pokepay_partner_ruby_sdk 0.3.0 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (26) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/docs/index.md +592 -187
  4. data/lib/pokepay_partner_ruby_sdk/request/create_topup_transaction_with_check.rb +2 -2
  5. data/lib/pokepay_partner_ruby_sdk/request/create_webhook.rb +16 -0
  6. data/lib/pokepay_partner_ruby_sdk/request/get_bulk_transaction.rb +5 -5
  7. data/lib/pokepay_partner_ruby_sdk/request/get_coupon.rb +15 -0
  8. data/lib/pokepay_partner_ruby_sdk/request/list_bulk_transaction_jobs.rb +15 -0
  9. data/lib/pokepay_partner_ruby_sdk/request/list_coupons.rb +15 -0
  10. data/lib/pokepay_partner_ruby_sdk/request/list_webhooks.rb +15 -0
  11. data/lib/pokepay_partner_ruby_sdk/request/update_webhook.rb +15 -0
  12. data/lib/pokepay_partner_ruby_sdk/response/coupon.rb +48 -0
  13. data/lib/pokepay_partner_ruby_sdk/response/coupon_detail.rb +55 -0
  14. data/lib/pokepay_partner_ruby_sdk/response/organization_worker_task_webhook.rb +21 -0
  15. data/lib/pokepay_partner_ruby_sdk/response/paginated_coupons.rb +16 -0
  16. data/lib/pokepay_partner_ruby_sdk/response/paginated_organization_worker_task_webhook.rb +16 -0
  17. data/lib/pokepay_partner_ruby_sdk/response/private_money.rb +2 -0
  18. data/lib/pokepay_partner_ruby_sdk/response/shop_with_accounts.rb +2 -0
  19. data/lib/pokepay_partner_ruby_sdk/response/shop_with_metadata.rb +2 -0
  20. data/lib/pokepay_partner_ruby_sdk/response/transaction.rb +4 -0
  21. data/lib/pokepay_partner_ruby_sdk/response/transaction_detail.rb +4 -0
  22. data/lib/pokepay_partner_ruby_sdk/version.rb +1 -1
  23. data/lib/pokepay_partner_ruby_sdk.rb +11 -2
  24. data/partner.yaml +591 -53
  25. metadata +13 -3
  26. data/lib/pokepay_partner_ruby_sdk/response/user_transaction.rb +0 -33
data/partner.yaml CHANGED
@@ -39,6 +39,12 @@ tags:
39
39
  - name: Bulk
40
40
  - name: Event
41
41
  - name: Campaign
42
+ - name: Webhook
43
+ description: |
44
+ Webhookは特定のワーカータスクでの処理が完了した事を通知します。
45
+ WebHookにはURLとタスク名、有効化されているかを設定することが出来ます。
46
+ 通知はタスク完了時、事前に設定したURLにPOSTリクエストを行います。
47
+ - name: Coupon
42
48
 
43
49
  components:
44
50
  schemas:
@@ -489,6 +495,10 @@ components:
489
495
  type: number
490
496
  format: decimal
491
497
  title: 'マネーの取引上限額'
498
+ money_topup_transfer_limit:
499
+ type: number
500
+ format: decimal
501
+ title: 'マネーチャージ取引上限額'
492
502
  type:
493
503
  type: string
494
504
  enum: [own, third-party]
@@ -500,7 +510,8 @@ components:
500
510
  enable_topup_by_member:
501
511
  type: boolean
502
512
  nullable: true
503
- title: '加盟店によるチャージが有効かどうか'
513
+ deprecated: true
514
+ description: 'このパラメータは未使用につき廃止されます'
504
515
  display_money_and_point:
505
516
  type: string
506
517
  enum: [both, money-only, point-only]
@@ -524,7 +535,16 @@ components:
524
535
  title: '取引ID'
525
536
  type:
526
537
  type: string
527
- title: '取引種別 (チャージ=topup, 支払い=payment)'
538
+ title: '取引種別'
539
+ description: |
540
+ 各取引種別の値の意味は以下の通りです。
541
+ - topup: チャージ
542
+ - payment: 支払い
543
+ - transfer: 個人間送金
544
+ - exchange: マネー間交換
545
+ - cashback: ウォレット退会時の払い戻し処理
546
+ - expire: ウォレット退会時の残高失効処理
547
+ enum: [topup, payment, transfer, exchange, cashback, expire]
528
548
  is_modified:
529
549
  type: boolean
530
550
  title: '返金された取引かどうか'
@@ -542,13 +562,28 @@ components:
542
562
  title: '受取ウォレット情報'
543
563
  amount:
544
564
  type: number
545
- title: '決済総額 (マネー額 + ポイント額)'
565
+ title: '取引総額 (マネー額 + ポイント額)'
546
566
  money_amount:
547
567
  type: number
548
- title: '決済マネー額'
568
+ title: '取引マネー額'
549
569
  point_amount:
550
570
  type: number
551
- title: '決済ポイント額'
571
+ title: '取引ポイント額(キャンペーン付与ポイント合算)'
572
+ description: |
573
+ 取引のポイント額です。
574
+ キャンペーンによるポイント付与額との合算値なので、元々の取引のポイント額のみを取り出したいときは `raw_point_amount` を参照してください。
575
+ チャージ取引の場合、point_amount = raw_point_amount + campaign_point_amount
576
+ 支払い取引の場合、point_amount = raw_point_amount - campaign_point_amount
577
+ が成立します。
578
+ raw_point_amount:
579
+ type: number
580
+ title: '取引ポイント額'
581
+ description: |
582
+ 取引のポイント額です。
583
+ キャンペーンによるポイント付与額を含まない、元々の取引で支払われたポイント額を表します。
584
+ campaign_point_amount:
585
+ type: number
586
+ title: 'キャンペーンによるポイント付与額'
552
587
  done_at:
553
588
  type: string
554
589
  format: date-time
@@ -565,7 +600,16 @@ components:
565
600
  title: '取引ID'
566
601
  type:
567
602
  type: string
568
- title: '取引種別 (チャージ=topup, 支払い=payment)'
603
+ title: '取引種別'
604
+ description: |
605
+ 各取引種別の値の意味は以下の通りです。
606
+ - topup: チャージ
607
+ - payment: 支払い
608
+ - transfer: 個人間送金
609
+ - exchange: マネー間交換
610
+ - cashback: ウォレット退会時の払い戻し処理
611
+ - expire: ウォレット退会時の残高失効処理
612
+ enum: [topup, payment, transfer, exchange, cashback, expire]
569
613
  is_modified:
570
614
  type: boolean
571
615
  title: '返金された取引かどうか'
@@ -583,13 +627,28 @@ components:
583
627
  title: '受取ウォレット情報'
584
628
  amount:
585
629
  type: number
586
- title: '決済総額 (マネー額 + ポイント額)'
630
+ title: '取引総額 (マネー額 + ポイント額)'
587
631
  money_amount:
588
632
  type: number
589
- title: '決済マネー額'
633
+ title: '取引マネー額'
590
634
  point_amount:
591
635
  type: number
592
- title: '決済ポイント額'
636
+ title: '取引ポイント額(キャンペーン付与ポイント合算)'
637
+ description: |
638
+ 取引のポイント額です。
639
+ キャンペーンによるポイント付与額との合算値なので、元々の取引のポイント額のみを取り出したいときは `raw_point_amount` を参照してください。
640
+ チャージ取引の場合、point_amount = raw_point_amount + campaign_point_amount
641
+ 支払い取引の場合、point_amount = raw_point_amount - campaign_point_amount
642
+ が成立します。
643
+ raw_point_amount:
644
+ type: number
645
+ title: '取引ポイント額'
646
+ description: |
647
+ 取引のポイント額です。
648
+ キャンペーンによるポイント付与額を含まない、元々の取引で支払われたポイント額を表します。
649
+ campaign_point_amount:
650
+ type: number
651
+ title: 'キャンペーンによるポイント付与額'
593
652
  done_at:
594
653
  type: string
595
654
  format: date-time
@@ -615,6 +674,10 @@ components:
615
674
  type: string
616
675
  maxLength: 256
617
676
  title: 組織コード
677
+ status:
678
+ type: string
679
+ enum: [active, disabled]
680
+ title: '店舗の状態'
618
681
  postal_code:
619
682
  type: string
620
683
  nullable: true
@@ -652,6 +715,10 @@ components:
652
715
  type: string
653
716
  maxLength: 256
654
717
  title: 組織コード
718
+ status:
719
+ type: string
720
+ enum: [active, disabled]
721
+ title: '店舗の状態'
655
722
  postal_code:
656
723
  type: string
657
724
  nullable: true
@@ -679,41 +746,6 @@ components:
679
746
  type: array
680
747
  items:
681
748
  $ref: '#/components/schemas/ShopAccount'
