pokepay_partner_ruby_sdk 0.3.2 → 0.3.6

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 (59) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/release-pr.yml +18 -0
  3. data/Gemfile.lock +1 -1
  4. data/docs/README.md +269 -0
  5. data/docs/account.md +159 -0
  6. data/docs/bank_pay.md +235 -0
  7. data/docs/bill.md +365 -0
  8. data/docs/bulk.md +121 -0
  9. data/docs/campaign.md +1749 -0
  10. data/docs/cashtray.md +318 -0
  11. data/docs/check.md +883 -0
  12. data/docs/coupon.md +724 -0
  13. data/docs/customer.md +1042 -0
  14. data/docs/error-response.csv +839 -0
  15. data/docs/event.md +308 -0
  16. data/docs/index.md +1279 -305
  17. data/docs/organization.md +292 -0
  18. data/docs/private_money.md +213 -0
  19. data/docs/responses.md +711 -0
  20. data/docs/shop.md +678 -0
  21. data/docs/transaction.md +2021 -0
  22. data/docs/transfer.md +686 -0
  23. data/docs/user.md +3 -0
  24. data/docs/user_device.md +134 -0
  25. data/docs/webhook.md +231 -0
  26. data/lib/pokepay_partner_ruby_sdk/request/activate_user_device.rb +15 -0
  27. data/lib/pokepay_partner_ruby_sdk/request/create_bank.rb +17 -0
  28. data/lib/pokepay_partner_ruby_sdk/request/create_bank_topup_transaction.rb +18 -0
  29. data/lib/pokepay_partner_ruby_sdk/request/create_coupon.rb +19 -0
  30. data/lib/pokepay_partner_ruby_sdk/request/create_external_transaction.rb +2 -2
  31. data/lib/pokepay_partner_ruby_sdk/request/create_transaction_with_cashtray.rb +16 -0
  32. data/lib/pokepay_partner_ruby_sdk/request/create_user_device.rb +15 -0
  33. data/lib/pokepay_partner_ruby_sdk/request/delete_webhook.rb +15 -0
  34. data/lib/pokepay_partner_ruby_sdk/request/get_check.rb +15 -0
  35. data/lib/pokepay_partner_ruby_sdk/request/get_coupon.rb +1 -1
  36. data/lib/pokepay_partner_ruby_sdk/request/get_external_transaction_by_request_id.rb +15 -0
  37. data/lib/pokepay_partner_ruby_sdk/request/get_user_device.rb +15 -0
  38. data/lib/pokepay_partner_ruby_sdk/request/list_banks.rb +15 -0
  39. data/lib/pokepay_partner_ruby_sdk/request/list_checks.rb +15 -0
  40. data/lib/pokepay_partner_ruby_sdk/request/list_organizations.rb +15 -0
  41. data/lib/pokepay_partner_ruby_sdk/request/refund_external_transaction.rb +2 -2
  42. data/lib/pokepay_partner_ruby_sdk/request/update_check.rb +15 -0
  43. data/lib/pokepay_partner_ruby_sdk/request/update_coupon.rb +15 -0
  44. data/lib/pokepay_partner_ruby_sdk/response/bank.rb +28 -0
  45. data/lib/pokepay_partner_ruby_sdk/response/bank_registering_info.rb +13 -0
  46. data/lib/pokepay_partner_ruby_sdk/response/banks.rb +13 -0
  47. data/lib/pokepay_partner_ruby_sdk/response/campaign.rb +6 -0
  48. data/lib/pokepay_partner_ruby_sdk/response/check.rb +2 -0
  49. data/lib/pokepay_partner_ruby_sdk/response/external_transaction_detail.rb +34 -0
  50. data/lib/pokepay_partner_ruby_sdk/response/organization_summary.rb +4 -0
  51. data/lib/pokepay_partner_ruby_sdk/response/paginated_checks.rb +16 -0
  52. data/lib/pokepay_partner_ruby_sdk/response/paginated_organizations.rb +16 -0
  53. data/lib/pokepay_partner_ruby_sdk/response/private_money_summary.rb +4 -0
  54. data/lib/pokepay_partner_ruby_sdk/response/product.rb +2 -0
  55. data/lib/pokepay_partner_ruby_sdk/response/user_device.rb +18 -0
  56. data/lib/pokepay_partner_ruby_sdk/version.rb +1 -1
  57. data/lib/pokepay_partner_ruby_sdk.rb +26 -4
  58. data/partner.yaml +1578 -216
  59. metadata +46 -2
data/partner.yaml CHANGED
@@ -7,8 +7,9 @@ openapi: '3.0.1'
7
7
  info:
8
8
  description: >-
9
9
  Partner APIs
10
+
10
11
  title: Partner APIs
11
- version: 0.0.0
12
+ version: 24.3.26
12
13
 
13
14
  tags:
14
15
  - name: Transaction
@@ -34,6 +35,7 @@ tags:
34
35
  - name: Customer
35
36
  - name: Organization
36
37
  - name: Shop
38
+ - name: User
37
39
  - name: Account
38
40
  - name: Private Money
39
41
  - name: Bulk
@@ -45,6 +47,17 @@ tags:
45
47
  WebHookにはURLとタスク名、有効化されているかを設定することが出来ます。
46
48
  通知はタスク完了時、事前に設定したURLにPOSTリクエストを行います。
47
49
  - name: Coupon
50
+ description: |
51
+ Couponは支払い時に指定し、支払い処理の前にCouponに指定の方法で値引き処理を行います。
52
+ Couponは特定店舗で利用できるものや利用可能期間、配信条件などを設定できます。
53
+ - name: UserDevice
54
+ description: |
55
+ UserDeviceはユーザー毎のデバイスを管理します。
56
+ あるユーザーが使っている端末を区別する必要がある場合に用いられます。
57
+ これが必要な理由はBank Payを用いたチャージを行う場合は端末を区別できることが要件としてあるためです。
58
+ - name: BankPay
59
+ description: |
60
+ BankPayを用いた銀行からのチャージ取引などのAPIを提供しています。
48
61
 
49
62
  components:
50
63
  schemas:
@@ -52,6 +65,7 @@ components:
52
65
  x-pokepay-schema-type: "response"
53
66
  properties:
54
67
  pong:
68
+ x-pokepay-csharp-property-name: "Value"
55
69
  type: string
56
70
  pattern: '^ok$'
57
71
  Echo:
@@ -284,6 +298,10 @@ components:
284
298
  type: string
285
299
  format: date-time
286
300
  title: チャージQRコード自体の失効日時
301
+ last_used_at:
302
+ type: string
303
+ format: date-time
304
+ nullable: true
287
305
  private_money:
288
306
  $ref: '#/components/schemas/PrivateMoney'
289
307
  title: 対象マネー情報
@@ -309,11 +327,24 @@ components:
309
327
  token:
310
328
  type: string
311
329
  title: チャージQRコードを解析したときに出てくるURL
330
+ PaginatedChecks:
331
+ x-pokepay-schema-type: "response"
332
+ properties:
333
+ rows:
334
+ type: array
335
+ items:
336
+ $ref: '#/components/schemas/Check'
337
+ count:
338
+ type: integer
339
+ minimum: 0
340
+ pagination:
341
+ $ref: '#/components/schemas/Pagination'
312
342
  CpmToken:
313
343
  x-pokepay-schema-type: "response"
314
344
  type: object
315
345
  properties:
316
346
  cpm_token:
347
+ x-pokepay-csharp-property-name: "Token"
317
348
  type: string
318
349
  minLength: 22
319
350
  maxLength: 22
@@ -581,9 +612,11 @@ components:
581
612
  description: |
582
613
  取引のポイント額です。
583
614
  キャンペーンによるポイント付与額を含まない、元々の取引で支払われたポイント額を表します。
615
+ nullable: true
584
616
  campaign_point_amount:
585
617
  type: number
586
618
  title: 'キャンペーンによるポイント付与額'
619
+ nullable: true
587
620
  done_at:
588
621
  type: string
589
622
  format: date-time
@@ -948,6 +981,96 @@ components:
948
981
  description:
949
982
  type: string
950
983
  title: 取引説明文
984
+ ExternalTransactionDetail:
985
+ x-pokepay-schema-type: "response"
986
+ properties:
987
+ id:
988
+ type: string
989
+ format: uuid
990
+ title: ポケペイ外部取引ID
991
+ is_modified:
992
+ type: boolean
993
+ title: 返金された取引かどうか
994
+ sender:
995
+ $ref: '#/components/schemas/User'
996
+ title: 送金者情報
997
+ sender_account:
998
+ $ref: '#/components/schemas/Account'
999
+ title: 送金ウォレット情報
1000
+ receiver:
1001
+ $ref: '#/components/schemas/User'
1002
+ title: 受取者情報
1003
+ receiver_account:
1004
+ $ref: '#/components/schemas/Account'
1005
+ title: 受取ウォレット情報
1006
+ amount:
1007
+ type: number
1008
+ title: 決済額
1009
+ done_at:
1010
+ type: string
1011
+ format: date-time
1012
+ title: 取引日時
1013
+ description:
1014
+ type: string
1015
+ title: 取引説明文
1016
+ transaction:
1017
+ $ref: '#/components/schemas/TransactionDetail'
1018
+ nullable: true
1019
+ title: 関連ポケペイ取引詳細
1020
+ description: |
1021
+ ポケペイ外取引と連動して作られたポケペイ取引の取引詳細です。
1022
+ 例えば、キャンペーンによるポイント付与取引やキャンセル状況などの情報が含まれます。
1023
+ ポケペイ取引が存在しない場合はnullが設定されます。
1024
+
1025
+ Products:
1026
+ type: array
1027
+ items:
1028
+ type: object
1029
+ properties:
1030
+ jan_code:
1031
+ type: string
1032
+ maxLength: 64
1033
+ classification_code:
1034
+ type: string
1035
+ maxLength: 64
1036
+ name:
1037
+ type: string
1038
+ maxLength: 256
1039
+ unit_price:
1040
+ type: number
1041
+ minimum: 0
1042
+ price:
1043
+ type: number
1044
+ minimum: 0
1045
+ quantity:
1046
+ type: integer
1047
+ minimum: 1
1048
+ is_discounted:
1049
+ type: boolean
1050
+ other:
1051
+ type: string
1052
+ format: json
1053
+ example: |-
1054
+ {"jan_code":"abc",
1055
+ "name":"name1",
1056
+ "unit_price":100,
1057
+ "price": 100,
1058
+ "quantity": 1,
1059
+ "is_discounted": false,
1060
+ "other":"{}"}
1061
+ title: '商品情報データ'
1062
+ description: |-
1063
+ 一つの取引に含まれる商品情報データです。
1064
+ 以下の内容からなるJSONオブジェクトの配列で指定します。
1065
+
1066
+ - `jan_code`: JANコード。64字以下の文字列
1067
+ - `name`: 商品名。256字以下の文字列
1068
+ - `unit_price`: 商品単価。0以上の数値
1069
+ - `price`: 全体の金額(例: 商品単価 × 個数)。0以上の数値
1070
+ - `quantity`: 商品の個数。この値が指定された場合、priceから算出される個数よりも優先されます。
1071
+ - `is_discounted`: 賞味期限が近いなどの理由で商品が値引きされているかどうかのフラグ。boolean
1072
+ - `other`: その他商品に関する情報。JSONオブジェクトで指定します。
1073
+
951
1074
  Product:
952
1075
  x-pokepay-schema-type: "response"
953
1076
  properties:
@@ -963,6 +1086,10 @@ components:
963
1086
  price:
964
1087
  type: number
965
1088
  minimum: 0
1089
+ quantity:
1090
+ type: integer
1091
+ minimum: 1
1092
+ nullable: true
966
1093
  is_discounted:
967
1094
  type: boolean
968
1095
  other:
@@ -984,6 +1111,14 @@ components:
984
1111
  type: number
985
1112
  format: decimal
986
1113
  minimum: 0
