pokepay_partner_ruby_sdk 0.1.8 → 0.1.12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (29) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +4 -4
  3. data/docs/index.md +1673 -318
  4. data/lib/pokepay_partner_ruby_sdk.rb +18 -0
  5. data/lib/pokepay_partner_ruby_sdk/client.rb +1 -1
  6. data/lib/pokepay_partner_ruby_sdk/request/cancel_cashtray.rb +15 -0
  7. data/lib/pokepay_partner_ruby_sdk/request/create_cashtray.rb +17 -0
  8. data/lib/pokepay_partner_ruby_sdk/request/create_shop_v2.rb +15 -0
  9. data/lib/pokepay_partner_ruby_sdk/request/get_bulk_transaction.rb +15 -0
  10. data/lib/pokepay_partner_ruby_sdk/request/get_cashtray.rb +15 -0
  11. data/lib/pokepay_partner_ruby_sdk/request/get_customer_accounts.rb +15 -0
  12. data/lib/pokepay_partner_ruby_sdk/request/get_private_moneys.rb +15 -0
  13. data/lib/pokepay_partner_ruby_sdk/request/get_shop.rb +15 -0
  14. data/lib/pokepay_partner_ruby_sdk/request/get_shop_accounts.rb +15 -0
  15. data/lib/pokepay_partner_ruby_sdk/request/refund_transaction.rb +2 -2
  16. data/lib/pokepay_partner_ruby_sdk/request/update_cashtray.rb +15 -0
  17. data/lib/pokepay_partner_ruby_sdk/request/update_shop.rb +15 -0
  18. data/lib/pokepay_partner_ruby_sdk/response/bulk_transaction.rb +6 -0
  19. data/lib/pokepay_partner_ruby_sdk/response/cashtray.rb +24 -0
  20. data/lib/pokepay_partner_ruby_sdk/response/cashtray_attempt.rb +20 -0
  21. data/lib/pokepay_partner_ruby_sdk/response/cashtray_with_result.rb +30 -0
  22. data/lib/pokepay_partner_ruby_sdk/response/paginated_account_with_users.rb +16 -0
  23. data/lib/pokepay_partner_ruby_sdk/response/paginated_private_moneys.rb +16 -0
  24. data/lib/pokepay_partner_ruby_sdk/response/private_money.rb +0 -2
  25. data/lib/pokepay_partner_ruby_sdk/response/shop_account.rb +20 -0
  26. data/lib/pokepay_partner_ruby_sdk/response/shop_with_accounts.rb +27 -0
  27. data/lib/pokepay_partner_ruby_sdk/version.rb +1 -1
  28. data/partner.yaml +1232 -224
  29. metadata +24 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4820f2638f0bc46dd7d401e8d0d488ee8ebe763f0e1664cc872113ff1a9e45a8
4
- data.tar.gz: 7fe61418ef2c499d79a261b02209924579d1f16bbf224a2cfd7775d6291ed465
3
+ metadata.gz: 29e82aafd1c708679e2c6f7e105ff14ec9e8421d4359bfcf85d7ba2c0d97c23c
4
+ data.tar.gz: c7a2c9ff483d47310743125720676185715911b92c7649f964ac1861e8e3945a
5
5
  SHA512:
6
- metadata.gz: b2e5b0bd0c12fd7ab88b51e328cb39a3eff5d3c35c443f336affae2e9591567dc261335f5683f467b8b550b049662d9aa0b8aa7e45185561d138f71258cb8d0b
7
- data.tar.gz: a66eb0bfe7ffbc70b581d3f10cce063dc67ce594846d4a1ce541e2c367a2f0643fef79cc769831e8a7afe2b69f6645a068a0d2d55c5cfd6331fbf9939034b445
6
+ metadata.gz: 2216d1f635b7f055a7ad5ab4aaa6bf74f1ad37a6881bbc19c78055ae8eef432131337f08381518b3d76ac8ed41db6815acc8f71815881c25ddc7b8e32e205058
7
+ data.tar.gz: 7c319558191d00a643c9eef445fa1af4534f03d769fec4b2851257ee9100f0335d31bb4e2846f7f2bcfe7c152afbc14357ae8311aa68db15c7723bc188b9820c
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- pokepay_partner_ruby_sdk (0.1.8)
4
+ pokepay_partner_ruby_sdk (0.1.12)
5
5
  inifile (~> 3.0.0)
6
6
  json (~> 2.3.0)
7
7
  openssl (~> 2.1.2)
@@ -11,8 +11,8 @@ GEM
11
11
  specs:
12
12
  inifile (3.0.0)
13
13
  ipaddr (1.2.2)
14
- json (2.3.0)
15
- minitest (5.14.0)
14
+ json (2.3.1)
15
+ minitest (5.14.4)
16
16
  openssl (2.1.2)
17
17
  ipaddr
18
18
  rake (13.0.1)
@@ -27,4 +27,4 @@ DEPENDENCIES
27
27
  rake (~> 13.0)
28
28
 
29
29
  BUNDLED WITH
30
- 2.1.4
30
+ 2.2.3
data/docs/index.md CHANGED
@@ -142,25 +142,275 @@ response.body
142
142
  <a name="api-operations"></a>
143
143
  ## API Operations
144
144
 