682
- UserTransaction:
683
- x-pokepay-schema-type: "response"
684
- properties:
685
- id:
686
- type: string
687
- format: uuid
688
- user:
689
- $ref: '#/components/schemas/User'
690
- balance:
691
- type: number
692
- format: decimal
693
- amount:
694
- type: number
695
- format: decimal
696
- minimum: 0
697
- money_amount:
698
- type: number
699
- format: decimal
700
- minimum: 0
701
- point_amount:
702
- type: number
703
- format: decimal
704
- minimum: 0
705
- account:
706
- $ref: '#/components/schemas/Account'
707
- description:
708
- type: string
709
- done_at:
710
- type: string
711
- format: date-time
712
- type:
713
- type: string
714
- enum: [topup, payment, transfer, exchange, cashback, expire]
715
- is_modified:
716
- type: boolean
717
749
  BulkTransaction:
718
750
  x-pokepay-schema-type: "response"
719
751
  properties:
@@ -761,7 +793,7 @@ components:
761
793
  id:
762
794
  type: integer
763
795
  bulk_transaction:
764
- $ref: '#/components/schemas/BulkTransaction'
796
+ $ref: '#/components/schemas/BulkTransaction'
765
797
  type:
766
798
  type: string
767
799
  enum:
@@ -1314,6 +1346,206 @@ components:
1314
1346
  type: array
1315
1347
  items:
1316
1348
  $ref: '#/components/schemas/AccountTransferSummaryElement'
