pokepay_partner_ruby_sdk 0.1.8 → 0.1.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/docs/index.md +701 -311
- data/lib/pokepay_partner_ruby_sdk.rb +15 -0
- data/lib/pokepay_partner_ruby_sdk/request/cancel_cashtray.rb +15 -0
- data/lib/pokepay_partner_ruby_sdk/request/create_cashtray.rb +17 -0
- data/lib/pokepay_partner_ruby_sdk/request/create_shop_v.rb +15 -0
- data/lib/pokepay_partner_ruby_sdk/request/get_bulk_transaction.rb +15 -0
- data/lib/pokepay_partner_ruby_sdk/request/get_cashtray.rb +15 -0
- data/lib/pokepay_partner_ruby_sdk/request/get_private_moneys.rb +15 -0
- data/lib/pokepay_partner_ruby_sdk/request/get_shop.rb +15 -0
- data/lib/pokepay_partner_ruby_sdk/request/update_cashtray.rb +15 -0
- data/lib/pokepay_partner_ruby_sdk/request/update_shop.rb +15 -0
- data/lib/pokepay_partner_ruby_sdk/response/bulk_transaction.rb +6 -0
- data/lib/pokepay_partner_ruby_sdk/response/cashtray.rb +24 -0
- data/lib/pokepay_partner_ruby_sdk/response/cashtray_attempt.rb +20 -0
- data/lib/pokepay_partner_ruby_sdk/response/cashtray_with_result.rb +30 -0
- data/lib/pokepay_partner_ruby_sdk/response/paginated_private_moneys.rb +16 -0
- data/lib/pokepay_partner_ruby_sdk/response/private_money.rb +0 -2
- data/lib/pokepay_partner_ruby_sdk/response/shop_account.rb +20 -0
- data/lib/pokepay_partner_ruby_sdk/response/shop_with_accounts.rb +27 -0
- data/lib/pokepay_partner_ruby_sdk/version.rb +1 -1
- data/partner.yaml +894 -53
- metadata +20 -5
@@ -32,8 +32,17 @@ require "pokepay_partner_ruby_sdk/request/list_transfers"
|
|
32
32
|
require "pokepay_partner_ruby_sdk/request/create_organization"
|
33
33
|
require "pokepay_partner_ruby_sdk/request/list_shops"
|
34
34
|
require "pokepay_partner_ruby_sdk/request/create_shop"
|
35
|
+
require "pokepay_partner_ruby_sdk/request/create_shop_v"
|
36
|
+
require "pokepay_partner_ruby_sdk/request/get_shop"
|
37
|
+
require "pokepay_partner_ruby_sdk/request/update_shop"
|
38
|
+
require "pokepay_partner_ruby_sdk/request/get_private_moneys"
|
35
39
|
require "pokepay_partner_ruby_sdk/request/get_private_money_organization_summaries"
|
36
40
|
require "pokepay_partner_ruby_sdk/request/list_customer_transactions"
|
41
|
+
require "pokepay_partner_ruby_sdk/request/get_bulk_transaction"
|
42
|
+
require "pokepay_partner_ruby_sdk/request/create_cashtray"
|
43
|
+
require "pokepay_partner_ruby_sdk/request/get_cashtray"
|
44
|
+
require "pokepay_partner_ruby_sdk/request/cancel_cashtray"
|
45
|
+
require "pokepay_partner_ruby_sdk/request/update_cashtray"
|
37
46
|
require "pokepay_partner_ruby_sdk/response/pong"
|
38
47
|
require "pokepay_partner_ruby_sdk/response/echo"
|
39
48
|
require "pokepay_partner_ruby_sdk/response/pagination"
|
@@ -41,14 +50,19 @@ require "pokepay_partner_ruby_sdk/response/admin_user_with_shops_and_private_mon
|
|
41
50
|
require "pokepay_partner_ruby_sdk/response/account"
|
42
51
|
require "pokepay_partner_ruby_sdk/response/account_with_user"
|
43
52
|
require "pokepay_partner_ruby_sdk/response/account_detail"
|
53
|
+
require "pokepay_partner_ruby_sdk/response/shop_account"
|
44
54
|
require "pokepay_partner_ruby_sdk/response/account_balance"
|
45
55
|
require "pokepay_partner_ruby_sdk/response/bill"
|
46
56
|
require "pokepay_partner_ruby_sdk/response/check"
|
57
|
+
require "pokepay_partner_ruby_sdk/response/cashtray"
|
58
|
+
require "pokepay_partner_ruby_sdk/response/cashtray_with_result"
|
59
|
+
require "pokepay_partner_ruby_sdk/response/cashtray_attempt"
|
47
60
|
require "pokepay_partner_ruby_sdk/response/user"
|
48
61
|
require "pokepay_partner_ruby_sdk/response/private_money"
|
49
62
|
require "pokepay_partner_ruby_sdk/response/organization"
|
50
63
|
require "pokepay_partner_ruby_sdk/response/transaction"
|
51
64
|
require "pokepay_partner_ruby_sdk/response/shop_with_metadata"
|
65
|
+
require "pokepay_partner_ruby_sdk/response/shop_with_accounts"
|
52
66
|
require "pokepay_partner_ruby_sdk/response/user_transaction"
|
53
67
|
require "pokepay_partner_ruby_sdk/response/bulk_transaction"
|
54
68
|
require "pokepay_partner_ruby_sdk/response/account_without_private_money_detail"
|
@@ -62,6 +76,7 @@ require "pokepay_partner_ruby_sdk/response/paginated_accounts"
|
|
62
76
|
require "pokepay_partner_ruby_sdk/response/paginated_account_balance"
|
63
77
|
require "pokepay_partner_ruby_sdk/response/paginated_shops"
|
64
78
|
require "pokepay_partner_ruby_sdk/response/paginated_bills"
|
79
|
+
require "pokepay_partner_ruby_sdk/response/paginated_private_moneys"
|
65
80
|
require "pokepay_partner_ruby_sdk/response/bad_request"
|
66
81
|
require "pokepay_partner_ruby_sdk/response/partner_client_not_found"
|
67
82
|
require "pokepay_partner_ruby_sdk/response/partner_decryption_failed"
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# DO NOT EDIT: File is generated by code generator.
|
2
|
+
|
3
|
+
require "pokepay_partner_ruby_sdk/response/cashtray"
|
4
|
+
|
5
|
+
module Pokepay::Request
|
6
|
+
class CancelCashtray < Request
|
7
|
+
def initialize(cashtray_id)
|
8
|
+
@path = "/cashtrays" + "/" + cashtray_id
|
9
|
+
@method = "DELETE"
|
10
|
+
@body_params = { }
|
11
|
+
@response_class = Pokepay::Response::Cashtray
|
12
|
+
end
|
13
|
+
attr_reader :response_class
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# DO NOT EDIT: File is generated by code generator.
|
2
|
+
|
3
|
+
require "pokepay_partner_ruby_sdk/response/cashtray"
|
4
|
+
|
5
|
+
module Pokepay::Request
|
6
|
+
class CreateCashtray < Request
|
7
|
+
def initialize(private_money_id, shop_id, amount, rest_args = {})
|
8
|
+
@path = "/cashtrays"
|
9
|
+
@method = "POST"
|
10
|
+
@body_params = { "private_money_id" => private_money_id,
|
11
|
+
"shop_id" => shop_id,
|
12
|
+
"amount" => amount }.merge(rest_args)
|
13
|
+
@response_class = Pokepay::Response::Cashtray
|
14
|
+
end
|
15
|
+
attr_reader :response_class
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# DO NOT EDIT: File is generated by code generator.
|
2
|
+
|
3
|
+
require "pokepay_partner_ruby_sdk/response/shop_with_accounts"
|
4
|
+
|
5
|
+
module Pokepay::Request
|
6
|
+
class CreateShopV2 < Request
|
7
|
+
def initialize(name, rest_args = {})
|
8
|
+
@path = "/shops-v2"
|
9
|
+
@method = "POST"
|
10
|
+
@body_params = { "name" => name }.merge(rest_args)
|
11
|
+
@response_class = Pokepay::Response::ShopWithAccounts
|
12
|
+
end
|
13
|
+
attr_reader :response_class
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# DO NOT EDIT: File is generated by code generator.
|
2
|
+
|
3
|
+
require "pokepay_partner_ruby_sdk/response/bulk_transaction"
|
4
|
+
|
5
|
+
module Pokepay::Request
|
6
|
+
class GetBulkTransaction < Request
|
7
|
+
def initialize(bulk_transaction_id)
|
8
|
+
@path = "/bulk-transactions" + "/" + bulk_transaction_id
|
9
|
+
@method = "GET"
|
10
|
+
@body_params = { }
|
11
|
+
@response_class = Pokepay::Response::BulkTransaction
|
12
|
+
end
|
13
|
+
attr_reader :response_class
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# DO NOT EDIT: File is generated by code generator.
|
2
|
+
|
3
|
+
require "pokepay_partner_ruby_sdk/response/cashtray_with_result"
|
4
|
+
|
5
|
+
module Pokepay::Request
|
6
|
+
class GetCashtray < Request
|
7
|
+
def initialize(cashtray_id)
|
8
|
+
@path = "/cashtrays" + "/" + cashtray_id
|
9
|
+
@method = "GET"
|
10
|
+
@body_params = { }
|
11
|
+
@response_class = Pokepay::Response::CashtrayWithResult
|
12
|
+
end
|
13
|
+
attr_reader :response_class
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# DO NOT EDIT: File is generated by code generator.
|
2
|
+
|
3
|
+
require "pokepay_partner_ruby_sdk/response/paginated_private_moneys"
|
4
|
+
|
5
|
+
module Pokepay::Request
|
6
|
+
class GetPrivateMoneys < Request
|
7
|
+
def initialize(rest_args = {})
|
8
|
+
@path = "/private-moneys"
|
9
|
+
@method = "GET"
|
10
|
+
@body_params = { }.merge(rest_args)
|
11
|
+
@response_class = Pokepay::Response::PaginatedPrivateMoneys
|
12
|
+
end
|
13
|
+
attr_reader :response_class
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# DO NOT EDIT: File is generated by code generator.
|
2
|
+
|
3
|
+
require "pokepay_partner_ruby_sdk/response/shop_with_accounts"
|
4
|
+
|
5
|
+
module Pokepay::Request
|
6
|
+
class GetShop < Request
|
7
|
+
def initialize(shop_id)
|
8
|
+
@path = "/shops" + "/" + shop_id
|
9
|
+
@method = "GET"
|
10
|
+
@body_params = { }
|
11
|
+
@response_class = Pokepay::Response::ShopWithAccounts
|
12
|
+
end
|
13
|
+
attr_reader :response_class
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# DO NOT EDIT: File is generated by code generator.
|
2
|
+
|
3
|
+
require "pokepay_partner_ruby_sdk/response/cashtray"
|
4
|
+
|
5
|
+
module Pokepay::Request
|
6
|
+
class UpdateCashtray < Request
|
7
|
+
def initialize(cashtray_id, rest_args = {})
|
8
|
+
@path = "/cashtrays" + "/" + cashtray_id
|
9
|
+
@method = "PATCH"
|
10
|
+
@body_params = { }.merge(rest_args)
|
11
|
+
@response_class = Pokepay::Response::Cashtray
|
12
|
+
end
|
13
|
+
attr_reader :response_class
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# DO NOT EDIT: File is generated by code generator.
|
2
|
+
|
3
|
+
require "pokepay_partner_ruby_sdk/response/shop_with_accounts"
|
4
|
+
|
5
|
+
module Pokepay::Request
|
6
|
+
class UpdateShop < Request
|
7
|
+
def initialize(shop_id, rest_args = {})
|
8
|
+
@path = "/shops" + "/" + shop_id
|
9
|
+
@method = "PATCH"
|
10
|
+
@body_params = { }.merge(rest_args)
|
11
|
+
@response_class = Pokepay::Response::ShopWithAccounts
|
12
|
+
end
|
13
|
+
attr_reader :response_class
|
14
|
+
end
|
15
|
+
end
|
@@ -4,17 +4,23 @@
|
|
4
4
|
module Pokepay::Response
|
5
5
|
class BulkTransaction
|
6
6
|
def initialize(row)
|
7
|
+
@id = row["id"]
|
7
8
|
@request_id = row["request_id"]
|
8
9
|
@name = row["name"]
|
9
10
|
@description = row["description"]
|
10
11
|
@status = row["status"]
|
12
|
+
@error = row["error"]
|
13
|
+
@error_lineno = row["error_lineno"]
|
11
14
|
@submitted_at = row["submitted_at"]
|
12
15
|
@updated_at = row["updated_at"]
|
13
16
|
end
|
17
|
+
attr_reader :id
|
14
18
|
attr_reader :request_id
|
15
19
|
attr_reader :name
|
16
20
|
attr_reader :description
|
17
21
|
attr_reader :status
|
22
|
+
attr_reader :error
|
23
|
+
attr_reader :error_lineno
|
18
24
|
attr_reader :submitted_at
|
19
25
|
attr_reader :updated_at
|
20
26
|
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# DO NOT EDIT: File is generated by code generator.
|
2
|
+
|
3
|
+
require "pokepay_partner_ruby_sdk/response/account_with_user"
|
4
|
+
|
5
|
+
module Pokepay::Response
|
6
|
+
class Cashtray
|
7
|
+
def initialize(row)
|
8
|
+
@id = row["id"]
|
9
|
+
@amount = row["amount"]
|
10
|
+
@description = row["description"]
|
11
|
+
@account = AccountWithUser.new(row["account"])
|
12
|
+
@expires_at = row["expires_at"]
|
13
|
+
@canceled_at = row["canceled_at"]
|
14
|
+
@token = row["token"]
|
15
|
+
end
|
16
|
+
attr_reader :id
|
17
|
+
attr_reader :amount
|
18
|
+
attr_reader :description
|
19
|
+
attr_reader :account
|
20
|
+
attr_reader :expires_at
|
21
|
+
attr_reader :canceled_at
|
22
|
+
attr_reader :token
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# DO NOT EDIT: File is generated by code generator.
|
2
|
+
|
3
|
+
require "pokepay_partner_ruby_sdk/response/account_with_user"
|
4
|
+
|
5
|
+
module Pokepay::Response
|
6
|
+
class CashtrayAttempt
|
7
|
+
def initialize(row)
|
8
|
+
@account = AccountWithUser.new(row["account"])
|
9
|
+
@status_code = row["status_code"]
|
10
|
+
@error_type = row["error_type"]
|
11
|
+
@error_message = row["error_message"]
|
12
|
+
@created_at = row["created_at"]
|
13
|
+
end
|
14
|
+
attr_reader :account
|
15
|
+
attr_reader :status_code
|
16
|
+
attr_reader :error_type
|
17
|
+
attr_reader :error_message
|
18
|
+
attr_reader :created_at
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# DO NOT EDIT: File is generated by code generator.
|
2
|
+
|
3
|
+
require "pokepay_partner_ruby_sdk/response/account_with_user"
|
4
|
+
require "pokepay_partner_ruby_sdk/response/cashtray_attempt"
|
5
|
+
require "pokepay_partner_ruby_sdk/response/transaction"
|
6
|
+
|
7
|
+
module Pokepay::Response
|
8
|
+
class CashtrayWithResult
|
9
|
+
def initialize(row)
|
10
|
+
@id = row["id"]
|
11
|
+
@amount = row["amount"]
|
12
|
+
@description = row["description"]
|
13
|
+
@account = AccountWithUser.new(row["account"])
|
14
|
+
@expires_at = row["expires_at"]
|
15
|
+
@canceled_at = row["canceled_at"]
|
16
|
+
@token = row["token"]
|
17
|
+
@attempt = CashtrayAttempt.new(row["attempt"])
|
18
|
+
@transaction = Transaction.new(row["transaction"])
|
19
|
+
end
|
20
|
+
attr_reader :id
|
21
|
+
attr_reader :amount
|
22
|
+
attr_reader :description
|
23
|
+
attr_reader :account
|
24
|
+
attr_reader :expires_at
|
25
|
+
attr_reader :canceled_at
|
26
|
+
attr_reader :token
|
27
|
+
attr_reader :attempt
|
28
|
+
attr_reader :transaction
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# DO NOT EDIT: File is generated by code generator.
|
2
|
+
|
3
|
+
require "pokepay_partner_ruby_sdk/response/pagination"
|
4
|
+
|
5
|
+
module Pokepay::Response
|
6
|
+
class PaginatedPrivateMoneys
|
7
|
+
def initialize(row)
|
8
|
+
@rows = row["rows"]
|
9
|
+
@count = row["count"]
|
10
|
+
@pagination = Pagination.new(row["pagination"])
|
11
|
+
end
|
12
|
+
attr_reader :rows
|
13
|
+
attr_reader :count
|
14
|
+
attr_reader :pagination
|
15
|
+
end
|
16
|
+
end
|
@@ -17,7 +17,6 @@ module Pokepay::Response
|
|
17
17
|
@type = row["type"]
|
18
18
|
@expiration_type = row["expiration_type"]
|
19
19
|
@enable_topup_by_member = row["enable_topup_by_member"]
|
20
|
-
@account_image = row["account_image"]
|
21
20
|
end
|
22
21
|
attr_reader :id
|
23
22
|
attr_reader :name
|
@@ -31,6 +30,5 @@ module Pokepay::Response
|
|
31
30
|
attr_reader :type
|
32
31
|
attr_reader :expiration_type
|
33
32
|
attr_reader :enable_topup_by_member
|
34
|
-
attr_reader :account_image
|
35
33
|
end
|
36
34
|
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# DO NOT EDIT: File is generated by code generator.
|
2
|
+
|
3
|
+
require "pokepay_partner_ruby_sdk/response/private_money"
|
4
|
+
|
5
|
+
module Pokepay::Response
|
6
|
+
class ShopAccount
|
7
|
+
def initialize(row)
|
8
|
+
@id = row["id"]
|
9
|
+
@name = row["name"]
|
10
|
+
@is_suspended = row["is_suspended"]
|
11
|
+
@can_transfer_topup = row["can_transfer_topup"]
|
12
|
+
@private_money = PrivateMoney.new(row["private_money"])
|
13
|
+
end
|
14
|
+
attr_reader :id
|
15
|
+
attr_reader :name
|
16
|
+
attr_reader :is_suspended
|
17
|
+
attr_reader :can_transfer_topup
|
18
|
+
attr_reader :private_money
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# DO NOT EDIT: File is generated by code generator.
|
2
|
+
|
3
|
+
|
4
|
+
module Pokepay::Response
|
5
|
+
class ShopWithAccounts
|
6
|
+
def initialize(row)
|
7
|
+
@id = row["id"]
|
8
|
+
@name = row["name"]
|
9
|
+
@organization_code = row["organization_code"]
|
10
|
+
@postal_code = row["postal_code"]
|
11
|
+
@address = row["address"]
|
12
|
+
@tel = row["tel"]
|
13
|
+
@email = row["email"]
|
14
|
+
@external_id = row["external_id"]
|
15
|
+
@accounts = row["accounts"]
|
16
|
+
end
|
17
|
+
attr_reader :id
|
18
|
+
attr_reader :name
|
19
|
+
attr_reader :organization_code
|
20
|
+
attr_reader :postal_code
|
21
|
+
attr_reader :address
|
22
|
+
attr_reader :tel
|
23
|
+
attr_reader :email
|
24
|
+
attr_reader :external_id
|
25
|
+
attr_reader :accounts
|
26
|
+
end
|
27
|
+
end
|
data/partner.yaml
CHANGED
@@ -10,6 +10,33 @@ info:
|
|
10
10
|
title: Partner APIs
|
11
11
|
version: 0.0.0
|
12
12
|
|
13
|
+
tags:
|
14
|
+
- name: Transaction
|
15
|
+
- name: Check
|
16
|
+
description: |
|
17
|
+
店舗ユーザが発行し、エンドユーザーがポケペイアプリから読み取ることでチャージ取引が発生するQRコードです。
|
18
|
+
|
19
|
+
チャージQRコードを解析すると次のようなURLになります(URLは環境によって異なります)。
|
20
|
+
|
21
|
+
`https://www-sandbox.pokepay.jp/checks/xxxxxxxx-xxxx-xxxxxxxxx-xxxxxxxxxxxx`
|
22
|
+
|
23
|
+
QRコードを読み取る方法以外にも、このURLリンクを直接スマートフォン(iOS/Android)上で開くことによりアプリが起動して取引が行われます。(注意: 上記URLはsandbox環境であるため、アプリもsandbox環境のものである必要があります) 上記URL中の `xxxxxxxx-xxxx-xxxxxxxxx-xxxxxxxxxxxx` の部分がチャージQRコードのIDです。
|
24
|
+
- name: Bill
|
25
|
+
description: 支払いQRコード
|
26
|
+
- name: Cashtray
|
27
|
+
description: |
|
28
|
+
Cashtrayは支払いとチャージ両方に使えるQRコードで、店舗ユーザとエンドユーザーの間の主に店頭などでの取引のために用いられます。
|
29
|
+
Cashtrayによる取引では、エンドユーザーがQRコードを読み取った時点で即時取引が作られ、ユーザに対して受け取り確認画面は表示されません。
|
30
|
+
Cashtrayはワンタイムで、一度読み取りに成功するか、取引エラーになると失効します。
|
31
|
+
また、Cashtrayには有効期限があり、デフォルトでは30分で失効します。
|
32
|
+
|
33
|
+
- name: Customer
|
34
|
+
- name: Organization
|
35
|
+
- name: Shop
|
36
|
+
- name: Account
|
37
|
+
- name: Private Money
|
38
|
+
- name: Bulk
|
39
|
+
|
13
40
|
components:
|
14
41
|
schemas:
|
15
42
|
Pong:
|
@@ -118,6 +145,25 @@ components:
|
|
118
145
|
format: decimal
|
119
146
|
private_money:
|
120
147
|
$ref: '#/components/schemas/PrivateMoney'
|
148
|
+
ShopAccount:
|
149
|
+
x-pokepay-schema-type: "response"
|
150
|
+
properties:
|
151
|
+
id:
|
152
|
+
type: string
|
153
|
+
format: uuid
|
154
|
+
summary: 'ウォレットID'
|
155
|
+
name:
|
156
|
+
type: string
|
157
|
+
summary: 'ウォレット名'
|
158
|
+
is_suspended:
|
159
|
+
type: boolean
|
160
|
+
summary: 'ウォレットが凍結されているかどうか'
|
161
|
+
can_transfer_topup:
|
162
|
+
type: boolean
|
163
|
+
summary: 'チャージ可能かどうか'
|
164
|
+
private_money:
|
165
|
+
$ref: '#/components/schemas/PrivateMoney'
|
166
|
+
summary: '設定マネー情報'
|
121
167
|
AccountBalance:
|
122
168
|
x-pokepay-schema-type: "response"
|
123
169
|
properties:
|
@@ -167,7 +213,7 @@ components:
|
|
167
213
|
summary: 無効化されているかどうか
|
168
214
|
token:
|
169
215
|
type: string
|
170
|
-
|
216
|
+
summary: 支払いQRコードを解析したときに出てくるURL
|
171
217
|
Check:
|
172
218
|
x-pokepay-schema-type: "response"
|
173
219
|
properties:
|
@@ -216,6 +262,111 @@ components:
|
|
216
262
|
token:
|
217
263
|
type: string
|
218
264
|
summary: チャージQRコードを解析したときに出てくるURL
|
265
|
+
|
266
|
+
Cashtray:
|
267
|
+
x-pokepay-schema-type: "response"
|
268
|
+
properties:
|
269
|
+
id:
|
270
|
+
type: string
|
271
|
+
format: uuid
|
272
|
+
summary: Cashtray自体のIDです。
|
273
|
+
amount:
|
274
|
+
type: number
|
275
|
+
format: decimal
|
276
|
+
summary: 取引金額
|
277
|
+
description: Cashtrayの取引金額です。正の数ならチャージ、負の数なら支払いとなります。
|
278
|
+
description:
|
279
|
+
type: string
|
280
|
+
summary: Cashtrayの説明文
|
281
|
+
description: Cashtrayの説明文です。アプリ上で取引の説明文として表示されます。
|
282
|
+
account:
|
283
|
+
$ref: '#/components/schemas/AccountWithUser'
|
284
|
+
summary: 発行店舗のウォレット
|
285
|
+
description: Cashtrayを発行した店舗ユーザーのウォレット情報です。ユーザやマネーの情報を含みます。
|
286
|
+
expires_at:
|
287
|
+
type: string
|
288
|
+
format: date-time
|
289
|
+
summary: Cashtrayの失効日時
|
290
|
+
canceled_at:
|
291
|
+
type: string
|
292
|
+
format: date-time
|
293
|
+
nullable: true
|
294
|
+
summary: Cashtrayの無効化日時。NULLの場合は無効化されていません
|
295
|
+
token:
|
296
|
+
type: string
|
297
|
+
summary: CashtrayのQRコードを解析したときに出てくるURL
|
298
|
+
|
299
|
+
CashtrayWithResult:
|
300
|
+
x-pokepay-schema-type: "response"
|
301
|
+
properties:
|
302
|
+
id:
|
303
|
+
type: string
|
304
|
+
format: uuid
|
305
|
+
summary: CashtrayのID
|
306
|
+
description: Cashtray自体のIDです。
|
307
|
+
amount:
|
308
|
+
type: number
|
309
|
+
format: decimal
|
310
|
+
summary: 取引金額
|
311
|
+
description: Cashtrayの取引金額です。正の数ならチャージ、負の数なら支払いとなります。
|
312
|
+
description:
|
313
|
+
type: string
|
314
|
+
summary: Cashtrayの説明文(アプリ上で取引の説明文として表示される)
|
315
|
+
account:
|
316
|
+
$ref: '#/components/schemas/AccountWithUser'
|
317
|
+
summary: 発行店舗のウォレット
|
318
|
+
description: Cashtrayを発行した店舗ユーザーのウォレット情報です。ユーザやマネーの情報を含みます。
|
319
|
+
expires_at:
|
320
|
+
type: string
|
321
|
+
format: date-time
|
322
|
+
summary: Cashtrayの失効日時
|
323
|
+
canceled_at:
|
324
|
+
type: string
|
325
|
+
format: date-time
|
326
|
+
nullable: true
|
327
|
+
summary: Cashtrayの無効化日時。NULLの場合は無効化されていません
|
328
|
+
token:
|
329
|
+
type: string
|
330
|
+
summary: CashtrayのQRコードを解析したときに出てくるURL
|
331
|
+
attempt:
|
332
|
+
$ref: '#/components/schemas/CashtrayAttempt'
|
333
|
+
summary: Cashtray読み取り結果
|
334
|
+
description: Cashtrayをエンドユーザーが読み取った結果です。Cashtrayがまだ誰にも読み取られていない場合はNULLになります。
|
335
|
+
nullable: true
|
336
|
+
transaction:
|
337
|
+
$ref: '#/components/schemas/Transaction'
|
338
|
+
summary: 取引結果
|
339
|
+
description: Cashtrayをエンドユーザーが読み取った結果としてできた取引です。Cashtrayがまだ誰にも読み取られていない場合、またはエラーにより取引が完了しなかった場合はNULLになります。
|
340
|
+
nullable: true
|
341
|
+
|
342
|
+
CashtrayAttempt:
|
343
|
+
x-pokepay-schema-type: "response"
|
344
|
+
properties:
|
345
|
+
account:
|
346
|
+
$ref: '#/components/schemas/AccountWithUser'
|
347
|
+
summary: エンドユーザーのウォレット
|
348
|
+
description: |-
|
349
|
+
Cashtrayを読み取ったエンドユーザーのウォレット情報です。ユーザやマネーの情報を含みます。
|
350
|
+
この際、エンドユーザーがCashtrayを発行した店舗ウォレットのマネーを持っていない場合、この値はNULLになります。
|
351
|
+
nullable: true
|
352
|
+
status_code:
|
353
|
+
type: number
|
354
|
+
summary: ステータスコード
|
355
|
+
description: エンドユーザーによるCashtrayの読み取りリクエストに対するレスポンスのHTTPステータスコードです。
|
356
|
+
error_type:
|
357
|
+
type: string
|
358
|
+
summary: エラー型
|
359
|
+
description: 取引中に発生したエラーの型名です。エラーが発生しなかった場合は空文字となります。
|
360
|
+
error_message:
|
361
|
+
type: string
|
362
|
+
summary: エラーメッセージ
|
363
|
+
description: 取引中に発生したエラーの説明文です。エラーが発生しなかった場合は空文字となります。
|
364
|
+
created_at:
|
365
|
+
type: string
|
366
|
+
format: date-time
|
367
|
+
summary: Cashtray読み取り記録の作成日時
|
368
|
+
description: エンドユーザーによるCashtrayの読み取りリクエストに対する記録(CashtrayAttempt)の作成日時です。これによりエンドユーザーがCashtrayをいつ読み取ったかが分かります。
|
369
|
+
|
219
370
|
User:
|
220
371
|
x-pokepay-schema-type: "response"
|
221
372
|
properties:
|
@@ -275,10 +426,6 @@ components:
|
|
275
426
|
type: boolean
|
276
427
|
nullable: true
|
277
428
|
summary: '加盟店によるチャージが有効かどうか'
|
278
|
-
account_image:
|
279
|
-
type: string
|
280
|
-
nullable: true
|
281
|
-
summary: 'マネーの画像URL'
|
282
429
|
Organization:
|
283
430
|
x-pokepay-schema-type: "response"
|
284
431
|
properties:
|
@@ -368,6 +515,47 @@ components:
|
|
368
515
|
nullable: true
|
369
516
|
maxLength: 36
|
370
517
|
summary: '店舗の外部ID'
|
518
|
+
ShopWithAccounts:
|
519
|
+
x-pokepay-schema-type: "response"
|
520
|
+
properties:
|
521
|
+
id:
|
522
|
+
type: string
|
523
|
+
format: uuid
|
524
|
+
summary: 店舗ID
|
525
|
+
name:
|
526
|
+
type: string
|
527
|
+
summary: 店舗名
|
528
|
+
organization_code:
|
529
|
+
type: string
|
530
|
+
maxLength: 256
|
531
|
+
summary: 組織コード
|
532
|
+
postal_code:
|
533
|
+
type: string
|
534
|
+
nullable: true
|
535
|
+
summary: '店舗の郵便番号'
|
536
|
+
address:
|
537
|
+
type: string
|
538
|
+
nullable: true
|
539
|
+
summary: '店舗の住所'
|
540
|
+
tel:
|
541
|
+
type: string
|
542
|
+
nullable: true
|
543
|
+
summary: '店舗の電話番号'
|
544
|
+
email:
|
545
|
+
type: string
|
546
|
+
nullable: true
|
547
|
+
format: email
|
548
|
+
maxLength: 256
|
549
|
+
summary: '店舗のメールアドレス'
|
550
|
+
external_id:
|
551
|
+
type: string
|
552
|
+
nullable: true
|
553
|
+
maxLength: 36
|
554
|
+
summary: '店舗の外部ID'
|
555
|
+
accounts:
|
556
|
+
type: array
|
557
|
+
items:
|
558
|
+
$ref: '#/components/schemas/ShopAccount'
|
371
559
|
UserTransaction:
|
372
560
|
x-pokepay-schema-type: "response"
|
373
561
|
properties:
|
@@ -406,15 +594,18 @@ components:
|
|
406
594
|
BulkTransaction:
|
407
595
|
x-pokepay-schema-type: "response"
|
408
596
|
properties:
|
597
|
+
id:
|
598
|
+
type: string
|
599
|
+
format: uuid
|
409
600
|
request_id:
|
410
601
|
type: string
|
411
602
|
summary: リクエストID
|
412
603
|
name:
|
413
604
|
type: string
|
414
|
-
summary:
|
605
|
+
summary: バルク取引管理用の名前
|
415
606
|
description:
|
416
607
|
type: string
|
417
|
-
summary:
|
608
|
+
summary: バルク取引管理用の説明文
|
418
609
|
status:
|
419
610
|
type: string
|
420
611
|
enum:
|
@@ -424,15 +615,23 @@ components:
|
|
424
615
|
- processing
|
425
616
|
- error
|
426
617
|
- done
|
427
|
-
summary:
|
618
|
+
summary: バルク取引の状態
|
619
|
+
error:
|
620
|
+
type: string
|
621
|
+
nullable: true
|
622
|
+
summary: バルク取引のエラー種別
|
623
|
+
error_lineno:
|
624
|
+
type: integer
|
625
|
+
nullable: true
|
626
|
+
summary: バルク取引のエラーが発生した行番号
|
428
627
|
submitted_at:
|
429
628
|
type: string
|
430
629
|
format: date-time
|
431
|
-
summary:
|
630
|
+
summary: バルク取引が登録された日時
|
432
631
|
updated_at:
|
433
632
|
type: string
|
434
633
|
format: date-time
|
435
|
-
summary:
|
634
|
+
summary: バルク取引が更新された日時
|
436
635
|
AccountWithoutPrivateMoneyDetail:
|
437
636
|
x-pokepay-schema-type: "response"
|
438
637
|
properties:
|
@@ -594,6 +793,18 @@ components:
|
|
594
793
|
minimum: 0
|
595
794
|
pagination:
|
596
795
|
$ref: '#/components/schemas/Pagination'
|
796
|
+
PaginatedPrivateMoneys:
|
797
|
+
x-pokepay-schema-type: "response"
|
798
|
+
properties:
|
799
|
+
rows:
|
800
|
+
type: array
|
801
|
+
items:
|
802
|
+
$ref: '#/components/schemas/PrivateMoney'
|
803
|
+
count:
|
804
|
+
type: integer
|
805
|
+
minimum: 0
|
806
|
+
pagination:
|
807
|
+
$ref: '#/components/schemas/Pagination'
|
597
808
|
|
598
809
|
BadRequest:
|
599
810
|
x-pokepay-schema-type: "response"
|
@@ -773,6 +984,8 @@ paths:
|
|
773
984
|
$ref: '#/components/schemas/AdminUserWithShopsAndPrivateMoneys'
|
774
985
|
/users/{user_id}/accounts:
|
775
986
|
get:
|
987
|
+
tags:
|
988
|
+
- Account
|
776
989
|
summary: 'エンドユーザー、店舗ユーザーのウォレット一覧を表示する'
|
777
990
|
description: ユーザーIDを指定してそのユーザーのウォレット一覧を取得します。
|
778
991
|
x-pokepay-operator-name: "ListUserAccounts"
|
@@ -804,6 +1017,8 @@ paths:
|
|
804
1017
|
$ref: '#/components/responses/NotFound'
|
805
1018
|
/accounts/{account_id}:
|
806
1019
|
get:
|
1020
|
+
tags:
|
1021
|
+
- Customer
|
807
1022
|
summary: 'ウォレット情報を表示する'
|
808
1023
|
description: ウォレットを取得します。
|
809
1024
|
x-pokepay-operator-name: "GetAccount"
|
@@ -834,6 +1049,8 @@ paths:
|
|
834
1049
|
'404':
|
835
1050
|
$ref: '#/components/responses/NotFound'
|
836
1051
|
patch:
|
1052
|
+
tags:
|
1053
|
+
- Customer
|
837
1054
|
summary: 'ウォレット情報を更新する'
|
838
1055
|
description: ウォレットの状態を更新します。現在はウォレットの凍結/凍結解除の切り替えにのみ対応しています。
|
839
1056
|
x-pokepay-operator-name: "UpdateAccount"
|
@@ -875,6 +1092,8 @@ paths:
|
|
875
1092
|
$ref: '#/components/responses/NotFound'
|
876
1093
|
/accounts/{account_id}/balances:
|
877
1094
|
get:
|
1095
|
+
tags:
|
1096
|
+
- Customer
|
878
1097
|
summary: 'エンドユーザーの残高内訳を表示する'
|
879
1098
|
description: エンドユーザーのウォレット毎の残高を有効期限別のリストとして取得します。
|
880
1099
|
x-pokepay-operator-name: "ListAccountBalances"
|
@@ -937,6 +1156,8 @@ paths:
|
|
937
1156
|
$ref: '#/components/responses/NotFound'
|
938
1157
|
/accounts/{account_id}/expired-balances:
|
939
1158
|
get:
|
1159
|
+
tags:
|
1160
|
+
- Customer
|
940
1161
|
summary: 'エンドユーザーの失効済みの残高内訳を表示する'
|
941
1162
|
description: エンドユーザーのウォレット毎の失効済みの残高を有効期限別のリストとして取得します。
|
942
1163
|
x-pokepay-operator-name: "ListAccountExpiredBalances"
|
@@ -999,6 +1220,8 @@ paths:
|
|
999
1220
|
$ref: '#/components/responses/NotFound'
|
1000
1221
|
/accounts/customers:
|
1001
1222
|
post:
|
1223
|
+
tags:
|
1224
|
+
- Customer
|
1002
1225
|
summary: '新規エンドユーザーウォレットを追加する'
|
1003
1226
|
description: |-
|
1004
1227
|
指定したマネーのウォレットを作成し、同時にそのウォレットを保有するユーザも作成します。
|
@@ -1048,6 +1271,8 @@ paths:
|
|
1048
1271
|
$ref: '#/components/responses/UnprocessableEntity'
|
1049
1272
|
/bills:
|
1050
1273
|
get:
|
1274
|
+
tags:
|
1275
|
+
- Bill
|
1051
1276
|
summary: '支払いQRコード一覧を表示する'
|
1052
1277
|
description: 支払いQRコード一覧を表示します。
|
1053
1278
|
x-pokepay-operator-name: "ListBills"
|
@@ -1071,7 +1296,7 @@ paths:
|
|
1071
1296
|
bill_id:
|
1072
1297
|
type: string
|
1073
1298
|
summary: '支払いQRコードのID'
|
1074
|
-
description: 支払いQRコードのIDを指定して検索します。ID
|
1299
|
+
description: 支払いQRコードのIDを指定して検索します。IDは前方一致で検索されます。
|
1075
1300
|
private_money_id:
|
1076
1301
|
type: string
|
1077
1302
|
format: uuid
|
@@ -1109,7 +1334,7 @@ paths:
|
|
1109
1334
|
type: string
|
1110
1335
|
maxLength: 256
|
1111
1336
|
summary: '店舗名'
|
1112
|
-
description: 支払いQR
|
1337
|
+
description: 支払いQRコードを作成した店舗名でフィルターします。店舗名は部分一致で検索されます。
|
1113
1338
|
example: 'bill test shop1'
|
1114
1339
|
shop_id:
|
1115
1340
|
type: string
|
@@ -1144,6 +1369,8 @@ paths:
|
|
1144
1369
|
'403':
|
1145
1370
|
$ref: '#/components/responses/Forbidden'
|
1146
1371
|
post:
|
1372
|
+
tags:
|
1373
|
+
- Bill
|
1147
1374
|
summary: '支払いQRコードの発行'
|
1148
1375
|
description: 支払いQRコードの内容を更新します。支払い先の店舗ユーザーは指定したマネーのウォレットを持っている必要があります。
|
1149
1376
|
x-pokepay-operator-name: "CreateBill"
|
@@ -1191,6 +1418,8 @@ paths:
|
|
1191
1418
|
|
1192
1419
|
/bills/{bill_id}:
|
1193
1420
|
patch:
|
1421
|
+
tags:
|
1422
|
+
- Bill
|
1194
1423
|
summary: '支払いQRコードの更新'
|
1195
1424
|
description: 支払いQRコードの内容を更新します。パラメータは全て省略可能で、指定したもののみ更新されます。
|
1196
1425
|
x-pokepay-operator-name: "UpdateBill"
|
@@ -1243,6 +1472,8 @@ paths:
|
|
1243
1472
|
$ref: '#/components/responses/NotFound'
|
1244
1473
|
/checks:
|
1245
1474
|
post:
|
1475
|
+
tags:
|
1476
|
+
- Check
|
1246
1477
|
summary: 'チャージQRコードの発行'
|
1247
1478
|
x-pokepay-operator-name: "CreateCheck"
|
1248
1479
|
requestBody:
|
@@ -1314,6 +1545,8 @@ paths:
|
|
1314
1545
|
$ref: '#/components/responses/InvalidParameters'
|
1315
1546
|
/transactions:
|
1316
1547
|
get:
|
1548
|
+
tags:
|
1549
|
+
- Transaction
|
1317
1550
|
summary: '取引履歴を取得する'
|
1318
1551
|
description: 取引一覧を返します。
|
1319
1552
|
x-pokepay-operator-name: "ListTransactions"
|
@@ -1452,6 +1685,11 @@ paths:
|
|
1452
1685
|
'400':
|
1453
1686
|
$ref: '#/components/responses/InvalidParameters'
|
1454
1687
|
post:
|
1688
|
+
tags:
|
1689
|
+
- Transaction
|
1690
|
+
summary: 'チャージする(廃止予定)'
|
1691
|
+
description: |-
|
1692
|
+
チャージ取引を作成します。このAPIは廃止予定です。以降は `CreateTopupTransaction` を使用してください。
|
1455
1693
|
x-pokepay-operator-name: "CreateTransaction"
|
1456
1694
|
x-pokepay-allow-server-side: true
|
1457
1695
|
deprecated: true
|
@@ -1479,6 +1717,13 @@ paths:
|
|
1479
1717
|
type: integer
|
1480
1718
|
format: decimal
|
1481
1719
|
minimum: 0
|
1720
|
+
point_expires_at:
|
1721
|
+
type: string
|
1722
|
+
format: date-time
|
1723
|
+
summary: 'ポイント有効期限'
|
1724
|
+
description: |-
|
1725
|
+
ポイントをチャージした場合の、付与されるポイントの有効期限です。
|
1726
|
+
省略した場合はマネーに設定された有効期限と同じものがポイントの有効期限となります。
|
1482
1727
|
description:
|
1483
1728
|
type: string
|
1484
1729
|
maxLength: 200
|
@@ -1497,6 +1742,8 @@ paths:
|
|
1497
1742
|
$ref: '#/components/responses/UnprocessableEntity'
|
1498
1743
|
/transactions/topup:
|
1499
1744
|
post:
|
1745
|
+
tags:
|
1746
|
+
- Transaction
|
1500
1747
|
summary: 'チャージする'
|
1501
1748
|
description: チャージ取引を作成します。
|
1502
1749
|
x-pokepay-operator-name: "CreateTopupTransaction"
|
@@ -1556,6 +1803,13 @@ paths:
|
|
1556
1803
|
ポイント額です。
|
1557
1804
|
|
1558
1805
|
送金するポイント額を指定します。
|
1806
|
+
point_expires_at:
|
1807
|
+
type: string
|
1808
|
+
format: date-time
|
1809
|
+
summary: 'ポイント有効期限'
|
1810
|
+
description: |-
|
1811
|
+
ポイントをチャージした場合の、付与されるポイントの有効期限です。
|
1812
|
+
省略した場合はマネーに設定された有効期限と同じものがポイントの有効期限となります。
|
1559
1813
|
description:
|
1560
1814
|
type: string
|
1561
1815
|
maxLength: 200
|
@@ -1580,11 +1834,13 @@ paths:
|
|
1580
1834
|
$ref: '#/components/responses/UnprocessableEntity'
|
1581
1835
|
/transactions/topup/check:
|
1582
1836
|
post:
|
1837
|
+
tags:
|
1838
|
+
- Check
|
1583
1839
|
summary: 'チャージQRコードを読み取ることでチャージする'
|
1584
1840
|
description: |
|
1585
|
-
通常チャージQR
|
1841
|
+
通常チャージQRコードはエンドユーザーのアプリによって読み取られ、アプリとポケペイサーバとの直接通信によって取引が作られます。 もしエンドユーザーとの通信をパートナーのサーバのみに限定したい場合、パートナーのサーバがチャージQRの情報をエンドユーザーから代理受けして、サーバ間連携APIによって実際のチャージ取引をリクエストすることになります。
|
1586
1842
|
|
1587
|
-
|
1843
|
+
エンドユーザーから受け取ったチャージ用QRコードのIDをエンドユーザーIDと共に渡すことでチャージ取引が作られます。
|
1588
1844
|
x-pokepay-operator-name: "CreateTopupTransactionWithCheck"
|
1589
1845
|
x-pokepay-allow-server-side: true
|
1590
1846
|
requestBody:
|
@@ -1627,6 +1883,8 @@ paths:
|
|
1627
1883
|
$ref: '#/components/responses/UnprocessableEntity'
|
1628
1884
|
/transactions/payment:
|
1629
1885
|
post:
|
1886
|
+
tags:
|
1887
|
+
- Transaction
|
1630
1888
|
summary: '支払いする'
|
1631
1889
|
description: |
|
1632
1890
|
支払取引を作成します。
|
@@ -1696,6 +1954,8 @@ paths:
|
|
1696
1954
|
$ref: '#/components/responses/UnprocessableEntity'
|
1697
1955
|
/transactions/transfer:
|
1698
1956
|
post:
|
1957
|
+
tags:
|
1958
|
+
- Transaction
|
1699
1959
|
summary: '個人間送金'
|
1700
1960
|
description: |
|
1701
1961
|
エンドユーザー間での送金取引(個人間送金)を作成します。
|
@@ -1765,6 +2025,8 @@ paths:
|
|
1765
2025
|
$ref: '#/components/responses/UnprocessableEntity'
|
1766
2026
|
/transactions/exchange:
|
1767
2027
|
post:
|
2028
|
+
tags:
|
2029
|
+
- Transaction
|
1768
2030
|
x-pokepay-allow-server-side: true
|
1769
2031
|
requestBody:
|
1770
2032
|
required: true
|
@@ -1801,6 +2063,8 @@ paths:
|
|
1801
2063
|
$ref: '#/components/responses/UnprocessableEntity'
|
1802
2064
|
/transactions/bulk:
|
1803
2065
|
post:
|
2066
|
+
tags:
|
2067
|
+
- Bulk
|
1804
2068
|
summary: CSVファイル一括取引
|
1805
2069
|
description: CSVファイルから一括取引をします。
|
1806
2070
|
x-pokepay-operator-name: "BulkCreateTransaction"
|
@@ -1834,14 +2098,18 @@ paths:
|
|
1834
2098
|
|
1835
2099
|
- `type`: 取引種別
|
1836
2100
|
- 必須。'topup' または 'payment'
|
1837
|
-
- `
|
2101
|
+
- `sender_id`: 送金ユーザーID
|
2102
|
+
- 必須。UUID
|
2103
|
+
- `receiver_id`: 受取ユーザーID
|
1838
2104
|
- 必須。UUID
|
1839
|
-
- `
|
2105
|
+
- `private_money_id`: マネーID
|
1840
2106
|
- 必須。UUID
|
1841
2107
|
- `money_amount`: マネー額
|
1842
2108
|
- 任意。ただし `point_amount` といずれかが必須。0以上の数字
|
1843
2109
|
- `point_amount`: ポイント額
|
1844
2110
|
- 任意。ただし `money_amount` といずれかが必須。0以上の数字
|
2111
|
+
- `description`: 取引の説明文
|
2112
|
+
- 任意。200文字以内。取引履歴に表示される文章
|
1845
2113
|
- `bear_account_id`: ポイント負担ウォレットID
|
1846
2114
|
- `point_amount` があるときは必須。UUID
|
1847
2115
|
- `point_expires_at`: ポイントの有効期限
|
@@ -1868,6 +2136,8 @@ paths:
|
|
1868
2136
|
$ref: '#/components/responses/Conflict'
|
1869
2137
|
/transactions/{transaction_id}:
|
1870
2138
|
get:
|
2139
|
+
tags:
|
2140
|
+
- Transaction
|
1871
2141
|
summary: '取引情報を取得する'
|
1872
2142
|
description: 取引を取得します。
|
1873
2143
|
x-pokepay-operator-name: "GetTransaction"
|
@@ -1899,6 +2169,8 @@ paths:
|
|
1899
2169
|
$ref: '#/components/responses/NotFound'
|
1900
2170
|
/transactions/{transaction_id}/refund:
|
1901
2171
|
post:
|
2172
|
+
tags:
|
2173
|
+
- Transaction
|
1902
2174
|
summary: 返金する
|
1903
2175
|
x-pokepay-operator-name: RefundTransaction
|
1904
2176
|
parameters:
|
@@ -1935,6 +2207,8 @@ paths:
|
|
1935
2207
|
$ref: '#/components/responses/UnprocessableEntity'
|
1936
2208
|
/transfers:
|
1937
2209
|
get:
|
2210
|
+
tags:
|
2211
|
+
- Transaction
|
1938
2212
|
x-pokepay-operator-name: "ListTransfers"
|
1939
2213
|
x-pokepay-allow-server-side: true
|
1940
2214
|
requestBody:
|
@@ -1997,6 +2271,8 @@ paths:
|
|
1997
2271
|
|
1998
2272
|
/organizations:
|
1999
2273
|
post:
|
2274
|
+
tags:
|
2275
|
+
- Organization
|
2000
2276
|
summary: '新規加盟店組織を追加する'
|
2001
2277
|
x-pokepay-operator-name: "CreateOrganization"
|
2002
2278
|
requestBody:
|
@@ -2082,6 +2358,8 @@ paths:
|
|
2082
2358
|
$ref: '#/components/schemas/Organization'
|
2083
2359
|
/shops:
|
2084
2360
|
get:
|
2361
|
+
tags:
|
2362
|
+
- Shop
|
2085
2363
|
summary: '店舗一覧を取得する'
|
2086
2364
|
x-pokepay-operator-name: "ListShops"
|
2087
2365
|
x-pokepay-allow-server-side: true
|
@@ -2173,7 +2451,11 @@ paths:
|
|
2173
2451
|
'422':
|
2174
2452
|
$ref: '#/components/responses/UnprocessableEntity'
|
2175
2453
|
post:
|
2176
|
-
|
2454
|
+
tags:
|
2455
|
+
- Shop
|
2456
|
+
summary: '新規店舗を追加する(廃止予定)'
|
2457
|
+
description: |-
|
2458
|
+
新規店舗を追加します。このAPIは廃止予定です。以降は `CreateShopV2` を使用してください。
|
2177
2459
|
x-pokepay-operator-name: "CreateShop"
|
2178
2460
|
x-pokepay-allow-server-side: true
|
2179
2461
|
requestBody:
|
@@ -2232,68 +2514,349 @@ paths:
|
|
2232
2514
|
$ref: '#/components/responses/Conflict'
|
2233
2515
|
'422':
|
2234
2516
|
$ref: '#/components/responses/UnprocessableEntity'
|
2235
|
-
/
|
2236
|
-
|
2237
|
-
|
2238
|
-
|
2517
|
+
/shops-v2:
|
2518
|
+
post:
|
2519
|
+
tags:
|
2520
|
+
- Shop
|
2521
|
+
summary: '新規店舗を追加する'
|
2522
|
+
x-pokepay-operator-name: "CreateShopV2"
|
2239
2523
|
x-pokepay-allow-server-side: true
|
2240
2524
|
requestBody:
|
2241
2525
|
required: true
|
2242
2526
|
content:
|
2243
2527
|
application/json:
|
2244
2528
|
schema:
|
2245
|
-
|
2529
|
+
required: ["name"]
|
2246
2530
|
properties:
|
2247
|
-
|
2531
|
+
name:
|
2248
2532
|
type: string
|
2249
|
-
|
2250
|
-
|
2251
|
-
|
2533
|
+
minLength: 1
|
2534
|
+
maxLength: 256
|
2535
|
+
summary: '店舗名'
|
2536
|
+
description: |-
|
2537
|
+
店舗名です。
|
2538
|
+
|
2539
|
+
同一組織内に同名の店舗があった場合は`name_conflict`エラーが返ります。
|
2540
|
+
example: 'oxスーパー三田店'
|
2541
|
+
postal_code:
|
2252
2542
|
type: string
|
2253
|
-
|
2254
|
-
summary: '
|
2255
|
-
|
2256
|
-
type:
|
2257
|
-
|
2258
|
-
summary: '
|
2259
|
-
example:
|
2260
|
-
|
2261
|
-
type:
|
2262
|
-
|
2263
|
-
summary: '
|
2264
|
-
|
2543
|
+
pattern: '^[0-9]{3}-?[0-9]{4}$'
|
2544
|
+
summary: '店舗の郵便番号'
|
2545
|
+
address:
|
2546
|
+
type: string
|
2547
|
+
maxLength: 256
|
2548
|
+
summary: '店舗の住所'
|
2549
|
+
example: '東京都港区芝...'
|
2550
|
+
tel:
|
2551
|
+
type: string
|
2552
|
+
pattern: '^0[0-9]{1,3}-?[0-9]{2,4}-?[0-9]{3,4}$'
|
2553
|
+
summary: '店舗の電話番号'
|
2554
|
+
email:
|
2555
|
+
type: string
|
2556
|
+
format: email
|
2557
|
+
maxLength: 256
|
2558
|
+
summary: '店舗のメールアドレス'
|
2559
|
+
external_id:
|
2560
|
+
type: string
|
2561
|
+
maxLength: 36
|
2562
|
+
summary: '店舗の外部ID'
|
2563
|
+
organization_code:
|
2564
|
+
type: string
|
2565
|
+
pattern: '^[a-zA-Z0-9-]*$'
|
2566
|
+
maxLength: 32
|
2567
|
+
summary: '組織コード'
|
2568
|
+
example: 'ox-supermarket'
|
2569
|
+
private_money_ids:
|
2570
|
+
type: array
|
2571
|
+
items:
|
2572
|
+
type: string
|
2573
|
+
format: uuid
|
2574
|
+
minItems: 1
|
2575
|
+
summary: '店舗で有効にするマネーIDの配列'
|
2576
|
+
description: |-
|
2577
|
+
店舗で有効にするマネーIDの配列を指定します。
|
2578
|
+
|
2579
|
+
店舗が所属する組織が発行または加盟しているマネーのみが指定できます。利用できないマネーが指定された場合は`unavailable_private_money`エラーが返ります。
|
2580
|
+
このパラメータを省略したときは、店舗が所属する組織が発行または加盟している全てのマネーのウォレットができます。
|
2581
|
+
can_topup_private_money_ids:
|
2582
|
+
type: array
|
2583
|
+
items:
|
2584
|
+
type: string
|
2585
|
+
format: uuid
|
2586
|
+
minItems: 0
|
2587
|
+
summary: '店舗でチャージ可能にするマネーIDの配列'
|
2588
|
+
description: |-
|
2589
|
+
店舗でチャージ可能にするマネーIDの配列を指定します。
|
2590
|
+
|
2591
|
+
このパラメータは発行体のみが指定でき、自身が発行しているマネーのみを指定できます。加盟店が他発行体のマネーに加盟している場合でも、そのチャージ可否を変更することはできません。
|
2592
|
+
省略したときは対象店舗のその発行体の全てのマネーのアカウントがチャージ不可となります。
|
2593
|
+
responses:
|
2594
|
+
'200':
|
2595
|
+
description: OK
|
2596
|
+
content:
|
2597
|
+
application/json:
|
2598
|
+
schema:
|
2599
|
+
$ref: '#/components/schemas/ShopWithAccounts'
|
2600
|
+
'400':
|
2601
|
+
$ref: '#/components/responses/InvalidParameters'
|
2602
|
+
'403':
|
2603
|
+
$ref: '#/components/responses/Forbidden'
|
2604
|
+
'409':
|
2605
|
+
$ref: '#/components/responses/Conflict'
|
2606
|
+
'422':
|
2607
|
+
$ref: '#/components/responses/UnprocessableEntity'
|
2608
|
+
/shops/{shop_id}:
|
2609
|
+
get:
|
2610
|
+
tags:
|
2611
|
+
- Shop
|
2612
|
+
summary: '店舗情報を表示する'
|
2613
|
+
description: |-
|
2614
|
+
店舗情報を表示します。
|
2615
|
+
|
2616
|
+
権限に関わらず自組織の店舗情報は表示可能です。それに加え、発行体は自組織の発行しているマネーの加盟店組織の店舗情報を表示できます。
|
2617
|
+
x-pokepay-operator-name: "GetShop"
|
2618
|
+
x-pokepay-allow-server-side: true
|
2265
2619
|
parameters:
|
2266
2620
|
- in: path
|
2267
|
-
name:
|
2621
|
+
name: shop_id
|
2268
2622
|
required: true
|
2269
2623
|
schema:
|
2270
2624
|
type: string
|
2271
2625
|
format: uuid
|
2272
|
-
summary:
|
2626
|
+
summary: '店舗ユーザーID'
|
2273
2627
|
responses:
|
2274
2628
|
'200':
|
2275
2629
|
description: OK
|
2276
2630
|
content:
|
2277
2631
|
application/json:
|
2278
2632
|
schema:
|
2279
|
-
$ref: '#/components/schemas/
|
2633
|
+
$ref: '#/components/schemas/ShopWithAccounts'
|
2280
2634
|
'400':
|
2281
2635
|
$ref: '#/components/responses/InvalidParameters'
|
2282
2636
|
'403':
|
2283
2637
|
$ref: '#/components/responses/Forbidden'
|
2284
|
-
'
|
2285
|
-
$ref: '#/components/responses/
|
2286
|
-
|
2287
|
-
|
2288
|
-
|
2289
|
-
|
2290
|
-
|
2638
|
+
'422':
|
2639
|
+
$ref: '#/components/responses/UnprocessableEntity'
|
2640
|
+
patch:
|
2641
|
+
tags:
|
2642
|
+
- Shop
|
2643
|
+
summary: '店舗情報を更新する'
|
2644
|
+
description: |-
|
2645
|
+
店舗情報を更新します。bodyパラメーターは全て省略可能で、指定したもののみ更新されます。
|
2646
|
+
x-pokepay-operator-name: "UpdateShop"
|
2291
2647
|
x-pokepay-allow-server-side: true
|
2292
|
-
|
2293
|
-
|
2294
|
-
|
2295
|
-
|
2296
|
-
|
2648
|
+
parameters:
|
2649
|
+
- in: path
|
2650
|
+
name: shop_id
|
2651
|
+
required: true
|
2652
|
+
schema:
|
2653
|
+
type: string
|
2654
|
+
format: uuid
|
2655
|
+
summary: '店舗ユーザーID'
|
2656
|
+
requestBody:
|
2657
|
+
required: true
|
2658
|
+
content:
|
2659
|
+
application/json:
|
2660
|
+
schema:
|
2661
|
+
properties:
|
2662
|
+
name:
|
2663
|
+
type: string
|
2664
|
+
minLength: 1
|
2665
|
+
maxLength: 256
|
2666
|
+
summary: '店舗名'
|
2667
|
+
description: |-
|
2668
|
+
店舗名です。
|
2669
|
+
|
2670
|
+
同一組織内に同名の店舗があった場合は`shop_name_conflict`エラーが返ります。
|
2671
|
+
example: 'oxスーパー三田店'
|
2672
|
+
postal_code:
|
2673
|
+
type: string
|
2674
|
+
pattern: '^[0-9]{3}-?[0-9]{4}$'
|
2675
|
+
summary: '店舗の郵便番号'
|
2676
|
+
description: |-
|
2677
|
+
店舗住所の郵便番号(7桁の数字)です。ハイフンは無視されます。明示的に空の値を設定するにはNULLを指定します。
|
2678
|
+
nullable: true
|
2679
|
+
address:
|
2680
|
+
type: string
|
2681
|
+
maxLength: 256
|
2682
|
+
summary: '店舗の住所'
|
2683
|
+
example: '東京都港区芝...'
|
2684
|
+
nullable: true
|
2685
|
+
tel:
|
2686
|
+
type: string
|
2687
|
+
pattern: '^0[0-9]{1,3}-?[0-9]{2,4}-?[0-9]{3,4}$'
|
2688
|
+
summary: '店舗の電話番号'
|
2689
|
+
description: |-
|
2690
|
+
店舗の電話番号です。ハイフンは無視されます。明示的に空の値を設定するにはNULLを指定します。
|
2691
|
+
nullable: true
|
2692
|
+
email:
|
2693
|
+
type: string
|
2694
|
+
format: email
|
2695
|
+
maxLength: 256
|
2696
|
+
summary: '店舗のメールアドレス'
|
2697
|
+
description: |-
|
2698
|
+
店舗の連絡先メールアドレスです。明示的に空の値を設定するにはNULLを指定します。
|
2699
|
+
nullable: true
|
2700
|
+
external_id:
|
2701
|
+
type: string
|
2702
|
+
maxLength: 36
|
2703
|
+
summary: '店舗の外部ID'
|
2704
|
+
description: |-
|
2705
|
+
店舗の外部IDです(最大36文字)。明示的に空の値を設定するにはNULLを指定します。
|
2706
|
+
nullable: true
|
2707
|
+
private_money_ids:
|
2708
|
+
type: array
|
2709
|
+
items:
|
2710
|
+
type: string
|
2711
|
+
format: uuid
|
2712
|
+
minItems: 0
|
2713
|
+
summary: '店舗で有効にするマネーIDの配列'
|
2714
|
+
description: |-
|
2715
|
+
店舗で有効にするマネーIDの配列を指定します。
|
2716
|
+
|
2717
|
+
店舗が所属する組織が発行または加盟しているマネーのみが指定できます。利用できないマネーが指定された場合は`unavailable_private_money`エラーが返ります。
|
2718
|
+
店舗が既にウォレットを持っている場合に、ここでそのウォレットのマネーIDを指定しないで更新すると、そのマネーのウォレットは凍結(無効化)されます。
|
2719
|
+
can_topup_private_money_ids:
|
2720
|
+
type: array
|
2721
|
+
items:
|
2722
|
+
type: string
|
2723
|
+
format: uuid
|
2724
|
+
minItems: 0
|
2725
|
+
summary: '店舗でチャージ可能にするマネーIDの配列'
|
2726
|
+
description: |-
|
2727
|
+
店舗でチャージ可能にするマネーIDの配列を指定します。
|
2728
|
+
|
2729
|
+
このパラメータは発行体のみが指定でき、発行しているマネーのみを指定できます。加盟店が他発行体のマネーに加盟している場合でも、そのチャージ可否を変更することはできません。
|
2730
|
+
省略したときは対象店舗のその発行体の全てのマネーのアカウントがチャージ不可となります。
|
2731
|
+
responses:
|
2732
|
+
'200':
|
2733
|
+
description: OK
|
2734
|
+
content:
|
2735
|
+
application/json:
|
2736
|
+
schema:
|
2737
|
+
$ref: '#/components/schemas/ShopWithAccounts'
|
2738
|
+
'400':
|
2739
|
+
$ref: '#/components/responses/InvalidParameters'
|
2740
|
+
'403':
|
2741
|
+
$ref: '#/components/responses/Forbidden'
|
2742
|
+
'409':
|
2743
|
+
$ref: '#/components/responses/Conflict'
|
2744
|
+
'422':
|
2745
|
+
$ref: '#/components/responses/UnprocessableEntity'
|
2746
|
+
/private-moneys:
|
2747
|
+
get:
|
2748
|
+
tags:
|
2749
|
+
- Private Money
|
2750
|
+
summary: マネー一覧を取得する
|
2751
|
+
description: |-
|
2752
|
+
マネーの一覧を取得します。
|
2753
|
+
パートナーキーの管理者が発行体組織に属している場合、自組織が加盟または発行しているマネーの一覧を返します。また、`organization_code`として決済加盟店の組織コードを指定した場合、発行マネーのうち、その決済加盟店組織が加盟しているマネーの一覧を返します。
|
2754
|
+
パートナーキーの管理者が決済加盟店組織に属している場合は、自組織が加盟しているマネーの一覧を返します。
|
2755
|
+
x-pokepay-operator-name: "GetPrivateMoneys"
|
2756
|
+
x-pokepay-allow-server-side: true
|
2757
|
+
requestBody:
|
2758
|
+
required: true
|
2759
|
+
content:
|
2760
|
+
application/json:
|
2761
|
+
schema:
|
2762
|
+
properties:
|
2763
|
+
organization_code:
|
2764
|
+
type: string
|
2765
|
+
pattern: '^[a-zA-Z0-9-]*$'
|
2766
|
+
maxLength: 32
|
2767
|
+
summary: '組織コード'
|
2768
|
+
description: |-
|
2769
|
+
パートナーキーの管理者が発行体組織に属している場合、発行マネーのうち、この組織コードで指定した決済加盟店組織が加盟しているマネーの一覧を返します。決済加盟店組織の管理者は自組織以外を指定することはできません。
|
2770
|
+
example: 'ox-supermarket'
|
2771
|
+
page:
|
2772
|
+
type: integer
|
2773
|
+
minimum: 1
|
2774
|
+
summary: 'ページ番号'
|
2775
|
+
example: 1
|
2776
|
+
per_page:
|
2777
|
+
type: integer
|
2778
|
+
minimum: 1
|
2779
|
+
summary: '1ページ分の取得数'
|
2780
|
+
example: 50
|
2781
|
+
responses:
|
2782
|
+
'200':
|
2783
|
+
description: OK
|
2784
|
+
content:
|
2785
|
+
application/json:
|
2786
|
+
schema:
|
2787
|
+
$ref: '#/components/schemas/PaginatedPrivateMoneys'
|
2788
|
+
'400':
|
2789
|
+
$ref: '#/components/responses/InvalidParameters'
|
2790
|
+
'403':
|
2791
|
+
$ref: '#/components/responses/Forbidden'
|
2792
|
+
'422':
|
2793
|
+
$ref: '#/components/responses/UnprocessableEntity'
|
2794
|
+
/private-moneys/{private_money_id}/organization-summaries:
|
2795
|
+
get:
|
2796
|
+
tags:
|
2797
|
+
- Private Money
|
2798
|
+
summary: 決済加盟店の取引サマリを取得する
|
2799
|
+
x-pokepay-operator-name: "GetPrivateMoneyOrganizationSummaries"
|
2800
|
+
x-pokepay-allow-server-side: true
|
2801
|
+
requestBody:
|
2802
|
+
required: true
|
2803
|
+
content:
|
2804
|
+
application/json:
|
2805
|
+
schema:
|
2806
|
+
x-pokepay-conditional-parameters: {xnor: [from, to]}
|
2807
|
+
properties:
|
2808
|
+
from:
|
2809
|
+
type: string
|
2810
|
+
format: date-time
|
2811
|
+
summary: '開始日時(toと同時に指定する必要有)'
|
2812
|
+
to:
|
2813
|
+
type: string
|
2814
|
+
format: date-time
|
2815
|
+
summary: '終了日時(fromと同時に指定する必要有)'
|
2816
|
+
page:
|
2817
|
+
type: integer
|
2818
|
+
minimum: 1
|
2819
|
+
summary: 'ページ番号'
|
2820
|
+
example: 1
|
2821
|
+
per_page:
|
2822
|
+
type: integer
|
2823
|
+
minimum: 1
|
2824
|
+
summary: '1ページ分の取引数'
|
2825
|
+
example: 50
|
2826
|
+
parameters:
|
2827
|
+
- in: path
|
2828
|
+
name: private_money_id
|
2829
|
+
required: true
|
2830
|
+
schema:
|
2831
|
+
type: string
|
2832
|
+
format: uuid
|
2833
|
+
summary: マネーID
|
2834
|
+
responses:
|
2835
|
+
'200':
|
2836
|
+
description: OK
|
2837
|
+
content:
|
2838
|
+
application/json:
|
2839
|
+
schema:
|
2840
|
+
$ref: '#/components/schemas/PaginatedPrivateMoneyOrganizationSummaries'
|
2841
|
+
'400':
|
2842
|
+
$ref: '#/components/responses/InvalidParameters'
|
2843
|
+
'403':
|
2844
|
+
$ref: '#/components/responses/Forbidden'
|
2845
|
+
'404':
|
2846
|
+
$ref: '#/components/responses/NotFound'
|
2847
|
+
/customers/transactions:
|
2848
|
+
get:
|
2849
|
+
tags:
|
2850
|
+
- Customer
|
2851
|
+
summary: '取引履歴を取得する'
|
2852
|
+
description: '取引一覧を返します。'
|
2853
|
+
x-pokepay-operator-name: "ListCustomerTransactions"
|
2854
|
+
x-pokepay-allow-server-side: true
|
2855
|
+
requestBody:
|
2856
|
+
required: true
|
2857
|
+
content:
|
2858
|
+
application/json:
|
2859
|
+
schema:
|
2297
2860
|
required: ["private_money_id"]
|
2298
2861
|
properties:
|
2299
2862
|
private_money_id:
|
@@ -2385,3 +2948,281 @@ paths:
|
|
2385
2948
|
$ref: '#/components/responses/Forbidden'
|
2386
2949
|
'422':
|
2387
2950
|
$ref: '#/components/responses/UnprocessableEntity'
|
2951
|
+
/bulk-transactions/{bulk_transaction_id}:
|
2952
|
+
get:
|
2953
|
+
summary: バルク取引ジョブの実行状況を取得する
|
2954
|
+
x-pokepay-operator-name: "GetBulkTransaction"
|
2955
|
+
x-pokepay-allow-server-side: true
|
2956
|
+
parameters:
|
2957
|
+
- in: path
|
2958
|
+
name: bulk_transaction_id
|
2959
|
+
schema:
|
2960
|
+
type: string
|
2961
|
+
format: uuid
|
2962
|
+
summary: 'バルク取引ジョブID'
|
2963
|
+
description: |-
|
2964
|
+
バルク取引ジョブIDです。
|
2965
|
+
バルク取引ジョブ登録時にレスポンスに含まれます。
|
2966
|
+
required: true
|
2967
|
+
responses:
|
2968
|
+
'200':
|
2969
|
+
description: OK
|
2970
|
+
content:
|
2971
|
+
application/json:
|
2972
|
+
schema:
|
2973
|
+
$ref: '#/components/schemas/BulkTransaction'
|
2974
|
+
'400':
|
2975
|
+
$ref: '#/components/responses/InvalidParameters'
|
2976
|
+
'404':
|
2977
|
+
$ref: '#/components/responses/NotFound'
|
2978
|
+
/cashtrays:
|
2979
|
+
post:
|
2980
|
+
tags:
|
2981
|
+
- Cashtray
|
2982
|
+
summary: 'Cashtrayを作る'
|
2983
|
+
description: |
|
2984
|
+
Cashtrayを作成します。
|
2985
|
+
|
2986
|
+
エンドユーザーに対して支払いまたはチャージを行う店舗の情報(店舗ユーザーIDとマネーID)と、取引金額が必須項目です。
|
2987
|
+
店舗ユーザーIDとマネーIDから店舗ウォレットを特定します。
|
2988
|
+
|
2989
|
+
その他に、Cashtrayから作られる取引に対する説明文や失効時間を指定できます。
|
2990
|
+
|
2991
|
+
x-pokepay-operator-name: "CreateCashtray"
|
2992
|
+
x-pokepay-allow-server-side: true
|
2993
|
+
requestBody:
|
2994
|
+
required: true
|
2995
|
+
content:
|
2996
|
+
application/json:
|
2997
|
+
schema:
|
2998
|
+
required: ["private_money_id", "shop_id", "amount"]
|
2999
|
+
properties:
|
3000
|
+
private_money_id:
|
3001
|
+
type: string
|
3002
|
+
format: uuid
|
3003
|
+
summary: 'マネーID'
|
3004
|
+
description: |-
|
3005
|
+
取引対象のマネーのIDです(必須項目)。
|
3006
|
+
shop_id:
|
3007
|
+
type: string
|
3008
|
+
format: uuid
|
3009
|
+
summary: '店舗ユーザーID'
|
3010
|
+
description: |-
|
3011
|
+
店舗のユーザーIDです(必須項目)。
|
3012
|
+
amount:
|
3013
|
+
type: number
|
3014
|
+
summary: '金額'
|
3015
|
+
description: |-
|
3016
|
+
マネー額です(必須項目)。
|
3017
|
+
正の値を与えるとチャージになり、負の値を与えると支払いとなります。
|
3018
|
+
description:
|
3019
|
+
type: string
|
3020
|
+
maxLength: 200
|
3021
|
+
summary: '取引履歴に表示する説明文'
|
3022
|
+
description: |-
|
3023
|
+
Cashtrayを読み取ったときに作られる取引の説明文です(最大200文字、任意項目)。
|
3024
|
+
アプリや管理画面などの取引履歴に表示されます。デフォルトでは空文字になります。
|
3025
|
+
example: たい焼き(小倉)
|
3026
|
+
expires_in:
|
3027
|
+
type: integer
|
3028
|
+
minimum: 1
|
3029
|
+
summary: '失効時間(秒)'
|
3030
|
+
description: |-
|
3031
|
+
Cashtrayが失効するまでの時間を秒単位で指定します(任意項目、デフォルト値は1800秒(30分))。
|
3032
|
+
responses:
|
3033
|
+
'200':
|
3034
|
+
description: OK
|
3035
|
+
content:
|
3036
|
+
application/json:
|
3037
|
+
schema:
|
3038
|
+
$ref: '#/components/schemas/Cashtray'
|
3039
|
+
'400':
|
3040
|
+
$ref: '#/components/responses/BadRequest'
|
3041
|
+
'403':
|
3042
|
+
$ref: '#/components/responses/Forbidden'
|
3043
|
+
'422':
|
3044
|
+
$ref: '#/components/responses/UnprocessableEntity'
|
3045
|
+
/cashtrays/{cashtray_id}:
|
3046
|
+
get:
|
3047
|
+
tags:
|
3048
|
+
- Cashtray
|
3049
|
+
summary: 'Cashtrayの情報を取得する'
|
3050
|
+
description: |-
|
3051
|
+
Cashtrayの情報を取得します。
|
3052
|
+
|
3053
|
+
Cashtrayの現在の状態に加え、エンドユーザーのCashtray読み取りの試行結果、Cashtray読み取りによって作られた取引情報が取得できます。
|
3054
|
+
|
3055
|
+
レスポンス中の `attempt` には、このCashtrayをエンドユーザーが読み取った試行結果が入ります。
|
3056
|
+
`account` はエンドユーザーのウォレット情報です。
|
3057
|
+
成功時には `attempt` 内の `status_code` に200が入ります。
|
3058
|
+
|
3059
|
+
まだCashtrayが読み取られていない場合は `attempt` の内容は `NULL` になります。
|
3060
|
+
エンドユーザーのCashtray読み取りの際には、様々なエラーが起き得ます。
|
3061
|
+
エラーの詳細は `attempt` 中の `error_type` と `error_message` にあります。主なエラー型と対応するステータスコードを以下に列挙します。
|
3062
|
+
|
3063
|
+
- `cashtray_already_proceed (422)`
|
3064
|
+
- 既に処理済みのCashtrayをエンドユーザーが再び読み取ったときに返されます
|
3065
|
+
- `cashtray_expired (422)`
|
3066
|
+
- 読み取り時点でCashtray自体の有効期限が切れているときに返されます。Cashtrayが失効する時刻はレスポンス中の `expires_at` にあります
|
3067
|
+
- `cashtray_already_canceled (422)`
|
3068
|
+
- 読み取り時点でCashtrayが無効化されているときに返されます
|
3069
|
+
- `account_balance_not_enough (422)`
|
3070
|
+
- 支払い時に、エンドユーザーの残高が不足していて取引が完了できなかったときに返されます
|
3071
|
+
- `account_balance_exceeded`
|
3072
|
+
- チャージ時に、エンドユーザーのウォレット上限を超えて取引が完了できなかったときに返されます
|
3073
|
+
- `account_transfer_limit_exceeded (422)`
|
3074
|
+
- マネーに設定されている一度の取引金額の上限を超えたため、取引が完了できなかったときに返されます
|
3075
|
+
- `account_not_found (422)`
|
3076
|
+
- Cashtrayに設定されたマネーのウォレットをエンドユーザーが持っていなかったときに返されます
|
3077
|
+
|
3078
|
+
|
3079
|
+
レスポンス中の `transaction` には、このCashtrayをエンドユーザーが読み取ることによって作られる取引データが入ります。まだCashtrayが読み取られていない場合は `NULL` になります。
|
3080
|
+
|
3081
|
+
以上をまとめると、Cashtrayの状態は以下のようになります。
|
3082
|
+
|
3083
|
+
- エンドユーザーのCashtray読み取りによって取引が成功した場合
|
3084
|
+
- レスポンス中の `attempt` と `transaction` にそれぞれ値が入ります
|
3085
|
+
- 何らかの理由で取引が失敗した場合
|
3086
|
+
- レスポンス中の `attempt` にエラー内容が入り、 `transaction` には `NULL` が入ります
|
3087
|
+
- まだCashtrayが読み取られていない場合
|
3088
|
+
- レスポンス中の `attempt` と `transaction` にそれぞれ `NULL` が入ります。Cashtrayの `expires_at` が現在時刻より前の場合は有効期限切れ状態です。
|
3089
|
+
|
3090
|
+
Cashtrayの取り得る全ての状態を擬似コードで記述すると以下のようになります。
|
3091
|
+
```
|
3092
|
+
if (attempt == null) {
|
3093
|
+
// 状態は未確定
|
3094
|
+
if (canceled_at != null) {
|
3095
|
+
// 無効化済み
|
3096
|
+
} else if (expires_at < now) {
|
3097
|
+
// 失効済み
|
3098
|
+
} else {
|
3099
|
+
// まだ有効で読み取られていない
|
3100
|
+
}
|
3101
|
+
} else if (transaction != null) {
|
3102
|
+
// 取引成功確定。attempt で読み取ったユーザなどが分かる
|
3103
|
+
} else {
|
3104
|
+
// 取引失敗確定。attempt で失敗理由などが分かる
|
3105
|
+
}
|
3106
|
+
```
|
3107
|
+
|
3108
|
+
x-pokepay-operator-name: "GetCashtray"
|
3109
|
+
x-pokepay-allow-server-side: true
|
3110
|
+
parameters:
|
3111
|
+
- in: path
|
3112
|
+
name: cashtray_id
|
3113
|
+
required: true
|
3114
|
+
schema:
|
3115
|
+
type: string
|
3116
|
+
format: uuid
|
3117
|
+
summary: 'CashtrayのID'
|
3118
|
+
description: |-
|
3119
|
+
情報を取得するCashtrayのIDです。
|
3120
|
+
responses:
|
3121
|
+
'200':
|
3122
|
+
description: OK
|
3123
|
+
content:
|
3124
|
+
application/json:
|
3125
|
+
schema:
|
3126
|
+
$ref: '#/components/schemas/CashtrayWithResult'
|
3127
|
+
'400':
|
3128
|
+
$ref: '#/components/responses/InvalidParameters'
|
3129
|
+
'403':
|
3130
|
+
$ref: '#/components/responses/Forbidden'
|
3131
|
+
'404':
|
3132
|
+
$ref: '#/components/responses/NotFound'
|
3133
|
+
'422':
|
3134
|
+
$ref: '#/components/responses/UnprocessableEntity'
|
3135
|
+
delete:
|
3136
|
+
tags:
|
3137
|
+
- Cashtray
|
3138
|
+
summary: 'Cashtrayを無効化する'
|
3139
|
+
description: |-
|
3140
|
+
Cashtrayを無効化します。
|
3141
|
+
|
3142
|
+
これにより、 `GetCashtray` のレスポンス中の `canceled_at` に無効化時点での現在時刻が入るようになります。
|
3143
|
+
エンドユーザーが無効化されたQRコードを読み取ると `cashtray_already_canceled` エラーとなり、取引は失敗します。
|
3144
|
+
x-pokepay-operator-name: "CancelCashtray"
|
3145
|
+
x-pokepay-allow-server-side: true
|
3146
|
+
parameters:
|
3147
|
+
- in: path
|
3148
|
+
name: cashtray_id
|
3149
|
+
required: true
|
3150
|
+
schema:
|
3151
|
+
type: string
|
3152
|
+
format: uuid
|
3153
|
+
summary: 'CashtrayのID'
|
3154
|
+
description: |-
|
3155
|
+
無効化するCashtrayのIDです。
|
3156
|
+
responses:
|
3157
|
+
'200':
|
3158
|
+
description: OK
|
3159
|
+
content:
|
3160
|
+
application/json:
|
3161
|
+
schema:
|
3162
|
+
$ref: '#/components/schemas/Cashtray'
|
3163
|
+
'400':
|
3164
|
+
$ref: '#/components/responses/BadRequest'
|
3165
|
+
'403':
|
3166
|
+
$ref: '#/components/responses/Forbidden'
|
3167
|
+
'404':
|
3168
|
+
$ref: '#/components/responses/NotFound'
|
3169
|
+
'422':
|
3170
|
+
$ref: '#/components/responses/UnprocessableEntity'
|
3171
|
+
patch:
|
3172
|
+
tags:
|
3173
|
+
- Cashtray
|
3174
|
+
summary: 'Cashtrayの情報を更新する'
|
3175
|
+
description: Cashtrayの内容を更新します。bodyパラメーターは全て省略可能で、指定したもののみ更新されます。
|
3176
|
+
x-pokepay-operator-name: "UpdateCashtray"
|
3177
|
+
x-pokepay-allow-server-side: true
|
3178
|
+
parameters:
|
3179
|
+
- in: path
|
3180
|
+
name: cashtray_id
|
3181
|
+
required: true
|
3182
|
+
schema:
|
3183
|
+
type: string
|
3184
|
+
format: uuid
|
3185
|
+
summary: 'CashtrayのID'
|
3186
|
+
description: |-
|
3187
|
+
更新対象のCashtrayのIDです。
|
3188
|
+
requestBody:
|
3189
|
+
required: true
|
3190
|
+
content:
|
3191
|
+
application/json:
|
3192
|
+
schema:
|
3193
|
+
properties:
|
3194
|
+
amount:
|
3195
|
+
type: number
|
3196
|
+
summary: '金額'
|
3197
|
+
description: |-
|
3198
|
+
マネー額です(任意項目)。
|
3199
|
+
正の値を与えるとチャージになり、負の値を与えると支払いとなります。
|
3200
|
+
description:
|
3201
|
+
type: string
|
3202
|
+
maxLength: 200
|
3203
|
+
summary: '取引履歴に表示する説明文'
|
3204
|
+
description: |-
|
3205
|
+
Cashtrayを読み取ったときに作られる取引の説明文です(最大200文字、任意項目)。
|
3206
|
+
アプリや管理画面などの取引履歴に表示されます。
|
3207
|
+
example: たい焼き(小倉)
|
3208
|
+
expires_in:
|
3209
|
+
type: integer
|
3210
|
+
minimum: 1
|
3211
|
+
summary: '失効時間(秒)'
|
3212
|
+
description: |-
|
3213
|
+
Cashtrayが失効するまでの時間を秒で指定します(任意項目、デフォルト値は1800秒(30分))。
|
3214
|
+
responses:
|
3215
|
+
'200':
|
3216
|
+
description: OK
|
3217
|
+
content:
|
3218
|
+
application/json:
|
3219
|
+
schema:
|
3220
|
+
$ref: '#/components/schemas/Cashtray'
|
3221
|
+
'400':
|
3222
|
+
$ref: '#/components/responses/BadRequest'
|
3223
|
+
'403':
|
3224
|
+
$ref: '#/components/responses/Forbidden'
|
3225
|
+
'404':
|
3226
|
+
$ref: '#/components/responses/NotFound'
|
3227
|
+
'422':
|
3228
|
+
$ref: '#/components/responses/UnprocessableEntity'
|