145
+ - [ListTransactions](#list-transactions): 取引履歴を取得する
146
+ - [CreateTransaction](#create-transaction): チャージする(廃止予定)
147
+ - [CreateTopupTransaction](#create-topup-transaction): チャージする
148
+ - [CreatePaymentTransaction](#create-payment-transaction): 支払いする
149
+ - [CreateTransferTransaction](#create-transfer-transaction): 個人間送金
150
+ - [CreateExchangeTransaction](#create-exchange-transaction):
151
+ - [GetTransaction](#get-transaction): 取引情報を取得する
152
+ - [RefundTransaction](#refund-transaction): 返金する
153
+ - [ListTransfers](#list-transfers):
154
+ - [CreateTopupTransactionWithCheck](#create-topup-transaction-with-check): チャージQRコードを読み取ることでチャージする
155
+ - [ListBills](#list-bills): 支払いQRコード一覧を表示する
156
+ - [CreateBill](#create-bill): 支払いQRコードの発行
157
+ - [UpdateBill](#update-bill): 支払いQRコードの更新
158
+ - [CreateCashtray](#create-cashtray): Cashtrayを作る
159
+ - [GetCashtray](#get-cashtray): Cashtrayの情報を取得する
160
+ - [CancelCashtray](#cancel-cashtray): Cashtrayを無効化する
161
+ - [UpdateCashtray](#update-cashtray): Cashtrayの情報を更新する
162
+ - [GetAccount](#get-account): ウォレット情報を表示する
163
+ - [UpdateAccount](#update-account): ウォレット情報を更新する
164
+ - [ListAccountBalances](#list-account-balances): エンドユーザーの残高内訳を表示する
165
+ - [ListAccountExpiredBalances](#list-account-expired-balances): エンドユーザーの失効済みの残高内訳を表示する
166
+ - [GetCustomerAccounts](#get-customer-accounts): エンドユーザーのウォレット一覧を表示する
167
+ - [CreateCustomerAccount](#create-customer-account): 新規エンドユーザーウォレットを追加する
168
+ - [GetShopAccounts](#get-shop-accounts): 店舗ユーザーのウォレット一覧を表示する
169
+ - [ListCustomerTransactions](#list-customer-transactions): 取引履歴を取得する
170
+ - [ListShops](#list-shops): 店舗一覧を取得する
171
+ - [CreateShop](#create-shop): 新規店舗を追加する(廃止予定)
172
+ - [CreateShopV2](#create-shop-v2): 新規店舗を追加する
173
+ - [GetShop](#get-shop): 店舗情報を表示する
174
+ - [UpdateShop](#update-shop): 店舗情報を更新する
175
+ - [ListUserAccounts](#list-user-accounts): エンドユーザー、店舗ユーザーのウォレット一覧を表示する
176
+ - [GetPrivateMoneys](#get-private-moneys): マネー一覧を取得する
177
+ - [GetPrivateMoneyOrganizationSummaries](#get-private-money-organization-summaries): 決済加盟店の取引サマリを取得する
178
+ - [BulkCreateTransaction](#bulk-create-transaction): CSVファイル一括取引
145
179
  ### Transaction
146
-
147
- #### 取引情報を取得する
148
- 取引を取得します。
180
+ <a name="list-transactions"></a>
181
+ #### 取引履歴を取得する
182
+ 取引一覧を返します。
149
183
  ```ruby
150
- response = $client.send(Pokepay::Request::GetTransaction.new(
151
- "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" # transaction_id: 取引ID
184
+ response = $client.send(Pokepay::Request::ListTransactions.new(
185
+ from: "2019-11-15T06:49:18.000000+09:00", # 開始日時
186
+ to: "2017-11-14T20:55:11.000000+09:00", # 終了日時
187
+ page: 1, # ページ番号
188
+ per_page: 50, # 1ページ分の取引数
189
+ shop_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # 店舗ID
190
+ customer_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # エンドユーザーID
191
+ customer_name: "太郎", # エンドユーザー名
192
+ terminal_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # 端末ID
193
+ transaction_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # 取引ID
194
+ organization_code: "pocketchange", # 組織コード
195
+ private_money_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # マネーID
196
+ is_modified: false, # キャンセルフラグ
197
+ types: ["topup", "payment"], # 取引種別 (複数指定可)、チャージ=topup、支払い=payment
198
+ description: "店頭QRコードによる支払い" # 取引説明文
152
199
  ))
153
200
  ```
154
201
 
202
+ ---
203
+ `from`
204
+ ```json
205
+ {
206
+ "type": "string",
207
+ "format": "date-time"
208
+ }
209
+ ```
210
+ 抽出期間の開始日時です。
211
+
212
+ フィルターとして使われ、開始日時以降に発生した取引のみ一覧に表示されます。
213
+
214
+ ---
215
+ `to`
216
+ ```json
217
+ {
218
+ "type": "string",
219
+ "format": "date-time"
220
+ }
221
+ ```
222
+ 抽出期間の終了日時です。
223
+
224
+ フィルターとして使われ、終了日時以前に発生した取引のみ一覧に表示されます。
225
+
226
+ ---
227
+ `page`
228
+ ```json
229
+ {
230
+ "type": "integer",
231
+ "minimum": 1
232
+ }
233
+ ```
234
+ 取得したいページ番号です。
235
+
236
+ ---
237
+ `per_page`
238
+ ```json
239
+ {
240
+ "type": "integer",
241
+ "minimum": 1
242
+ }
243
+ ```
244
+ 1ページ分の取引数です。
245
+
246
+ ---
247
+ `shop_id`
248
+ ```json
249
+ {
250
+ "type": "string",
251
+ "format": "uuid"
252
+ }
253
+ ```
254
+ 店舗IDです。
255
+
256
+ フィルターとして使われ、指定された店舗での取引のみ一覧に表示されます。
257
+
258
+ ---
259
+ `customer_id`
260
+ ```json
261
+ {
262
+ "type": "string",
263
+ "format": "uuid"
264
+ }
265
+ ```
266
+ エンドユーザーIDです。
267
+
268
+ フィルターとして使われ、指定されたエンドユーザーでの取引のみ一覧に表示されます。
269
+
270
+ ---
271
+ `customer_name`
272
+ ```json
273
+ {
274
+ "type": "string",
275
+ "maxLength": 256
276
+ }
277
+ ```
278
+ エンドユーザー名です。
279
+
280
+ フィルターとして使われ、入力された名前に部分一致するエンドユーザーでの取引のみ一覧に表示されます。
281
+
282
+ ---
283
+ `terminal_id`
284
+ ```json
285
+ {
286
+ "type": "string",
287
+ "format": "uuid"
288
+ }
289
+ ```
290
+ 端末IDです。
291
+
292
+ フィルターとして使われ、指定された端末での取引のみ一覧に表示されます。
293
+
155
294
  ---
156
295
  `transaction_id`
296
+ ```json
297
+ {
298
+ "type": "string",
299
+ "format": "uuid"
300
+ }
301
+ ```
157
302
  取引IDです。
158
303
 
159
- フィルターとして使われ、指定した取引IDの取引を取得します。
304
+ フィルターとして使われ、指定された取引のみ一覧に表示されます。
160
305
 
161
306
  ---
162
- 成功したときは[Transaction](#transaction)オブジェクトを返します
307
+ `organization_code`
308
+ ```json
309
+ {
310
+ "type": "string",
311
+ "maxLength": 32,
312
+ "pattern": "^[a-zA-Z0-9-]*$"
313
+ }
314
+ ```
315
+ 組織コードです。
316
+
317
+ フィルターとして使われ、指定された組織での取引のみ一覧に表示されます。
318
+
319
+ ---
320
+ `private_money_id`
321
+ ```json
322
+ {
323
+ "type": "string",
324
+ "format": "uuid"
325
+ }
326
+ ```
327
+ マネーIDです。
328
+
329
+ フィルターとして使われ、指定したマネーでの取引のみ一覧に表示されます。
330
+
331
+ ---
332
+ `is_modified`
333
+ ```json
334
+ { "type": "boolean" }
335
+ ```
336
+ キャンセルフラグです。
337
+
338
+ これにtrueを指定するとキャンセルされた取引のみ一覧に表示されます。
339
+ デフォルト値はfalseで、キャンセルの有無にかかわらず一覧に表示されます。
340
+
341
+ ---
342
+ `types`
343
+ ```json
344
+ {
345
+ "type": "array",
346
+ "items": {
347
+ "type": "string",
348
+ "enum": {
349
+ "topup": "payment",
350
+ "exchange_outflow": "exchange_inflow"
351
+ }
352
+ }
353
+ }
354
+ ```
355
+ 取引の種類でフィルターします。
356
+
357
+ 以下の種類を指定できます。
358
+
359
+ 1. topup
360
+ 店舗からエンドユーザーへの送金取引(チャージ)
361
+
362
+ 2. payment
363
+ エンドユーザーから店舗への送金取引(支払い)
364
+
365
+ 3. exchange-outflow
366
+   他マネーへの流出
367
+
368
+ 4. exchange-inflow
369
+ 他マネーからの流入
370
+
371
+ ---
372
+ `description`
373
+ ```json
374
+ {
375
+ "type": "string",
376
+ "maxLength": 200
377
+ }
378
+ ```
379
+ 取引を指定の取引説明文でフィルターします。
380
+
381
+ 取引説明文が完全一致する取引のみ抽出されます。取引説明文は最大200文字で記録されています。
382
+
383
+ ---
384
+ 成功したときは[PaginatedTransaction](#paginated-transaction)オブジェクトを返します
385
+ <a name="create-transaction"></a>
386
+ #### チャージする(廃止予定)
387
+ チャージ取引を作成します。このAPIは廃止予定です。以降は `CreateTopupTransaction` を使用してください。
388
+ ```ruby
389
+ response = $client.send(Pokepay::Request::CreateTransaction.new(
390
+ "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
391
+ "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
392
+ "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
393
+ money_amount: 2372,
394
+ point_amount: 450,
395
+ point_expires_at: "2023-01-18T09:59:31.000000+09:00", # ポイント有効期限
396
+ description: "WPKCwbirzvScUvjsqVkcSInvOjFPIL9qlVMwg0ANEHCj5eM805Swtsg2NkJB"
397
+ ))
398
+ ```
399
+
400
+ ---
401
+ `point_expires_at`
402
+ ```json
403
+ {
404
+ "type": "string",
405
+ "format": "date-time"
406
+ }
407
+ ```
408
+ ポイントをチャージした場合の、付与されるポイントの有効期限です。
409
+ 省略した場合はマネーに設定された有効期限と同じものがポイントの有効期限となります。
163
410
 
411
+ ---
412
+ 成功したときは[Transaction](#transaction)オブジェクトを返します
413
+ <a name="create-topup-transaction"></a>
164
414
  #### チャージする
165
415
  チャージ取引を作成します。
166
416
  ```ruby
@@ -169,57 +419,111 @@ response = $client.send(Pokepay::Request::CreateTopupTransaction.new(
169
419
  "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # customer_id: エンドユーザーのID
170
420
  "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # private_money_id: マネーID
171
421
  bear_point_shop_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # ポイント支払時の負担店舗ID
172
- money_amount: 9829, # マネー額
173
- point_amount: 3839, # ポイント額
422
+ money_amount: 8235, # マネー額
423
+ point_amount: 2326, # ポイント額
424
+ point_expires_at: "2024-09-08T13:01:58.000000+09:00", # ポイント有効期限
174
425
  description: "初夏のチャージキャンペーン" # 取引履歴に表示する説明文
175
426
  ))
176
427
  ```
177
428
 
178
429
  ---
179
430
  `shop_id`
431
+ ```json
432
+ {
433
+ "type": "string",
434
+ "format": "uuid"
435
+ }
436
+ ```
180
437
  店舗IDです。
181
438
 
182
439
  送金元の店舗を指定します。
183
440
 
184
441
  ---
185
442
  `customer_id`
443
+ ```json
444
+ {
445
+ "type": "string",
446
+ "format": "uuid"
447
+ }
448
+ ```
186
449
  エンドユーザーIDです。
187
450
 
188
451
  送金先のエンドユーザーを指定します。
189
452
 
190
453
  ---
191
454
  `private_money_id`
455
+ ```json
456
+ {
457
+ "type": "string",
458
+ "format": "uuid"
459
+ }
460
+ ```
192
461
  マネーIDです。
193
462
 
194
463
  マネーを指定します。
195
464
 
196
465
  ---
197
466
  `bear_point_shop_id`
467
+ ```json
468
+ {
469
+ "type": "string",
470
+ "format": "uuid"
471
+ }
472
+ ```
198
473
  ポイント支払時の負担店舗IDです。
199
474
 
200
475
  ポイント支払い時に実際お金を負担する店舗を指定します。
201
476
 
202
477
  ---
203
478
  `money_amount`
479
+ ```json
480
+ {
481
+ "type": "number",
482
+ "minimum": 0
483
+ }
484
+ ```
204
485
  マネー額です。
205
486
 
206
487
  送金するマネー額を指定します。
207
488
 
208
489
  ---
209
490
  `point_amount`
491
+ ```json
492
+ {
493
+ "type": "number",
494
+ "minimum": 0
495
+ }
496
+ ```
210
497
  ポイント額です。
211
498
 
212
499
  送金するポイント額を指定します。
213
500
 
501
+ ---
502
+ `point_expires_at`
503
+ ```json
504
+ {
505
+ "type": "string",
506
+ "format": "date-time"
507
+ }
508
+ ```
509
+ ポイントをチャージした場合の、付与されるポイントの有効期限です。
510
+ 省略した場合はマネーに設定された有効期限と同じものがポイントの有効期限となります。
511
+
214
512
  ---
215
513
  `description`
514
+ ```json
515
+ {
516
+ "type": "string",
517
+ "maxLength": 200
518
+ }
519
+ ```
216
520
  取引説明文です。
217
521
 
218
522
  任意入力で、取引履歴に表示される説明文です。
219
523
 
220
524
  ---
221
525
  成功したときは[Transaction](#transaction)オブジェクトを返します
222
-
526
+ <a name="create-payment-transaction"></a>
223
527
  #### 支払いする
224
528
  支払取引を作成します。
225
529
  支払い時には、エンドユーザーの残高のうち、ポイント残高から優先的に消費されます。
@@ -229,44 +533,74 @@ response = $client.send(Pokepay::Request::CreatePaymentTransaction.new(
229
533
  "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # shop_id: 店舗ID
230
534
  "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # customer_id: エンドユーザーID
231
535
  "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # private_money_id: マネーID
232
- 9578, # amount: 支払い額
536
+ 6084, # amount: 支払い額
233
537
  description: "たい焼き(小倉)" # 取引履歴に表示する説明文
234
538
  ))
235
539
  ```
236
540
 
237
541
  ---
238
542
  `shop_id`
543
+ ```json
544
+ {
545
+ "type": "string",
546
+ "format": "uuid"
547
+ }
548
+ ```
239
549
  店舗IDです。
240
550
 
241
551
  送金先の店舗を指定します。
242
552
 
243
553
  ---
244
554
  `customer_id`
555
+ ```json
556
+ {
557
+ "type": "string",
558
+ "format": "uuid"
559
+ }
560
+ ```
245
561
  エンドユーザーIDです。
246
562
 
247
563
  送金元のエンドユーザーを指定します。
248
564
 
249
565
  ---
250
566
  `private_money_id`
567
+ ```json
568
+ {
569
+ "type": "string",
570
+ "format": "uuid"
571
+ }
572
+ ```
251
573
  マネーIDです。
252
574
 
253
575
  マネーを指定します。
254
576
 
255
577
  ---
256
578
  `amount`
579
+ ```json
580
+ {
581
+ "type": "number",
582
+ "minimum": 0
583
+ }
584
+ ```
257
585
  マネー額です。
258
586
 
259
587
  送金するマネー額を指定します。
260
588
 
261
589
  ---
262
590
  `description`
591
+ ```json
592
+ {
593
+ "type": "string",
594
+ "maxLength": 200
595
+ }
596
+ ```
263
597
  取引説明文です。
264
598
 
265
599
  任意入力で、取引履歴に表示される説明文です。
266
600
 
267
601
  ---
268
602
  成功したときは[Transaction](#transaction)オブジェクトを返します
269
-
603
+ <a name="create-transfer-transaction"></a>
270
604
  #### 個人間送金
271
605
  エンドユーザー間での送金取引(個人間送金)を作成します。
272
606
  個人間送金で送れるのはマネーのみで、ポイントを送ることはできません。送金元のマネー残高のうち、有効期限が最も遠いものから順に送金されます。
@@ -276,154 +610,109 @@ response = $client.send(Pokepay::Request::CreateTransferTransaction.new(
276
610
  "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # sender_id: 送金元ユーザーID
277
611
  "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # receiver_id: 受取ユーザーID
278
612
  "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # private_money_id: マネーID
279
- 2298, # amount: 送金額
613
+ 9336, # amount: 送金額
280
614
  description: "たい焼き(小倉)" # 取引履歴に表示する説明文
281
615
  ))
282
616
  ```
283
617
 
284
618
  ---
285
619
  `sender_id`
620
+ ```json
621
+ {
622
+ "type": "string",
623
+ "format": "uuid"
624
+ }
625
+ ```
286
626
  エンドユーザーIDです。
287
627
 
288
628
  送金元のエンドユーザー(送り主)を指定します。
289
629
 
290
630
  ---
291
631
  `receiver_id`
632
+ ```json
633
+ {
634
+ "type": "string",
635
+ "format": "uuid"
636
+ }
637
+ ```
292
638
  エンドユーザーIDです。
293
639
 
294
640
  送金先のエンドユーザー(受け取り人)を指定します。
295
641
 
296
642
  ---
297
643
  `private_money_id`
644
+ ```json
645
+ {
646
+ "type": "string",
647
+ "format": "uuid"
648
+ }
649
+ ```
298
650
  マネーIDです。
299
651
 
300
652
  マネーを指定します。
301
653
 
302
654
  ---
303
655
  `amount`
656
+ ```json
657
+ {
658
+ "type": "number",
659
+ "minimum": 0
660
+ }
661
+ ```
304
662
  マネー額です。
305
663
 
306
664
  送金するマネー額を指定します。
307
665
 
308
666
  ---
309
667
  `description`
668
+ ```json
669
+ {
670
+ "type": "string",
671
+ "maxLength": 200
672
+ }
673
+ ```
310
674
  取引説明文です。
311
675
 
312
676
  任意入力で、取引履歴に表示される説明文です。
313
677
 
314
678
  ---
315
679
  成功したときは[Transaction](#transaction)オブジェクトを返します
316
-
317
- #### 取引履歴を取得する
318
- 取引一覧を返します。
680
+ <a name="create-exchange-transaction"></a>
681
+ ####
319
682
  ```ruby
320
- response = $client.send(Pokepay::Request::ListTransactions.new(
321
- from: "2022-12-14T10:46:43.000000+09:00", # 開始日時
322
- to: "2024-01-27T16:51:48.000000+09:00", # 終了日時
323
- page: 1, # ページ番号
324
- per_page: 50, # 1ページ分の取引数
325
- shop_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # 店舗ID
326
- customer_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # エンドユーザーID
327
- customer_name: "太郎", # エンドユーザー名
328
- terminal_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # 端末ID
329
- transaction_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # 取引ID
330
- organization_code: "pocketchange", # 組織コード
331
- private_money_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # マネーID
332
- is_modified: true, # キャンセルフラグ
333
- types: ["topup", "payment"] # 取引種別 (複数指定可)、チャージ=topup、支払い=payment
683
+ response = $client.send(Pokepay::Request::CreateExchangeTransaction.new(
684
+ "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
685
+ "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
686
+ "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
687
+ 7953,
688
+ description: "WoqdLq3QmHRbZpwbPRidVG7B6hajGJrCJBxTKH0Y"
689
+ ))
690
+ ```
691
+ 成功したときは[Transaction](#transaction)オブジェクトを返します
692
+ <a name="get-transaction"></a>
693
+ #### 取引情報を取得する
694
+ 取引を取得します。
695
+ ```ruby
696
+ response = $client.send(Pokepay::Request::GetTransaction.new(
697
+ "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" # transaction_id: 取引ID
334
698
  ))
335
699
  ```
336
-
337
- ---
338
- `from`
339
- 抽出期間の開始日時です。
340
-
341
- フィルターとして使われ、開始日時以降に発生した取引のみ一覧に表示されます。
342
-
343
- ---
344
- `to`
345
- 抽出期間の終了日時です。
346
-
347
- フィルターとして使われ、終了日時以前に発生した取引のみ一覧に表示されます。
348
-
349
- ---
350
- `page`
351
- 取得したいページ番号です。
352
-
353
- ---
354
- `per_page`
355
- 1ページ分の取引数です。
356
-
357
- ---
358
- `shop_id`
359
- 店舗IDです。
360
-
361
- フィルターとして使われ、指定された店舗での取引のみ一覧に表示されます。
362
-
363
- ---
364
- `customer_id`
365
- エンドユーザーIDです。
366
-
367
- フィルターとして使われ、指定されたエンドユーザーでの取引のみ一覧に表示されます。
368
-
369
- ---
370
- `customer_name`
371
- エンドユーザー名です。
372
-
373
- フィルターとして使われ、入力された名前に部分一致するエンドユーザーでの取引のみ一覧に表示されます。
374
-
375
- ---
376
- `terminal_id`
377
- 端末IDです。
378
-
379
- フィルターとして使われ、指定された端末での取引のみ一覧に表示されます。
380
700
 
381
701
  ---
382
702
  `transaction_id`
703
+ ```json
704
+ {
705
+ "type": "string",
706
+ "format": "uuid"
707
+ }
708
+ ```
383
709
  取引IDです。
384
710
 
385
- フィルターとして使われ、指定された取引のみ一覧に表示されます。
386
-
387
- ---
388
- `organization_code`
389
- 組織コードです。
390
-
391
- フィルターとして使われ、指定された組織での取引のみ一覧に表示されます。
392
-
393
- ---
394
- `private_money_id`
395
- マネーIDです。
396
-
397
- フィルターとして使われ、指定したマネーでの取引のみ一覧に表示されます。
398
-
399
- ---
400
- `is_modified`
401
- キャンセルフラグです。
402
-
403
- これにtrueを指定するとキャンセルされた取引のみ一覧に表示されます。
404
- デフォルト値はfalseで、キャンセルの有無にかかわらず一覧に表示されます。
405
-
406
- ---
407
- `types`
408
- 取引の種類でフィルターします。
409
-
410
- 以下の種類を指定できます。
411
-
412
- 1. topup
413
- 店舗からエンドユーザーへの送金取引(チャージ)
414
-
415
- 2. payment
416
- エンドユーザーから店舗への送金取引(支払い)
417
-
418
- 3. exchange-outflow
419
-   他マネーへの流出
420
-
421
- 4. exchange-inflow
422
- 他マネーからの流入
711
+ フィルターとして使われ、指定した取引IDの取引を取得します。
423
712
 
424
713
  ---
425
- 成功したときは[PaginatedTransaction](#paginated-transaction)オブジェクトを返します
426
-
714
+ 成功したときは[Transaction](#transaction)オブジェクトを返します
715
+ <a name="refund-transaction"></a>
427
716
  #### 返金する
428
717
  ```ruby
429
718
  response = $client.send(Pokepay::Request::RefundTransaction.new(
@@ -431,56 +720,90 @@ response = $client.send(Pokepay::Request::RefundTransaction.new(
431
720
  description: "返品対応のため" # 取引履歴に表示する返金事由
432
721
  ))
433
722
  ```
434
- 成功したときは[Transfer](#transfer)オブジェクトを返します
723
+ 成功したときは[Transaction](#transaction)オブジェクトを返します
724
+ <a name="list-transfers"></a>
725
+ ####
726
+ ```ruby
727
+ response = $client.send(Pokepay::Request::ListTransfers.new(
728
+ from: "2021-03-24T05:27:59.000000+09:00",
729
+ to: "2025-05-30T13:08:03.000000+09:00",
730
+ page: 2222,
731
+ per_page: 5540,
732
+ shop_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
733
+ shop_name: "8iwJJuJPCjlaztijN3vebjT869RjYRPCqvnZ1YzdrhGH7XKNoGDpqqjYUa42NN7jWbTA8sT9CjYdhYyR9ZtWhMAKSZHQ2Tjahc0hASAcEibjku1fdQetgL0O7DlAFrkXVihIdQWu7J4NYirXryPP6taqbm6hsnA9hELkacVB4dzDqQ1LbTyVIgVP7fIz1xemnrDx9P7HPwLX5lwWZKuWWf4n5wNPq2rj",
734
+ customer_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
735
+ customer_name: "28QfQLnQ9Qr2gs4rAyEVt2ws7WkJzpgGUX4mtxobZ9ZCpNJGZG6LzTWIbd8ZNVrafdiivNn4NbNLXIdoiqtrelImUNmLeKEfXUc2dQExu22E4bXnTsrAuXzcUztcjpDcIzv8TjKb1dIcQKtgPEpt9Ynsu0LI4T70lQwB453YpOK96EoFGxVJNTeRlFM4Xw2YneFRtau24yc1kus",
736
+ transaction_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
737
+ private_money_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
738
+ is_modified: true,
739
+ transaction_types: ["exchange", "transfer", "topup"],
740
+ transfer_types: ["transfer"], # 取引明細の種類でフィルターします。
741
+ description: "店頭QRコードによる支払い" # 取引詳細説明文
742
+ ))
743
+ ```
435
744
 
436
- ### チャージQRコード
745
+ ---
746
+ `transfer_types`
747
+ ```json
748
+ {
749
+ "type": "array",
750
+ "items": {
751
+ "type": "string",
752
+ "enum": {
753
+ "topup": "payment",
754
+ "exchange": "transfer",
755
+ "coupon": "campaign"
756
+ }
757
+ }
758
+ }
759
+ ```
760
+ 取引明細の種類でフィルターします。
437
761
 
438
- 店舗ユーザが発行し、エンドユーザがポケペイアプリから読み取ることでチャージ取引が発生するQRコードです。
762
+ 以下の種類を指定できます。
439
763
 
440
- チャージQRコードを解析すると次のようなURLになります(URLは環境によって異なります)。
764
+ 1. topup
765
+ 店舗からエンドユーザーへの送金取引(チャージ)、またはそのキャンセル取引
441
766
 
442
- `https://www-sandbox.pokepay.jp/checks/xxxxxxxx-xxxx-xxxxxxxxx-xxxxxxxxxxxx`
767
+ 2. payment
768
+ エンドユーザーから店舗への送金取引(支払い)、またはそのキャンセル取引
443
769
 
444
- QRコードを読み取る方法以外にも、このURLリンクを直接スマートフォン(iOS/Android)上で開くことによりアプリが起動して取引が行われます。(注意: 上記URLはsandbox環境であるため、アプリもsandbox環境のものである必要があります) 上記URL中の `xxxxxxxx-xxxx-xxxxxxxxx-xxxxxxxxxxxx` の部分がチャージQRコードのIDです。
770
+ 3. exchange
771
+ 他マネーへの流出/流入
445
772
 
446
- #### チャージQRコードの発行
447
- ```ruby
448
- response = $client.send(Pokepay::Request::CreateCheck.new(
449
- "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # account_id: 送金元の店舗アカウントID
450
- money_amount: 4826, # 付与マネー額
451
- point_amount: 2394, # 付与ポイント額
452
- description: "test check", # 説明文(アプリ上で取引の説明文として表示される)
453
- is_onetime: true, # ワンタイムかどうか。真の場合1度読み込まれた時点でそのチャージQRは失効する(デフォルト値は真)
454
- usage_limit: 3826, # ワンタイムでない場合、複数ユーザから読み取られ得る。その場合の最大読み取り回数
455
- expires_at: "2019-02-22T16:57:44.000000+09:00", # チャージQR自体の失効日時
456
- point_expires_at: "2024-02-13T17:41:07.000000+09:00", # チャージQRによって付与されるポイントの失効日時
457
- point_expires_in_days: 60, # チャージQRによって付与されるポイントの有効期限(相対指定、単位は日)
458
- bear_point_account: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" # ポイント額を負担する店舗アカウントのID
459
- ))
460
- ```
461
- `money_amount`と`point_amount`の少なくとも一方は指定する必要があります。
773
+ 4. campaign
774
+ 取引に対するポイント還元キャンペーンによるポイント付与、またはそのキャンセル取引
462
775
 
776
+ 5. coupon
777
+ クーポンによる値引き処理、またはそのキャンセル取引
463
778
 
464
779
  ---
465
- `is_onetime`
466
- チャージQRコードが一度の読み取りで失効するときに`true`にします。デフォルト値は`true`です。
467
- `false`の場合、そのチャージQRコードは1ユーザについては1回きりですが、複数ユーザによって読み取り可能なQRコードになります。
780
+ `description`
781
+ ```json
782
+ {
783
+ "type": "string",
784
+ "maxLength": 200
785
+ }
786
+ ```
787
+ 取引詳細を指定の取引詳細説明文でフィルターします。
468
788
 
789
+ 取引詳細説明文が完全一致する取引のみ抽出されます。取引詳細説明文は最大200文字で記録されています。
469
790
 
470
791
  ---
471
- `usage_limit`
472
- 複数ユーザによって読み取り可能なチャージQRコードの読み取り回数に制限をつけるために指定します。
473
- 省略すると無制限に読み取り可能なチャージQRコードになります。
474
- チャージQRコードは管理画面からいつでも無効化(有効化)することができます。
792
+ 成功したときは[PaginatedTransfers](#paginated-transfers)オブジェクトを返します
793
+ ### Check
794
+ 店舗ユーザが発行し、エンドユーザーがポケペイアプリから読み取ることでチャージ取引が発生するQRコードです。
475
795
 
796
+ チャージQRコードを解析すると次のようなURLになります(URLは環境によって異なります)。
476
797
 
477
- ---
478
- 成功したときは[Check](#check)オブジェクトを返します
798
+ `https://www-sandbox.pokepay.jp/checks/xxxxxxxx-xxxx-xxxxxxxxx-xxxxxxxxxxxx`
799
+
800
+ QRコードを読み取る方法以外にも、このURLリンクを直接スマートフォン(iOS/Android)上で開くことによりアプリが起動して取引が行われます。(注意: 上記URLはsandbox環境であるため、アプリもsandbox環境のものである必要があります) 上記URL中の `xxxxxxxx-xxxx-xxxxxxxxx-xxxxxxxxxxxx` の部分がチャージQRコードのIDです。
479
801
 
802
+ <a name="create-topup-transaction-with-check"></a>
480
803
  #### チャージQRコードを読み取ることでチャージする
481
- 通常チャージQRコードはエンドユーザのアプリによって読み取られ、アプリとポケペイサーバとの直接通信によって取引が作られます。 もしエンドユーザとの通信をパートナーのサーバのみに限定したい場合、パートナーのサーバがチャージQRの情報をエンドユーザから代理受けして、サーバ間連携APIによって実際のチャージ取引をリクエストすることになります。
804
+ 通常チャージQRコードはエンドユーザーのアプリによって読み取られ、アプリとポケペイサーバとの直接通信によって取引が作られます。 もしエンドユーザーとの通信をパートナーのサーバのみに限定したい場合、パートナーのサーバがチャージQRの情報をエンドユーザーから代理受けして、サーバ間連携APIによって実際のチャージ取引をリクエストすることになります。
482
805
 
483
- エンドユーザから受け取ったチャージ用QRコードのIDをエンドユーザIDと共に渡すことでチャージ取引が作られます。
806
+ エンドユーザーから受け取ったチャージ用QRコードのIDをエンドユーザーIDと共に渡すことでチャージ取引が作られます。
484
807
 
485
808
  ```ruby
486
809
  response = $client.send(Pokepay::Request::CreateTopupTransactionWithCheck.new(
@@ -491,124 +814,218 @@ response = $client.send(Pokepay::Request::CreateTopupTransactionWithCheck.new(
491
814
 
492
815
  ---
493
816
  `check_id`
817
+ ```json
818
+ {
819
+ "type": "string",
820
+ "format": "uuid"
821
+ }
822
+ ```
494
823
  チャージ用QRコードのIDです。
495
824
 
496
825
  QRコード生成時に送金元店舗のウォレット情報や、送金額などが登録されています。
497
826
 
498
827
  ---
499
828
  `customer_id`
829
+ ```json
830
+ {
831
+ "type": "string",
832
+ "format": "uuid"
833
+ }
834
+ ```
500
835
  エンドユーザーIDです。
501
836
 
502
837
  送金先のエンドユーザーを指定します。
503
838
 
504
839
  ---
505
840
  成功したときは[Transaction](#transaction)オブジェクトを返します
506
-
507
- ### 支払いQRコード
508
-
841
+ ### Bill
842
+ 支払いQRコード
843
+ <a name="list-bills"></a>
509
844
  #### 支払いQRコード一覧を表示する
510
845
  支払いQRコード一覧を表示します。
511
846
  ```ruby
512
847
  response = $client.send(Pokepay::Request::ListBills.new(
513
- page: 6649, # ページ番号
514
- per_page: 2896, # 1ページの表示数
515
- bill_id: "3x6r1", # 支払いQRコードのID
848
+ page: 4039, # ページ番号
849
+ per_page: 6790, # 1ページの表示数
850
+ bill_id: "HNP", # 支払いQRコードのID
516
851
  private_money_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # マネーID
517
- organization_code: "70s2krAk--iSH3DW--7--d----N", # 組織コード
852
+ organization_code: "-v-7TmsnnC4-N1Sa1H", # 組織コード
518
853
  description: "test bill", # 取引説明文
519
- created_from: "2022-07-07T06:17:16.000000+09:00", # 作成日時(起点)
520
- created_to: "2024-09-06T18:44:09.000000+09:00", # 作成日時(終点)
854
+ created_from: "2018-10-12T16:21:05.000000+09:00", # 作成日時(起点)
855
+ created_to: "2021-01-23T14:16:21.000000+09:00", # 作成日時(終点)
521
856
  shop_name: "bill test shop1", # 店舗名
522
857
  shop_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # 店舗ID
523
- lower_limit_amount: 8780, # 金額の範囲によるフィルタ(下限)
524
- upper_limit_amount: 8338, # 金額の範囲によるフィルタ(上限)
525
- is_disabled: true # 支払いQRコードが無効化されているかどうか
858
+ lower_limit_amount: 9962, # 金額の範囲によるフィルタ(下限)
859
+ upper_limit_amount: 7245, # 金額の範囲によるフィルタ(上限)
860
+ is_disabled: false # 支払いQRコードが無効化されているかどうか
526
861
  ))
527
862
  ```
528
863
 
529
864
  ---
530
865
  `page`
866
+ ```json
867
+ {
868
+ "type": "integer",
869
+ "minimum": 1
870
+ }
871
+ ```
531
872
  取得したいページ番号です。
532
873
 
533
874
  ---
534
875
  `per_page`
876
+ ```json
877
+ {
878
+ "type": "integer",
879
+ "minimum": 1
880
+ }
881
+ ```
535
882
  1ページに表示する支払いQRコードの数です。
536
883
 
537
884
  ---
538
885
  `bill_id`
539
- 支払いQRコードのIDを指定して検索します。IDは部分一致で検索できます。
886
+ ```json
887
+ { "type": "string" }
888
+ ```
889
+ 支払いQRコードのIDを指定して検索します。IDは前方一致で検索されます。
540
890
 
541
891
  ---
542
892
  `private_money_id`
893
+ ```json
894
+ {
895
+ "type": "string",
896
+ "format": "uuid"
897
+ }
898
+ ```
543
899
  支払いQRコードの送金元ウォレットのマネーIDでフィルターします。
544
900
 
545
901
  ---
546
902
  `organization_code`
903
+ ```json
904
+ {
905
+ "type": "string",
906
+ "maxLength": 32,
907
+ "pattern": "^[a-zA-Z0-9-]*$"
908
+ }
909
+ ```
547
910
  支払いQRコードの送金元店舗が所属する組織の組織コードでフィルターします。
548
911
 
549
912
  ---
550
913
  `description`
914
+ ```json
915
+ {
916
+ "type": "string",
917
+ "maxLength": 200
918
+ }
919
+ ```
551
920
  支払いQRコードを読み取ることで作られた取引の説明文としてアプリなどに表示されます。
552
921
 
553
922
  ---
554
923
  `created_from`
924
+ ```json
925
+ {
926
+ "type": "string",
927
+ "format": "date-time"
928
+ }
929
+ ```
555
930
  支払いQRコードの作成日時でフィルターします。
556
931
 
557
932
  これ以降に作成された支払いQRコードのみ一覧に表示されます。
558
933
 
559
934
  ---
560
935
  `created_to`
936
+ ```json
937
+ {
938
+ "type": "string",
939
+ "format": "date-time"
940
+ }
941
+ ```
561
942
  支払いQRコードの作成日時でフィルターします。
562
943
 
563
944
  これ以前に作成された支払いQRコードのみ一覧に表示されます。
564
945
 
565
946
  ---
566
947
  `shop_name`
567
- 支払いQRコードを作成した店舗名でフィルターします。
948
+ ```json
949
+ {
950
+ "type": "string",
951
+ "maxLength": 256
952
+ }
953
+ ```
954
+ 支払いQRコードを作成した店舗名でフィルターします。店舗名は部分一致で検索されます。
568
955
 
569
956
  ---
570
957
  `shop_id`
958
+ ```json
959
+ {
960
+ "type": "string",
961
+ "format": "uuid"
962
+ }
963
+ ```
571
964
  支払いQRコードを作成した店舗IDでフィルターします。
572
965
 
573
966
  ---
574
967
  `lower_limit_amount`
968
+ ```json
969
+ {
970
+ "type": "integer",
971
+ "format": "decimal",
972
+ "minimum": 0
973
+ }
974
+ ```
575
975
  支払いQRコードの金額の下限を指定してフィルターします。
576
976
 
577
977
  ---
578
978
  `upper_limit_amount`
979
+ ```json
980
+ {
981
+ "type": "integer",
982
+ "format": "decimal",
983
+ "minimum": 0
984
+ }
985
+ ```
579
986
  支払いQRコードの金額の上限を指定してフィルターします。
580
987
 
581
988
  ---
582
989
  `is_disabled`
990
+ ```json
991
+ { "type": "boolean" }
992
+ ```
583
993
  支払いQRコードが無効化されているかどうかを表します。デフォルト値は偽(有効)です。
584
994
 
585
995
  ---
586
996
  成功したときは[PaginatedBills](#paginated-bills)オブジェクトを返します
587
-
997
+ <a name="create-bill"></a>
588
998
  #### 支払いQRコードの発行
589
999
  支払いQRコードの内容を更新します。支払い先の店舗ユーザーは指定したマネーのウォレットを持っている必要があります。
590
1000
  ```ruby
591
1001
  response = $client.send(Pokepay::Request::CreateBill.new(
592
1002
  "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # private_money_id: 支払いマネーのマネーID
593
1003
  "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # shop_id: 支払い先(受け取り人)の店舗ID
594
- amount: 9137, # 支払い額
1004
+ amount: 1206, # 支払い額
595
1005
  description: "test bill" # 説明文(アプリ上で取引の説明文として表示される)
596
1006
  ))
597
1007
  ```
598
1008
 
599
1009
  ---
600
1010
  `amount`
1011
+ ```json
1012
+ {
1013
+ "type": "number",
1014
+ "format": "decimal",
1015
+ "minimum": 0
1016
+ }
1017
+ ```
601
1018
  支払いQRコードを支払い額を指定します。省略するかnullを渡すと任意金額の支払いQRコードとなり、エンドユーザーがアプリで読み取った際に金額を入力します。
602
1019
 
603
1020
  ---
604
1021
  成功したときは[Bill](#bill)オブジェクトを返します
605
-
1022
+ <a name="update-bill"></a>
606
1023
  #### 支払いQRコードの更新
607
1024
  支払いQRコードの内容を更新します。パラメータは全て省略可能で、指定したもののみ更新されます。
608
1025
  ```ruby
609
1026
  response = $client.send(Pokepay::Request::UpdateBill.new(
610
1027
  "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # bill_id: 支払いQRコードのID
611
- amount: 8582, # 支払い額
1028
+ amount: 2363, # 支払い額
612
1029
  description: "test bill", # 説明文
613
1030
  is_disabled: false # 無効化されているかどうか
614
1031
  ))
@@ -616,52 +1033,275 @@ response = $client.send(Pokepay::Request::UpdateBill.new(
616
1033
 
617
1034
  ---
618
1035
  `bill_id`
1036
+ ```json
1037
+ {
1038
+ "type": "string",
1039
+ "format": "uuid"
1040
+ }
1041
+ ```
619
1042
  更新対象の支払いQRコードのIDです。
620
1043
 
621
1044
  ---
622
1045
  `amount`
1046
+ ```json
1047
+ {
1048
+ "type": "number",
1049
+ "format": "decimal",
1050
+ "minimum": 0
1051
+ }
1052
+ ```
623
1053
  支払いQRコードを支払い額を指定します。nullを渡すと任意金額の支払いQRコードとなり、エンドユーザーがアプリで読み取った際に金額を入力します。
624
1054
 
625
1055
  ---
626
1056
  `description`
1057
+ ```json
1058
+ {
1059
+ "type": "string",
1060
+ "maxLength": 200
1061
+ }
1062
+ ```
627
1063
  支払いQRコードの詳細説明文です。アプリ上で取引の説明文として表示されます。
628
1064
 
629
1065
  ---
630
1066
  `is_disabled`
1067
+ ```json
1068
+ { "type": "boolean" }
1069
+ ```
631
1070
  支払いQRコードが無効化されているかどうかを指定します。真にすると無効化され、偽にすると有効化します。
632
1071
 
633
1072
  ---
634
1073
  成功したときは[Bill](#bill)オブジェクトを返します
1074
+ ### Cashtray
1075
+ Cashtrayは支払いとチャージ両方に使えるQRコードで、店舗ユーザとエンドユーザーの間の主に店頭などでの取引のために用いられます。
1076
+ Cashtrayによる取引では、エンドユーザーがQRコードを読み取った時点で即時取引が作られ、ユーザに対して受け取り確認画面は表示されません。
1077
+ Cashtrayはワンタイムで、一度読み取りに成功するか、取引エラーになると失効します。
1078
+ また、Cashtrayには有効期限があり、デフォルトでは30分で失効します。
635
1079
 
636
- ### Customer
1080
+ <a name="create-cashtray"></a>
1081
+ #### Cashtrayを作る
1082
+ Cashtrayを作成します。
1083
+
1084
+ エンドユーザーに対して支払いまたはチャージを行う店舗の情報(店舗ユーザーIDとマネーID)と、取引金額が必須項目です。
1085
+ 店舗ユーザーIDとマネーIDから店舗ウォレットを特定します。
1086
+
1087
+ その他に、Cashtrayから作られる取引に対する説明文や失効時間を指定できます。
637
1088
 
638
- #### 新規エンドユーザーウォレットを追加する
639
- 指定したマネーのウォレットを作成し、同時にそのウォレットを保有するユーザも作成します。
640
1089
  ```ruby
641
- response = $client.send(Pokepay::Request::CreateCustomerAccount.new(
1090
+ response = $client.send(Pokepay::Request::CreateCashtray.new(
642
1091
  "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # private_money_id: マネーID
643
- user_name: "ポケペイ太郎", # ユーザー名
644
- account_name: "ポケペイ太郎のアカウント" # アカウント名
1092
+ "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # shop_id: 店舗ユーザーID
1093
+ 2185, # amount: 金額
1094
+ description: "たい焼き(小倉)", # 取引履歴に表示する説明文
1095
+ expires_in: 4327 # 失効時間(秒)
645
1096
  ))
646
1097
  ```
647
1098
 
648
1099
  ---
649
1100
  `private_money_id`
650
- マネーIDです。
1101
+ ```json
1102
+ {
1103
+ "type": "string",
1104
+ "format": "uuid"
1105
+ }
1106
+ ```
1107
+ 取引対象のマネーのIDです(必須項目)。
651
1108
 
652
- これによって作成するウォレットのマネーを指定します。
1109
+ ---
1110
+ `shop_id`
1111
+ ```json
1112
+ {
1113
+ "type": "string",
1114
+ "format": "uuid"
1115
+ }
1116
+ ```
1117
+ 店舗のユーザーIDです(必須項目)。
653
1118
 
654
1119
  ---
655
- `user_name`
656
- ウォレットと共に作成するユーザ名です。省略した場合は空文字となります。
1120
+ `amount`
1121
+ ```json
1122
+ { "type": "number" }
1123
+ ```
1124
+ マネー額です(必須項目)。
1125
+ 正の値を与えるとチャージになり、負の値を与えると支払いとなります。
657
1126
 
658
1127
  ---
659
- `account_name`
660
- 作成するウォレット名です。省略した場合は空文字となります。
1128
+ `description`
1129
+ ```json
1130
+ {
1131
+ "type": "string",
1132
+ "maxLength": 200
1133
+ }
1134
+ ```
1135
+ Cashtrayを読み取ったときに作られる取引の説明文です(最大200文字、任意項目)。
1136
+ アプリや管理画面などの取引履歴に表示されます。デフォルトでは空文字になります。
661
1137
 
662
1138
  ---
663
- 成功したときは[AccountWithUser](#account-with-user)オブジェクトを返します
1139
+ `expires_in`
1140
+ ```json
1141
+ {
1142
+ "type": "integer",
1143
+ "minimum": 1
1144
+ }
1145
+ ```
1146
+ Cashtrayが失効するまでの時間を秒単位で指定します(任意項目、デフォルト値は1800秒(30分))。
1147
+
1148
+ ---
1149
+ 成功したときは[Cashtray](#cashtray)オブジェクトを返します
1150
+ <a name="get-cashtray"></a>
1151
+ #### Cashtrayの情報を取得する
1152
+ Cashtrayの情報を取得します。
1153
+
1154
+ Cashtrayの現在の状態に加え、エンドユーザーのCashtray読み取りの試行結果、Cashtray読み取りによって作られた取引情報が取得できます。
1155
+
1156
+ レスポンス中の `attempt` には、このCashtrayをエンドユーザーが読み取った試行結果が入ります。
1157
+ `account` はエンドユーザーのウォレット情報です。
1158
+ 成功時には `attempt` 内の `status_code` に200が入ります。
1159
+
1160
+ まだCashtrayが読み取られていない場合は `attempt` の内容は `NULL` になります。
1161
+ エンドユーザーのCashtray読み取りの際には、様々なエラーが起き得ます。
1162
+ エラーの詳細は `attempt` 中の `error_type` と `error_message` にあります。主なエラー型と対応するステータスコードを以下に列挙します。
1163
+
1164
+ - `cashtray_already_proceed (422)`
1165
+ - 既に処理済みのCashtrayをエンドユーザーが再び読み取ったときに返されます
1166
+ - `cashtray_expired (422)`
1167
+ - 読み取り時点でCashtray自体の有効期限が切れているときに返されます。Cashtrayが失効する時刻はレスポンス中の `expires_at` にあります
1168
+ - `cashtray_already_canceled (422)`
1169
+ - 読み取り時点でCashtrayが無効化されているときに返されます
1170
+ - `account_balance_not_enough (422)`
1171
+ - 支払い時に、エンドユーザーの残高が不足していて取引が完了できなかったときに返されます
1172
+ - `account_balance_exceeded`
1173
+ - チャージ時に、エンドユーザーのウォレット上限を超えて取引が完了できなかったときに返されます
1174
+ - `account_transfer_limit_exceeded (422)`
1175
+ - マネーに設定されている一度の取引金額の上限を超えたため、取引が完了できなかったときに返されます
1176
+ - `account_not_found (422)`
1177
+ - Cashtrayに設定されたマネーのウォレットをエンドユーザーが持っていなかったときに返されます
1178
+
1179
+
1180
+ レスポンス中の `transaction` には、このCashtrayをエンドユーザーが読み取ることによって作られる取引データが入ります。まだCashtrayが読み取られていない場合は `NULL` になります。
1181
+
1182
+ 以上をまとめると、Cashtrayの状態は以下のようになります。
1183
+
1184
+ - エンドユーザーのCashtray読み取りによって取引が成功した場合
1185
+ - レスポンス中の `attempt` と `transaction` にそれぞれ値が入ります
1186
+ - 何らかの理由で取引が失敗した場合
1187
+ - レスポンス中の `attempt` にエラー内容が入り、 `transaction` には `NULL` が入ります
1188
+ - まだCashtrayが読み取られていない場合
1189
+ - レスポンス中の `attempt` と `transaction` にそれぞれ `NULL` が入ります。Cashtrayの `expires_at` が現在時刻より前の場合は有効期限切れ状態です。
1190
+
1191
+ Cashtrayの取り得る全ての状態を擬似コードで記述すると以下のようになります。
1192
+ ```
1193
+ if (attempt == null) {
1194
+ // 状態は未確定
1195
+ if (canceled_at != null) {
1196
+ // 無効化済み
1197
+ } else if (expires_at < now) {
1198
+ // 失効済み
1199
+ } else {
1200
+ // まだ有効で読み取られていない
1201
+ }
1202
+ } else if (transaction != null) {
1203
+ // 取引成功確定。attempt で読み取ったユーザなどが分かる
1204
+ } else {
1205
+ // 取引失敗確定。attempt で失敗理由などが分かる
1206
+ }
1207
+ ```
1208
+ ```ruby
1209
+ response = $client.send(Pokepay::Request::GetCashtray.new(
1210
+ "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" # cashtray_id: CashtrayのID
1211
+ ))
1212
+ ```
1213
+
1214
+ ---
1215
+ `cashtray_id`
1216
+ ```json
1217
+ {
1218
+ "type": "string",
1219
+ "format": "uuid"
1220
+ }
1221
+ ```
1222
+ 情報を取得するCashtrayのIDです。
1223
+
1224
+ ---
1225
+ 成功したときは[CashtrayWithResult](#cashtray-with-result)オブジェクトを返します
1226
+ <a name="cancel-cashtray"></a>
1227
+ #### Cashtrayを無効化する
1228
+ Cashtrayを無効化します。
1229
+
1230
+ これにより、 `GetCashtray` のレスポンス中の `canceled_at` に無効化時点での現在時刻が入るようになります。
1231
+ エンドユーザーが無効化されたQRコードを読み取ると `cashtray_already_canceled` エラーとなり、取引は失敗します。
1232
+ ```ruby
1233
+ response = $client.send(Pokepay::Request::CancelCashtray.new(
1234
+ "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" # cashtray_id: CashtrayのID
1235
+ ))
1236
+ ```
1237
+
1238
+ ---
1239
+ `cashtray_id`
1240
+ ```json
1241
+ {
1242
+ "type": "string",
1243
+ "format": "uuid"
1244
+ }
1245
+ ```
1246
+ 無効化するCashtrayのIDです。
1247
+
1248
+ ---
1249
+ 成功したときは[Cashtray](#cashtray)オブジェクトを返します
1250
+ <a name="update-cashtray"></a>
1251
+ #### Cashtrayの情報を更新する
1252
+ Cashtrayの内容を更新します。bodyパラメーターは全て省略可能で、指定したもののみ更新されます。
1253
+ ```ruby
1254
+ response = $client.send(Pokepay::Request::UpdateCashtray.new(
1255
+ "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # cashtray_id: CashtrayのID
1256
+ amount: 3700, # 金額
1257
+ description: "たい焼き(小倉)", # 取引履歴に表示する説明文
1258
+ expires_in: 8713 # 失効時間(秒)
1259
+ ))
1260
+ ```
1261
+
1262
+ ---
1263
+ `cashtray_id`
1264
+ ```json
1265
+ {
1266
+ "type": "string",
1267
+ "format": "uuid"
1268
+ }
1269
+ ```
1270
+ 更新対象のCashtrayのIDです。
1271
+
1272
+ ---
1273
+ `amount`
1274
+ ```json
1275
+ { "type": "number" }
1276
+ ```
1277
+ マネー額です(任意項目)。
1278
+ 正の値を与えるとチャージになり、負の値を与えると支払いとなります。
1279
+
1280
+ ---
1281
+ `description`
1282
+ ```json
1283
+ {
1284
+ "type": "string",
1285
+ "maxLength": 200
1286
+ }
1287
+ ```
1288
+ Cashtrayを読み取ったときに作られる取引の説明文です(最大200文字、任意項目)。
1289
+ アプリや管理画面などの取引履歴に表示されます。
1290
+
1291
+ ---
1292
+ `expires_in`
1293
+ ```json
1294
+ {
1295
+ "type": "integer",
1296
+ "minimum": 1
1297
+ }
1298
+ ```
1299
+ Cashtrayが失効するまでの時間を秒で指定します(任意項目、デフォルト値は1800秒(30分))。
664
1300
 
1301
+ ---
1302
+ 成功したときは[Cashtray](#cashtray)オブジェクトを返します
1303
+ ### Customer
1304
+ <a name="get-account"></a>
665
1305
  #### ウォレット情報を表示する
666
1306
  ウォレットを取得します。
667
1307
  ```ruby
@@ -672,97 +1312,401 @@ response = $client.send(Pokepay::Request::GetAccount.new(
672
1312
 
673
1313
  ---
674
1314
  `account_id`
1315
+ ```json
1316
+ {
1317
+ "type": "string",
1318
+ "format": "uuid"
1319
+ }
1320
+ ```
675
1321
  ウォレットIDです。
676
1322
 
677
1323
  フィルターとして使われ、指定したウォレットIDのウォレットを取得します。
678
1324
 
679
1325
  ---
680
1326
  成功したときは[AccountDetail](#account-detail)オブジェクトを返します
1327
+ <a name="update-account"></a>
1328
+ #### ウォレット情報を更新する
1329
+ ウォレットの状態を更新します。現在はウォレットの凍結/凍結解除の切り替えにのみ対応しています。
1330
+ ```ruby
1331
+ response = $client.send(Pokepay::Request::UpdateAccount.new(
1332
+ "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # account_id: ウォレットID
1333
+ is_suspended: false # ウォレットが凍結されているかどうか
1334
+ ))
1335
+ ```
1336
+
1337
+ ---
1338
+ `account_id`
1339
+ ```json
1340
+ {
1341
+ "type": "string",
1342
+ "format": "uuid"
1343
+ }
1344
+ ```
1345
+ ウォレットIDです。
1346
+
1347
+ 指定したウォレットIDのウォレットの状態を更新します。
1348
+
1349
+ ---
1350
+ `is_suspended`
1351
+ ```json
1352
+ { "type": "boolean" }
1353
+ ```
1354
+ ウォレットの凍結状態です。真にするとウォレットが凍結され、そのウォレットでは新規取引ができなくなります。偽にすると凍結解除されます。
681
1355
 
1356
+ ---
1357
+ 成功したときは[AccountDetail](#account-detail)オブジェクトを返します
1358
+ <a name="list-account-balances"></a>
682
1359
  #### エンドユーザーの残高内訳を表示する
683
1360
  エンドユーザーのウォレット毎の残高を有効期限別のリストとして取得します。
684
1361
  ```ruby
685
1362
  response = $client.send(Pokepay::Request::ListAccountBalances.new(
686
1363
  "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # account_id: ウォレットID
687
- page: 1912, # ページ番号
688
- per_page: 4503, # 1ページ分の取引数
689
- expires_at_from: "2021-11-26T22:06:49.000000+09:00", # 有効期限の期間によるフィルター(開始時点)
690
- expires_at_to: "2019-12-08T14:37:45.000000+09:00", # 有効期限の期間によるフィルター(終了時点)
1364
+ page: 7958, # ページ番号
1365
+ per_page: 233, # 1ページ分の取引数
1366
+ expires_at_from: "2023-04-12T23:21:21.000000+09:00", # 有効期限の期間によるフィルター(開始時点)
1367
+ expires_at_to: "2024-10-10T05:42:51.000000+09:00", # 有効期限の期間によるフィルター(終了時点)
691
1368
  direction: "asc" # 有効期限によるソート順序
692
1369
  ))
693
1370
  ```
694
1371
 
695
1372
  ---
696
1373
  `account_id`
1374
+ ```json
1375
+ {
1376
+ "type": "string",
1377
+ "format": "uuid"
1378
+ }
1379
+ ```
697
1380
  ウォレットIDです。
698
1381
 
699
1382
  フィルターとして使われ、指定したウォレットIDのウォレット残高を取得します。
700
1383
 
701
1384
  ---
702
1385
  `page`
1386
+ ```json
1387
+ {
1388
+ "type": "integer",
1389
+ "minimum": 1
1390
+ }
1391
+ ```
703
1392
  取得したいページ番号です。デフォルト値は1です。
704
1393
 
705
1394
  ---
706
1395
  `per_page`
1396
+ ```json
1397
+ {
1398
+ "type": "integer",
1399
+ "minimum": 1
1400
+ }
1401
+ ```
707
1402
  1ページ分のウォレット残高数です。デフォルト値は30です。
708
1403
 
709
1404
  ---
710
1405
  `expires_at_from`
1406
+ ```json
1407
+ {
1408
+ "type": "string",
1409
+ "format": "date-time"
1410
+ }
1411
+ ```
711
1412
  有効期限の期間によるフィルターの開始時点のタイムスタンプです。デフォルトでは未指定です。
712
1413
 
713
1414
  ---
714
1415
  `expires_at_to`
1416
+ ```json
1417
+ {
1418
+ "type": "string",
1419
+ "format": "date-time"
1420
+ }
1421
+ ```
715
1422
  有効期限の期間によるフィルターの終了時点のタイムスタンプです。デフォルトでは未指定です。
716
1423
 
717
1424
  ---
718
- `direction`
719
- 有効期限によるソートの順序を指定します。デフォルト値はasc (昇順)です。
1425
+ `direction`
1426
+ ```json
1427
+ {
1428
+ "type": "string",
1429
+ "enum": { "asc": "desc" }
1430
+ }
1431
+ ```
1432
+ 有効期限によるソートの順序を指定します。デフォルト値はasc (昇順)です。
1433
+
1434
+ ---
1435
+ 成功したときは[PaginatedAccountBalance](#paginated-account-balance)オブジェクトを返します
1436
+ <a name="list-account-expired-balances"></a>
1437
+ #### エンドユーザーの失効済みの残高内訳を表示する
1438
+ エンドユーザーのウォレット毎の失効済みの残高を有効期限別のリストとして取得します。
1439
+ ```ruby
1440
+ response = $client.send(Pokepay::Request::ListAccountExpiredBalances.new(
1441
+ "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # account_id: ウォレットID
1442
+ page: 7656, # ページ番号
1443
+ per_page: 4892, # 1ページ分の取引数
1444
+ expires_at_from: "2020-01-19T11:53:20.000000+09:00", # 有効期限の期間によるフィルター(開始時点)
1445
+ expires_at_to: "2021-08-17T13:01:31.000000+09:00", # 有効期限の期間によるフィルター(終了時点)
1446
+ direction: "desc" # 有効期限によるソート順序
1447
+ ))
1448
+ ```
1449
+
1450
+ ---
1451
+ `account_id`
1452
+ ```json
1453
+ {
1454
+ "type": "string",
1455
+ "format": "uuid"
1456
+ }
1457
+ ```
1458
+ ウォレットIDです。
1459
+
1460
+ フィルターとして使われ、指定したウォレットIDのウォレット残高を取得します。
1461
+
1462
+ ---
1463
+ `page`
1464
+ ```json
1465
+ {
1466
+ "type": "integer",
1467
+ "minimum": 1
1468
+ }
1469
+ ```
1470
+ 取得したいページ番号です。デフォルト値は1です。
1471
+
1472
+ ---
1473
+ `per_page`
1474
+ ```json
1475
+ {
1476
+ "type": "integer",
1477
+ "minimum": 1
1478
+ }
1479
+ ```
1480
+ 1ページ分のウォレット残高数です。デフォルト値は30です。
1481
+
1482
+ ---
1483
+ `expires_at_from`
1484
+ ```json
1485
+ {
1486
+ "type": "string",
1487
+ "format": "date-time"
1488
+ }
1489
+ ```
1490
+ 有効期限の期間によるフィルターの開始時点のタイムスタンプです。デフォルトでは未指定です。
1491
+
1492
+ ---
1493
+ `expires_at_to`
1494
+ ```json
1495
+ {
1496
+ "type": "string",
1497
+ "format": "date-time"
1498
+ }
1499
+ ```
1500
+ 有効期限の期間によるフィルターの終了時点のタイムスタンプです。デフォルトでは未指定です。
1501
+
1502
+ ---
1503
+ `direction`
1504
+ ```json
1505
+ {
1506
+ "type": "string",
1507
+ "enum": { "asc": "desc" }
1508
+ }
1509
+ ```
1510
+ 有効期限によるソートの順序を指定します。デフォルト値はdesc (降順)です。
1511
+
1512
+ ---
1513
+ 成功したときは[PaginatedAccountBalance](#paginated-account-balance)オブジェクトを返します
1514
+ <a name="get-customer-accounts"></a>
1515
+ #### エンドユーザーのウォレット一覧を表示する
1516
+ マネーを指定してエンドユーザーのウォレット一覧を取得します。
1517
+ ```ruby
1518
+ response = $client.send(Pokepay::Request::GetCustomerAccounts.new(
1519
+ "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # private_money_id: マネーID
1520
+ page: 6897, # ページ番号
1521
+ per_page: 7778, # 1ページ分のウォレット数
1522
+ created_at_from: "2024-10-01T15:15:39.000000+09:00", # ウォレット作成日によるフィルター(開始時点)
1523
+ created_at_to: "2016-09-16T11:22:10.000000+09:00", # ウォレット作成日によるフィルター(終了時点)
1524
+ is_suspended: true # ウォレットが凍結状態かどうかでフィルターする
1525
+ ))
1526
+ ```
1527
+
1528
+ ---
1529
+ `private_money_id`
1530
+ ```json
1531
+ {
1532
+ "type": "string",
1533
+ "format": "uuid"
1534
+ }
1535
+ ```
1536
+ マネーIDです。
1537
+
1538
+ 一覧するウォレットのマネーを指定します。このパラメータは必須です。
1539
+
1540
+ ---
1541
+ `page`
1542
+ ```json
1543
+ {
1544
+ "type": "integer",
1545
+ "minimum": 1
1546
+ }
1547
+ ```
1548
+ 取得したいページ番号です。デフォルト値は1です。
1549
+
1550
+ ---
1551
+ `per_page`
1552
+ ```json
1553
+ {
1554
+ "type": "integer",
1555
+ "minimum": 1
1556
+ }
1557
+ ```
1558
+ 1ページ分のウォレット数です。デフォルト値は30です。
1559
+
1560
+ ---
1561
+ `created_at_from`
1562
+ ```json
1563
+ {
1564
+ "type": "string",
1565
+ "format": "date-time"
1566
+ }
1567
+ ```
1568
+ ウォレット作成日によるフィルターの開始時点のタイムスタンプです。デフォルトでは未指定です。
1569
+
1570
+ ---
1571
+ `created_at_to`
1572
+ ```json
1573
+ {
1574
+ "type": "string",
1575
+ "format": "date-time"
1576
+ }
1577
+ ```
1578
+ ウォレット作成日によるフィルターの終了時点のタイムスタンプです。デフォルトでは未指定です。
1579
+
1580
+ ---
1581
+ `is_suspended`
1582
+ ```json
1583
+ { "type": "boolean" }
1584
+ ```
1585
+ このパラメータが指定されている場合、ウォレットの凍結状態で結果がフィルターされます。デフォルトでは未指定です。
1586
+
1587
+ ---
1588
+ 成功したときは[PaginatedAccountWithUsers](#paginated-account-with-users)オブジェクトを返します
1589
+ <a name="create-customer-account"></a>
1590
+ #### 新規エンドユーザーウォレットを追加する
1591
+ 指定したマネーのウォレットを作成し、同時にそのウォレットを保有するユーザも作成します。
1592
+ ```ruby
1593
+ response = $client.send(Pokepay::Request::CreateCustomerAccount.new(
1594
+ "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # private_money_id: マネーID
1595
+ user_name: "ポケペイ太郎", # ユーザー名
1596
+ account_name: "ポケペイ太郎のアカウント" # アカウント名
1597
+ ))
1598
+ ```
1599
+
1600
+ ---
1601
+ `private_money_id`
1602
+ ```json
1603
+ {
1604
+ "type": "string",
1605
+ "format": "uuid"
1606
+ }
1607
+ ```
1608
+ マネーIDです。
1609
+
1610
+ これによって作成するウォレットのマネーを指定します。
1611
+
1612
+ ---
1613
+ `user_name`
1614
+ ```json
1615
+ {
1616
+ "type": "string",
1617
+ "maxLength": 256
1618
+ }
1619
+ ```
1620
+ ウォレットと共に作成するユーザ名です。省略した場合は空文字となります。
1621
+
1622
+ ---
1623
+ `account_name`
1624
+ ```json
1625
+ {
1626
+ "type": "string",
1627
+ "maxLength": 256
1628
+ }
1629
+ ```
1630
+ 作成するウォレット名です。省略した場合は空文字となります。
720
1631
 
721
1632
  ---
722
- 成功したときは[PaginatedAccountBalance](#paginated-account-balance)オブジェクトを返します
723
-
724
- #### エンドユーザーの失効済みの残高内訳を表示する
725
- エンドユーザーのウォレット毎の失効済みの残高を有効期限別のリストとして取得します。
1633
+ 成功したときは[AccountWithUser](#account-with-user)オブジェクトを返します
1634
+ <a name="get-shop-accounts"></a>
1635
+ #### 店舗ユーザーのウォレット一覧を表示する
1636
+ マネーを指定して店舗ユーザーのウォレット一覧を取得します。
726
1637
  ```ruby
727
- response = $client.send(Pokepay::Request::ListAccountExpiredBalances.new(
728
- "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # account_id: ウォレットID
729
- page: 7446, # ページ番号
730
- per_page: 9384, # 1ページ分の取引数
731
- expires_at_from: "2020-08-10T16:38:08.000000+09:00", # 有効期限の期間によるフィルター(開始時点)
732
- expires_at_to: "2024-03-31T04:16:45.000000+09:00", # 有効期限の期間によるフィルター(終了時点)
733
- direction: "asc" # 有効期限によるソート順序
1638
+ response = $client.send(Pokepay::Request::GetShopAccounts.new(
1639
+ "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # private_money_id: マネーID
1640
+ page: 4421, # ページ番号
1641
+ per_page: 9305, # 1ページ分のウォレット数
1642
+ created_at_from: "2023-06-03T12:27:49.000000+09:00", # ウォレット作成日によるフィルター(開始時点)
1643
+ created_at_to: "2016-01-17T12:47:37.000000+09:00", # ウォレット作成日によるフィルター(終了時点)
1644
+ is_suspended: false # ウォレットが凍結状態かどうかでフィルターする
734
1645
  ))
735
1646
  ```
736
1647
 
737
1648
  ---
738
- `account_id`
739
- ウォレットIDです。
1649
+ `private_money_id`
1650
+ ```json
1651
+ {
1652
+ "type": "string",
1653
+ "format": "uuid"
1654
+ }
1655
+ ```
1656
+ マネーIDです。
740
1657
 
741
- フィルターとして使われ、指定したウォレットIDのウォレット残高を取得します。
1658
+ 一覧するウォレットのマネーを指定します。このパラメータは必須です。
742
1659
 
743
1660
  ---
744
1661
  `page`
1662
+ ```json
1663
+ {
1664
+ "type": "integer",
1665
+ "minimum": 1
1666
+ }
1667
+ ```
745
1668
  取得したいページ番号です。デフォルト値は1です。
746
1669
 
747
1670
  ---
748
1671
  `per_page`
749
- 1ページ分のウォレット残高数です。デフォルト値は30です。
1672
+ ```json
1673
+ {
1674
+ "type": "integer",
1675
+ "minimum": 1
1676
+ }
1677
+ ```
1678
+ 1ページ分のウォレット数です。デフォルト値は30です。
750
1679
 
751
1680
  ---
752
- `expires_at_from`
753
- 有効期限の期間によるフィルターの開始時点のタイムスタンプです。デフォルトでは未指定です。
1681
+ `created_at_from`
1682
+ ```json
1683
+ {
1684
+ "type": "string",
1685
+ "format": "date-time"
1686
+ }
1687
+ ```
1688
+ ウォレット作成日によるフィルターの開始時点のタイムスタンプです。デフォルトでは未指定です。
754
1689
 
755
1690
  ---
756
- `expires_at_to`
757
- 有効期限の期間によるフィルターの終了時点のタイムスタンプです。デフォルトでは未指定です。
1691
+ `created_at_to`
1692
+ ```json
1693
+ {
1694
+ "type": "string",
1695
+ "format": "date-time"
1696
+ }
1697
+ ```
1698
+ ウォレット作成日によるフィルターの終了時点のタイムスタンプです。デフォルトでは未指定です。
758
1699
 
759
1700
  ---
760
- `direction`
761
- 有効期限によるソートの順序を指定します。デフォルト値はdesc (降順)です。
1701
+ `is_suspended`
1702
+ ```json
1703
+ { "type": "boolean" }
1704
+ ```
1705
+ このパラメータが指定されている場合、ウォレットの凍結状態で結果がフィルターされます。デフォルトでは未指定です。
762
1706
 
763
1707
  ---
764
- 成功したときは[PaginatedAccountBalance](#paginated-account-balance)オブジェクトを返します
765
-
1708
+ 成功したときは[PaginatedAccountWithUsers](#paginated-account-with-users)オブジェクトを返します
1709
+ <a name="list-customer-transactions"></a>
766
1710
  #### 取引履歴を取得する
767
1711
  取引一覧を返します。
768
1712
  ```ruby
@@ -770,10 +1714,10 @@ response = $client.send(Pokepay::Request::ListCustomerTransactions.new(
770
1714
  "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # private_money_id: マネーID
771
1715
  sender_customer_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # 送金エンドユーザーID
772
1716
  receiver_customer_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # 受取エンドユーザーID
773
- type: "sFsWbo7bpQ", # 取引種別、チャージ=topup、支払い=payment、個人間送金=transfer
774
- is_modified: true, # キャンセル済みかどうか
775
- from: "2021-04-11T02:43:13.000000+09:00", # 開始日時
776
- to: "2022-03-18T03:41:42.000000+09:00", # 終了日時
1717
+ type: "yMo26iq", # 取引種別、チャージ=topup、支払い=payment、個人間送金=transfer
1718
+ is_modified: false, # キャンセル済みかどうか
1719
+ from: "2019-06-30T23:11:41.000000+09:00", # 開始日時
1720
+ to: "2024-04-19T00:57:24.000000+09:00", # 終了日時
777
1721
  page: 1, # ページ番号
778
1722
  per_page: 50 # 1ページ分の取引数
779
1723
  ))
@@ -781,23 +1725,44 @@ response = $client.send(Pokepay::Request::ListCustomerTransactions.new(
781
1725
 
782
1726
  ---
783
1727
  `private_money_id`
1728
+ ```json
1729
+ {
1730
+ "type": "string",
1731
+ "format": "uuid"
1732
+ }
1733
+ ```
784
1734
  マネーIDです。
785
1735
  フィルターとして使われ、指定したマネーでの取引のみ一覧に表示されます。
786
1736
 
787
1737
  ---
788
1738
  `sender_customer_id`
1739
+ ```json
1740
+ {
1741
+ "type": "string",
1742
+ "format": "uuid"
1743
+ }
1744
+ ```
789
1745
  送金ユーザーIDです。
790
1746
 
791
1747
  フィルターとして使われ、指定された送金ユーザーでの取引のみ一覧に表示されます。
792
1748
 
793
1749
  ---
794
1750
  `receiver_customer_id`
1751
+ ```json
1752
+ {
1753
+ "type": "string",
1754
+ "format": "uuid"
1755
+ }
1756
+ ```
795
1757
  受取ユーザーIDです。
796
1758
 
797
1759
  フィルターとして使われ、指定された受取ユーザーでの取引のみ一覧に表示されます。
798
1760
 
799
1761
  ---
800
1762
  `type`
1763
+ ```json
1764
+ { "type": "string" }
1765
+ ```
801
1766
  取引の種類でフィルターします。
802
1767
 
803
1768
  以下の種類を指定できます。
@@ -813,6 +1778,9 @@ response = $client.send(Pokepay::Request::ListCustomerTransactions.new(
813
1778
 
814
1779
  ---
815
1780
  `is_modified`
1781
+ ```json
1782
+ { "type": "boolean" }
1783
+ ```
816
1784
  キャンセル済みかどうかを判定するフラグです。
817
1785
 
818
1786
  これにtrueを指定するとキャンセルされた取引のみ一覧に表示されます。
@@ -821,76 +1789,64 @@ falseを指定するとキャンセルされていない取引のみ一覧に表
821
1789
 
822
1790
  ---
823
1791
  `from`
1792
+ ```json
1793
+ {
1794
+ "type": "string",
1795
+ "format": "date-time"
1796
+ }
1797
+ ```
824
1798
  抽出期間の開始日時です。
825
1799
 
826
1800
  フィルターとして使われ、開始日時以降に発生した取引のみ一覧に表示されます。
827
1801
 
828
1802
  ---
829
1803
  `to`
1804
+ ```json
1805
+ {
1806
+ "type": "string",
1807
+ "format": "date-time"
1808
+ }
1809
+ ```
830
1810
  抽出期間の終了日時です。
831
1811
 
832
1812
  フィルターとして使われ、終了日時以前に発生した取引のみ一覧に表示されます。
833
1813
 
834
1814
  ---
835
1815
  `page`
1816
+ ```json
1817
+ {
1818
+ "type": "integer",
1819
+ "minimum": 1
1820
+ }
1821
+ ```
836
1822
  取得したいページ番号です。
837
1823
 
838
1824
  ---
839
1825
  `per_page`
1826
+ ```json
1827
+ {
1828
+ "type": "integer",
1829
+ "minimum": 1
1830
+ }
1831
+ ```
840
1832
  1ページ分の取引数です。
841
1833
 
842
1834
  ---
843
1835
  成功したときは[PaginatedTransaction](#paginated-transaction)オブジェクトを返します
844
-
845
1836
  ### Organization
846
-
847
- #### 新規加盟店組織を追加する
848
- ```ruby
849
- response = $client.send(Pokepay::Request::CreateOrganization.new(
850
- "ox_supermarket", # code: 新規組織コード
851
- "oxスーパー", # name: 新規組織名
852
- ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"], # private_money_ids: 加盟店組織で有効にするマネーIDの配列
853
- "PszkN335U1@t4DY.com", # issuer_admin_user_email: 発行体担当者メールアドレス
854
- "suiE88p3Ho@g0k8.com", # member_admin_user_email: 新規組織担当者メールアドレス
855
- bank_name: "XYZ銀行", # 銀行名
856
- bank_code: "99X", # 銀行金融機関コード
857
- bank_branch_name: "ABC支店", # 銀行支店名
858
- bank_branch_code: "99X", # 銀行支店コード
859
- bank_account_type: "saving", # 銀行口座種別 (普通=saving, 当座=current, その他=other)
860
- bank_account: 9999999, # 銀行口座番号
861
- bank_account_holder_name: "フクザワユキチ", # 口座名義人名
862
- contact_name: "佐藤清" # 担当者名
863
- ))
864
- ```
865
- 成功したときは[Organization](#organization)オブジェクトを返します
866
-
867
1837
  ### Shop
868
-
869
- #### 新規店舗を追加する
870
- ```ruby
871
- response = $client.send(Pokepay::Request::CreateShop.new(
872
- "oxスーパー三田店", # shop_name: 店舗名
873
- shop_postal_code: "805-5907", # 店舗の郵便番号
874
- shop_address: "東京都港区芝...", # 店舗の住所
875
- shop_tel: "06-01122", # 店舗の電話番号
876
- shop_email: "n8ATMTNMME@yVAp.com", # 店舗のメールアドレス
877
- shop_external_id: "kaDeYuOtBoCZgc4gwc8RSE7", # 店舗の外部ID
878
- organization_code: "ox-supermarket" # 組織コード
879
- ))
880
- ```
881
- 成功したときは[User](#user)オブジェクトを返します
882
-
1838
+ <a name="list-shops"></a>
883
1839
  #### 店舗一覧を取得する
884
1840
  ```ruby
885
1841
  response = $client.send(Pokepay::Request::ListShops.new(
886
1842
  organization_code: "pocketchange", # 組織コード
887
1843
  private_money_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # マネーID
888
1844
  name: "oxスーパー三田店", # 店舗名
889
- postal_code: "257-1310", # 店舗の郵便番号
1845
+ postal_code: "9061434", # 店舗の郵便番号
890
1846
  address: "東京都港区芝...", # 店舗の住所
891
- tel: "0689-859-5517", # 店舗の電話番号
892
- email: "pb9AHk6UF1@UjWU.com", # 店舗のメールアドレス
893
- external_id: "yw97H5Wi0UlM5hWRopq8fm3QjwrUJD", # 店舗の外部ID
1847
+ tel: "036-858434", # 店舗の電話番号
1848
+ email: "x6Ov6eGwjQ@Cqxd.com", # 店舗のメールアドレス
1849
+ external_id: "tQnDY", # 店舗の外部ID
894
1850
  page: 1, # ページ番号
895
1851
  per_page: 50 # 1ページ分の取引数
896
1852
  ))
@@ -898,57 +1854,317 @@ response = $client.send(Pokepay::Request::ListShops.new(
898
1854
 
899
1855
  ---
900
1856
  `organization_code`
1857
+ ```json
1858
+ {
1859
+ "type": "string",
1860
+ "maxLength": 32,
1861
+ "pattern": "^[a-zA-Z0-9-]*$"
1862
+ }
1863
+ ```
901
1864
  このパラメータを渡すとその組織の店舗のみが返され、省略すると加盟店も含む店舗が返されます。
902
1865
 
903
1866
 
904
1867
  ---
905
1868
  `private_money_id`
1869
+ ```json
1870
+ {
1871
+ "type": "string",
1872
+ "format": "uuid"
1873
+ }
1874
+ ```
906
1875
  このパラメータを渡すとそのマネーのウォレットを持つ店舗のみが返されます。
907
1876
 
908
1877
 
909
1878
  ---
910
1879
  `name`
1880
+ ```json
1881
+ {
1882
+ "type": "string",
1883
+ "minLength": 1,
1884
+ "maxLength": 256
1885
+ }
1886
+ ```
911
1887
  このパラメータを渡すとその名前の店舗のみが返されます。
912
1888
 
913
1889
 
914
1890
  ---
915
1891
  `postal_code`
1892
+ ```json
1893
+ {
1894
+ "type": "string",
1895
+ "pattern": "^[0-9]{3}-?[0-9]{4}$"
1896
+ }
1897
+ ```
916
1898
  このパラメータを渡すとその郵便番号が登録された店舗のみが返されます。
917
1899
 
918
1900
 
919
1901
  ---
920
1902
  `address`
1903
+ ```json
1904
+ {
1905
+ "type": "string",
1906
+ "maxLength": 256
1907
+ }
1908
+ ```
921
1909
  このパラメータを渡すとその住所が登録された店舗のみが返されます。
922
1910
 
923
1911
 
924
1912
  ---
925
1913
  `tel`
1914
+ ```json
1915
+ {
1916
+ "type": "string",
1917
+ "pattern": "^0[0-9]{1,3}-?[0-9]{2,4}-?[0-9]{3,4}$"
1918
+ }
1919
+ ```
926
1920
  このパラメータを渡すとその電話番号が登録された店舗のみが返されます。
927
1921
 
928
1922
 
929
1923
  ---
930
1924
  `email`
1925
+ ```json
1926
+ {
1927
+ "type": "string",
1928
+ "format": "email",
1929
+ "maxLength": 256
1930
+ }
1931
+ ```
931
1932
  このパラメータを渡すとそのメールアドレスが登録された店舗のみが返されます。
932
1933
 
933
1934
 
934
1935
  ---
935
1936
  `external_id`
1937
+ ```json
1938
+ {
1939
+ "type": "string",
1940
+ "maxLength": 36
1941
+ }
1942
+ ```
936
1943
  このパラメータを渡すとその外部IDが登録された店舗のみが返されます。
937
1944
 
938
1945
 
939
1946
  ---
940
1947
  `page`
1948
+ ```json
1949
+ {
1950
+ "type": "integer",
1951
+ "minimum": 1
1952
+ }
1953
+ ```
941
1954
  取得したいページ番号です。
942
1955
 
943
1956
  ---
944
1957
  `per_page`
1958
+ ```json
1959
+ {
1960
+ "type": "integer",
1961
+ "minimum": 1
1962
+ }
1963
+ ```
945
1964
  1ページ分の取引数です。
946
1965
 
947
1966
  ---
948
1967
  成功したときは[PaginatedShops](#paginated-shops)オブジェクトを返します
1968
+ <a name="create-shop"></a>
1969
+ #### 新規店舗を追加する(廃止予定)
1970
+ 新規店舗を追加します。このAPIは廃止予定です。以降は `CreateShopV2` を使用してください。
1971
+ ```ruby
1972
+ response = $client.send(Pokepay::Request::CreateShop.new(
1973
+ "oxスーパー三田店", # shop_name: 店舗名
1974
+ shop_postal_code: "4391483", # 店舗の郵便番号
1975
+ shop_address: "東京都港区芝...", # 店舗の住所
1976
+ shop_tel: "088152-979", # 店舗の電話番号
1977
+ shop_email: "CsXRcUZY47@cpIh.com", # 店舗のメールアドレス
1978
+ shop_external_id: "03BvqB7CzLjYHoO28zEE65UlKtMCe12", # 店舗の外部ID
1979
+ organization_code: "ox-supermarket" # 組織コード
1980
+ ))
1981
+ ```
1982
+ 成功したときは[User](#user)オブジェクトを返します
1983
+ <a name="create-shop-v2"></a>
1984
+ #### 新規店舗を追加する
1985
+ ```ruby
1986
+ response = $client.send(Pokepay::Request::CreateShopV2.new(
1987
+ "oxスーパー三田店", # name: 店舗名
1988
+ postal_code: "891-6024", # 店舗の郵便番号
1989
+ address: "東京都港区芝...", # 店舗の住所
1990
+ tel: "0224-585", # 店舗の電話番号
1991
+ email: "WnFZLX87qt@edPz.com", # 店舗のメールアドレス
1992
+ external_id: "8NdiYCurcmVOPZzwMWHgQ0V", # 店舗の外部ID
1993
+ organization_code: "ox-supermarket", # 組織コード
1994
+ private_money_ids: ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"], # 店舗で有効にするマネーIDの配列
1995
+ can_topup_private_money_ids: ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"] # 店舗でチャージ可能にするマネーIDの配列
1996
+ ))
1997
+ ```
949
1998
 
950
- ### Account
1999
+ ---
2000
+ `name`
2001
+ ```json
2002
+ {
2003
+ "type": "string",
2004
+ "minLength": 1,
2005
+ "maxLength": 256
2006
+ }
2007
+ ```
2008
+ 店舗名です。
2009
+
2010
+ 同一組織内に同名の店舗があった場合は`name_conflict`エラーが返ります。
2011
+
2012
+ ---
2013
+ `private_money_ids`
2014
+ ```json
2015
+ {
2016
+ "type": "array",
2017
+ "minItems": 1,
2018
+ "items": {
2019
+ "type": "string",
2020
+ "format": "uuid"
2021
+ }
2022
+ }
2023
+ ```
2024
+ 店舗で有効にするマネーIDの配列を指定します。
2025
+
2026
+ 店舗が所属する組織が発行または加盟しているマネーのみが指定できます。利用できないマネーが指定された場合は`unavailable_private_money`エラーが返ります。
2027
+ このパラメータを省略したときは、店舗が所属する組織が発行または加盟している全てのマネーのウォレットができます。
2028
+
2029
+ ---
2030
+ `can_topup_private_money_ids`
2031
+ ```json
2032
+ {
2033
+ "type": "array",
2034
+ "minItems": 0,
2035
+ "items": {
2036
+ "type": "string",
2037
+ "format": "uuid"
2038
+ }
2039
+ }
2040
+ ```
2041
+ 店舗でチャージ可能にするマネーIDの配列を指定します。
2042
+
2043
+ このパラメータは発行体のみが指定でき、自身が発行しているマネーのみを指定できます。加盟店が他発行体のマネーに加盟している場合でも、そのチャージ可否を変更することはできません。
2044
+ 省略したときは対象店舗のその発行体の全てのマネーのアカウントがチャージ不可となります。
2045
+
2046
+ ---
2047
+ 成功したときは[ShopWithAccounts](#shop-with-accounts)オブジェクトを返します
2048
+ <a name="get-shop"></a>
2049
+ #### 店舗情報を表示する
2050
+ 店舗情報を表示します。
2051
+
2052
+ 権限に関わらず自組織の店舗情報は表示可能です。それに加え、発行体は自組織の発行しているマネーの加盟店組織の店舗情報を表示できます。
2053
+ ```ruby
2054
+ response = $client.send(Pokepay::Request::GetShop.new(
2055
+ "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" # shop_id: 店舗ユーザーID
2056
+ ))
2057
+ ```
2058
+ 成功したときは[ShopWithAccounts](#shop-with-accounts)オブジェクトを返します
2059
+ <a name="update-shop"></a>
2060
+ #### 店舗情報を更新する
2061
+ 店舗情報を更新します。bodyパラメーターは全て省略可能で、指定したもののみ更新されます。
2062
+ ```ruby
2063
+ response = $client.send(Pokepay::Request::UpdateShop.new(
2064
+ "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # shop_id: 店舗ユーザーID
2065
+ name: "oxスーパー三田店", # 店舗名
2066
+ postal_code: "486-3690", # 店舗の郵便番号
2067
+ address: "東京都港区芝...", # 店舗の住所
2068
+ tel: "02-924308", # 店舗の電話番号
2069
+ email: "TSynCfTiWL@EN2p.com", # 店舗のメールアドレス
2070
+ external_id: "E", # 店舗の外部ID
2071
+ private_money_ids: ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"], # 店舗で有効にするマネーIDの配列
2072
+ can_topup_private_money_ids: ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"] # 店舗でチャージ可能にするマネーIDの配列
2073
+ ))
2074
+ ```
2075
+
2076
+ ---
2077
+ `name`
2078
+ ```json
2079
+ {
2080
+ "type": "string",
2081
+ "minLength": 1,
2082
+ "maxLength": 256
2083
+ }
2084
+ ```
2085
+ 店舗名です。
2086
+
2087
+ 同一組織内に同名の店舗があった場合は`shop_name_conflict`エラーが返ります。
2088
+
2089
+ ---
2090
+ `postal_code`
2091
+ ```json
2092
+ {
2093
+ "type": "string",
2094
+ "pattern": "^[0-9]{3}-?[0-9]{4}$"
2095
+ }
2096
+ ```
2097
+ 店舗住所の郵便番号(7桁の数字)です。ハイフンは無視されます。明示的に空の値を設定するにはNULLを指定します。
2098
+
2099
+ ---
2100
+ `tel`
2101
+ ```json
2102
+ {
2103
+ "type": "string",
2104
+ "pattern": "^0[0-9]{1,3}-?[0-9]{2,4}-?[0-9]{3,4}$"
2105
+ }
2106
+ ```
2107
+ 店舗の電話番号です。ハイフンは無視されます。明示的に空の値を設定するにはNULLを指定します。
2108
+
2109
+ ---
2110
+ `email`
2111
+ ```json
2112
+ {
2113
+ "type": "string",
2114
+ "format": "email",
2115
+ "maxLength": 256
2116
+ }
2117
+ ```
2118
+ 店舗の連絡先メールアドレスです。明示的に空の値を設定するにはNULLを指定します。
2119
+
2120
+ ---
2121
+ `external_id`
2122
+ ```json
2123
+ {
2124
+ "type": "string",
2125
+ "maxLength": 36
2126
+ }
2127
+ ```
2128
+ 店舗の外部IDです(最大36文字)。明示的に空の値を設定するにはNULLを指定します。
2129
+
2130
+ ---
2131
+ `private_money_ids`
2132
+ ```json
2133
+ {
2134
+ "type": "array",
2135
+ "minItems": 0,
2136
+ "items": {
2137
+ "type": "string",
2138
+ "format": "uuid"
2139
+ }
2140
+ }
2141
+ ```
2142
+ 店舗で有効にするマネーIDの配列を指定します。
2143
+
2144
+ 店舗が所属する組織が発行または加盟しているマネーのみが指定できます。利用できないマネーが指定された場合は`unavailable_private_money`エラーが返ります。
2145
+ 店舗が既にウォレットを持っている場合に、ここでそのウォレットのマネーIDを指定しないで更新すると、そのマネーのウォレットは凍結(無効化)されます。
2146
+
2147
+ ---
2148
+ `can_topup_private_money_ids`
2149
+ ```json
2150
+ {
2151
+ "type": "array",
2152
+ "minItems": 0,
2153
+ "items": {
2154
+ "type": "string",
2155
+ "format": "uuid"
2156
+ }
2157
+ }
2158
+ ```
2159
+ 店舗でチャージ可能にするマネーIDの配列を指定します。
2160
+
2161
+ このパラメータは発行体のみが指定でき、発行しているマネーのみを指定できます。加盟店が他発行体のマネーに加盟している場合でも、そのチャージ可否を変更することはできません。
2162
+ 省略したときは対象店舗のその発行体の全てのマネーのアカウントがチャージ不可となります。
951
2163
 
2164
+ ---
2165
+ 成功したときは[ShopWithAccounts](#shop-with-accounts)オブジェクトを返します
2166
+ ### Account
2167
+ <a name="list-user-accounts"></a>
952
2168
  #### エンドユーザー、店舗ユーザーのウォレット一覧を表示する
953
2169
  ユーザーIDを指定してそのユーザーのウォレット一覧を取得します。
954
2170
  ```ruby
@@ -959,21 +2175,52 @@ response = $client.send(Pokepay::Request::ListUserAccounts.new(
959
2175
 
960
2176
  ---
961
2177
  `user_id`
2178
+ ```json
2179
+ {
2180
+ "type": "string",
2181
+ "format": "uuid"
2182
+ }
2183
+ ```
962
2184
  ユーザーIDです。
963
2185
 
964
2186
  指定したユーザーIDのウォレット一覧を取得します。パートナーキーと紐づく組織が発行しているマネーのウォレットのみが表示されます。
965
2187
 
966
2188
  ---
967
2189
  成功したときは[PaginatedAccounts](#paginated-accounts)オブジェクトを返します
968
-
969
2190
  ### Private Money
2191
+ <a name="get-private-moneys"></a>
2192
+ #### マネー一覧を取得する
2193
+ マネーの一覧を取得します。
2194
+ パートナーキーの管理者が発行体組織に属している場合、自組織が加盟または発行しているマネーの一覧を返します。また、`organization_code`として決済加盟店の組織コードを指定した場合、発行マネーのうち、その決済加盟店組織が加盟しているマネーの一覧を返します。
2195
+ パートナーキーの管理者が決済加盟店組織に属している場合は、自組織が加盟しているマネーの一覧を返します。
2196
+ ```ruby
2197
+ response = $client.send(Pokepay::Request::GetPrivateMoneys.new(
2198
+ organization_code: "ox-supermarket", # 組織コード
2199
+ page: 1, # ページ番号
2200
+ per_page: 50 # 1ページ分の取得数
2201
+ ))
2202
+ ```
970
2203
 
2204
+ ---
2205
+ `organization_code`
2206
+ ```json
2207
+ {
2208
+ "type": "string",
2209
+ "maxLength": 32,
2210
+ "pattern": "^[a-zA-Z0-9-]*$"
2211
+ }
2212
+ ```
2213
+ パートナーキーの管理者が発行体組織に属している場合、発行マネーのうち、この組織コードで指定した決済加盟店組織が加盟しているマネーの一覧を返します。決済加盟店組織の管理者は自組織以外を指定することはできません。
2214
+
2215
+ ---
2216
+ 成功したときは[PaginatedPrivateMoneys](#paginated-private-moneys)オブジェクトを返します
2217
+ <a name="get-private-money-organization-summaries"></a>
971
2218
  #### 決済加盟店の取引サマリを取得する
972
2219
  ```ruby
973
2220
  response = $client.send(Pokepay::Request::GetPrivateMoneyOrganizationSummaries.new(
974
2221
  "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # private_money_id: マネーID
975
- from: "2021-01-27T10:09:02.000000+09:00", # 開始日時(toと同時に指定する必要有)
976
- to: "2016-02-05T23:42:53.000000+09:00", # 終了日時(fromと同時に指定する必要有)
2222
+ from: "2016-09-20T16:43:03.000000+09:00", # 開始日時(toと同時に指定する必要有)
2223
+ to: "2019-10-20T11:06:22.000000+09:00", # 終了日時(fromと同時に指定する必要有)
977
2224
  page: 1, # ページ番号
978
2225
  per_page: 50 # 1ページ分の取引数
979
2226
  ))
@@ -981,44 +2228,62 @@ response = $client.send(Pokepay::Request::GetPrivateMoneyOrganizationSummaries.n
981
2228
  `from`と`to`は同時に指定する必要があります。
982
2229
 
983
2230
  成功したときは[PaginatedPrivateMoneyOrganizationSummaries](#paginated-private-money-organization-summaries)オブジェクトを返します
984
-
985
- ### バルクチャージ
986
-
2231
+ ### Bulk
2232
+ <a name="bulk-create-transaction"></a>
987
2233
  #### CSVファイル一括取引
988
2234
  CSVファイルから一括取引をします。
989
2235
  ```ruby
990
2236
  response = $client.send(Pokepay::Request::BulkCreateTransaction.new(
991
- "IEgbGEOQG1PZp7fjd9", # name: 一括取引タスク名
992
- "1zgh1", # content: 取引する情報のCSV
993
- "RHHtL55R7YEprCJ0U4QnLZWmGvTqLQwaZ9vO", # request_id: リクエストID
994
- description: "v67spoRoPKUgWvYVa3Gv9xbfzvgScohGvfvszFZKZ0fsirdyb8N5N4uLXeppDXZ9aq2pYugtiiL7qWoYElTKmZkEzCv7OKUa8NeEnF41oUMWRj1" # 一括取引の説明
2237
+ "B8PVJkE9NzaeTptZ5kX9rLpagdWQ", # name: 一括取引タスク名
2238
+ "E", # content: 取引する情報のCSV
2239
+ "nTlLyubwibc5uG9Y4cn6ApRZ5NX6gFb5nuOD", # request_id: リクエストID
2240
+ description: "mm9rpn022H3wQmNFzbLFmfFSz1uperYHhU5vbLxW8Yq15XpRuu89q3NykiRPYO2oQiAYMcKkXBWEu4RSjxgCW3jFlgob7yobgqdqFleVhpCeb" # 一括取引の説明
995
2241
  ))
996
2242
  ```
997
2243
 
998
2244
  ---
999
2245
  `name`
2246
+ ```json
2247
+ {
2248
+ "type": "string",
2249
+ "maxLength": 32
2250
+ }
2251
+ ```
1000
2252
  一括取引タスクの管理用の名前です。
1001
2253
 
1002
2254
  ---
1003
2255
  `description`
2256
+ ```json
2257
+ {
2258
+ "type": "string",
2259
+ "maxLength": 128
2260
+ }
2261
+ ```
1004
2262
  一括取引タスクの管理用の説明文です。
1005
2263
 
1006
2264
  ---
1007
2265
  `content`
2266
+ ```json
2267
+ { "type": "string" }
2268
+ ```
1008
2269
  一括取引する情報を書いたCSVの文字列です。
1009
2270
  1行目はヘッダ行で、2行目以降の各行にカンマ区切りの取引データを含みます。
1010
2271
  カラムは以下の7つです。任意のカラムには空文字を指定します。
1011
2272
 
1012
2273
  - `type`: 取引種別
1013
2274
  - 必須。'topup' または 'payment'
1014
- - `sender_account_id`: 送金ウォレットID
2275
+ - `sender_id`: 送金ユーザーID
1015
2276
  - 必須。UUID
1016
- - `receiver_account_id`: 受取ウォレットID
2277
+ - `receiver_id`: 受取ユーザーID
2278
+ - 必須。UUID
2279
+ - `private_money_id`: マネーID
1017
2280
  - 必須。UUID
1018
2281
  - `money_amount`: マネー額
1019
2282
  - 任意。ただし `point_amount` といずれかが必須。0以上の数字
1020
2283
  - `point_amount`: ポイント額
1021
2284
  - 任意。ただし `money_amount` といずれかが必須。0以上の数字
2285
+ - `description`: 取引の説明文
2286
+ - 任意。200文字以内。取引履歴に表示される文章
1022
2287
  - `bear_account_id`: ポイント負担ウォレットID
1023
2288
  - `point_amount` があるときは必須。UUID
1024
2289
  - `point_expires_at`: ポイントの有効期限
@@ -1026,11 +2291,17 @@ response = $client.send(Pokepay::Request::BulkCreateTransaction.new(
1026
2291
 
1027
2292
  ---
1028
2293
  `request_id`
2294
+ ```json
2295
+ {
2296
+ "type": "string",
2297
+ "minLength": 36,
2298
+ "maxLength": 36
2299
+ }
2300
+ ```
1029
2301
  重複したリクエストを判断するためのユニークID。ランダムな36字の文字列を生成して渡してください。
1030
2302
 
1031
2303
  ---
1032
2304
  成功したときは[BulkTransaction](#bulk-transaction)オブジェクトを返します
1033
-
1034
2305
  ## Responses
1035
2306
 
1036
2307
 
@@ -1067,29 +2338,39 @@ response = $client.send(Pokepay::Request::BulkCreateTransaction.new(
1067
2338
  * `description (string)`: 支払いQRコードの説明文(アプリ上で取引の説明文として表示される)
1068
2339
  * `account (AccountWithUser)`: 支払いQRコード発行ウォレット
1069
2340
  * `is_disabled (boolean)`: 無効化されているかどうか
1070
- * `token (string)`:
2341
+ * `token (string)`: 支払いQRコードを解析したときに出てくるURL
1071
2342
 
1072
2343
  `account`は [AccountWithUser](#account-with-user) オブジェクトを返します。
1073
2344
 
1074
- <a name="check"></a>
1075
- ## Check
1076
- * `id (string)`: チャージQRコードのID
1077
- * `amount (double)`: チャージマネー額 (deprecated)
1078
- * `money_amount (double)`: チャージマネー額
1079
- * `point_amount (double)`: チャージポイント額
1080
- * `description (string)`: チャージQRコードの説明文(アプリ上で取引の説明文として表示される)
1081
- * `user (User)`: 送金元ユーザ情報
1082
- * `is_onetime (boolean)`: 使用回数が一回限りかどうか
1083
- * `is_disabled (boolean)`: 無効化されているかどうか
1084
- * `expires_at (string)`: チャージQRコード自体の失効日時
1085
- * `private_money (PrivateMoney)`: 対象マネー情報
1086
- * `usage_limit (integer)`: 一回限りでない場合の最大読み取り回数
1087
- * `usage_count (double)`: 一回限りでない場合の現在までに読み取られた回数
1088
- * `token (string)`: チャージQRコードを解析したときに出てくるURL
2345
+ <a name="cashtray"></a>
2346
+ ## Cashtray
2347
+ * `id (string)`: Cashtray自体のIDです。
2348
+ * `amount (double)`: 取引金額
2349
+ * `description (string)`: Cashtrayの説明文
2350
+ * `account (AccountWithUser)`: 発行店舗のウォレット
2351
+ * `expires_at (string)`: Cashtrayの失効日時
2352
+ * `canceled_at (string)`: Cashtrayの無効化日時。NULLの場合は無効化されていません
2353
+ * `token (string)`: CashtrayのQRコードを解析したときに出てくるURL
1089
2354
 
1090
- `user`は [User](#user) オブジェクトを返します。
2355
+ `account`は [AccountWithUser](#account-with-user) オブジェクトを返します。
1091
2356
 
1092
- `private_money`は [PrivateMoney](#private-money) オブジェクトを返します。
2357
+ <a name="cashtray-with-result"></a>
2358
+ ## CashtrayWithResult
2359
+ * `id (string)`: CashtrayのID
2360
+ * `amount (double)`: 取引金額
2361
+ * `description (string)`: Cashtrayの説明文(アプリ上で取引の説明文として表示される)
2362
+ * `account (AccountWithUser)`: 発行店舗のウォレット
2363
+ * `expires_at (string)`: Cashtrayの失効日時
2364
+ * `canceled_at (string)`: Cashtrayの無効化日時。NULLの場合は無効化されていません
2365
+ * `token (string)`: CashtrayのQRコードを解析したときに出てくるURL
2366
+ * `attempt (CashtrayAttempt)`: Cashtray読み取り結果
2367
+ * `transaction (Transaction)`: 取引結果
2368
+
2369
+ `account`は [AccountWithUser](#account-with-user) オブジェクトを返します。
2370
+
2371
+ `attempt`は [CashtrayAttempt](#cashtray-attempt) オブジェクトを返します。
2372
+
2373
+ `transaction`は [Transaction](#transaction) オブジェクトを返します。
1093
2374
 
1094
2375
  <a name="user"></a>
1095
2376
  ## User
@@ -1097,11 +2378,6 @@ response = $client.send(Pokepay::Request::BulkCreateTransaction.new(
1097
2378
  * `name (string)`: ユーザー (または店舗) 名
1098
2379
  * `is_merchant (boolean)`: 店舗ユーザーかどうか
1099
2380
 
1100
- <a name="organization"></a>
1101
- ## Organization
1102
- * `code (string)`: 組織コード
1103
- * `name (string)`: 組織名
1104
-
1105
2381
  <a name="transaction"></a>
1106
2382
  ## Transaction
1107
2383
  * `id (string)`: 取引ID
@@ -1121,29 +2397,31 @@ response = $client.send(Pokepay::Request::BulkCreateTransaction.new(
1121
2397
 
1122
2398
  `receiver_account`と`sender_account`は [Account](#account) オブジェクトを返します。
1123
2399
 
2400
+ <a name="shop-with-accounts"></a>
2401
+ ## ShopWithAccounts
2402
+ * `id (string)`: 店舗ID
2403
+ * `name (string)`: 店舗名
2404
+ * `organization_code (string)`: 組織コード
2405
+ * `postal_code (string)`: 店舗の郵便番号
2406
+ * `address (string)`: 店舗の住所
2407
+ * `tel (string)`: 店舗の電話番号
2408
+ * `email (string)`: 店舗のメールアドレス
2409
+ * `external_id (string)`: 店舗の外部ID
2410
+ * `accounts (array of ShopAccounts)`:
2411
+
2412
+ `accounts`は [ShopAccount](#shop-account) オブジェクトの配列を返します。
2413
+
1124
2414
  <a name="bulk-transaction"></a>
1125
2415
  ## BulkTransaction
1126
- * `request_id (string)`: リクエストID
1127
- * `name (string)`: バルクチャージ管理用の名前
1128
- * `description (string)`: バルクチャージ管理用の説明文
1129
- * `status (string)`: バルクチャージの状態
1130
- * `submitted_at (string)`: バルクチャージが登録された日時
1131
- * `updated_at (string)`: バルクチャージが更新された日時
1132
-
1133
- <a name="transfer"></a>
1134
- ## Transfer
1135
2416
  * `id (string)`:
1136
- * `sender_account (AccountWithoutPrivateMoneyDetail)`:
1137
- * `receiver_account (AccountWithoutPrivateMoneyDetail)`:
1138
- * `amount (double)`:
1139
- * `money_amount (double)`:
1140
- * `point_amount (double)`:
1141
- * `done_at (string)`:
1142
- * `type (string)`:
1143
- * `description (string)`:
1144
- * `transaction_id (string)`:
1145
-
1146
- `receiver_account`と`sender_account`は [AccountWithoutPrivateMoneyDetail](#account-without-private-money-detail) オブジェクトを返します。
2417
+ * `request_id (string)`: リクエストID
2418
+ * `name (string)`: バルク取引管理用の名前
2419
+ * `description (string)`: バルク取引管理用の説明文
2420
+ * `status (string)`: バルク取引の状態
2421
+ * `error (string)`: バルク取引のエラー種別
2422
+ * `error_lineno (integer)`: バルク取引のエラーが発生した行番号
2423
+ * `submitted_at (string)`: バルク取引が登録された日時
2424
+ * `updated_at (string)`: バルク取引が更新された日時
1147
2425
 
1148
2426
  <a name="paginated-private-money-organization-summaries"></a>
1149
2427
  ## PaginatedPrivateMoneyOrganizationSummaries
@@ -1165,6 +2443,16 @@ response = $client.send(Pokepay::Request::BulkCreateTransaction.new(
1165
2443
 
1166
2444
  `pagination`は [Pagination](#pagination) オブジェクトを返します。
1167
2445
 
2446
+ <a name="paginated-transfers"></a>
2447
+ ## PaginatedTransfers
2448
+ * `rows (array of Transfers)`:
2449
+ * `count (integer)`:
2450
+ * `pagination (Pagination)`:
2451
+
2452
+ `rows`は [Transfer](#transfer) オブジェクトの配列を返します。
2453
+
2454
+ `pagination`は [Pagination](#pagination) オブジェクトを返します。
2455
+
1168
2456
  <a name="paginated-accounts"></a>
1169
2457
  ## PaginatedAccounts
1170
2458
  * `rows (array of Accounts)`:
@@ -1175,6 +2463,16 @@ response = $client.send(Pokepay::Request::BulkCreateTransaction.new(
1175
2463
 
1176
2464
  `pagination`は [Pagination](#pagination) オブジェクトを返します。
1177
2465
 
2466
+ <a name="paginated-account-with-users"></a>
2467
+ ## PaginatedAccountWithUsers
2468
+ * `rows (array of AccountWithUsers)`:
2469
+ * `count (integer)`:
2470
+ * `pagination (Pagination)`:
2471
+
2472
+ `rows`は [AccountWithUser](#account-with-user) オブジェクトの配列を返します。
2473
+
2474
+ `pagination`は [Pagination](#pagination) オブジェクトを返します。
2475
+
1178
2476
  <a name="paginated-account-balance"></a>
1179
2477
  ## PaginatedAccountBalance
1180
2478
  * `rows (array of AccountBalances)`:
@@ -1205,6 +2503,16 @@ response = $client.send(Pokepay::Request::BulkCreateTransaction.new(
1205
2503
 
1206
2504
  `pagination`は [Pagination](#pagination) オブジェクトを返します。
1207
2505
 
2506
+ <a name="paginated-private-moneys"></a>
2507
+ ## PaginatedPrivateMoneys
2508
+ * `rows (array of PrivateMoneys)`:
2509
+ * `count (integer)`:
2510
+ * `pagination (Pagination)`:
2511
+
2512
+ `rows`は [PrivateMoney](#private-money) オブジェクトの配列を返します。
2513
+
2514
+ `pagination`は [Pagination](#pagination) オブジェクトを返します。
2515
+
1208
2516
  <a name="private-money"></a>
1209
2517
  ## PrivateMoney
1210
2518
  * `id (string)`: マネーID
@@ -1219,10 +2527,19 @@ response = $client.send(Pokepay::Request::BulkCreateTransaction.new(
1219
2527
  * `type (string)`: マネー種別 (自家型=own, 第三者型=third-party)
1220
2528
  * `expiration_type (string)`: 有効期限種別 (チャージ日起算=static, 最終利用日起算=last-update, 最終チャージ日起算=last-topup-update)
1221
2529
  * `enable_topup_by_member (boolean)`: 加盟店によるチャージが有効かどうか
1222
- * `account_image (string)`: マネーの画像URL
1223
2530
 
1224
2531
  `organization`は [Organization](#organization) オブジェクトを返します。
1225
2532
 
2533
+ <a name="cashtray-attempt"></a>
2534
+ ## CashtrayAttempt
2535
+ * `account (AccountWithUser)`: エンドユーザーのウォレット
2536
+ * `status_code (double)`: ステータスコード
2537
+ * `error_type (string)`: エラー型
2538
+ * `error_message (string)`: エラーメッセージ
2539
+ * `created_at (string)`: Cashtray読み取り記録の作成日時
2540
+
2541
+ `account`は [AccountWithUser](#account-with-user) オブジェクトを返します。
2542
+
1226
2543
  <a name="account"></a>
1227
2544
  ## Account
1228
2545
  * `id (string)`: ウォレットID
@@ -1232,15 +2549,15 @@ response = $client.send(Pokepay::Request::BulkCreateTransaction.new(
1232
2549
 
1233
2550
  `private_money`は [PrivateMoney](#private-money) オブジェクトを返します。
1234
2551
 
1235
- <a name="account-without-private-money-detail"></a>
1236
- ## AccountWithoutPrivateMoneyDetail
1237
- * `id (string)`:
1238
- * `name (string)`:
1239
- * `is_suspended (boolean)`:
1240
- * `private_money_id (string)`:
1241
- * `user (User)`:
2552
+ <a name="shop-account"></a>
2553
+ ## ShopAccount
2554
+ * `id (string)`: ウォレットID
2555
+ * `name (string)`: ウォレット名
2556
+ * `is_suspended (boolean)`: ウォレットが凍結されているかどうか
2557
+ * `can_transfer_topup (boolean)`: チャージ可能かどうか
2558
+ * `private_money (PrivateMoney)`: 設定マネー情報
1242
2559
 
1243
- `user`は [User](#user) オブジェクトを返します。
2560
+ `private_money`は [PrivateMoney](#private-money) オブジェクトを返します。
1244
2561
 
1245
2562
  <a name="private-money-organization-summary"></a>
1246
2563
  ## PrivateMoneyOrganizationSummary
@@ -1258,6 +2575,21 @@ response = $client.send(Pokepay::Request::BulkCreateTransaction.new(
1258
2575
  * `has_prev (boolean)`:
1259
2576
  * `has_next (boolean)`:
1260
2577
 
2578
+ <a name="transfer"></a>
2579
+ ## Transfer
2580
+ * `id (string)`:
2581
+ * `sender_account (AccountWithoutPrivateMoneyDetail)`:
2582
+ * `receiver_account (AccountWithoutPrivateMoneyDetail)`:
2583
+ * `amount (double)`:
2584
+ * `money_amount (double)`:
2585
+ * `point_amount (double)`:
2586
+ * `done_at (string)`:
2587
+ * `type (string)`:
2588
+ * `description (string)`:
2589
+ * `transaction_id (string)`:
2590
+
2591
+ `receiver_account`と`sender_account`は [AccountWithoutPrivateMoneyDetail](#account-without-private-money-detail) オブジェクトを返します。
2592
+
1261
2593
  <a name="account-balance"></a>
1262
2594
  ## AccountBalance
1263
2595
  * `expires_at (string)`:
@@ -1274,3 +2606,26 @@ response = $client.send(Pokepay::Request::BulkCreateTransaction.new(
1274
2606
  * `tel (string)`: 店舗の電話番号
1275
2607
  * `email (string)`: 店舗のメールアドレス
1276
2608
  * `external_id (string)`: 店舗の外部ID
2609
+
2610
+ <a name="organization"></a>
2611
+ ## Organization
2612
+ * `code (string)`: 組織コード
2613
+ * `name (string)`: 組織名
2614
+
2615
+ <a name="organization-summary"></a>
2616
+ ## OrganizationSummary
2617
+ * `count (integer)`:
2618
+ * `money_amount (double)`:
2619
+ * `money_count (integer)`:
2620
+ * `point_amount (double)`:
2621
+ * `point_count (integer)`:
2622
+
2623
+ <a name="account-without-private-money-detail"></a>
2624
+ ## AccountWithoutPrivateMoneyDetail
2625
+ * `id (string)`:
2626
+ * `name (string)`:
2627
+ * `is_suspended (boolean)`:
2628
+ * `private_money_id (string)`:
2629
+ * `user (User)`:
2630
+
2631
+ `user`は [User](#user) オブジェクトを返します。