1349
+ OrganizationWorkerTaskWebhook:
1350
+ x-pokepay-schema-type: "response"
1351
+ properties:
1352
+ id:
1353
+ type: string
1354
+ format: uuid
1355
+ organization_code:
1356
+ type: string
1357
+ task:
1358
+ type: string
1359
+ url:
1360
+ type: string
1361
+ content_type:
1362
+ type: string
1363
+ is_active:
1364
+ type: boolean
1365
+ PaginatedOrganizationWorkerTaskWebhook:
1366
+ x-pokepay-schema-type: "response"
1367
+ properties:
1368
+ rows:
1369
+ type: array
1370
+ items:
1371
+ $ref: '#/components/schemas/OrganizationWorkerTaskWebhook'
1372
+ count:
1373
+ type: integer
1374
+ minimum: 0
1375
+ pagination:
1376
+ $ref: '#/components/schemas/Pagination'
1377
+ Coupon:
1378
+ x-pokepay-schema-type: "response"
1379
+ properties:
1380
+ id:
1381
+ type: string
1382
+ format: uuid
1383
+ title: 'クーポンID'
1384
+ name:
1385
+ type: string
1386
+ title: 'クーポン名'
1387
+ issued_shop:
1388
+ $ref: '#/components/schemas/User'
1389
+ title: 'クーポン発行店舗'
1390
+ description:
1391
+ type: string
1392
+ title: 'クーポンの説明文'
1393
+ discount_amount:
1394
+ type: integer
1395
+ nullable: true
1396
+ title: 'クーポンによる値引き額(絶対値指定)'
1397
+ discount_percentage:
1398
+ type: number
1399
+ nullable: true
1400
+ title: 'クーポンによる値引き率'
1401
+ discount_upper_limit:
1402
+ type: integer
1403
+ nullable: true
1404
+ title: 'クーポンによる値引き上限(値引き率が指定された場合の値引き上限額)'
1405
+ starts_at:
1406
+ type: string
1407
+ format: date-time
1408
+ title: 'クーポンの利用可能期間(開始日時)'
1409
+ ends_at:
1410
+ type: string
1411
+ format: date-time
1412
+ title: 'クーポンの利用可能期間(終了日時)'
1413
+ display_starts_at:
1414
+ type: string
1415
+ format: date-time
1416
+ title: 'クーポンの掲載期間(開始日時)'
1417
+ display_ends_at:
1418
+ type: string
1419
+ format: date-time
1420
+ title: 'クーポンの掲載期間(終了日時)'
1421
+ usage_limit:
1422
+ type: integer
1423
+ nullable: true
1424
+ title: 'ユーザごとの利用可能回数(NULLの場合は無制限)'
1425
+ min_amount:
1426
+ type: integer
1427
+ nullable: true
1428
+ title: 'クーポン適用可能な最小取引額'
1429
+ is_shop_specified:
1430
+ type: boolean
1431
+ title: '特定店舗限定のクーポンかどうか'
1432
+ is_hidden:
1433
+ type: boolean
1434
+ title: 'クーポン一覧に掲載されるかどうか'
1435
+ description: |
1436
+ アプリに表示されるクーポン一覧に掲載されるかどうか。
1437
+ 主に一時的に掲載から外したいときに用いられる。そのためis_publicの設定よりも優先される。
1438
+ is_public:
1439
+ type: boolean
1440
+ title: 'アプリ配信なしで受け取れるかどうか'
1441
+ code:
1442
+ type: string
1443
+ nullable: true
1444
+ title: 'クーポン受け取りコード'
1445
+ is_disabled:
1446
+ type: boolean
1447
+ title: '無効化フラグ'
1448
+ token:
1449
+ type: string
1450
+ title: 'クーポンを特定するためのトークン'
1451
+ CouponDetail:
1452
+ x-pokepay-schema-type: "response"
1453
+ properties:
1454
+ id:
1455
+ type: string
1456
+ format: uuid
1457
+ title: 'クーポンID'
1458
+ name:
1459
+ type: string
1460
+ title: 'クーポン名'
1461
+ issued_shop:
1462
+ $ref: '#/components/schemas/User'
1463
+ title: 'クーポン発行店舗'
1464
+ description:
1465
+ type: string
1466
+ title: 'クーポンの説明文'
1467
+ discount_amount:
1468
+ type: integer
1469
+ nullable: true
1470
+ title: 'クーポンによる値引き額(絶対値指定)'
1471
+ discount_percentage:
1472
+ type: number
1473
+ nullable: true
1474
+ title: 'クーポンによる値引き率'
1475
+ discount_upper_limit:
1476
+ type: integer
1477
+ nullable: true
1478
+ title: 'クーポンによる値引き上限(値引き率が指定された場合の値引き上限額)'
1479
+ starts_at:
1480
+ type: string
1481
+ format: date-time
1482
+ title: 'クーポンの利用可能期間(開始日時)'
1483
+ ends_at:
1484
+ type: string
1485
+ format: date-time
1486
+ title: 'クーポンの利用可能期間(終了日時)'
1487
+ display_starts_at:
1488
+ type: string
1489
+ format: date-time
1490
+ title: 'クーポンの掲載期間(開始日時)'
1491
+ display_ends_at:
1492
+ type: string
1493
+ format: date-time
1494
+ title: 'クーポンの掲載期間(終了日時)'
1495
+ usage_limit:
1496
+ type: integer
1497
+ nullable: true
1498
+ title: 'ユーザごとの利用可能回数(NULLの場合は無制限)'
1499
+ min_amount:
1500
+ type: integer
1501
+ nullable: true
1502
+ title: 'クーポン適用可能な最小取引額'
1503
+ is_shop_specified:
1504
+ type: boolean
1505
+ title: '特定店舗限定のクーポンかどうか'
1506
+ is_hidden:
1507
+ type: boolean
1508
+ title: 'クーポン一覧に掲載されるかどうか'
1509
+ description: |
1510
+ アプリに表示されるクーポン一覧に掲載されるかどうか。
1511
+ 主に一時的に掲載から外したいときに用いられる。そのためis_publicの設定よりも優先される。
1512
+ is_public:
1513
+ type: boolean
1514
+ title: 'アプリ配信なしで受け取れるかどうか'
1515
+ code:
1516
+ type: string
1517
+ nullable: true
1518
+ title: 'クーポン受け取りコード'
1519
+ is_disabled:
1520
+ type: boolean
1521
+ title: '無効化フラグ'
1522
+ token:
1523
+ type: string
1524
+ title: 'クーポンを特定するためのトークン'
1525
+ coupon_image:
1526
+ type: string
1527
+ nullable: true
1528
+ title: 'クーポン画像のURL'
1529
+ available_shops:
1530
+ type: array
1531
+ items:
1532
+ $ref: '#/components/schemas/User'
1533
+ title: '利用可能店舗リスト'
1534
+ private_money:
1535
+ $ref: '#/components/schemas/PrivateMoney'
1536
+ title: 'クーポンのマネー'
1537
+ PaginatedCoupons:
1538
+ x-pokepay-schema-type: "response"
1539
+ properties:
1540
+ rows:
1541
+ type: array
1542
+ items:
1543
+ $ref: '#/components/schemas/Coupon'
1544
+ count:
1545
+ type: integer
1546
+ minimum: 0
1547
+ pagination:
1548
+ $ref: '#/components/schemas/Pagination'
1317
1549
 
1318
1550
  BadRequest:
1319
1551
  x-pokepay-schema-type: "response"
@@ -3124,6 +3356,17 @@ paths:
3124
3356
  エンドユーザーIDです。
3125
3357
 
3126
3358
  送金先のエンドユーザーを指定します。