1114
+ raw_point_amount:
1115
+ type: number
1116
+ format: decimal
1117
+ minimum: 0
1118
+ campaign_point_amount:
1119
+ type: number
1120
+ format: decimal
1121
+ minimum: 0
987
1122
  point_count:
988
1123
  type: integer
989
1124
  PrivateMoneyOrganizationSummary:
@@ -1027,6 +1162,12 @@ components:
1027
1162
  added_point_amount:
1028
1163
  type: number
1029
1164
  format: decimal
1165
+ topup_point_amount:
1166
+ type: number
1167
+ format: decimal
1168
+ campaign_point_amount:
1169
+ type: number
1170
+ format: decimal
1030
1171
  refunded_added_point_amount:
1031
1172
  type: number
1032
1173
  format: decimal
@@ -1078,6 +1219,67 @@ components:
1078
1219
  type: string
1079
1220
  format: date-time
1080
1221
 
1222
+ UserDevice:
1223
+ x-pokepay-schema-type: "response"
1224
+ properties:
1225
+ id:
1226
+ type: string
1227
+ format: uuid
1228
+ title: 'デバイスID'
1229
+ user:
1230
+ $ref: '#/components/schemas/User'
1231
+ title: 'デバイスを使用するユーザ'
1232
+ is_active:
1233
+ type: boolean
1234
+ title: 'デバイスが有効か'
1235
+ metadata:
1236
+ type: string
1237
+ format: json
1238
+ title: 'デバイスのメタデータ'
1239
+
1240
+ BankRegisteringInfo:
1241
+ x-pokepay-schema-type: "response"
1242
+ properties:
1243
+ redirect_url:
1244
+ type: string
1245
+ paytree_customer_number:
1246
+ type: string
1247
+ nullable: true
1248
+
1249
+ Bank:
1250
+ x-pokepay-schema-type: "response"
1251
+ properties:
1252
+ id:
1253
+ type: string
1254
+ format: uuid
1255
+ private_money:
1256
+ $ref: '#/components/schemas/PrivateMoney'
1257
+ bank_name:
1258
+ type: string
1259
+ bank_code:
1260
+ type: string
1261
+ branch_number:
1262
+ type: string
1263
+ branch_name:
1264
+ type: string
1265
+ deposit_type:
1266
+ type: string
1267
+ masked_account_number:
1268
+ type: string
1269
+ account_name:
1270
+ type: string
1271
+
1272
+ Banks:
1273
+ x-pokepay-schema-type: "response"
1274
+ properties:
1275
+ rows:
1276
+ type: array
1277
+ items:
1278
+ $ref: '#/components/schemas/Bank'
1279
+ count:
1280
+ type: integer
1281
+ minimum: 0
1282
+
1081
1283
  PaginatedTransaction:
1082
1284
  x-pokepay-schema-type: "response"
1083
1285
  properties:
@@ -1312,6 +1514,20 @@ components:
1312
1514
  type: string
1313
1515
  enum: [enabled, disabled]
1314
1516
  title: 'キャンペーンの現在の状態'
1517
+ budget_caps_amount:
1518
+ title: 'キャンペーンの予算上限額'
1519
+ type: integer
1520
+ nullable: true
1521
+ budget_current_amount:
1522
+ title: 'キャンペーンの付与合計額'
1523
+ type: integer
1524
+ nullable: true
1525
+ budget_current_time:
1526
+ title: 'キャンペーンの付与集計日時'
1527
+ type: string
1528
+ format: date-time
1529
+ nullable: true
1530
+
1315
1531
  PaginatedCampaigns:
1316
1532
  x-pokepay-schema-type: "response"
1317
1533
  properties:
@@ -1546,6 +1762,18 @@ components:
1546
1762
  minimum: 0
1547
1763
  pagination:
1548
1764
  $ref: '#/components/schemas/Pagination'
1765
+ PaginatedOrganizations:
1766
+ x-pokepay-schema-type: "response"
1767
+ properties:
1768
+ rows:
1769
+ type: array
1770
+ items:
1771
+ $ref: '#/components/schemas/Organization'
1772
+ count:
1773
+ type: integer
1774
+ minimum: 0
1775
+ pagination:
1776
+ $ref: '#/components/schemas/Pagination'
1549
1777
 
1550
1778
  BadRequest:
1551
1779
  x-pokepay-schema-type: "response"
@@ -1765,6 +1993,8 @@ paths:
1765
1993
  $ref: '#/components/responses/BadRequest'
1766
1994
  /user:
1767
1995
  get:
1996
+ tags:
1997
+ - User
1768
1998
  responses:
1769
1999
  '200':
1770
2000
  description: OK
@@ -2729,11 +2959,17 @@ paths:
2729
2959
  minimum: 0
2730
2960
  format: decimal
2731
2961
  title: '付与マネー額'
2962
+ description: |
2963
+ チャージQRコードによって付与されるマネー額です。
2964
+ `money_amount`と`point_amount`の少なくともどちらかは指定する必要があります。
2732
2965
  point_amount:
2733
2966
  type: number
2734
2967
  minimum: 0
2735
2968
  format: decimal
2736
2969
  title: '付与ポイント額'
2970
+ description: |
2971
+ チャージQRコードによって付与されるポイント額です。
2972
+ `money_amount`と`point_amount`の少なくともどちらかは指定する必要があります。
2737
2973
  account_id:
2738
2974
  type: string
2739
2975
  format: uuid
@@ -2745,35 +2981,52 @@ paths:
2745
2981
  example: 'test check'
2746
2982
  is_onetime:
2747
2983
  type: boolean
2748
- title: 'ワンタイムかどうか。真の場合1度読み込まれた時点でそのチャージQRは失効する(デフォルト値は真)'
2984
+ title: 'ワンタイムかどうかのフラグ'
2749
2985
  description: |
2750
2986
  チャージQRコードが一度の読み取りで失効するときに`true`にします。デフォルト値は`true`です。
2751
- `false`の場合、そのチャージQRコードは1ユーザについては1回きりですが、複数ユーザによって読み取り可能なQRコードになります。
2987
+ `false`の場合、複数ユーザによって読み取り可能なQRコードになります。
2988
+ ただし、その場合も1ユーザにつき1回のみしか読み取れません。
2752
2989
  usage_limit:
2753
2990
  type: integer
2754
2991
  nullable: true
2755
- title: 'ワンタイムでない場合、複数ユーザから読み取られ得る。その場合の最大読み取り回数'
2992
+ title: 'ワンタイムでない場合の最大読み取り回数'
2756
2993
  description: |
2757
- 複数ユーザによって読み取り可能なチャージQRコードの読み取り回数に制限をつけるために指定します。
2758
- 省略すると無制限に読み取り可能なチャージQRコードになります。
2759
- チャージQRコードは管理画面からいつでも無効化(有効化)することができます。
2994
+ 複数ユーザによって読み取り可能なチャージQRコードの最大読み取り回数を指定します。
2995
+ NULLに設定すると無制限に読み取り可能なチャージQRコードになります。
2996
+ デフォルト値はNULLです。
2997
+ ワンタイム指定(`is_onetime`)がされているときは、本パラメータはNULLである必要があります。
2760
2998
  expires_at:
2761
2999
  type: string
2762
3000
  format: date-time
2763
- title: 'チャージQR自体の失効日時'
3001
+ title: 'チャージQRコード自体の失効日時'
3002
+ description: |
3003
+ チャージQRコード自体の失効日時を指定します。この日時以降はチャージQRコードを読み取れなくなります。デフォルトでは作成日時から3ヶ月後になります。
3004
+
3005
+ チャージQRコード自体の失効日時であって、チャージQRコードによって付与されるマネー残高の有効期限とは異なることに注意してください。マネー残高の有効期限はマネー設定で指定されているものになります。
2764
3006
  point_expires_at:
2765
3007
  type: string
2766
3008
  format: date-time
2767
- title: 'チャージQRによって付与されるポイントの失効日時'
3009
+ title: 'チャージQRコードによって付与されるポイント残高の有効期限'
3010
+ description: |
3011
+ チャージQRコードによって付与されるポイント残高の有効起源を指定します。デフォルトではマネー残高の有効期限と同じものが指定されます。
3012
+
3013
+ チャージQRコードにより付与されるマネー残高の有効期限はQRコード毎には指定できませんが、ポイント残高の有効期限は本パラメータにより、QRコード毎に個別に指定することができます。
2768
3014
  point_expires_in_days:
2769
3015
  type: integer
2770
3016
  minimum: 1
2771
- title: 'チャージQRによって付与されるポイントの有効期限(相対指定、単位は日)'
3017
+ title: 'チャージQRコードによって付与されるポイント残高の有効期限(相対日数指定)'
3018
+ description: |
3019
+ チャージQRコードによって付与されるポイント残高の有効期限を相対日数で指定します。
3020
+ 1を指定すると、チャージQRコード作成日の当日中に失効します(翌日0時に失効)。
3021
+ `point_expires_at`と`point_expires_in_days`が両方指定されている場合は、チャージQRコードによるチャージ取引ができた時点からより近い方が採用されます。
2772
3022
  example: 60
2773
3023
  bear_point_account:
2774
3024
  type: string
2775
3025
  format: uuid
2776
- title: 'ポイント額を負担する店舗アカウントのID'
3026
+ title: 'ポイント額を負担する店舗のウォレットID'
3027
+ description: |
3028
+ ポイントチャージをする場合、ポイント額を負担する店舗のウォレットIDを指定することができます。
3029
+ デフォルトではマネー発行体のデフォルト店舗(本店)がポイント負担先となります。
2777
3030
  responses:
2778
3031
  '200':
2779
3032
  description: OK
@@ -2784,59 +3037,313 @@ paths:
2784
3037
  '400':
2785
3038
  $ref: '#/components/responses/InvalidParameters'
2786
3039
  '403':
2787
- $ref: '#/components/responses/Forbidden'
3040
+ $ref: '#/components/responses/UnpermittedAdminUser'
2788
3041
  '422':
2789
3042
  $ref: '#/components/responses/UnprocessableEntity'
2790
- /cpm/{cpm_token}:
2791
3043
  get:
2792
3044
  tags:
2793
- - Transaction
2794
- summary: 'CPMトークンの状態取得'
2795
- description: CPMトークンの現在の状態を取得します。CPMトークンの有効期限やCPM取引の状態を返します。
2796
- x-pokepay-operator-name: "GetCpmToken"
3045
+ - Check
3046
+ summary: 'チャージQRコード一覧の取得'
3047
+ x-pokepay-operator-name: "ListChecks"
3048
+ x-pokepay-allow-server-side: true
3049
+ requestBody:
3050
+ required: true
3051
+ content:
3052
+ application/json:
3053
+ schema:
3054
+ properties:
3055
+ page:
3056
+ type: integer
3057
+ minimum: 1
3058
+ title: 'ページ番号'
3059
+ per_page:
3060
+ type: integer
3061
+ minimum: 1
3062
+ title: '1ページの表示数'
3063
+ description: 1ページ当たり表示数です。デフォルト値は50です。
3064
+ example: 50
3065
+ private_money_id:
3066
+ type: string
3067
+ format: uuid
3068
+ title: 'マネーID'
3069
+ description: |
3070
+ チャージQRコードのチャージ対象のマネーIDで結果をフィルターします。
3071
+ organization_code:
3072
+ type: string
3073
+ maxLength: 32
3074
+ title: '組織コード'
3075
+ description: |-
3076
+ チャージQRコードの発行店舗の所属組織の組織コードで結果をフィルターします。
3077
+ デフォルトでは未指定です。
3078
+ expires_from:
3079
+ type: string
3080
+ format: date-time
3081
+ title: '有効期限の期間によるフィルター(開始時点)'
3082
+ description: |
3083
+ 有効期限の期間によるフィルターの開始時点のタイムスタンプです。
3084
+ デフォルトでは未指定です。
3085
+ expires_to:
3086
+ type: string
3087
+ format: date-time
3088
+ title: '有効期限の期間によるフィルター(終了時点)'
3089
+ description: |
3090
+ 有効期限の期間によるフィルターの終了時点のタイムスタンプです。
3091
+ デフォルトでは未指定です。
3092
+ created_from:
3093
+ type: string
3094
+ format: date-time
3095
+ title: '作成日時の期間によるフィルター(開始時点)'
3096
+ description: |
3097
+ 作成日時の期間によるフィルターの開始時点のタイムスタンプです。
3098
+ デフォルトでは未指定です。
3099
+ created_to:
3100
+ type: string
3101
+ format: date-time
3102
+ title: '作成日時の期間によるフィルター(終了時点)'
3103
+ description: |
3104
+ 作成日時の期間によるフィルターの終了時点のタイムスタンプです。
3105
+ デフォルトでは未指定です。
3106
+ issuer_shop_id:
3107
+ type: string
3108
+ format: uuid
3109
+ title: '発行店舗ID'
3110
+ description: |
3111
+ チャージQRコードを発行した店舗IDによってフィルターします。
3112
+ デフォルトでは未指定です。
3113
+ description:
3114
+ type: string
3115
+ title: 'チャージQRコードの説明文'
3116
+ description: |
3117
+ チャージQRコードの説明文(description)によってフィルターします。
3118
+ 部分一致(前方一致)したものを表示します。
3119
+ デフォルトでは未指定です。
3120
+ is_onetime:
3121
+ type: boolean
3122
+ title: 'ワンタイムのチャージQRコードかどうか'
3123
+ description: |
3124
+ チャージQRコードがワンタイムに設定されているかどうかでフィルターします。
3125
+ `true` の場合はワンタイムかどうかでフィルターし、`false`の場合はワンタイムでないものをフィルターします。
3126
+ 未指定の場合はフィルターしません。
3127
+ デフォルトでは未指定です。
3128
+ is_disabled:
3129
+ type: boolean
3130
+ title: '無効化されたチャージQRコードかどうか'
3131
+ description: |
3132
+ チャージQRコードが無効化されているかどうかでフィルターします。
3133
+ `true` の場合は無効なものをフィルターし、`false`の場合は有効なものをフィルターします。
3134
+ 未指定の場合はフィルターしません。
3135
+ デフォルトでは未指定です。
3136
+ responses:
3137
+ '200':
3138
+ description: OK
3139
+ content:
3140
+ application/json:
3141
+ schema:
3142
+ $ref: '#/components/schemas/PaginatedChecks'
3143
+ '400':
3144
+ $ref: '#/components/responses/InvalidParameters'
3145
+ '403':
3146
+ $ref: '#/components/responses/UnpermittedAdminUser'
3147
+ '422':
3148
+ $ref: '#/components/responses/UnprocessableEntity'
3149
+ /checks/{check_id}:
3150
+ get:
3151
+ tags:
3152
+ - Check
3153
+ summary: 'チャージQRコードの表示'
3154
+ x-pokepay-operator-name: "GetCheck"
2797
3155
  x-pokepay-allow-server-side: true
2798
3156
  parameters:
2799
3157
  - in: path
2800
- name: cpm_token
3158
+ name: check_id
2801
3159
  required: true
2802
3160
  schema:
2803
3161
  type: string
2804
- minLength: 22
2805
- maxLength: 22
2806
- title: CPMトークン
2807
- description: CPM取引時にエンドユーザーが店舗に提示するバーコードを解析して得られる22桁の文字列です。
3162
+ format: uuid
3163
+ title: 'チャージQRコードのID'
3164
+ description: |-
3165
+ 表示対象のチャージQRコードのIDです。
2808
3166
  responses:
2809
3167
  '200':
2810
3168
  description: OK
2811
3169
  content:
2812
3170
  application/json:
2813
3171
  schema:
2814
- $ref: '#/components/schemas/CpmToken'
3172
+ $ref: '#/components/schemas/Check'
2815
3173
  '400':
2816
- $ref: '#/components/responses/BadRequest'
3174
+ $ref: '#/components/responses/InvalidParameters'
2817
3175
  '403':
2818
- $ref: '#/components/responses/Forbidden'
3176
+ $ref: '#/components/responses/UnpermittedAdminUser'
3177
+ '404':
3178
+ $ref: '#/components/responses/NotFound'
2819
3179
  '422':
2820
3180
  $ref: '#/components/responses/UnprocessableEntity'
2821
- /transactions:
2822
- get:
3181
+ patch:
2823
3182
  tags:
2824
- - Transaction
2825
- summary: '【廃止】取引履歴を取得する'
2826
- description: 取引一覧を返します。
2827
- x-pokepay-operator-name: "ListTransactions"
3183
+ - Check
3184
+ summary: 'チャージQRコードの更新'
3185
+ x-pokepay-operator-name: "UpdateCheck"
2828
3186
  x-pokepay-allow-server-side: true
3187
+ parameters:
3188
+ - in: path
3189
+ name: check_id
3190
+ required: true
3191
+ schema:
3192
+ type: string
3193
+ format: uuid
3194
+ title: 'チャージQRコードのID'
3195
+ description: |-
3196
+ 更新対象のチャージQRコードのIDです。
2829
3197
  requestBody:
2830
3198
  required: true
2831
3199
  content:
2832
3200
  application/json:
2833
3201
  schema:
2834
3202
  properties:
2835
- from:
2836
- type: string
2837
- format: date-time
2838
- title: '開始日時'
2839
- description: |-
3203
+ money_amount:
3204
+ type: number
3205
+ minimum: 0
3206
+ format: decimal
3207
+ title: '付与マネー額'
3208
+ description: |
3209
+ チャージQRコードによって付与されるマネー額です。
3210
+ `money_amount`と`point_amount`が両方0になるような更新リクエストはエラーになります。
3211
+ point_amount:
3212
+ type: number
3213
+ minimum: 0
3214
+ format: decimal
3215
+ title: '付与ポイント額'
3216
+ description: |
3217
+ チャージQRコードによって付与されるポイント額です。
3218
+ `money_amount`と`point_amount`が両方0になるような更新リクエストはエラーになります。
3219
+ description:
3220
+ type: string
3221
+ maxLength: 200
3222
+ title: 'チャージQRコードの説明文'
3223
+ description: |
3224
+ チャージQRコードの説明文です。
3225
+ チャージ取引後は、取引の説明文に転記され、取引履歴などに表示されます。
3226
+ example: 'test check'
3227
+ is_onetime:
3228
+ type: boolean
3229
+ title: 'ワンタイムかどうかのフラグ'
3230
+ description: |
3231
+ チャージQRコードが一度の読み取りで失効するときに`true`にします。
3232
+ `false`の場合、複数ユーザによって読み取り可能なQRコードになります。
3233
+ ただし、その場合も1ユーザにつき1回のみしか読み取れません。
3234
+ usage_limit:
3235
+ type: integer
3236
+ nullable: true
3237
+ title: 'ワンタイムでない場合の最大読み取り回数'
3238
+ description: |
3239
+ 複数ユーザによって読み取り可能なチャージQRコードの最大読み取り回数を指定します。
3240
+ NULLに設定すると無制限に読み取り可能なチャージQRコードになります。
3241
+ ワンタイム指定(`is_onetime`)がされているときは、本パラメータはNULLである必要があります。
3242
+ expires_at:
3243
+ type: string
3244
+ format: date-time
3245
+ title: 'チャージQRコード自体の失効日時'
3246
+ description: |
3247
+ チャージQRコード自体の失効日時を指定します。この日時以降はチャージQRコードを読み取れなくなります。
3248
+
3249
+ チャージQRコード自体の失効日時であって、チャージQRコードによって付与されるマネー残高の有効期限とは異なることに注意してください。マネー残高の有効期限はマネー設定で指定されているものになります。
3250
+ point_expires_at:
3251
+ type: string
3252
+ format: date-time
3253
+ nullable: true
3254
+ title: 'チャージQRコードによって付与されるポイント残高の有効期限'
3255
+ description: |
3256
+ チャージQRコードによって付与されるポイント残高の有効起源を指定します。
3257
+
3258
+ チャージQRコードにより付与されるマネー残高の有効期限はQRコード毎には指定できませんが、ポイント残高の有効期限は本パラメータにより、QRコード毎に個別に指定することができます。
3259
+ point_expires_in_days:
3260
+ type: integer
3261
+ minimum: 1
3262
+ nullable: true
3263
+ title: 'チャージQRコードによって付与されるポイント残高の有効期限(相対日数指定)'
3264
+ description: |
3265
+ チャージQRコードによって付与されるポイント残高の有効期限を相対日数で指定します。
3266
+ 1を指定すると、チャージQRコード作成日の当日中に失効します(翌日0時に失効)。
3267
+ `point_expires_at`と`point_expires_in_days`が両方指定されている場合は、チャージQRコードによるチャージ取引ができた時点からより近い方が採用されます。
3268
+ `point_expires_at`と`point_expires_in_days`が両方NULLに設定されている場合は、マネーに設定されている残高の有効期限と同じになります。
3269
+ example: 60
3270
+ bear_point_account:
3271
+ type: string
3272
+ format: uuid
3273
+ title: 'ポイント額を負担する店舗のウォレットID'
3274
+ description: |
3275
+ ポイントチャージをする場合、ポイント額を負担する店舗のウォレットIDを指定することができます。
3276
+ is_disabled:
3277
+ type: boolean
3278
+ title: '無効化されているかどうかのフラグ'
3279
+ description: |
3280
+ チャージQRコードを無効化するときに`true`にします。
3281
+ `false`の場合は無効化されているチャージQRコードを再有効化します。
3282
+ responses:
3283
+ '200':
3284
+ description: OK
3285
+ content:
3286
+ application/json:
3287
+ schema:
3288
+ $ref: '#/components/schemas/Check'
3289
+ '400':
3290
+ $ref: '#/components/responses/InvalidParameters'
3291
+ '403':
3292
+ $ref: '#/components/responses/UnpermittedAdminUser'
3293
+ '422':
3294
+ $ref: '#/components/responses/UnprocessableEntity'
3295
+ '404':
3296
+ $ref: '#/components/responses/NotFound'
3297
+ /cpm/{cpm_token}:
3298
+ get:
3299
+ tags:
3300
+ - Transaction
3301
+ summary: 'CPMトークンの状態取得'
3302
+ description: CPMトークンの現在の状態を取得します。CPMトークンの有効期限やCPM取引の状態を返します。
3303
+ x-pokepay-operator-name: "GetCpmToken"
3304
+ x-pokepay-allow-server-side: true
3305
+ parameters:
3306
+ - in: path
3307
+ name: cpm_token
3308
+ required: true
3309
+ schema:
3310
+ type: string
3311
+ minLength: 22
3312
+ maxLength: 22
3313
+ title: CPMトークン
3314
+ description: CPM取引時にエンドユーザーが店舗に提示するバーコードを解析して得られる22桁の文字列です。
3315
+ responses:
3316
+ '200':
3317
+ description: OK
3318
+ content:
3319
+ application/json:
3320
+ schema:
3321
+ $ref: '#/components/schemas/CpmToken'
3322
+ '400':
3323
+ $ref: '#/components/responses/BadRequest'
3324
+ '403':
3325
+ $ref: '#/components/responses/Forbidden'
3326
+ '422':
3327
+ $ref: '#/components/responses/UnprocessableEntity'
3328
+ /transactions:
3329
+ get:
3330
+ tags:
3331
+ - Transaction
3332
+ summary: '【廃止】取引履歴を取得する'
3333
+ description: 取引一覧を返します。
3334
+ x-pokepay-operator-name: "ListTransactions"
3335
+ x-pokepay-allow-server-side: true
3336
+ requestBody:
3337
+ required: true
3338
+ content:
3339
+ application/json:
3340
+ schema:
3341
+ properties:
3342
+ from:
3343
+ type: string
3344
+ format: date-time
3345
+ title: '開始日時'
3346
+ description: |-
2840
3347
  抽出期間の開始日時です。
2841
3348
 
2842
3349
  フィルターとして使われ、開始日時以降に発生した取引のみ一覧に表示されます。
