pokepay_partner_ruby_sdk 0.1.11 → 0.1.15
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/docs/index.md +503 -100
- data/lib/pokepay_partner_ruby_sdk/request/create_cpm_transaction.rb +17 -0
- data/lib/pokepay_partner_ruby_sdk/request/get_cpm_token.rb +15 -0
- data/lib/pokepay_partner_ruby_sdk/request/list_user_accounts.rb +2 -2
- data/lib/pokepay_partner_ruby_sdk/request/refund_transaction.rb +2 -2
- data/lib/pokepay_partner_ruby_sdk/response/account_detail.rb +3 -0
- data/lib/pokepay_partner_ruby_sdk/response/cashtray_attempt.rb +1 -1
- data/lib/pokepay_partner_ruby_sdk/response/cashtray_with_result.rb +2 -2
- data/lib/pokepay_partner_ruby_sdk/response/cpm_token.rb +26 -0
- data/lib/pokepay_partner_ruby_sdk/response/external_transaction.rb +31 -0
- data/lib/pokepay_partner_ruby_sdk/response/paginated_account_details.rb +16 -0
- data/lib/pokepay_partner_ruby_sdk/response/product.rb +21 -0
- data/lib/pokepay_partner_ruby_sdk/version.rb +1 -1
- data/lib/pokepay_partner_ruby_sdk.rb +6 -0
- data/partner.yaml +505 -12
- data/pokepay_partner_ruby_sdk.gemspec +3 -3
- metadata +12 -6
data/partner.yaml
CHANGED
@@ -145,6 +145,8 @@ components:
|
|
145
145
|
format: decimal
|
146
146
|
private_money:
|
147
147
|
$ref: '#/components/schemas/PrivateMoney'
|
148
|
+
user:
|
149
|
+
$ref: '#/components/schemas/User'
|
148
150
|
ShopAccount:
|
149
151
|
x-pokepay-schema-type: "response"
|
150
152
|
properties:
|
@@ -262,6 +264,40 @@ components:
|
|
262
264
|
token:
|
263
265
|
type: string
|
264
266
|
title: チャージQRコードを解析したときに出てくるURL
|
267
|
+
CpmToken:
|
268
|
+
x-pokepay-schema-type: "response"
|
269
|
+
type: object
|
270
|
+
properties:
|
271
|
+
cpm_token:
|
272
|
+
type: string
|
273
|
+
minLength: 22
|
274
|
+
maxLength: 22
|
275
|
+
account:
|
276
|
+
$ref: '#/components/schemas/AccountDetail'
|
277
|
+
transaction:
|
278
|
+
$ref: '#/components/schemas/Transaction'
|
279
|
+
nullable: true
|
280
|
+
event:
|
281
|
+
$ref: '#/components/schemas/ExternalTransaction'
|
282
|
+
nullable: true
|
283
|
+
scopes:
|
284
|
+
type: array
|
285
|
+
title: 許可された取引種別
|
286
|
+
description: エンドユーザーがCPMトークンを生成する際に指定する、CPMトークンに許可された取引の種別。
|
287
|
+
items:
|
288
|
+
type: string
|
289
|
+
enum: [payment, topup, external-transaction]
|
290
|
+
expires_at:
|
291
|
+
type: string
|
292
|
+
format: date-time
|
293
|
+
title: CPMトークンの失効日時
|
294
|
+
metadata:
|
295
|
+
type: string
|
296
|
+
format: json
|
297
|
+
title: エンドユーザー側メタデータ
|
298
|
+
description: |-
|
299
|
+
取引作成時に店舗側から指定されるメタデータです。
|
300
|
+
全てのkeyとvalueが文字列であるようなフラットな構造のJSON文字列です。
|
265
301
|
|
266
302
|
Cashtray:
|
267
303
|
x-pokepay-schema-type: "response"
|
@@ -674,12 +710,64 @@ components:
|
|
674
710
|
format: date-time
|
675
711
|
type:
|
676
712
|
type: string
|
677
|
-
enum: [topup, payment, refund-topup, refund-payment, transfer, exchange-inflow, exchange-outflow]
|
713
|
+
enum: [topup, payment, refund-topup, refund-payment, transfer, exchange-inflow, exchange-outflow, campaign-topup, refund-campaign, use-coupon, refund-coupon]
|
678
714
|
description:
|
679
715
|
type: string
|
680
716
|
transaction_id:
|
681
717
|
type: string
|
682
718
|
format: uuid
|
719
|
+
ExternalTransaction:
|
720
|
+
x-pokepay-schema-type: "response"
|
721
|
+
properties:
|
722
|
+
id:
|
723
|
+
type: string
|
724
|
+
format: uuid
|
725
|
+
title: ポケペイ外部取引ID
|
726
|
+
is_modified:
|
727
|
+
type: boolean
|
728
|
+
title: 返金された取引かどうか
|
729
|
+
sender:
|
730
|
+
$ref: '#/components/schemas/User'
|
731
|
+
title: 送金者情報
|
732
|
+
sender_account:
|
733
|
+
$ref: '#/components/schemas/Account'
|
734
|
+
title: 送金ウォレット情報
|
735
|
+
receiver:
|
736
|
+
$ref: '#/components/schemas/User'
|
737
|
+
title: 受取者情報
|
738
|
+
receiver_account:
|
739
|
+
$ref: '#/components/schemas/Account'
|
740
|
+
title: 受取ウォレット情報
|
741
|
+
amount:
|
742
|
+
type: number
|
743
|
+
title: 決済額
|
744
|
+
done_at:
|
745
|
+
type: string
|
746
|
+
format: date-time
|
747
|
+
title: 取引日時
|
748
|
+
description:
|
749
|
+
type: string
|
750
|
+
title: 取引説明文
|
751
|
+
Product:
|
752
|
+
x-pokepay-schema-type: "response"
|
753
|
+
properties:
|
754
|
+
jan_code:
|
755
|
+
type: string
|
756
|
+
maxLength: 64
|
757
|
+
name:
|
758
|
+
type: string
|
759
|
+
maxLength: 256
|
760
|
+
unit_price:
|
761
|
+
type: number
|
762
|
+
minimum: 0
|
763
|
+
price:
|
764
|
+
type: number
|
765
|
+
minimum: 0
|
766
|
+
is_discounted:
|
767
|
+
type: boolean
|
768
|
+
other:
|
769
|
+
type: string
|
770
|
+
format: json
|
683
771
|
|
684
772
|
OrganizationSummary:
|
685
773
|
x-pokepay-schema-type: "response"
|
@@ -769,6 +857,18 @@ components:
|
|
769
857
|
minimum: 0
|
770
858
|
pagination:
|
771
859
|
$ref: '#/components/schemas/Pagination'
|
860
|
+
PaginatedAccountDetails:
|
861
|
+
x-pokepay-schema-type: "response"
|
862
|
+
properties:
|
863
|
+
rows:
|
864
|
+
type: array
|
865
|
+
items:
|
866
|
+
$ref: '#/components/schemas/AccountDetail'
|
867
|
+
count:
|
868
|
+
type: integer
|
869
|
+
minimum: 0
|
870
|
+
pagination:
|
871
|
+
$ref: '#/components/schemas/Pagination'
|
772
872
|
PaginatedAccountBalance:
|
773
873
|
x-pokepay-schema-type: "response"
|
774
874
|
properties:
|
@@ -915,6 +1015,20 @@ components:
|
|
915
1015
|
message:
|
916
1016
|
type: string
|
917
1017
|
|
1018
|
+
PrivateMoneyNotAvailable:
|
1019
|
+
properties:
|
1020
|
+
type:
|
1021
|
+
type: string
|
1022
|
+
pattern: '^unpermitted_private_money$'
|
1023
|
+
message:
|
1024
|
+
type: string
|
1025
|
+
example: 'This money is not available'
|
1026
|
+
object:
|
1027
|
+
type: array
|
1028
|
+
items:
|
1029
|
+
type: string
|
1030
|
+
format: uuid
|
1031
|
+
|
918
1032
|
responses:
|
919
1033
|
BadRequest:
|
920
1034
|
description: Bad Request
|
@@ -1020,7 +1134,7 @@ paths:
|
|
1020
1134
|
content:
|
1021
1135
|
application/json:
|
1022
1136
|
schema:
|
1023
|
-
$ref: '#/components/schemas/
|
1137
|
+
$ref: '#/components/schemas/PaginatedAccountDetails'
|
1024
1138
|
'400':
|
1025
1139
|
$ref: '#/components/responses/BadRequest'
|
1026
1140
|
'403':
|
@@ -1277,6 +1391,21 @@ paths:
|
|
1277
1391
|
type: boolean
|
1278
1392
|
title: 'ウォレットが凍結状態かどうかでフィルターする'
|
1279
1393
|
description: このパラメータが指定されている場合、ウォレットの凍結状態で結果がフィルターされます。デフォルトでは未指定です。
|
1394
|
+
external_id:
|
1395
|
+
type: string
|
1396
|
+
maxLength: 50
|
1397
|
+
title: '外部ID'
|
1398
|
+
description: 外部IDでのフィルタリングです。デフォルトでは未指定です。
|
1399
|
+
tel:
|
1400
|
+
type: string
|
1401
|
+
pattern: '^0[0-9]{1,3}-?[0-9]{2,4}-?[0-9]{3,4}$'
|
1402
|
+
title: 'エンドユーザーの電話番号'
|
1403
|
+
description: エンドユーザーの電話番号でのフィルタリングです。デフォルトでは未指定です。
|
1404
|
+
email:
|
1405
|
+
type: string
|
1406
|
+
format: email
|
1407
|
+
title: 'エンドユーザーのメールアドレス'
|
1408
|
+
description: エンドユーザーのメールアドレスでのフィルタリングです。デフォルトでは未指定です。
|
1280
1409
|
responses:
|
1281
1410
|
'200':
|
1282
1411
|
description: OK
|
@@ -1327,6 +1456,12 @@ paths:
|
|
1327
1456
|
type: string
|
1328
1457
|
maxLength: 256
|
1329
1458
|
example: ポケペイ太郎のアカウント
|
1459
|
+
external_id:
|
1460
|
+
title: '外部ID'
|
1461
|
+
description: |-
|
1462
|
+
PAPIクライアントシステムから利用するPokepayユーザーのIDです。デフォルトでは未指定です。
|
1463
|
+
type: string
|
1464
|
+
maxLength: 50
|
1330
1465
|
responses:
|
1331
1466
|
'200':
|
1332
1467
|
description: OK
|
@@ -1674,6 +1809,37 @@ paths:
|
|
1674
1809
|
$ref: '#/components/schemas/Check'
|
1675
1810
|
'400':
|
1676
1811
|
$ref: '#/components/responses/InvalidParameters'
|
1812
|
+
/cpm/{cpm_token}:
|
1813
|
+
get:
|
1814
|
+
tags:
|
1815
|
+
- Transaction
|
1816
|
+
summary: 'CPMトークンの状態取得'
|
1817
|
+
description: CPMトークンの現在の状態を取得します。CPMトークンの有効期限やCPM取引の状態を返します。
|
1818
|
+
x-pokepay-operator-name: "GetCpmToken"
|
1819
|
+
x-pokepay-allow-server-side: true
|
1820
|
+
parameters:
|
1821
|
+
- in: path
|
1822
|
+
name: cpm_token
|
1823
|
+
required: true
|
1824
|
+
schema:
|
1825
|
+
type: string
|
1826
|
+
minLength: 22
|
1827
|
+
maxLength: 22
|
1828
|
+
title: CPMトークン
|
1829
|
+
description: CPM取引時にエンドユーザーが店舗に提示するバーコードを解析して得られる22桁の文字列です。
|
1830
|
+
responses:
|
1831
|
+
'200':
|
1832
|
+
description: OK
|
1833
|
+
content:
|
1834
|
+
application/json:
|
1835
|
+
schema:
|
1836
|
+
$ref: '#/components/schemas/CpmToken'
|
1837
|
+
'400':
|
1838
|
+
$ref: '#/components/responses/BadRequest'
|
1839
|
+
'403':
|
1840
|
+
$ref: '#/components/responses/Forbidden'
|
1841
|
+
'422':
|
1842
|
+
$ref: '#/components/responses/UnprocessableEntity'
|
1677
1843
|
/transactions:
|
1678
1844
|
get:
|
1679
1845
|
tags:
|
@@ -1959,6 +2125,27 @@ paths:
|
|
1959
2125
|
|
1960
2126
|
任意入力で、取引履歴に表示される説明文です。
|
1961
2127
|
example: 初夏のチャージキャンペーン
|
2128
|
+
metadata:
|
2129
|
+
type: string
|
2130
|
+
format: json
|
2131
|
+
title: '取引メタデータ'
|
2132
|
+
description: |-
|
2133
|
+
取引作成時に指定されるメタデータです。
|
2134
|
+
|
2135
|
+
任意入力で、全てのkeyとvalueが文字列であるようなフラットな構造のJSON文字列で指定します。
|
2136
|
+
example: |-
|
2137
|
+
{"key":"value"}
|
2138
|
+
request_id:
|
2139
|
+
type: string
|
2140
|
+
format: uuid
|
2141
|
+
title: 'リクエストID'
|
2142
|
+
description: |-
|
2143
|
+
取引作成APIの羃等性を担保するためのリクエスト固有のIDです。
|
2144
|
+
|
2145
|
+
取引作成APIで結果が受け取れなかったなどの理由で再試行する際に、二重に取引が作られてしまうことを防ぐために、クライアント側から指定されます。指定は任意で、UUID V4フォーマットでランダム生成した文字列です。リクエストIDは一定期間で削除されます。
|
2146
|
+
|
2147
|
+
リクエストIDを指定したとき、まだそのリクエストIDに対する取引がない場合、新規に取引が作られレスポンスとして返されます。もしそのリクエストIDに対する取引が既にある場合、既存の取引がレスポンスとして返されます。
|
2148
|
+
example: '9dbfd997-b948-40d3-a3bf-6bc1a01368d2'
|
1962
2149
|
responses:
|
1963
2150
|
'200':
|
1964
2151
|
description: OK
|
@@ -2079,6 +2266,67 @@ paths:
|
|
2079
2266
|
|
2080
2267
|
任意入力で、取引履歴に表示される説明文です。
|
2081
2268
|
example: たい焼き(小倉)
|
2269
|
+
metadata:
|
2270
|
+
type: string
|
2271
|
+
format: json
|
2272
|
+
title: '取引メタデータ'
|
2273
|
+
description: |-
|
2274
|
+
取引作成時に指定されるメタデータです。
|
2275
|
+
|
2276
|
+
任意入力で、全てのkeyとvalueが文字列であるようなフラットな構造のJSON文字列で指定します。
|
2277
|
+
example: |-
|
2278
|
+
{"key":"value"}
|
2279
|
+
products:
|
2280
|
+
type: array
|
2281
|
+
items:
|
2282
|
+
type: object
|
2283
|
+
properties:
|
2284
|
+
jan_code:
|
2285
|
+
type: string
|
2286
|
+
maxLength: 64
|
2287
|
+
name:
|
2288
|
+
type: string
|
2289
|
+
maxLength: 256
|
2290
|
+
unit_price:
|
2291
|
+
type: number
|
2292
|
+
minimum: 0
|
2293
|
+
price:
|
2294
|
+
type: number
|
2295
|
+
minimum: 0
|
2296
|
+
is_discounted:
|
2297
|
+
type: boolean
|
2298
|
+
other:
|
2299
|
+
type: string
|
2300
|
+
format: json
|
2301
|
+
example: |-
|
2302
|
+
{"jan_code":"abc",
|
2303
|
+
"name":"name1",
|
2304
|
+
"unit_price":100,
|
2305
|
+
"price": 100,
|
2306
|
+
"is_discounted": false,
|
2307
|
+
"other":"{}"}
|
2308
|
+
title: '商品情報データ'
|
2309
|
+
description: |-
|
2310
|
+
一つの取引に含まれる商品情報データです。
|
2311
|
+
以下の内容からなるJSONオブジェクトの配列で指定します。
|
2312
|
+
|
2313
|
+
- `jan_code`: JANコード。64字以下の文字列
|
2314
|
+
- `name`: 商品名。256字以下の文字列
|
2315
|
+
- `unit_price`: 商品単価。0以上の数値
|
2316
|
+
- `price`: 全体の金額(例: 商品単価 × 個数)。0以上の数値
|
2317
|
+
- `is_discounted`: 賞味期限が近いなどの理由で商品が値引きされているかどうかのフラグ。boolean
|
2318
|
+
- `other`: その他商品に関する情報。JSONオブジェクトで指定します。
|
2319
|
+
request_id:
|
2320
|
+
type: string
|
2321
|
+
format: uuid
|
2322
|
+
title: 'リクエストID'
|
2323
|
+
description: |-
|
2324
|
+
取引作成APIの羃等性を担保するためのリクエスト固有のIDです。
|
2325
|
+
|
2326
|
+
取引作成APIで結果が受け取れなかったなどの理由で再試行する際に、二重に取引が作られてしまうことを防ぐために、クライアント側から指定されます。指定は任意で、UUID V4フォーマットでランダム生成した文字列です。リクエストIDは一定期間で削除されます。
|
2327
|
+
|
2328
|
+
リクエストIDを指定したとき、まだそのリクエストIDに対する取引がない場合、新規に取引が作られレスポンスとして返されます。もしそのリクエストIDに対する取引が既にある場合、既存の取引がレスポンスとして返されます。
|
2329
|
+
example: '9dbfd997-b948-40d3-a3bf-6bc1a01368d2'
|
2082
2330
|
responses:
|
2083
2331
|
'200':
|
2084
2332
|
description: OK
|
@@ -2092,6 +2340,187 @@ paths:
|
|
2092
2340
|
$ref: '#/components/responses/Forbidden'
|
2093
2341
|
'422':
|
2094
2342
|
$ref: '#/components/responses/UnprocessableEntity'
|
2343
|
+
/transactions/cpm:
|
2344
|
+
post:
|
2345
|
+
tags:
|
2346
|
+
- Transaction
|
2347
|
+
summary: 'CPMトークンによる取引作成'
|
2348
|
+
description: |
|
2349
|
+
CPMトークンにより取引を作成します。
|
2350
|
+
CPMトークンに設定されたスコープの取引を作ることができます。
|
2351
|
+
x-pokepay-operator-name: "CreateCpmTransaction"
|
2352
|
+
x-pokepay-allow-server-side: true
|
2353
|
+
requestBody:
|
2354
|
+
required: true
|
2355
|
+
content:
|
2356
|
+
application/json:
|
2357
|
+
schema:
|
2358
|
+
required: ["cpm_token", "shop_id", "amount"]
|
2359
|
+
properties:
|
2360
|
+
cpm_token:
|
2361
|
+
type: string
|
2362
|
+
minLength: 22
|
2363
|
+
maxLength: 22
|
2364
|
+
title: 'CPMトークン'
|
2365
|
+
description: |-
|
2366
|
+
エンドユーザーによって作られ、アプリなどに表示され、店舗に対して提示される22桁の文字列です。
|
2367
|
+
|
2368
|
+
エンドユーザーによって許可された取引のスコープを持っています。
|
2369
|
+
shop_id:
|
2370
|
+
type: string
|
2371
|
+
format: uuid
|
2372
|
+
title: '店舗ID'
|
2373
|
+
description: |-
|
2374
|
+
店舗IDです。
|
2375
|
+
|
2376
|
+
支払いやチャージを行う店舗を指定します。
|
2377
|
+
amount:
|
2378
|
+
type: number
|
2379
|
+
title: '取引金額'
|
2380
|
+
description: |-
|
2381
|
+
取引金額を指定します。
|
2382
|
+
|
2383
|
+
正の値を与えるとチャージになり、負の値を与えると支払いとなります。
|
2384
|
+
description:
|
2385
|
+
type: string
|
2386
|
+
maxLength: 200
|
2387
|
+
title: '取引説明文'
|
2388
|
+
description: |-
|
2389
|
+
取引説明文です。
|
2390
|
+
|
2391
|
+
エンドユーザーアプリの取引履歴などに表示されます。
|
2392
|
+
example: たい焼き(小倉)
|
2393
|
+
metadata:
|
2394
|
+
type: string
|
2395
|
+
format: json
|
2396
|
+
title: '店舗側メタデータ'
|
2397
|
+
description: |-
|
2398
|
+
取引作成時に店舗側から指定されるメタデータです。
|
2399
|
+
|
2400
|
+
任意入力で、全てのkeyとvalueが文字列であるようなフラットな構造のJSON文字列で指定します。
|
2401
|
+
example: |-
|
2402
|
+
{"key":"value"}
|
2403
|
+
products:
|
2404
|
+
type: array
|
2405
|
+
items:
|
2406
|
+
type: object
|
2407
|
+
properties:
|
2408
|
+
jan_code:
|
2409
|
+
type: string
|
2410
|
+
maxLength: 64
|
2411
|
+
name:
|
2412
|
+
type: string
|
2413
|
+
maxLength: 256
|
2414
|
+
unit_price:
|
2415
|
+
type: number
|
2416
|
+
minimum: 0
|
2417
|
+
price:
|
2418
|
+
type: number
|
2419
|
+
minimum: 0
|
2420
|
+
is_discounted:
|
2421
|
+
type: boolean
|
2422
|
+
other:
|
2423
|
+
type: string
|
2424
|
+
format: json
|
2425
|
+
example: |-
|
2426
|
+
{"jan_code":"abc",
|
2427
|
+
"name":"name1",
|
2428
|
+
"unit_price":100,
|
2429
|
+
"price": 100,
|
2430
|
+
"is_discounted": false,
|
2431
|
+
"other":"{}"}
|
2432
|
+
title: 商品情報データ
|
2433
|
+
description: |-
|
2434
|
+
一つの取引に含まれる商品情報データです。
|
2435
|
+
以下の内容からなるJSONオブジェクトの配列で指定します。
|
2436
|
+
|
2437
|
+
- `jan_code`: JANコード。64字以下の文字列
|
2438
|
+
- `name`: 商品名。256字以下の文字列
|
2439
|
+
- `unit_price`: 商品単価。0以上の数値
|
2440
|
+
- `price`: 全体の金額(例: 商品単価 × 個数)。0以上の数値
|
2441
|
+
- `is_discounted`: 賞味期限が近いなどの理由で商品が値引きされているかどうかのフラグ。boolean
|
2442
|
+
- `other`: その他商品に関する情報。JSONオブジェクトで指定します。
|
2443
|
+
request_id:
|
2444
|
+
type: string
|
2445
|
+
format: uuid
|
2446
|
+
title: 'リクエストID'
|
2447
|
+
description: |-
|
2448
|
+
取引作成APIの羃等性を担保するためのリクエスト固有のIDです。
|
2449
|
+
|
2450
|
+
取引作成APIで結果が受け取れなかったなどの理由で再試行する際に、二重に取引が作られてしまうことを防ぐために、クライアント側から指定されます。指定は任意で、UUID V4フォーマットでランダム生成した文字列です。リクエストIDは一定期間で削除されます。
|
2451
|
+
|
2452
|
+
リクエストIDを指定したとき、まだそのリクエストIDに対する取引がない場合、新規に取引が作られレスポンスとして返されます。もしそのリクエストIDに対する取引が既にある場合、既存の取引がレスポンスとして返されます。
|
2453
|
+
example: '9dbfd997-b948-40d3-a3bf-6bc1a01368d2'
|
2454
|
+
responses:
|
2455
|
+
'200':
|
2456
|
+
description: OK
|
2457
|
+
content:
|
2458
|
+
application/json:
|
2459
|
+
schema:
|
2460
|
+
$ref: '#/components/schemas/Transaction'
|
2461
|
+
examples:
|
2462
|
+
example-1:
|
2463
|
+
value:
|
2464
|
+
id: 497f6eca-6276-4993-bfeb-53cbbbba6f08
|
2465
|
+
type: string
|
2466
|
+
is_modified: true
|
2467
|
+
sender:
|
2468
|
+
id: 497f6eca-6276-4993-bfeb-53cbbbba6f08
|
2469
|
+
name: string
|
2470
|
+
is_merchant: true
|
2471
|
+
sender_account:
|
2472
|
+
id: 497f6eca-6276-4993-bfeb-53cbbbba6f08
|
2473
|
+
name: string
|
2474
|
+
is_suspended: true
|
2475
|
+
private_money:
|
2476
|
+
id: 497f6eca-6276-4993-bfeb-53cbbbba6f08
|
2477
|
+
name: string
|
2478
|
+
unit: string
|
2479
|
+
is_exclusive: true
|
2480
|
+
description: string
|
2481
|
+
oneline_message: string
|
2482
|
+
organization:
|
2483
|
+
code: string
|
2484
|
+
name: string
|
2485
|
+
max_balance: 0
|
2486
|
+
transfer_limit: 0
|
2487
|
+
type: own
|
2488
|
+
expiration_type: static
|
2489
|
+
enable_topup_by_member: true
|
2490
|
+
receiver:
|
2491
|
+
id: 497f6eca-6276-4993-bfeb-53cbbbba6f08
|
2492
|
+
name: string
|
2493
|
+
is_merchant: true
|
2494
|
+
receiver_account:
|
2495
|
+
id: 497f6eca-6276-4993-bfeb-53cbbbba6f08
|
2496
|
+
name: string
|
2497
|
+
is_suspended: true
|
2498
|
+
private_money:
|
2499
|
+
id: 497f6eca-6276-4993-bfeb-53cbbbba6f08
|
2500
|
+
name: string
|
2501
|
+
unit: string
|
2502
|
+
is_exclusive: true
|
2503
|
+
description: string
|
2504
|
+
oneline_message: string
|
2505
|
+
organization:
|
2506
|
+
code: string
|
2507
|
+
name: string
|
2508
|
+
max_balance: 0
|
2509
|
+
transfer_limit: 0
|
2510
|
+
type: own
|
2511
|
+
expiration_type: static
|
2512
|
+
enable_topup_by_member: true
|
2513
|
+
amount: 0
|
2514
|
+
money_amount: 0
|
2515
|
+
point_amount: 0
|
2516
|
+
done_at: '2019-08-24T14:15:22Z'
|
2517
|
+
description: string
|
2518
|
+
'400':
|
2519
|
+
$ref: '#/components/responses/BadRequest'
|
2520
|
+
'403':
|
2521
|
+
$ref: '#/components/responses/Forbidden'
|
2522
|
+
'422':
|
2523
|
+
$ref: '#/components/responses/UnprocessableEntity'
|
2095
2524
|
/transactions/transfer:
|
2096
2525
|
post:
|
2097
2526
|
tags:
|
@@ -2141,6 +2570,16 @@ paths:
|
|
2141
2570
|
マネー額です。
|
2142
2571
|
|
2143
2572
|
送金するマネー額を指定します。
|
2573
|
+
metadata:
|
2574
|
+
type: string
|
2575
|
+
format: json
|
2576
|
+
title: '取引メタデータ'
|
2577
|
+
description: |-
|
2578
|
+
取引作成時に指定されるメタデータです。
|
2579
|
+
|
2580
|
+
任意入力で、全てのkeyとvalueが文字列であるようなフラットな構造のJSON文字列で指定します。
|
2581
|
+
example: |-
|
2582
|
+
{"key":"value"}
|
2144
2583
|
description:
|
2145
2584
|
type: string
|
2146
2585
|
maxLength: 200
|
@@ -2150,6 +2589,17 @@ paths:
|
|
2150
2589
|
|
2151
2590
|
任意入力で、取引履歴に表示される説明文です。
|
2152
2591
|
example: たい焼き(小倉)
|
2592
|
+
request_id:
|
2593
|
+
type: string
|
2594
|
+
format: uuid
|
2595
|
+
title: 'リクエストID'
|
2596
|
+
description: |-
|
2597
|
+
取引作成APIの羃等性を担保するためのリクエスト固有のIDです。
|
2598
|
+
|
2599
|
+
取引作成APIで結果が受け取れなかったなどの理由で再試行する際に、二重に取引が作られてしまうことを防ぐために、クライアント側から指定されます。指定は任意で、UUID V4フォーマットでランダム生成した文字列です。リクエストIDは一定期間で削除されます。
|
2600
|
+
|
2601
|
+
リクエストIDを指定したとき、まだそのリクエストIDに対する取引がない場合、新規に取引が作られレスポンスとして返されます。もしそのリクエストIDに対する取引が既にある場合、既存の取引がレスポンスとして返されます。
|
2602
|
+
example: '9dbfd997-b948-40d3-a3bf-6bc1a01368d2'
|
2153
2603
|
responses:
|
2154
2604
|
'200':
|
2155
2605
|
description: OK
|
@@ -2190,6 +2640,17 @@ paths:
|
|
2190
2640
|
description:
|
2191
2641
|
type: string
|
2192
2642
|
maxLength: 200
|
2643
|
+
request_id:
|
2644
|
+
type: string
|
2645
|
+
format: uuid
|
2646
|
+
title: 'リクエストID'
|
2647
|
+
description: |-
|
2648
|
+
取引作成APIの羃等性を担保するためのリクエスト固有のIDです。
|
2649
|
+
|
2650
|
+
取引作成APIで結果が受け取れなかったなどの理由で再試行する際に、二重に取引が作られてしまうことを防ぐために、クライアント側から指定されます。指定は任意で、UUID V4フォーマットでランダム生成した文字列です。リクエストIDは一定期間で削除されます。
|
2651
|
+
|
2652
|
+
リクエストIDを指定したとき、まだそのリクエストIDに対する取引がない場合、新規に取引が作られレスポンスとして返されます。もしそのリクエストIDに対する取引が既にある場合、既存の取引がレスポンスとして返されます。
|
2653
|
+
example: '9dbfd997-b948-40d3-a3bf-6bc1a01368d2'
|
2193
2654
|
responses:
|
2194
2655
|
'200':
|
2195
2656
|
description: OK
|
@@ -2311,8 +2772,17 @@ paths:
|
|
2311
2772
|
post:
|
2312
2773
|
tags:
|
2313
2774
|
- Transaction
|
2314
|
-
summary:
|
2775
|
+
summary: '取引をキャンセルする'
|
2776
|
+
description: |-
|
2777
|
+
取引IDを指定して取引をキャンセルします。
|
2778
|
+
|
2779
|
+
発行体の管理者は自組織の直営店、または発行しているマネーの決済加盟店組織での取引をキャンセルできます。
|
2780
|
+
キャンセル対象の取引に付随するポイント還元キャンペーンやクーポン適用も取り消されます。
|
2781
|
+
|
2782
|
+
チャージ取引のキャンセル時に返金すべき残高が足りないときは `account_balance_not_enough (422)` エラーが返ります。
|
2783
|
+
取引をキャンセルできるのは1回きりです。既にキャンセルされた取引を重ねてキャンセルしようとすると `transaction_already_refunded (422)` エラーが返ります。
|
2315
2784
|
x-pokepay-operator-name: RefundTransaction
|
2785
|
+
x-pokepay-allow-server-side: true
|
2316
2786
|
parameters:
|
2317
2787
|
- in: path
|
2318
2788
|
name: transaction_id
|
@@ -2338,11 +2808,9 @@ paths:
|
|
2338
2808
|
content:
|
2339
2809
|
application/json:
|
2340
2810
|
schema:
|
2341
|
-
$ref: '#/components/schemas/
|
2811
|
+
$ref: '#/components/schemas/Transaction'
|
2342
2812
|
'403':
|
2343
2813
|
$ref: '#/components/responses/Forbidden'
|
2344
|
-
'404':
|
2345
|
-
$ref: '#/components/responses/NotFound'
|
2346
2814
|
'422':
|
2347
2815
|
$ref: '#/components/responses/UnprocessableEntity'
|
2348
2816
|
/transfers:
|
@@ -2396,9 +2864,28 @@ paths:
|
|
2396
2864
|
enum: [topup, payment, transfer, exchange]
|
2397
2865
|
transfer_types:
|
2398
2866
|
type: array
|
2867
|
+
description: |-
|
2868
|
+
取引明細の種類でフィルターします。
|
2869
|
+
|
2870
|
+
以下の種類を指定できます。
|
2871
|
+
|
2872
|
+
1. topup
|
2873
|
+
店舗からエンドユーザーへの送金取引(チャージ)、またはそのキャンセル取引
|
2874
|
+
|
2875
|
+
2. payment
|
2876
|
+
エンドユーザーから店舗への送金取引(支払い)、またはそのキャンセル取引
|
2877
|
+
|
2878
|
+
3. exchange
|
2879
|
+
他マネーへの流出/流入
|
2880
|
+
|
2881
|
+
4. campaign
|
2882
|
+
取引に対するポイント還元キャンペーンによるポイント付与、またはそのキャンセル取引
|
2883
|
+
|
2884
|
+
5. coupon
|
2885
|
+
クーポンによる値引き処理、またはそのキャンセル取引
|
2399
2886
|
items:
|
2400
2887
|
type: string
|
2401
|
-
enum: [topup, payment, exchange, transfer]
|
2888
|
+
enum: [topup, payment, exchange, transfer, coupon, campaign]
|
2402
2889
|
description:
|
2403
2890
|
type: string
|
2404
2891
|
maxLength: 200
|
@@ -2435,7 +2922,7 @@ paths:
|
|
2435
2922
|
type: string
|
2436
2923
|
maxLength: 32
|
2437
2924
|
title: '新規組織コード'
|
2438
|
-
example:
|
2925
|
+
example: ox-supermarket
|
2439
2926
|
name:
|
2440
2927
|
type: string
|
2441
2928
|
maxLength: 256
|
@@ -2465,7 +2952,7 @@ paths:
|
|
2465
2952
|
type: string
|
2466
2953
|
pattern: '^$|^[0-9]{4}$'
|
2467
2954
|
title: '銀行金融機関コード'
|
2468
|
-
example:
|
2955
|
+
example: '1234'
|
2469
2956
|
bank_branch_name:
|
2470
2957
|
type: string
|
2471
2958
|
maxLength: 64
|
@@ -2475,7 +2962,7 @@ paths:
|
|
2475
2962
|
type: string
|
2476
2963
|
pattern: '^(|[0-9]{3})$'
|
2477
2964
|
title: '銀行支店コード'
|
2478
|
-
example:
|
2965
|
+
example: '123'
|
2479
2966
|
bank_account_type:
|
2480
2967
|
type: string
|
2481
2968
|
enum: [saving, current, other]
|
@@ -2485,7 +2972,7 @@ paths:
|
|
2485
2972
|
maxLength: 7
|
2486
2973
|
pattern: '[0-9]{0,7}'
|
2487
2974
|
title: '銀行口座番号'
|
2488
|
-
example:
|
2975
|
+
example: '1234567'
|
2489
2976
|
bank_account_holder_name:
|
2490
2977
|
# TODO: flico
|
2491
2978
|
type: string
|
@@ -2753,7 +3240,13 @@ paths:
|
|
2753
3240
|
'409':
|
2754
3241
|
$ref: '#/components/responses/Conflict'
|
2755
3242
|
'422':
|
2756
|
-
|
3243
|
+
description:
|
3244
|
+
content:
|
3245
|
+
application/json:
|
3246
|
+
schema:
|
3247
|
+
oneOf:
|
3248
|
+
- $ref: '#/components/schemas/PrivateMoneyNotAvailable'
|
3249
|
+
- $ref: '#/components/schemas/UnprocessableEntity'
|
2757
3250
|
/shops/{shop_id}:
|
2758
3251
|
get:
|
2759
3252
|
tags:
|