3359
+ request_id:
3360
+ type: string
3361
+ format: uuid
3362
+ title: 'リクエストID'
3363
+ description: |-
3364
+ 取引作成APIの羃等性を担保するためのリクエスト固有のIDです。
3365
+
3366
+ 取引作成APIで結果が受け取れなかったなどの理由で再試行する際に、二重に取引が作られてしまうことを防ぐために、クライアント側から指定されます。指定は任意で、UUID V4フォーマットでランダム生成した文字列です。リクエストIDは一定期間で削除されます。
3367
+
3368
+ リクエストIDを指定したとき、まだそのリクエストIDに対する取引がない場合、新規に取引が作られレスポンスとして返されます。もしそのリクエストIDに対する取引が既にある場合、既存の取引がレスポンスとして返されます。
3369
+ example: '9dbfd997-b948-40d3-a3bf-6bc1a01368d2'
3127
3370
  responses:
3128
3371
  '200':
3129
3372
  description: OK
@@ -3421,9 +3664,9 @@ paths:
3421
3664
  name: string
3422
3665
  max_balance: 0
3423
3666
  transfer_limit: 0
3667
+ money_topup_transfer_limit: 0
3424
3668
  type: own
3425
3669
  expiration_type: static
3426
- enable_topup_by_member: true
3427
3670
  receiver:
3428
3671
  id: 497f6eca-6276-4993-bfeb-53cbbbba6f08
3429
3672
  name: string
@@ -3444,9 +3687,9 @@ paths:
3444
3687
  name: string
3445
3688
  max_balance: 0
3446
3689
  transfer_limit: 0
3690
+ money_topup_transfer_limit: 0
3447
3691
  type: own
3448
3692
  expiration_type: static
3449
- enable_topup_by_member: true
3450
3693
  amount: 0
3451
3694
  money_amount: 0
3452
3695
  point_amount: 0
@@ -4431,6 +4674,11 @@ paths:
4431
4674
  title: '店舗の外部ID'
4432
4675
  description: |
4433
4676
  このパラメータを渡すとその外部IDが登録された店舗のみが返されます。
4677
+ with_disabled:
4678
+ type: boolean
4679
+ title: '無効な店舗を含める'
4680
+ description: |
4681
+ このパラメータを渡すと無効にされた店舗を含めて返されます。デフォルトでは無効にされた店舗は返されません。
4434
4682
  page:
4435
4683
  type: integer
4436
4684
  minimum: 1
@@ -4742,6 +4990,12 @@ paths:
4742
4990
 
4743
4991
  このパラメータは発行体のみが指定でき、発行しているマネーのみを指定できます。加盟店が他発行体のマネーに加盟している場合でも、そのチャージ可否を変更することはできません。
4744
4992
  省略したときは対象店舗のその発行体の全てのマネーのアカウントがチャージ不可となります。
4993
+ status:
4994
+ type: string
4995
+ enum: [active, disabled]
4996
+ title: '店舗の状態'
4997
+ description: |-
4998
+ 店舗の状態です。activeを指定すると有効となり、disabledを指定するとリスト表示から除外されます。
4745
4999
  responses:
4746
5000
  '200':
4747
5001
  description: OK
@@ -5041,7 +5295,7 @@ paths:
5041
5295
  /bulk-transactions/{bulk_transaction_id}/jobs:
5042
5296
  get:
5043
5297
  summary: バルク取引ジョブの詳細情報一覧を取得する
5044
- x-pokepay-operator-name: "GetBulkTransaction"
5298
+ x-pokepay-operator-name: "ListBulkTransactionJobs"
5045
5299
  x-pokepay-allow-server-side: true
5046
5300
  requestBody:
5047
5301
  required: true
@@ -5182,6 +5436,8 @@ paths:
5182
5436
  - チャージ時に、エンドユーザーのウォレット上限を超えて取引が完了できなかったときに返されます
5183
5437
  - `account_transfer_limit_exceeded (422)`
5184
5438
  - マネーに設定されている一度の取引金額の上限を超えたため、取引が完了できなかったときに返されます
5439
+ - `account_money_topup_transfer_limit_exceeded (422)`
5440
+ - マネーに設定されている一度のマネーチャージ金額の上限を超えたため、取引が完了できなかったときに返されます
5185
5441
  - `account_not_found (422)`
5186
5442
  - Cashtrayに設定されたマネーのウォレットをエンドユーザーが持っていなかったときに返されます
5187
5443
 
@@ -5597,7 +5853,17 @@ paths:
5597
5853
  description: |-
5598
5854
  対象の製品コード (JANコードやISBNコードなど) を指定します。(必須項目)
5599
5855
 