@@ -3451,48 +3958,7 @@ paths:
3451
3958
  example: |-
3452
3959
  {"key":"value"}
3453
3960
  products:
3454
- type: array
3455
- items:
3456
- type: object
3457
- properties:
3458
- jan_code:
3459
- type: string
3460
- maxLength: 64
3461
- classification_code:
3462
- type: string
3463
- maxLength: 64
3464
- name:
3465
- type: string
3466
- maxLength: 256
3467
- unit_price:
3468
- type: number
3469
- minimum: 0
3470
- price:
3471
- type: number
3472
- minimum: 0
3473
- is_discounted:
3474
- type: boolean
3475
- other:
3476
- type: string
3477
- format: json
3478
- example: |-
3479
- {"jan_code":"abc",
3480
- "name":"name1",
3481
- "unit_price":100,
3482
- "price": 100,
3483
- "is_discounted": false,
3484
- "other":"{}"}
3485
- title: '商品情報データ'
3486
- description: |-
3487
- 一つの取引に含まれる商品情報データです。
3488
- 以下の内容からなるJSONオブジェクトの配列で指定します。
3489
-
3490
- - `jan_code`: JANコード。64字以下の文字列
3491
- - `name`: 商品名。256字以下の文字列
3492
- - `unit_price`: 商品単価。0以上の数値
3493
- - `price`: 全体の金額(例: 商品単価 × 個数)。0以上の数値
3494
- - `is_discounted`: 賞味期限が近いなどの理由で商品が値引きされているかどうかのフラグ。boolean
3495
- - `other`: その他商品に関する情報。JSONオブジェクトで指定します。
3961
+ $ref: '#/components/schemas/Products'
3496
3962
  request_id:
3497
3963
  type: string
3498
3964
  format: uuid
@@ -3504,6 +3970,19 @@ paths:
3504
3970
 
3505
3971
  リクエストIDを指定したとき、まだそのリクエストIDに対する取引がない場合、新規に取引が作られレスポンスとして返されます。もしそのリクエストIDに対する取引が既にある場合、既存の取引がレスポンスとして返されます。
3506
3972
  example: '9dbfd997-b948-40d3-a3bf-6bc1a01368d2'
3973
+ strategy:
3974
+ type: string
3975
+ enum: [point-preferred, money-only]
3976
+ title: '支払い時の残高消費方式'
3977
+ description: |-
3978
+ 支払い時に残高がどのように消費されるかを指定します。
3979
+ デフォルトでは point-preferred (ポイント優先)が採用されます。
3980
+
3981
+ - point-preferred: ポイント残高が優先的に消費され、ポイントがなくなり次第マネー残高から消費されていきます(デフォルト動作)
3982
+ - money-only: マネー残高のみから消費され、ポイント残高は使われません
3983
+
3984
+ マネー設定でポイント残高のみの利用に設定されている場合(display_money_and_point が point-only の場合)、 strategy の指定に関わらずポイント優先になります。
3985
+ example: 'point-preferred'
3507
3986
  responses:
3508
3987
  '200':
3509
3988
  description: OK
@@ -3578,48 +4057,7 @@ paths:
3578
4057
  example: |-
3579
4058
  {"key":"value"}
3580
4059
  products:
3581
- type: array
3582
- items:
3583
- type: object
3584
- properties:
3585
- jan_code:
3586
- type: string
3587
- maxLength: 64
3588
- classification_code:
3589
- type: string
3590
- maxLength: 64
3591
- name:
3592
- type: string
3593
- maxLength: 256
3594
- unit_price:
3595
- type: number
3596
- minimum: 0
3597
- price:
3598
- type: number
3599
- minimum: 0
3600
- is_discounted:
3601
- type: boolean
3602
- other:
3603
- type: string
3604
- format: json
3605
- example: |-
3606
- {"jan_code":"abc",
3607
- "name":"name1",
3608
- "unit_price":100,
3609
- "price": 100,
3610
- "is_discounted": false,
3611
- "other":"{}"}
3612
- title: 商品情報データ
3613
- description: |-
3614
- 一つの取引に含まれる商品情報データです。
3615
- 以下の内容からなるJSONオブジェクトの配列で指定します。
3616
-
3617
- - `jan_code`: JANコード。64字以下の文字列
3618
- - `name`: 商品名。256字以下の文字列
3619
- - `unit_price`: 商品単価。0以上の数値
3620
- - `price`: 全体の金額(例: 商品単価 × 個数)。0以上の数値
3621
- - `is_discounted`: 賞味期限が近いなどの理由で商品が値引きされているかどうかのフラグ。boolean
3622
- - `other`: その他商品に関する情報。JSONオブジェクトで指定します。
4060
+ $ref: '#/components/schemas/Products'
3623
4061
  request_id:
3624
4062
  type: string
3625
4063
  format: uuid
@@ -3631,6 +4069,19 @@ paths:
3631
4069
 
3632
4070
  リクエストIDを指定したとき、まだそのリクエストIDに対する取引がない場合、新規に取引が作られレスポンスとして返されます。もしそのリクエストIDに対する取引が既にある場合、既存の取引がレスポンスとして返されます。
3633
4071
  example: '9dbfd997-b948-40d3-a3bf-6bc1a01368d2'
4072
+ strategy:
4073
+ type: string
4074
+ enum: [point-preferred, money-only]
4075
+ title: '支払い時の残高消費方式'
4076
+ description: |-
4077
+ 支払い時に残高がどのように消費されるかを指定します。
4078
+ デフォルトでは point-preferred (ポイント優先)が採用されます。
4079
+
4080
+ - point-preferred: ポイント残高が優先的に消費され、ポイントがなくなり次第マネー残高から消費されていきます(デフォルト動作)
4081
+ - money-only: マネー残高のみから消費され、ポイント残高は使われません
4082
+
4083
+ マネー設定でポイント残高のみの利用に設定されている場合(display_money_and_point が point-only の場合)、 strategy の指定に関わらずポイント優先になります。
4084
+ example: 'point-preferred'
3634
4085
  responses:
3635
4086
  '200':
3636
4087
  description: OK
@@ -3701,6 +4152,87 @@ paths:
3701
4152
  $ref: '#/components/responses/Forbidden'
3702
4153
  '422':
3703
4154
  $ref: '#/components/responses/UnprocessableEntity'
4155
+
4156
+ /transactions/cashtray:
4157
+ post:
4158
+ tags:
4159
+ - Check
4160
+ summary: 'CashtrayQRコードを読み取ることで取引する'
4161
+ description: |
4162
+ エンドユーザーから受け取ったCashtray用QRコードのIDをエンドユーザーIDと共に渡すことで支払いあるいはチャージ取引が作られます。
4163
+
4164
+ 通常CashtrayQRコードはエンドユーザーのアプリによって読み取られ、アプリとポケペイサーバとの直接通信によって取引が作られます。
4165
+ もしエンドユーザーとの通信をパートナーのサーバのみに限定したい場合、パートナーのサーバがCashtrayQRの情報をエンドユーザーから代理受けして、サーバ間連携APIによって実際のチャージ取引をリクエストすることになります。
4166
+
4167
+ x-pokepay-operator-name: "CreateTransactionWithCashtray"
4168
+ x-pokepay-allow-server-side: true
4169
+ requestBody:
4170
+ required: true
4171
+ content:
4172
+ application/json:
4173
+ schema:
4174
+ required: ["cashtray_id", "customer_id"]
4175
+ properties:
4176
+ cashtray_id:
4177
+ type: string
4178
+ format: uuid
4179
+ title: 'Cashtray用QRコードのID'
4180
+ description: |-
4181
+ Cashtray用QRコードのIDです。
4182
+
4183
+ QRコード生成時に送金元店舗のウォレット情報や、金額などが登録されています。
4184
+
4185
+ customer_id:
4186
+ type: string
4187
+ format: uuid
4188
+ title: 'エンドユーザーのID'
4189
+ description: |-
4190
+ エンドユーザーIDです。
4191
+
4192
+ strategy:
4193
+ type: string
4194
+ enum: [point-preferred, money-only]
4195
+ default: 'point-preferred'
4196
+ title: '支払い時の残高消費方式'
4197
+ description: |-
4198
+ 支払い時に残高がどのように消費されるかを指定します。
4199
+ チャージの場合は無効です。
4200
+ デフォルトでは point-preferred (ポイント優先)が採用されます。
4201
+
4202
+ - point-preferred: ポイント残高が優先的に消費され、ポイントがなくなり次第マネー残高から消費されていきます(デフォルト動作)
4203
+ - money-only: マネー残高のみから消費され、ポイント残高は使われません
4204
+
4205
+ マネー設定でポイント残高のみの利用に設定されている場合(display_money_and_point が point-only の場合)、 strategy の指定に関わらずポイント優先になります。
4206
+
4207
+ request_id:
4208
+ type: string
4209
+ format: uuid
4210
+ title: 'リクエストID'
4211
+ description: |-
4212
+ 取引作成APIの羃等性を担保するためのリクエスト固有のIDです。
4213
+
4214
+ 取引作成APIで結果が受け取れなかったなどの理由で再試行する際に、二重に取引が作られてしまうことを防ぐために、クライアント側から指定されます。
4215
+ 指定は任意で、UUID V4フォーマットでランダム生成した文字列です。リクエストIDは一定期間で削除されます。
4216
+
4217
+ リクエストIDを指定したとき、まだそのリクエストIDに対する取引がない場合、新規に取引が作られレスポンスとして返されます。
4218
+ もしそのリクエストIDに対する取引が既にある場合、既存の取引がレスポンスとして返されます。
4219
+ example: '9dbfd997-b948-40d3-a3bf-6bc1a01368d2'
4220
+ responses:
4221
+ '200':
4222
+ description: OK
4223
+ content:
4224
+ application/json:
4225
+ schema:
4226
+ $ref: '#/components/schemas/TransactionDetail'
4227
+ '400':
4228
+ $ref: '#/components/responses/BadRequest'
4229
+ '403':
4230
+ $ref: '#/components/responses/Forbidden'
4231
+ '404':
4232
+ $ref: '#/components/responses/NotFound'
4233
+ '422':
4234
+ $ref: '#/components/responses/UnprocessableEntity'
4235
+
3704
4236
  /transactions/transfer:
3705
4237
  post:
3706
4238
  tags:
@@ -3798,6 +4330,7 @@ paths:
3798
4330
  tags:
3799
4331
  - Transaction
3800
4332
  x-pokepay-allow-server-side: true
4333
+ x-pokepay-operator-name: "CreateExchangeTransaction"
3801
4334
  requestBody:
3802
4335
  required: true
3803
4336
  content:
@@ -3815,7 +4348,7 @@ paths:
3815
4348
  type: string
3816
4349
  format: uuid
3817
4350
  amount:
3818
- type: number
4351
+ type: integer
3819
4352
  minimum: 1
3820
4353
  description:
3821
4354
  type: string
@@ -4112,48 +4645,7 @@ paths:
4112
4645
  example: |-
4113
4646
  {"key":"value"}
4114
4647
  products:
4115
- type: array
4116
- items:
4117
- type: object
4118
- properties:
4119
- jan_code:
4120
- type: string
4121
- maxLength: 64
4122
- classification_code:
4123
- type: string
4124
- maxLength: 64
4125
- name:
4126
- type: string
4127
- maxLength: 256
4128
- unit_price:
4129
- type: number
4130
- minimum: 0
4131
- price:
4132
- type: number
4133
- minimum: 0
4134
- is_discounted:
4135
- type: boolean
4136
- other:
4137
- type: string
4138
- format: json
4139
- example: |-
4140
- {"jan_code":"abc",
4141
- "name":"name1",
4142
- "unit_price":100,
4143
- "price": 100,
4144
- "is_discounted": false,
4145
- "other":"{}"}
4146
- title: '商品情報データ'
4147
- description: |-
4148
- 一つの取引に含まれる商品情報データです。
4149
- 以下の内容からなるJSONオブジェクトの配列で指定します。
4150
-
4151
- - `jan_code`: JANコード。64字以下の文字列
4152
- - `name`: 商品名。256字以下の文字列
4153
- - `unit_price`: 商品単価。0以上の数値
4154
- - `price`: 全体の金額(例: 商品単価 × 個数)。0以上の数値
4155
- - `is_discounted`: 賞味期限が近いなどの理由で商品が値引きされているかどうかのフラグ。boolean
4156
- - `other`: その他商品に関する情報。JSONオブジェクトで指定します。
4648
+ $ref: '#/components/schemas/Products'
4157
4649
  request_id:
4158
4650
  type: string
4159
4651
  format: uuid
@@ -4165,13 +4657,21 @@ paths:
4165
4657
 
4166
4658
  リクエストIDを指定したとき、まだそのリクエストIDに対する取引がない場合、新規に取引が作られレスポンスとして返されます。もしそのリクエストIDに対する取引が既にある場合、既存の取引がレスポンスとして返されます。
4167
4659
  example: 9dbfd997-b948-40d3-a3bf-6bc1a01368d2
4660
+ done_at:
4661
+ type: string
4662
+ format: date-time
4663
+ title: 'ポケペイ外部取引の実施時間'
4664
+ description: |-
4665
+ ポケペイ外部取引が実際に起こった時間です。
4666
+ 時間帯指定のポイント付与キャンペーンでの取引時間の計算に使われます。
4667
+ デフォルトではCreateExternalTransactionがリクエストされた時間になります。
4168
4668
  responses:
4169
4669
  '200':
4170
4670
  description: OK
4171
4671
  content:
4172
4672
  application/json:
4173
4673
  schema:
4174
- $ref: '#/components/schemas/ExternalTransaction'
4674
+ $ref: '#/components/schemas/ExternalTransactionDetail'
4175
4675
  '400':
4176
4676
  $ref: '#/components/responses/BadRequest'
4177
4677
  '403':
@@ -4217,30 +4717,61 @@ paths:
4217
4717
  content:
4218
4718
  application/json:
4219
4719
  schema:
4220
- $ref: '#/components/schemas/ExternalTransaction'
4720
+ $ref: '#/components/schemas/ExternalTransactionDetail'
4221
4721
  '403':
4222
4722
  $ref: '#/components/responses/Forbidden'
4223
4723
  '422':
4224
4724
  $ref: '#/components/responses/UnprocessableEntity'
4225
- /transfers:
4725
+ /external-transactions/requests/{request_id}:
4226
4726
  get:
4227
4727
  tags:
4228
- - Transfer
4229
- x-pokepay-operator-name: "ListTransfers"
4728
+ - Event
4729
+ summary: 'リクエストIDからポケペイ外部取引を取得する'
4730
+ description: |-
4731
+ リクエストIDを指定してポケペイ外部取引を取得します。
4732
+
4733
+ 発行体の管理者は自組織発行のマネーに紐付くポケペイ外部取引を取得できます。
4734
+
4735
+ x-pokepay-operator-name: GetExternalTransactionByRequestId
4230
4736
  x-pokepay-allow-server-side: true
4231
- requestBody:
4232
- required: true
4233
- content:
4234
- application/json:
4235
- schema:
4236
- properties:
4237
- from:
4238
- type: string
4239
- format: date-time
4240
- to:
4241
- type: string
4242
- format: date-time
4243
- page:
4737
+ parameters:
4738
+ - in: path
4739
+ name: request_id
4740
+ required: true
4741
+ schema:
4742
+ type: string
4743
+ format: uuid
4744
+ title: 'リクエストID'
4745
+ responses:
4746
+ '200':
4747
+ description: OK
4748
+ content:
4749
+ application/json:
4750
+ schema:
4751
+ $ref: '#/components/schemas/ExternalTransactionDetail'
4752
+ '403':
4753
+ $ref: '#/components/responses/Forbidden'
4754
+ '422':
4755
+ $ref: '#/components/responses/UnprocessableEntity'
4756
+ /transfers:
4757
+ get:
4758
+ tags:
4759
+ - Transfer
4760
+ x-pokepay-operator-name: "ListTransfers"
4761
+ x-pokepay-allow-server-side: true
4762
+ requestBody:
4763
+ required: true
4764
+ content:
4765
+ application/json:
4766
+ schema:
4767
+ properties:
4768
+ from:
4769
+ type: string
4770
+ format: date-time
4771
+ to:
4772
+ type: string
4773
+ format: date-time
4774
+ page:
4244
4775
  type: integer
4245
4776
  minimum: 1
4246
4777
  per_page:
@@ -4521,6 +5052,66 @@ paths:
4521
5052
  $ref: '#/components/responses/UnprocessableEntity'
4522
5053
 
4523
5054
  /organizations:
5055
+ get:
5056
+ tags:
5057
+ - Organization
5058
+ summary: '加盟店組織の一覧を取得する'
5059
+ x-pokepay-allow-server-side: true
5060
+ x-pokepay-operator-name: "ListOrganizations"
5061
+ requestBody:
5062
+ required: true
5063
+ content:
5064
+ application/json:
5065
+ schema:
5066
+ required: ["private_money_id"]
5067
+ properties:
5068
+ private_money_id:
5069
+ type: string
5070
+ format: uuid
5071
+ title: 'マネーID'
5072
+ description: |-
5073
+ マネーIDです。
5074
+ このマネーに加盟している加盟組織がフィルターされます。
5075
+ page:
5076
+ type: integer
5077
+ minimum: 1
5078
+ title: 'ページ番号'
5079
+ description: 取得したいページ番号です。
5080
+ example: 1
5081
+ per_page:
5082
+ type: integer
5083
+ minimum: 1
5084
+ title: '1ページ分の取引数'
5085
+ description: 1ページ分の取引数です。
5086
+ example: 50
5087
+ name:
5088
+ type: string
5089
+ title: '組織名'
5090
+ code:
5091
+ type: string
5092
+ title: '組織コード'
5093
+ #これらのパラメータは管理画面のユースケースに特化してそうなので一旦コメントアウトしておく
5094
+ #with_issuer_org:
5095
+ # type: boolean
5096
+ #with_details:
5097
+ # type: boolean
5098
+ #with_disabled_member_orgs:
5099
+ # type: boolean
5100
+ #with_all_members:
5101
+ # type: boolean
5102
+ responses:
5103
+ '200':
5104
+ description: OK
5105
+ content:
5106
+ application/json:
5107
+ schema:
5108
+ $ref: '#/components/schemas/PaginatedOrganizations'
5109
+ '400':
5110
+ $ref: '#/components/responses/BadRequest'
5111
+ '403':
5112
+ $ref: '#/components/responses/Forbidden'
5113
+ '422':
5114
+ $ref: '#/components/responses/UnprocessableEntity'
4524
5115
  post:
4525
5116
  tags:
4526
5117
  - Organization
@@ -5267,6 +5858,8 @@ paths:
5267
5858
  $ref: '#/components/responses/UnprocessableEntity'
5268
5859
  /bulk-transactions/{bulk_transaction_id}:
5269
5860
  get:
5861
+ tags:
5862
+ - Transaction
5270
5863
  summary: バルク取引ジョブの実行状況を取得する
5271
5864
  x-pokepay-operator-name: "GetBulkTransaction"
5272
5865
  x-pokepay-allow-server-side: true
@@ -5294,6 +5887,8 @@ paths:
5294
5887
  $ref: '#/components/responses/NotFound'
5295
5888
  /bulk-transactions/{bulk_transaction_id}/jobs:
5296
5889
  get:
5890
+ tags:
5891
+ - Transaction
5297
5892
  summary: バルク取引ジョブの詳細情報一覧を取得する
5298
5893
  x-pokepay-operator-name: "ListBulkTransactionJobs"
5299
5894
  x-pokepay-allow-server-side: true
@@ -5960,6 +6555,43 @@ paths:
5960
6555
  ]
5961
6556
  ```
5962
6557
 
6558
+ blacklisted_product_rules:
6559
+ type: array
6560
+ items:
6561
+ type: object
6562
+ properties:
6563
+ product_code:
6564
+ type: string
6565
+ maxLength: 64
6566
+ title: '対象の製品コード'
6567
+ description: |-
6568
+ 対象の製品コード (JANコードやISBNコードなど) を指定します。(必須項目)
6569
+
6570
+ SQLのLIKE文のようにワイルドカードを使った製品コードのパターンを指定することもできます (_ で任意の1文字にマッチし、 % で任意文字列にマッチします。 例: 978-% でISBNコード)
6571
+ items:
6572
+ type: string
6573
+ classification_code:
6574
+ type: string
6575
+ maxLength: 64
6576
+ title: '対象の商品分類コード'
6577
+ description: |-
6578
+ 対象の商品分類コード (書籍のCコードなど) を指定します。(任意項目)
6579
+
6580
+ SQLのLIKE文のようにワイルドカードを使った製品コードのパターンを指定することもできます (_ で任意の1文字にマッチし、 % で任意文字列にマッチします。 例: 978-% でISBNコード)
6581
+ items:
6582
+ type: string
6583
+ example: |-
6584
+ {
6585
+ "product_code": "4912345678904",
6586
+ "classification_code": "c123"
6587
+ }
6588
+
6589
+ title: '商品情報ベースのキャンペーンで除外対象にする商品リスト'
6590
+ description: |-
6591
+ 商品情報をベースとしてポイント付与を行う際に、事前に除外対象とする商品リストを指定します。
6592
+ 除外対象の商品コード、または分類コードのパターンの配列として指定します。
6593
+ 取引時には、まずここで指定した除外対象商品が除かれ、残った商品に対して `product_based_point_rules` のルール群が適用されます。
6594
+
5963
6595
  applicable_days_of_week:
5964
6596
  type: array
5965
6597
  items:
@@ -5967,7 +6599,7 @@ paths:
5967
6599
  minimum: 0
5968
6600
  maximum: 6
5969
6601
  title: 'キャンペーンを適用する曜日 (複数指定)'
5970
- describe: |-
6602
+ description: |-
5971
6603
  キャンペーンを適用する曜日を指定します (複数指定)。
5972
6604
  曜日は整数で表します。月曜を 0 とし、日曜を 6 とします。
5973
6605
  指定しなかった場合は全日を対象にします (曜日による適用条件なし)
@@ -5991,7 +6623,7 @@ paths:
5991
6623
  }
5992
6624
 
5993
6625
  title: 'キャンペーンを適用する時間帯 (複数指定)'
5994
- describe: |-
6626
+ description: |-
5995
6627
  キャンペーンを適用する時間帯を指定します (複数指定可)。
5996
6628
  時間帯はfromとtoからなるオブジェクトで指定します。
5997
6629
  fromとtoは両方必要です。
@@ -6001,9 +6633,31 @@ paths:
6001
6633
  type: string
6002
6634
  format: uuid
6003
6635
  title: 'キャンペーン適用対象となる店舗IDのリスト'
6004
- describe: |-
6636
+ description: |-
6005
6637
  キャンペーンを適用する店舗IDを指定します (複数指定)。
6006
6638
  指定しなかった場合は全店舗が対象になります。
6639
+ blacklisted_shop_ids:
6640
+ type: array
6641
+ items:
6642
+ type: string
6643
+ format: uuid
6644
+ title: 'キャンペーン適用対象外となる店舗IDのリスト(ブラックリスト方式)'
6645
+ description: |-
6646
+ キャンペーンの適用対象外となる店舗IDをブラックリスト方式で指定します (複数指定可)。
6647
+ このパラメータが指定されている場合、blacklisted_shop_idsに含まれていない店舗全てがキャンペーンの適用対象になります。
6648
+ blacklisted_shop_idsとapplicable_shop_idsは同時には指定できません。ホワイトリスト方式を使うときはapplicable_shop_idsを指定してください。
6649
+ minimum_number_of_products:
6650
+ type: integer
6651
+ minimum: 1
6652
+ title: 'キャンペーンを適用する1会計内の商品個数の下限'
6653
+ description: |-
6654
+ このパラメータを指定すると、取引時の1会計内のルールに適合する商品個数がminimum_number_of_productsを超えたときにのみキャンペーンが発火するようになります。
6655
+ minimum_number_of_amount:
6656
+ type: integer
6657
+ minimum: 1
6658
+ title: 'キャンペーンを適用する1会計内の商品総額の下限'
6659
+ description: |-
6660
+ このパラメータを指定すると、取引時の1会計内のルールに適合する商品総額がminimum_number_of_amountを超えたときにのみキャンペーンが発火するようになります。
6007
6661
  minimum_number_for_combination_purchase:
6008
6662
  type: integer
6009
6663
  minimum: 1
@@ -6194,6 +6848,7 @@ paths:
6194
6848
  デフォルトではポイント付与先はキャンペーンを駆動するイベントのマネー(private_money_idで指定したマネー)になります。
6195
6849
 
6196
6850
  別マネーに対するポイント付与は別のtransactionとなります。 RefundTransaction で元のイベントをキャンセルしたときはポイント付与のtransactionもキャンセルされ、逆にポイント付与のtransactionをキャンセルしたときは連動して元のイベントがキャンセルされます。
6851
+
6197
6852
  applicable_account_metadata:
6198
6853
  description: |-
6199
6854
  ウォレットに紐付くメタデータが特定の値を持つときにのみ発火するキャンペーンを登録します。
@@ -6243,6 +6898,66 @@ paths:
6243
6898
  "value": "male"
6244
6899
  }
6245
6900
 
6901
+ applicable_transaction_metadata:
6902
+ description: |-
6903
+ 取引時に指定するメタデータが特定の値を持つときにのみ発火するキャンペーンを登録します。
6904
+ メタデータの属性名 key とメタデータの値 value の組をオブジェクトとして指定します。
6905
+ 取引のメタデータはCreatePaymentTransactionやCreateExternalTransactionで登録できます。
6906
+
6907
+ オプショナルパラメータtestによって比較方法を指定することができます。
6908
+ デフォルトは equal で、その他に not-equalを指定可能です。
6909
+
6910
+ 例1: 取引のメタデータに会員ランクとしてbronzeが指定されているときのみ発火
6911
+
6912
+ ```javascript
6913
+ {
6914
+ "key": "rank",
6915
+ "value": "bronze"
6916
+ }
6917
+ ```
6918
+
6919
+ 例2: 取引のメタデータに会員ランクとしてbronze以外が指定されているときのみ発火
6920
+
6921
+ ```javascript
6922
+ {
6923
+ "key": "rank",
6924
+ "value": "bronze",
6925
+ "test": "not-equal"
6926
+ }
6927
+ ```
6928
+
6929
+ type: object
6930
+ properties:
6931
+ key:
6932
+ type: string
6933
+ description: |-
6934
+ メタデータの属性名
6935
+ value:
6936
+ type: string
6937
+ description: |-
6938
+ メタデータの値
6939
+ test:
6940
+ type: string
6941
+ enum: [equal, not-equal]
6942
+ description: |-
6943
+ メタデータの値の比較方法。デフォルトはequal
6944
+ example: |-
6945
+ {
6946
+ "key": "rank",
6947
+ "value": "bronze"
6948
+ }
6949
+
6950
+ budget_caps_amount:
6951
+ title: 'キャンペーン予算上限'
6952
+ type: integer
6953
+ minimum: 1
6954
+ maximum: 10000000000
6955
+ description: |-
6956
+ キャンペーンの予算上限を指定します。デフォルトは未指定です。
6957
+
6958
+ このパラメータが指定されている場合、このキャンペーンの適用により付与されたポイント全体を定期的に集計し、その合計が上限を越えていた場合にはキャンペーンを無効にします。
6959
+ 一度この値を越えて無効となったキャンペーンを再度有効にすることは出来ません。
6960
+
6246
6961
  responses:
6247
6962
  '200':
6248
6963
  description: OK
@@ -6731,6 +7446,43 @@ paths:
6731
7446
  ]
6732
7447
  ```