5600
- SQLのLIKE文のようにワイルドカードを使った製品コードのパターンを指定することもできます (例: 978-% でISBNコード)
5856
+ SQLのLIKE文のようにワイルドカードを使った製品コードのパターンを指定することもできます (_ で任意の1文字にマッチし、 % で任意文字列にマッチします。 例: 978-% でISBNコード)
5857
+ items:
5858
+ type: string
5859
+ classification_code:
5860
+ type: string
5861
+ maxLength: 64
5862
+ title: '対象の商品分類コード'
5863
+ description: |-
5864
+ 対象の商品分類コード (書籍のCコードなど) を指定します。(任意項目)
5865
+
5866
+ SQLのLIKE文のようにワイルドカードを使った製品コードのパターンを指定することもできます (_ で任意の1文字にマッチし、 % で任意文字列にマッチします。 例: 978-% でISBNコード)
5601
5867
  items:
5602
5868
  type: string
5603
5869
  required_count:
@@ -5698,7 +5964,7 @@ paths:
5698
5964
  type: array
5699
5965
  items:
5700
5966
  type: integer
5701
- minimun: 0
5967
+ minimum: 0
5702
5968
  maximum: 6
5703
5969
  title: 'キャンペーンを適用する曜日 (複数指定)'
5704
5970
  describe: |-
@@ -6022,6 +6288,20 @@ paths:
6022
6288
  有効化されており、現在キャンペーン期間内にあるキャンペーンをフィルターするために使われます。
6023
6289
  真であれば適用可能なもののみを抽出し、偽であれば適用不可なもののみを抽出します。
6024
6290
  デフォルトでは未指定(フィルターなし)です。
6291
+ available_from:
6292
+ type: string
6293
+ format: date-time
6294
+ title: '指定された日時以降に適用可能期間が含まれているか'
6295
+ description: |-
6296
+ キャンペーン終了日時が指定された日時以降であるキャンペーンをフィルターするために使われます。
6297
+ デフォルトでは未指定(フィルターなし)です。
6298
+ available_to:
6299
+ type: string
6300
+ format: date-time
6301
+ title: '指定された日時以前に適用可能期間が含まれているか'
6302
+ description: |-
6303
+ キャンペーン開始日時が指定された日時以前であるキャンペーンをフィルターするために使われます。
6304
+ デフォルトでは未指定(フィルターなし)です。
6025
6305
  page:
6026
6306
  type: integer
6027
6307
  minimum: 1
@@ -6031,9 +6311,10 @@ paths:
6031
6311
  per_page:
6032
6312
  type: integer
6033
6313
  minimum: 1
6314
+ maximum: 50
6034
6315
  title: '1ページ分の取得数'
6035
6316
  description: 1ページ分の取得数です。デフォルトでは 20 になっています。
6036
- example: 50
6317
+ example: 20
6037
6318
  responses:
6038
6319
  '200':
6039
6320
  description: OK
@@ -6345,6 +6626,16 @@ paths:
6345
6626
  SQLのLIKE文のようにワイルドカードを使った製品コードのパターンを指定することもできます (例: 978-% でISBNコード)
6346
6627
  items:
6347
6628
  type: string
6629
+ classification_code:
6630
+ type: string
6631
+ maxLength: 64
6632
+ title: '対象の商品分類コード'
6633
+ description: |-
6634
+ 対象の商品分類コード (書籍のCコードなど) を指定します。(任意項目)
6635
+
6636
+ SQLのLIKE文のようにワイルドカードを使った製品コードのパターンを指定することもできます (_ で任意の1文字にマッチし、 % で任意文字列にマッチします。 例: 978-% でISBNコード)
6637
+ items:
6638
+ type: string
6348
6639
  required_count:
6349
6640
  type: integer
6350
6641
  minimum: 1
@@ -6420,7 +6711,7 @@ paths:
6420
6711
  // 対象商品を2つ以上購入したら500ポイント付与(固定額付与)
6421
6712
  {
6422
6713
  "point_amount": 500,
6423
- "point_amount_unit": absolute",
6714
+ "point_amount_unit": "absolute",
6424
6715
  "product_code": "4912345678904",
6425
6716
  "required_count": 2
6426
6717
  },
@@ -6444,7 +6735,7 @@ paths:
6444
6735
  type: array
6445
6736
  items:
6446
6737
  type: integer
6447
- minimun: 0
6738
+ minimum: 0
6448
6739
  maximum: 6
6449
6740
  nullable: true
6450
6741
  title: 'キャンペーンを適用する曜日 (複数指定)'
@@ -6789,3 +7080,250 @@ paths:
6789
7080
  $ref: '#/components/responses/UnpermittedAdminUser'
6790
7081
  '503':
6791
7082
  $ref: '#/components/responses/UserStatsOperationServiceUnavailable'
7083
+ /webhooks:
7084
+ post:
7085
+ x-pokepay-operator-name: "CreateWebhook"
7086
+ x-pokepay-allow-server-side: true
7087
+ tags:
7088
+ - Webhook
7089
+ summary: webhookの作成
7090
+ description: |-
7091
+ ワーカータスクの処理が終了したことを通知するためのWebhookを登録します
7092
+ このAPIにより指定したタスクの終了時に、指定したURLにPOSTリクエストを送信します。
7093
+ このとき、リクエストボディは `{"task": <タスク名>}` という値になります。
7094
+ requestBody:
7095
+ required: true
7096
+ content:
7097
+ application/json:
7098
+ schema:
7099
+ required: ["task", "url"]
7100
+ properties:
7101
+ task:
7102
+ type: string
7103
+ enum: ["bulk_shops", "process_user_stats_operation"]
7104
+ title: タスク名
7105
+ description: ワーカータスク名を指定します
7106
+ url:
7107
+ type: string
7108
+ title: URL
7109
+ description: 通知先のURLを指定します
7110
+ responses:
7111
+ '200':
7112
+ description: OK
7113
+ content:
7114
+ application/json:
7115
+ schema:
7116
+ $ref: '#/components/schemas/OrganizationWorkerTaskWebhook'
7117
+ '400':
7118
+ $ref: '#/components/responses/InvalidParameters'
7119
+ '403':
7120
+ $ref: '#/components/responses/Forbidden'
7121
+ '409':
7122
+ $ref: '#/components/responses/Conflict'
7123
+ get:
7124
+ x-pokepay-operator-name: "ListWebhooks"
7125
+ x-pokepay-allow-server-side: true
7126
+ tags:
7127
+ - Webhook
7128
+ summary: 作成したWebhookの一覧を返す
7129
+ requestBody:
7130
+ required: true
7131
+ content:
7132
+ application/json:
7133
+ schema:
7134
+ required: []
7135
+ properties:
7136
+ page:
7137
+ type: integer
7138
+ default: 1
7139
+ minimum: 1
7140
+ title: 'ページ番号'
7141
+ description: 取得したいページ番号です。
7142
+ example: 1
7143
+ per_page:
7144
+ type: integer
7145
+ default: 50
7146
+ minimum: 1
7147
+ title: '1ページ分の取得数'
7148
+ description: 1ページ分の取得数です。デフォルトでは 50 になっています。
7149
+ example: 50
7150
+ responses:
7151
+ '200':
7152
+ description: OK
7153
+ content:
7154
+ application/json:
7155
+ schema:
7156
+ $ref: '#/components/schemas/PaginatedOrganizationWorkerTaskWebhook'
7157
+ '400':
7158
+ $ref: '#/components/responses/InvalidParameters'
7159
+ '403':
7160
+ $ref: '#/components/responses/Forbidden'
7161
+ /webhooks/{webhook_id}:
7162
+ patch:
7163
+ x-pokepay-operator-name: "UpdateWebhook"
7164
+ x-pokepay-allow-server-side: true
7165
+ tags:
7166
+ - Webhook
7167
+ summary: Webhookの更新
7168
+ description: 指定したWebhookの内容を更新します
7169
+ parameters:
7170
+ - in: path
7171
+ name: webhook_id
7172
+ required: true
7173
+ schema:
7174
+ type: string
7175
+ format: uuid
7176
+ title: 'Webhook ID'
7177
+ description: |-
7178
+ 更新するWebhookのIDです。
7179
+ requestBody:
7180
+ required: true
7181
+ content:
7182
+ application/json:
7183
+ schema:
7184
+ required: []
7185
+ properties:
7186
+ url:
7187
+ type: string
7188
+ title: URL
7189
+ description: 変更するURLを指定します
7190
+ is_active:
7191
+ type: boolean
7192
+ title: 有効/無効
7193
+ description: trueならWebhookによる通知が有効になり、falseなら無効になります
7194
+ task:
7195
+ type: string
7196
+ enum: ["bulk_shops", "process_user_stats_operation"]
7197
+ title: タスク名
7198
+ description: 指定したタスクが終了したときにWebhookによる通知がされます
7199
+ responses:
7200
+ '200':
7201
+ description: OK
7202
+ content:
7203
+ application/json:
7204
+ schema:
7205
+ $ref: '#/components/schemas/OrganizationWorkerTaskWebhook'
7206
+ '400':
7207
+ $ref: '#/components/responses/InvalidParameters'
7208
+ '403':
7209
+ $ref: '#/components/responses/Forbidden'
7210
+ '404':
7211
+ $ref: '#/components/responses/NotFound'
7212
+ '409':
7213
+ $ref: '#/components/responses/Conflict'
7214
+
7215
+ /coupons:
7216
+ get:
7217
+ x-pokepay-operator-name: "ListCoupons"
7218
+ x-pokepay-allow-server-side: true
7219
+ tags:
7220
+ - Coupon
7221
+ summary: クーポン一覧の取得
7222
+ description: 指定したマネーのクーポン一覧を取得します
7223
+ requestBody:
7224
+ required: true
7225
+ content:
7226
+ application/json:
7227
+ schema:
7228
+ required: [private_money_id]
7229
+ properties:
7230
+ private_money_id:
7231
+ type: string
7232
+ format: uuid
7233
+ title: '対象クーポンのマネーID'
7234
+ description: |
7235
+ 対象クーポンのマネーIDです(必須項目)。
7236
+ 存在しないマネーIDを指定した場合はprivate_money_not_foundエラー(422)が返ります。
7237
+ coupon_id:
7238
+ type: string
7239
+ title: 'クーポンID'
7240
+ description: |
7241
+ 指定されたクーポンIDで結果をフィルターします。
7242
+ 部分一致(前方一致)します。
7243
+ coupon_name:
7244
+ type: string
7245
+ title: 'クーポン名'
7246
+ description: |
7247
+ 指定されたクーポン名で結果をフィルターします。
7248
+ issued_shop_name:
7249
+ type: string
7250
+ title: '発行店舗名'
7251
+ description: |
7252
+ 指定された発行店舗で結果をフィルターします。
7253
+ available_shop_name:
7254
+ type: string
7255
+ title: '利用可能店舗名'
7256
+ description: |
7257
+ 指定された利用可能店舗で結果をフィルターします。
7258
+ available_from:
7259
+ type: string
7260
+ format: date-time
7261
+ title: '利用可能期間 (開始日時)'
7262
+ description: |
7263
+ 利用可能期間でフィルターします。フィルターの開始日時をISO8601形式で指定します。
7264
+ available_to:
7265
+ type: string
7266
+ format: date-time
7267
+ title: '利用可能期間 (終了日時)'
7268
+ description: |
7269
+ 利用可能期間でフィルターします。フィルターの終了日時をISO8601形式で指定します。
7270
+ page:
7271
+ type: integer
7272
+ default: 1
7273
+ minimum: 1
7274
+ title: 'ページ番号'
7275
+ description: 取得したいページ番号です。
7276
+ example: 1
7277
+ per_page:
7278
+ type: integer
7279
+ default: 50
7280
+ minimum: 1
7281
+ title: '1ページ分の取得数'
7282
+ description: 1ページ分の取得数です。デフォルトでは 50 になっています。
7283
+ example: 50
7284
+ responses:
7285
+ '200':
7286
+ description: OK
7287
+ content:
7288
+ application/json:
7289
+ schema:
7290
+ $ref: '#/components/schemas/PaginatedCoupons'
7291
+ '400':
7292
+ $ref: '#/components/responses/InvalidParameters'
7293
+ '403':
7294
+ $ref: '#/components/responses/UnpermittedAdminUser'
7295
+ '422':
7296
+ $ref: '#/components/responses/UnprocessableEntity'
7297
+ /coupons/{coupon-id}:
7298
+ get:
7299
+ x-pokepay-operator-name: "GetCoupon"
7300
+ x-pokepay-allow-server-side: true
7301
+ tags:
7302
+ - Coupon
7303
+ summary: クーポンの取得
7304
+ description: 指定したIDを持つクーポンを取得します
7305
+ parameters:
7306
+ - in: path
7307
+ name: coupon-id
7308
+ required: true
7309
+ schema:
7310
+ type: string
7311
+ format: uuid
7312
+ title: 'クーポンID'
7313
+ description: |-
7314
+ 取得するクーポンのIDです。
7315
+ UUIDv4フォーマットである必要があり、フォーマットが異なる場合は InvalidParametersエラー(400)が返ります。
7316
+ 指定したIDのクーポンが存在しない場合はCouponNotFoundエラー(422)が返ります。
7317
+ responses:
7318
+ '200':
7319
+ description: OK
7320
+ content:
7321
+ application/json:
7322
+ schema:
7323
+ $ref: '#/components/schemas/CouponDetail'
7324
+ '400':
7325
+ $ref: '#/components/responses/InvalidParameters'
7326
+ '403':
7327
+ $ref: '#/components/responses/UnpermittedAdminUser'
7328
+ '422':
7329
+ $ref: '#/components/responses/UnprocessableEntity'