6733
7448
 
7449
+ blacklisted_product_rules:
7450
+ type: array
7451
+ items:
7452
+ type: object
7453
+ properties:
7454
+ product_code:
7455
+ type: string
7456
+ maxLength: 64
7457
+ title: '対象の製品コード'
7458
+ description: |-
7459
+ 対象の製品コード (JANコードやISBNコードなど) を指定します。(必須項目)
7460
+
7461
+ SQLのLIKE文のようにワイルドカードを使った製品コードのパターンを指定することもできます (_ で任意の1文字にマッチし、 % で任意文字列にマッチします。 例: 978-% でISBNコード)
7462
+ items:
7463
+ type: string
7464
+ classification_code:
7465
+ type: string
7466
+ maxLength: 64
7467
+ title: '対象の商品分類コード'
7468
+ description: |-
7469
+ 対象の商品分類コード (書籍のCコードなど) を指定します。(任意項目)
7470
+
7471
+ SQLのLIKE文のようにワイルドカードを使った製品コードのパターンを指定することもできます (_ で任意の1文字にマッチし、 % で任意文字列にマッチします。 例: 978-% でISBNコード)
7472
+ items:
7473
+ type: string
7474
+ example: |-
7475
+ {
7476
+ "product_code": "4912345678904",
7477
+ "classification_code": "c123"
7478
+ }
7479
+
7480
+ title: '商品情報ベースのキャンペーンで除外対象にする商品リスト'
7481
+ description: |-
7482
+ 商品情報をベースとしてポイント付与を行う際に、事前に除外対象とする商品リストを指定します。
7483
+ 除外対象の商品コード、または分類コードのパターンの配列として指定します。
7484
+ 取引時には、まずここで指定した除外対象商品が除かれ、残った商品に対して `product_based_point_rules` のルール群が適用されます。
7485
+
6734
7486
  applicable_days_of_week:
6735
7487
  type: array
6736
7488
  items:
@@ -6739,7 +7491,7 @@ paths:
6739
7491
  maximum: 6
6740
7492
  nullable: true
6741
7493
  title: 'キャンペーンを適用する曜日 (複数指定)'
6742
- describe: |-
7494
+ description: |-
6743
7495
  キャンペーンを適用する曜日を指定します (複数指定)。
6744
7496
  曜日は整数で表します。月曜を 0 とし、日曜を 6 とします。
6745
7497
  指定しなかった場合は全日を対象にします (曜日による適用条件なし)
@@ -6764,7 +7516,7 @@ paths:
6764
7516
 
6765
7517
  nullable: true
6766
7518
  title: 'キャンペーンを適用する時間帯 (複数指定)'
6767
- describe: |-
7519
+ description: |-
6768
7520
  キャンペーンを適用する時間帯を指定します (複数指定可)。
6769
7521
  時間帯はfromとtoからなるオブジェクトで指定します。
6770
7522
  fromとtoは両方必要です。
@@ -6775,9 +7527,34 @@ paths:
6775
7527
  format: uuid
6776
7528
  nullable: true
6777
7529
  title: 'キャンペーン適用対象となる店舗IDのリスト'
6778
- describe: |-
7530
+ description: |-
6779
7531
  キャンペーンを適用する店舗IDを指定します (複数指定)。
6780
7532
  指定しなかった場合は全店舗が対象になります。
7533
+ blacklisted_shop_ids:
7534
+ type: array
7535
+ items:
7536
+ type: string
7537
+ format: uuid
7538
+ nullable: true
7539
+ title: 'キャンペーン適用対象外となる店舗IDのリスト(ブラックリスト方式)'
7540
+ description: |-
7541
+ キャンペーンの適用対象外となる店舗IDをブラックリスト方式で指定します (複数指定可)。
7542
+ このパラメータが指定されている場合、blacklisted_shop_idsに含まれていない店舗全てがキャンペーンの適用対象になります。
7543
+ blacklisted_shop_idsとapplicable_shop_idsは同時には指定できません。ホワイトリスト方式を使うときはapplicable_shop_idsを指定してください。
7544
+ minimum_number_of_products:
7545
+ type: integer
7546
+ minimum: 1
7547
+ nullable: true
7548
+ title: 'キャンペーンを適用する1会計内の商品個数の下限'
7549
+ description: |-
7550
+ このパラメータを指定すると、取引時の1会計内のルールに適合する商品個数がminimum_number_of_productsを超えたときにのみキャンペーンが発火するようになります。
7551
+ minimum_number_of_amount:
7552
+ type: integer
7553
+ minimum: 1
7554
+ nullable: true
7555
+ title: 'キャンペーンを適用する1会計内の商品総額の下限'
7556
+ description: |-
7557
+ このパラメータを指定すると、取引時の1会計内のルールに適合する商品総額がminimum_number_of_amountを超えたときにのみキャンペーンが発火するようになります。
6781
7558
  minimum_number_for_combination_purchase:
6782
7559
  type: integer
6783
7560
  minimum: 1
@@ -6957,6 +7734,7 @@ paths:
6957
7734
 
6958
7735
  このパラメータが指定されている場合、各ユーザに対してそのキャンペーンによって過去付与されたポイントの累積値が記録されるようになります。
6959
7736
  累積ポイント数がmax_total_point_amountを超えない限りにおいてキャンペーンで算出されたポイントが付与されます。
7737
+
6960
7738
  applicable_account_metadata:
6961
7739
  description: |-
6962
7740
  ウォレットに紐付くメタデータが特定の値を持つときにのみ発火するキャンペーンを登録します。
@@ -7007,35 +7785,99 @@ paths:
7007
7785
  "value": "male"
7008
7786
  }
7009
7787
 
7010
- responses:
7011
- '200':
7012
- description: OK
7013
- content:
7014
- application/json:
7015
- schema:
7016
- $ref: '#/components/schemas/Campaign'
7017
- '400':
7018
- $ref: '#/components/responses/BadRequest'
7019
- '403':
7020
- $ref: '#/components/responses/Forbidden'
7021
- '404':
7022
- $ref: '#/components/responses/NotFound'
7023
- '422':
7024
- $ref: '#/components/responses/UnprocessableEntity'
7025
- /user-stats:
7026
- post:
7027
- tags:
7028
- - Transaction
7029
- summary: '指定期間内の顧客が行った取引の統計情報をCSVでダウンロードする'
7030
- description: |-
7031
- 期間を指定して、期間内に発行マネーの全顧客が行った取引の総額・回数などをCSVでダウンロードする機能です。
7032
- CSVの作成は非同期で行われるため完了まで少しの間待つ必要がありますが、完了時にダウンロードできるURLをレスポンスとして返します。
7033
- このURLの有効期限はリクエスト日時から7日間です。
7788
+ applicable_transaction_metadata:
7789
+ description: |-
7790
+ 取引時に指定するメタデータが特定の値を持つときにのみ発火するキャンペーンを登録します。
7791
+ メタデータの属性名 key とメタデータの値 value の組をオブジェクトとして指定します。
7792
+ 取引のメタデータはCreatePaymentTransactionやCreateExternalTransactionで登録できます。
7034
7793
 
7035
- ダウンロードできるCSVのデータは以下のものです。
7794
+ オプショナルパラメータtestによって比較方法を指定することができます。
7795
+ デフォルトは equal で、その他に not-equalを指定可能です。
7036
7796
 
7037
- * organization_code: 取引を行った組織コード
7038
- * private_money_id: 取引されたマネーのID
7797
+ 例1: 取引のメタデータに会員ランクとしてbronzeが指定されているときのみ発火
7798
+
7799
+ ```javascript
7800
+ {
7801
+ "key": "rank",
7802
+ "value": "bronze"
7803
+ }
7804
+ ```
7805
+
7806
+ 例2: 取引のメタデータに会員ランクとしてbronze以外が指定されているときのみ発火
7807
+
7808
+ ```javascript
7809
+ {
7810
+ "key": "rank",
7811
+ "value": "bronze",
7812
+ "test": "not-equal"
7813
+ }
7814
+ ```
7815
+
7816
+ type: object
7817
+ nullable: true
7818
+ properties:
7819
+ key:
7820
+ type: string
7821
+ description: |-
7822
+ メタデータの属性名
7823
+ value:
7824
+ type: string
7825
+ description: |-
7826
+ メタデータの値
7827
+ test:
7828
+ type: string
7829
+ enum: [equal, not-equal]
7830
+ description: |-
7831
+ メタデータの値の比較方法。デフォルトはequal
7832
+ example: |-
7833
+ {
7834
+ "key": "rank",
7835
+ "value": "bronze"
7836
+ }
7837
+
7838
+ budget_caps_amount:
7839
+ title: 'キャンペーン予算上限'
7840
+ type: integer
7841
+ minimum: 1
7842
+ maximum: 10000000000
7843
+ nullable: true
7844
+ description: |-
7845
+ キャンペーンの予算上限を指定します。
7846
+
7847
+ キャンペーン予算上限が設定されておらずこのパラメータに数値が指定されている場合、このキャンペーンの適用により付与されたポイント全体を定期的に集計し、その合計が上限を越えていた場合にはキャンペーンを無効にします。
7848
+ 一度この値を越えて無効となったキャンペーンを再度有効にすることは出来ません。
7849
+ キャンペーン予算上限が設定されておらずこのパラメータにnullが指定されている場合、何も発生しない。
7850
+ キャンペーン予算上限が設定されておりこのパラメータにnullが指定された場合、キャンペーン予算上限は止まります。
7851
+
7852
+ responses:
7853
+ '200':
7854
+ description: OK
7855
+ content:
7856
+ application/json:
7857
+ schema:
7858
+ $ref: '#/components/schemas/Campaign'
7859
+ '400':
7860
+ $ref: '#/components/responses/BadRequest'
7861
+ '403':
7862
+ $ref: '#/components/responses/Forbidden'
7863
+ '404':
7864
+ $ref: '#/components/responses/NotFound'
7865
+ '422':
7866
+ $ref: '#/components/responses/UnprocessableEntity'
7867
+ /user-stats:
7868
+ post:
7869
+ tags:
7870
+ - Transaction
7871
+ summary: '指定期間内の顧客が行った取引の統計情報をCSVでダウンロードする'
7872
+ description: |-
7873
+ 期間を指定して、期間内に発行マネーの全顧客が行った取引の総額・回数などをCSVでダウンロードする機能です。
7874
+ CSVの作成は非同期で行われるため完了まで少しの間待つ必要がありますが、完了時にダウンロードできるURLをレスポンスとして返します。
7875
+ このURLの有効期限はリクエスト日時から7日間です。
7876
+
7877
+ ダウンロードできるCSVのデータは以下のものです。
7878
+
7879
+ * organization_code: 取引を行った組織コード
7880
+ * private_money_id: 取引されたマネーのID
7039
7881
  * private_money_name: 取引されたマネーの名前
7040
7882
  * user_id: 決済したユーザーID
7041
7883
  * user_external_id: 決済したユーザーの外部ID
@@ -7052,6 +7894,7 @@ paths:
7052
7894
  application/json:
7053
7895
  schema:
7054
7896
  required: ["from", "to"]
7897
+ x-pokepay-conditional-parameters: {<: [from, to]}
7055
7898
  properties:
7056
7899
  from:
7057
7900
  title: '集計期間の開始時刻'
@@ -7060,6 +7903,7 @@ paths:
7060
7903
  description: |-
7061
7904
  集計する期間の開始時刻をISO8601形式で指定します。
7062
7905
  時刻は現在時刻、及び `to` で指定する時刻以前である必要があります。
7906
+ example: '2022-05-20T17:56:49.000000+09:00'
7063
7907
  to:
7064
7908
  title: '集計期間の終了時刻'
7065
7909
  type: string
@@ -7067,6 +7911,7 @@ paths:
7067
7911
  description: |-
7068
7912
  集計する期間の終了時刻をISO8601形式で指定します。
7069
7913
  時刻は現在時刻、及び `from` で指定する時刻の間である必要があります。
7914
+ example: '2023-12-10T01:16:11.000000+09:00'
7070
7915
  responses:
7071
7916
  '200':
7072
7917
  description: OK
@@ -7080,6 +7925,7 @@ paths:
7080
7925
  $ref: '#/components/responses/UnpermittedAdminUser'
7081
7926
  '503':
7082
7927
  $ref: '#/components/responses/UserStatsOperationServiceUnavailable'
7928
+
7083
7929
  /webhooks:
7084
7930
  post:
7085
7931
  x-pokepay-operator-name: "CreateWebhook"
@@ -7212,6 +8058,308 @@ paths:
7212
8058
  '409':
7213
8059
  $ref: '#/components/responses/Conflict'
7214
8060
 
8061
+ delete:
8062
+ x-pokepay-operator-name: "DeleteWebhook"
8063
+ x-pokepay-allow-server-side: true
8064
+ tags:
8065
+ - Webhook
8066
+ summary: Webhookの削除
8067
+ description: 指定したWebhookを削除します
8068
+ parameters:
8069
+ - in: path
8070
+ name: webhook_id
8071
+ required: true
8072
+ schema:
8073
+ type: string
8074
+ format: uuid
8075
+ title: 'Webhook ID'
8076
+ description: |-
8077
+ 削除するWebhookのIDです。
8078
+ responses:
8079
+ '200':
8080
+ description: OK
8081
+ content:
8082
+ application/json:
8083
+ schema:
8084
+ $ref: '#/components/schemas/OrganizationWorkerTaskWebhook'
8085
+ '400':
8086
+ $ref: '#/components/responses/InvalidParameters'
8087
+ '403':
8088
+ $ref: '#/components/responses/Forbidden'
8089
+ '404':
8090
+ $ref: '#/components/responses/NotFound'
8091
+
8092
+ /user-devices:
8093
+ post:
8094
+ x-pokepay-operator-name: "CreateUserDevice"
8095
+ x-pokepay-allow-server-side: true
8096
+ tags:
8097
+ - UserDevice
8098
+ summary: ユーザーのデバイス登録
8099
+ description: ユーザーのデバイスを新規に登録します
8100
+ requestBody:
8101
+ required: true
8102
+ content:
8103
+ application/json:
8104
+ schema:
8105
+ required: [user_id]
8106
+ properties:
8107
+ user_id:
8108
+ type: string
8109
+ format: uuid
8110
+ title: 'ユーザーID'
8111
+ metadata:
8112
+ type: string
8113
+ format: json
8114
+ title: ユーザーデバイスのメタデータ
8115
+ description: |
8116
+ ユーザーのデバイス用の情報をメタデータを保持するために用います。
8117
+ 例: 端末の固有情報やブラウザのUser-Agent
8118
+ example: '{"user_agent": "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:120.0) Gecko/20100101 Firefox/120.0"}'
8119
+ responses:
8120
+ '200':
8121
+ description: OK
8122
+ content:
8123
+ application/json:
8124
+ schema:
8125
+ $ref: '#/components/schemas/UserDevice'
8126
+ '403':
8127
+ $ref: '#/components/responses/UnpermittedAdminUser'
8128
+ '404':
8129
+ $ref: '#/components/responses/NotFound'
8130
+ '422':
8131
+ $ref: '#/components/responses/UnprocessableEntity'
8132
+
8133
+ /user-devices/{user_device_id}:
8134
+ get:
8135
+ x-pokepay-operator-name: "GetUserDevice"
8136
+ x-pokepay-allow-server-side: true
8137
+ tags:
8138
+ - UserDevice
8139
+ summary: ユーザーのデバイスを取得
8140
+ description: ユーザーのデバイスの情報を取得します
8141
+ parameters:
8142
+ - in: path
8143
+ name: user_device_id
8144
+ required: true
8145
+ schema:
8146
+ type: string
8147
+ format: uuid
8148
+ title: ユーザーデバイスID
8149
+ responses:
8150
+ '200':
8151
+ description: OK
8152
+ content:
8153
+ application/json:
8154
+ schema:
8155
+ $ref: '#/components/schemas/UserDevice'
8156
+ '400':
8157
+ $ref: '#/components/responses/InvalidParameters'
8158
+ '403':
8159
+ $ref: '#/components/responses/UnpermittedAdminUser'
8160
+ '404':
8161
+ $ref: '#/components/responses/NotFound'
8162
+ '422':
8163
+ $ref: '#/components/responses/UnprocessableEntity'
8164
+
8165
+ /user-devices/{user_device_id}/activate:
8166
+ post:
8167
+ x-pokepay-operator-name: "ActivateUserDevice"
8168
+ x-pokepay-allow-server-side: true
8169
+ tags:
8170
+ - UserDevice
8171
+ summary: デバイスの有効化
8172
+ description: |
8173
+ 指定のデバイスを有効化し、それ以外の同一ユーザーのデバイスを無効化します。
8174
+ parameters:
8175
+ - in: path
8176
+ name: user_device_id
8177
+ required: true
8178
+ schema:
8179
+ type: string
8180
+ format: uuid
8181
+ title: "ユーザーデバイスID"
8182
+ responses:
8183
+ '200':
8184
+ description: OK
8185
+ content:
8186
+ application/json:
8187
+ schema:
8188
+ $ref: '#/components/schemas/UserDevice'
8189
+ '400':
8190
+ $ref: '#/components/responses/InvalidParameters'
8191
+ '403':
8192
+ $ref: '#/components/responses/UnpermittedAdminUser'
8193
+ '404':
8194
+ $ref: '#/components/responses/NotFound'
8195
+ '422':
8196
+ $ref: '#/components/responses/UnprocessableEntity'
8197
+ '503':
8198
+ $ref: '#/components/responses/UserStatsOperationServiceUnavailable'
8199
+
8200
+ /user-devices/{user_device_id}/banks:
8201
+ post:
8202
+ x-pokepay-operator-name: "CreateBank"
8203
+ x-pokepay-allow-server-side: true
8204
+ tags:
8205
+ - BankPay
8206
+ summary: 銀行口座の登録
8207
+ description: |
8208
+ 銀行口座の登録を始めるAPIです。レスポンスに含まれるredirect_urlをユーザーの端末で開き銀行を登録します。
8209
+
8210
+ ユーザーが銀行口座の登録に成功すると、callback_urlにリクエストが行われます。
8211
+ アプリの場合はDeep Linkを使うことを想定しています。
8212
+ parameters:
8213
+ - in: path
8214
+ name: user_device_id
8215
+ required: true
8216
+ schema:
8217
+ type: string
8218
+ format: uuid
8219
+ title: "デバイスID"
8220
+ requestBody:
8221
+ required: true
8222
+ content:
8223
+ application/json:
8224
+ schema:
8225
+ required: ["private_money_id", "callback_url", "kana"]
8226
+ properties:
8227
+ private_money_id:
8228
+ type: string
8229
+ format: uuid
8230
+ title: 'マネーID'
8231
+ callback_url:
8232
+ type: string
8233
+ maxLength: 256
8234
+ example: '<Deep Link>'
8235
+ title: 'コールバックURL'
8236
+ kana:
8237
+ type: string
8238
+ maxLength: 30
8239
+ example: 'ポケペイタロウ'
8240
+ title: 'ユーザーの氏名 (片仮名で指定)'
8241
+ email:
8242
+ type: string
8243
+ format: email
8244
+ maxLength: 300
8245
+ title: 'ユーザーのメールアドレス'
8246
+ birthdate:
8247
+ type: string
8248
+ maxLength: 8
8249
+ title: '生年月日'
8250
+ example: '19901142'
8251
+ responses:
8252
+ '200':
8253
+ description: OK
8254
+ content:
8255
+ application/json:
8256
+ schema:
8257
+ $ref: '#/components/schemas/BankRegisteringInfo'
8258
+ '400':
8259
+ $ref: '#/components/responses/InvalidParameters'
8260
+ '403':
8261
+ $ref: '#/components/responses/UnpermittedAdminUser'
8262
+ '404':
8263
+ $ref: '#/components/responses/NotFound'
8264
+ '422':
8265
+ $ref: '#/components/responses/UnprocessableEntity'
8266
+ '503':
8267
+ $ref: '#/components/responses/UserStatsOperationServiceUnavailable'
8268
+ get:
8269
+ x-pokepay-operator-name: "ListBanks"
8270
+ x-pokepay-allow-server-side: true
8271
+ tags:
8272
+ - BankPay
8273
+ summary: 登録した銀行の一覧
8274
+ description: 登録した銀行を一覧します
8275
+ parameters:
8276
+ - in: path
8277
+ name: user_device_id
8278
+ required: true
8279
+ schema:
8280
+ type: string
8281
+ format: uuid
8282
+ title: "デバイスID"
8283
+ requestBody:
8284
+ required: true
8285
+ content:
8286
+ application/json:
8287
+ schema:
8288
+ properties:
8289
+ private_money_id:
8290
+ type: string
8291
+ format: uuid
8292
+ responses:
8293
+ '200':
8294
+ description: OK
8295
+ content:
8296
+ application/json:
8297
+ schema:
8298
+ $ref: '#/components/schemas/Banks'
8299
+ '400':
8300
+ $ref: '#/components/responses/InvalidParameters'
8301
+ '403':
8302
+ $ref: '#/components/responses/UnpermittedAdminUser'
8303
+ '404':
8304
+ $ref: '#/components/responses/NotFound'
8305
+ '422':
8306
+ $ref: '#/components/responses/UnprocessableEntity'
8307
+
8308
+ /user-devices/{user_device_id}/banks/topup:
8309
+ post:
8310
+ x-pokepay-operator-name: "CreateBankTopupTransaction"
8311
+ x-pokepay-allow-server-side: true
8312
+ tags:
8313
+ - BankPay
8314
+ summary: 銀行からのチャージ
8315
+ description: 指定のマネーのアカウントにbank_idの口座を用いてチャージを行います。
8316
+ parameters:
8317
+ - in: path
8318
+ name: user_device_id
8319
+ required: true
8320
+ schema:
8321
+ type: string
8322
+ format: uuid
8323
+ title: "デバイスID"
8324
+ requestBody:
8325
+ required: true
8326
+ content:
8327
+ application/json:
8328
+ schema:
8329
+ required: ["private_money_id", "amount", "bank_id", "request_id"]
8330
+ properties:
8331
+ private_money_id:
8332
+ type: string
8333
+ format: uuid
8334
+ title: 'マネーID'
8335
+ amount:
8336
+ type: integer
8337
+ minimum: 1
8338
+ title: 'チャージ金額'
8339
+ bank_id:
8340
+ type: string
8341
+ format: uuid
8342
+ title: '銀行ID'
8343
+ request_id:
8344
+ type: string
8345
+ format: uuid
8346
+ title: 'リクエストID'
8347
+ responses:
8348
+ '200':
8349
+ description: OK
8350
+ content:
8351
+ application/json:
8352
+ schema:
8353
+ $ref: '#/components/schemas/TransactionDetail'
8354
+ '400':
8355
+ $ref: '#/components/responses/InvalidParameters'
8356
+ '403':
8357
+ $ref: '#/components/responses/UnpermittedAdminUser'
8358
+ '404':
8359
+ $ref: '#/components/responses/NotFound'
8360
+ '422':
8361
+ $ref: '#/components/responses/UnprocessableEntity'
8362
+
7215
8363
  /coupons:
7216
8364
  get:
7217
8365
  x-pokepay-operator-name: "ListCoupons"
@@ -7294,7 +8442,112 @@ paths:
7294
8442
  $ref: '#/components/responses/UnpermittedAdminUser'
7295
8443
  '422':
7296
8444
  $ref: '#/components/responses/UnprocessableEntity'
7297
- /coupons/{coupon-id}:
8445
+ post:
8446
+ x-pokepay-operator-name: "CreateCoupon"
8447
+ x-pokepay-allow-server-side: true
8448
+ tags:
8449
+ - Coupon
8450
+ summary: クーポンの登録
8451
+ description: 新しいクーポンを登録します
8452
+ requestBody:
8453
+ required: true
8454
+ content:
8455
+ application/json:
8456
+ schema:
8457
+ required: ["private_money_id", "name", "starts_at", "ends_at", "issued_shop_id"]
8458
+ x-pokepay-conditional-parameters:
8459
+ xor: [discount_amount, discount_percentage]
8460
+ xnor: [is_shop_specified, available_shop_ids]
8461
+ properties:
8462
+ private_money_id:
8463
+ type: string
8464
+ format: uuid
8465
+ name:
8466
+ type: string
8467
+ maxLength: 128
8468
+ description:
8469
+ type: string
8470
+ maxLength: 256
8471
+ discount_amount:
8472
+ type: integer
8473
+ minimum: 0
8474
+ discount_percentage:
8475
+ type: number
8476
+ minimum: 0
8477
+ discount_upper_limit:
8478
+ type: integer
8479
+ minimum: 0
8480
+ starts_at:
8481
+ type: string
8482
+ format: date-time
8483
+ ends_at:
8484
+ type: string
8485
+ format: date-time
8486
+ display_starts_at:
8487
+ type: string
8488
+ format: date-time
8489
+ title: 'クーポンの掲載期間(開始日時)'
8490
+ display_ends_at:
8491
+ type: string
8492
+ format: date-time
8493
+ title: 'クーポンの掲載期間(終了日時)'
8494
+ is_disabled:
8495
+ type: boolean
8496
+ title: '無効化フラグ'
8497
+ is_hidden:
8498
+ type: boolean
8499
+ title: 'クーポン一覧に掲載されるかどうか'
8500
+ description: |
8501
+ アプリに表示されるクーポン一覧に掲載されるかどうか。
8502
+ 主に一時的に掲載から外したいときに用いられる。そのためis_publicの設定よりも優先される。
8503
+ is_public:
8504
+ type: boolean
8505
+ title: 'アプリ配信なしで受け取れるかどうか'
8506
+ code:
8507
+ type: string
8508
+ title: 'クーポン受け取りコード'
8509
+ usage_limit:
8510
+ type: integer
8511
+ title: 'ユーザごとの利用可能回数(NULLの場合は無制限)'
8512
+ default: 1
8513
+ min_amount:
8514
+ type: integer
8515
+ title: 'クーポン適用可能な最小取引額'
8516
+ issued_shop_id:
8517
+ type: string
8518
+ format: uuid
8519
+ title: '発行元の店舗ID'
8520
+ is_shop_specified:
8521
+ type: boolean
8522
+ title: '特定店舗限定のクーポンかどうか'
8523
+ available_shop_ids:
8524
+ type: array
8525
+ items:
8526
+ type: string
8527
+ format: uuid
8528
+ title: '利用可能店舗リスト'
8529
+ storage_id:
8530
+ type: string
8531
+ format: uuid
8532
+ title: "ストレージID"
8533
+ description: "Storage APIでアップロードしたクーポン画像のStorage IDを指定します"
8534
+ responses:
8535
+ '200':
8536
+ description: OK
8537
+ content:
8538
+ application/json:
8539
+ schema:
8540
+ $ref: '#/components/schemas/CouponDetail'
8541
+ '400':
8542
+ $ref: '#/components/responses/InvalidParameters'
8543
+ '403':
8544
+ $ref: '#/components/responses/UnpermittedAdminUser'
8545
+ '404':
8546
+ $ref: '#/components/responses/NotFound'
8547
+ '422':
8548
+ $ref: '#/components/responses/UnprocessableEntity'
8549
+
8550
+ /coupons/{coupon_id}:
7298
8551
  get:
7299
8552
  x-pokepay-operator-name: "GetCoupon"
7300
8553
  x-pokepay-allow-server-side: true
@@ -7304,7 +8557,7 @@ paths:
7304
8557
  description: 指定したIDを持つクーポンを取得します
7305
8558
  parameters:
7306
8559
  - in: path
7307
- name: coupon-id
8560
+ name: coupon_id
7308
8561
  required: true
7309
8562
  schema:
7310
8563
  type: string
@@ -7327,3 +8580,112 @@ paths:
7327
8580
  $ref: '#/components/responses/UnpermittedAdminUser'
7328
8581
  '422':
7329
8582
  $ref: '#/components/responses/UnprocessableEntity'
8583
+ patch:
8584
+ x-pokepay-operator-name: "UpdateCoupon"
8585
+ x-pokepay-allow-server-side: true
8586
+ tags:
8587
+ - Coupon
8588
+ summary: クーポンの更新
8589
+ description: 指定したクーポンを更新します
8590
+ parameters:
8591
+ - in: path
8592
+ name: coupon_id
8593
+ required: true
8594
+ schema:
8595
+ type: string
8596
+ format: uuid
8597
+ title: 'クーポンID'
8598
+ requestBody:
8599
+ required: true
8600
+ content:
8601
+ application/json:
8602
+ schema:
8603
+ x-pokepay-conditional-parameters: {or: [discount_amount, discount_percentage]}
8604
+ properties:
8605
+ name:
8606
+ type: string
8607
+ maxLength: 128
8608
+ description:
8609
+ type: string
8610
+ maxLength: 256
8611
+ discount_amount:
8612
+ type: integer
8613
+ nullable: true
8614
+ minimum: 0
8615
+ discount_percentage:
8616
+ type: number
8617
+ nullable: true
8618
+ minimum: 0
8619
+ discount_upper_limit:
8620
+ type: integer
8621
+ nullable: true
8622
+ minimum: 0
8623
+ starts_at:
8624
+ type: string
8625
+ format: date-time
8626
+ ends_at:
8627
+ type: string
8628
+ format: date-time
8629
+ display_starts_at:
8630
+ type: string
8631
+ format: date-time
8632
+ nullable: true
8633
+ title: 'クーポンの掲載期間(開始日時)'
8634
+ display_ends_at:
8635
+ type: string
8636
+ format: date-time
8637
+ nullable: true
8638
+ title: 'クーポンの掲載期間(終了日時)'
8639
+ is_disabled:
8640
+ type: boolean
8641
+ title: '無効化フラグ'
8642
+ is_hidden:
8643
+ type: boolean
8644
+ title: 'クーポン一覧に掲載されるかどうか'
8645
+ description: |
8646
+ アプリに表示されるクーポン一覧に掲載されるかどうか。
8647
+ 主に一時的に掲載から外したいときに用いられる。そのためis_publicの設定よりも優先される。
8648
+ is_public:
8649
+ type: boolean
8650
+ title: 'アプリ配信なしで受け取れるかどうか'
8651
+ code:
8652
+ type: string
8653
+ nullable: true
8654
+ title: 'クーポン受け取りコード'
8655
+ usage_limit:
8656
+ type: integer
8657
+ nullable: true
8658
+ title: 'ユーザごとの利用可能回数(NULLの場合は無制限)'
8659
+ min_amount:
8660
+ type: integer
8661
+ nullable: true
8662
+ title: 'クーポン適用可能な最小取引額'
8663
+ is_shop_specified:
8664
+ type: boolean
8665
+ title: '特定店舗限定のクーポンかどうか'
8666
+ available_shop_ids:
8667
+ type: array
8668
+ items:
8669
+ type: string
8670
+ format: uuid
8671
+ title: '利用可能店舗リスト'
8672
+ storage_id:
8673
+ type: string
8674
+ format: uuid
8675
+ title: "ストレージID"
8676
+ description: "Storage APIでアップロードしたクーポン画像のStorage IDを指定します"
8677
+ responses:
8678
+ '200':
8679
+ description: OK
8680
+ content:
8681
+ application/json:
8682
+ schema:
8683
+ $ref: '#/components/schemas/CouponDetail'
8684
+ '400':
8685
+ $ref: '#/components/responses/InvalidParameters'
8686
+ '403':
8687
+ $ref: '#/components/responses/UnpermittedAdminUser'
8688
+ '404':
8689
+ $ref: '#/components/responses/NotFound'
8690
+ '422':
8691
+ $ref: '#/components/responses/UnprocessableEntity'