pokepay_partner_ruby_sdk 0.1.0 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +7 -7
- data/README.md +14 -0
- data/config.ini.sample +1 -1
- data/docs/index.md +752 -16
- data/examples/examples.rb +178 -13
- data/lib/pokepay_partner_ruby_sdk.rb +53 -6
- data/lib/pokepay_partner_ruby_sdk/client.rb +9 -7
- data/lib/pokepay_partner_ruby_sdk/request/create_check.rb +15 -0
- data/lib/pokepay_partner_ruby_sdk/request/create_customer_account.rb +15 -0
- data/lib/pokepay_partner_ruby_sdk/request/create_exchange_transaction.rb +18 -0
- data/lib/pokepay_partner_ruby_sdk/request/create_organization.rb +19 -0
- data/lib/pokepay_partner_ruby_sdk/request/create_payment_transaction.rb +18 -0
- data/lib/pokepay_partner_ruby_sdk/request/create_shop.rb +15 -0
- data/lib/pokepay_partner_ruby_sdk/request/create_topup_transaction.rb +17 -0
- data/lib/pokepay_partner_ruby_sdk/request/create_topup_transaction_with_check.rb +16 -0
- data/lib/pokepay_partner_ruby_sdk/request/create_transaction.rb +5 -5
- data/lib/pokepay_partner_ruby_sdk/request/create_transfer_transaction.rb +18 -0
- data/lib/pokepay_partner_ruby_sdk/request/get_account.rb +15 -0
- data/lib/pokepay_partner_ruby_sdk/request/get_ping.rb +15 -0
- data/lib/pokepay_partner_ruby_sdk/request/get_private_money_organization_summaries.rb +15 -0
- data/lib/pokepay_partner_ruby_sdk/request/get_transaction.rb +15 -0
- data/lib/pokepay_partner_ruby_sdk/request/get_user.rb +15 -0
- data/lib/pokepay_partner_ruby_sdk/request/list_account_balances.rb +15 -0
- data/lib/pokepay_partner_ruby_sdk/request/list_bills.rb +15 -0
- data/lib/pokepay_partner_ruby_sdk/request/list_shops.rb +15 -0
- data/lib/pokepay_partner_ruby_sdk/request/list_transactions.rb +7 -4
- data/lib/pokepay_partner_ruby_sdk/request/list_transfers.rb +15 -0
- data/lib/pokepay_partner_ruby_sdk/request/list_user_accounts.rb +15 -0
- data/lib/pokepay_partner_ruby_sdk/request/refund_transaction.rb +15 -0
- data/lib/pokepay_partner_ruby_sdk/request/send_echo.rb +4 -1
- data/lib/pokepay_partner_ruby_sdk/request/update_account.rb +15 -0
- data/lib/pokepay_partner_ruby_sdk/response/account.rb +2 -0
- data/lib/pokepay_partner_ruby_sdk/response/account_balance.rb +15 -0
- data/lib/pokepay_partner_ruby_sdk/response/account_detail.rb +24 -0
- data/lib/pokepay_partner_ruby_sdk/response/account_with_user.rb +21 -0
- data/lib/pokepay_partner_ruby_sdk/response/account_without_private_money_detail.rb +20 -0
- data/lib/pokepay_partner_ruby_sdk/response/admin_user_with_shops_and_private_moneys.rb +26 -0
- data/lib/pokepay_partner_ruby_sdk/response/bad_request.rb +11 -0
- data/lib/pokepay_partner_ruby_sdk/response/bill.rb +24 -0
- data/lib/pokepay_partner_ruby_sdk/response/check.rb +37 -0
- data/lib/pokepay_partner_ruby_sdk/response/echo.rb +6 -3
- data/lib/pokepay_partner_ruby_sdk/response/invalid_parameters.rb +15 -0
- data/lib/pokepay_partner_ruby_sdk/response/organization.rb +3 -0
- data/lib/pokepay_partner_ruby_sdk/response/organization_summary.rb +19 -0
- data/lib/pokepay_partner_ruby_sdk/response/paginated_account_balance.rb +16 -0
- data/lib/pokepay_partner_ruby_sdk/response/paginated_accounts.rb +16 -0
- data/lib/pokepay_partner_ruby_sdk/response/paginated_bills.rb +16 -0
- data/lib/pokepay_partner_ruby_sdk/response/paginated_private_money_organization_summaries.rb +16 -0
- data/lib/pokepay_partner_ruby_sdk/response/paginated_shops.rb +16 -0
- data/lib/pokepay_partner_ruby_sdk/response/paginated_transaction.rb +16 -0
- data/lib/pokepay_partner_ruby_sdk/response/paginated_transfers.rb +16 -0
- data/lib/pokepay_partner_ruby_sdk/response/pagination.rb +9 -6
- data/lib/pokepay_partner_ruby_sdk/response/partner_client_not_found.rb +13 -0
- data/lib/pokepay_partner_ruby_sdk/response/partner_decryption_failed.rb +13 -0
- data/lib/pokepay_partner_ruby_sdk/response/partner_request_already_done.rb +13 -0
- data/lib/pokepay_partner_ruby_sdk/response/partner_request_expired.rb +13 -0
- data/lib/pokepay_partner_ruby_sdk/response/pong.rb +11 -0
- data/lib/pokepay_partner_ruby_sdk/response/private_money.rb +8 -0
- data/lib/pokepay_partner_ruby_sdk/response/private_money_organization_summary.rb +17 -0
- data/lib/pokepay_partner_ruby_sdk/response/response.rb +3 -3
- data/lib/pokepay_partner_ruby_sdk/response/shop_with_metadata.rb +25 -0
- data/lib/pokepay_partner_ruby_sdk/response/transaction.rb +5 -1
- data/lib/pokepay_partner_ruby_sdk/response/transfer.rb +31 -0
- data/lib/pokepay_partner_ruby_sdk/response/user.rb +3 -0
- data/lib/pokepay_partner_ruby_sdk/response/user_transaction.rb +33 -0
- data/lib/pokepay_partner_ruby_sdk/version.rb +1 -1
- data/partner.yaml +1967 -0
- data/pokepay_partner_ruby_sdk.gemspec +4 -4
- metadata +60 -13
- data/lib/pokepay_partner_ruby_sdk/response/transactions.rb +0 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1fd61e182a33f59658adeb782593d28971cc70072d3d434b8880ba51d1348e81
|
4
|
+
data.tar.gz: 26dae7ac67ff5e10e2ab44f7e1fe2c03efcf30616e2cab5cb755b6bf757518fc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5e2b87c098a019491ffac0b7744d672747cbc0a6a1756e4d7b6ce61da8dc765e4d05b61522eb206a27618c0bf793a7c7c89f03aa1e761e0dde503f5b6e999926
|
7
|
+
data.tar.gz: d8fd52165e868d36d33de7e96637cd02d30fb99107ca74b1b8964c2780bf16cee298c2af817cd1983a6a149e932495a4c17a72261ce12c7b73e6e8d37b42a58d
|
data/Gemfile.lock
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
pokepay_partner_ruby_sdk (0.1.
|
4
|
+
pokepay_partner_ruby_sdk (0.1.6)
|
5
5
|
inifile (~> 3.0.0)
|
6
|
-
json (~> 2.
|
6
|
+
json (~> 2.3.0)
|
7
7
|
openssl (~> 2.1.2)
|
8
8
|
|
9
9
|
GEM
|
@@ -11,11 +11,11 @@ GEM
|
|
11
11
|
specs:
|
12
12
|
inifile (3.0.0)
|
13
13
|
ipaddr (1.2.2)
|
14
|
-
json (2.
|
15
|
-
minitest (5.
|
14
|
+
json (2.3.0)
|
15
|
+
minitest (5.14.0)
|
16
16
|
openssl (2.1.2)
|
17
17
|
ipaddr
|
18
|
-
rake (
|
18
|
+
rake (13.0.1)
|
19
19
|
|
20
20
|
PLATFORMS
|
21
21
|
ruby
|
@@ -24,7 +24,7 @@ DEPENDENCIES
|
|
24
24
|
bundler (~> 2.0)
|
25
25
|
minitest (~> 5.0)
|
26
26
|
pokepay_partner_ruby_sdk!
|
27
|
-
rake (~>
|
27
|
+
rake (~> 13.0)
|
28
28
|
|
29
29
|
BUNDLED WITH
|
30
|
-
2.
|
30
|
+
2.1.4
|
data/README.md
CHANGED
@@ -39,6 +39,20 @@ response = c.send(Pokepay::Request::CreateTransaction.new(
|
|
39
39
|
|
40
40
|
## Run test
|
41
41
|
|
42
|
+
Add `~/.pokepay/test-config.ini`
|
43
|
+
|
44
|
+
```
|
45
|
+
CLIENT_ID = aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa
|
46
|
+
CLIENT_SECRET = bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
|
47
|
+
API_BASE_URL = https://partnerapi-dev.pokepay.jp
|
48
|
+
SSL_KEY_FILE = /path/to/key.pem
|
49
|
+
SSL_CERT_FILE = /path/to/cert.pem
|
50
|
+
[testdata]
|
51
|
+
shop_id = xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
|
52
|
+
customer_id = yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy
|
53
|
+
private_money_id = zzzzzzzz-zzzz-zzzz-zzzz-zzzzzzzzzzzz
|
54
|
+
```
|
55
|
+
|
42
56
|
```
|
43
57
|
$ bundle exec ruby test/pokepay_partner_ruby_sdk_test.rb
|
44
58
|
```
|
data/config.ini.sample
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
CLIENT_ID = xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
|
2
2
|
CLIENT_SECRET = yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
|
3
|
-
API_BASE_URL = https://partnerapi-
|
3
|
+
API_BASE_URL = https://partnerapi-sandbox.pokepay.jp
|
4
4
|
SSL_KEY_FILE = /path/to/key.pem
|
5
5
|
SSL_CERT_FILE = /path/to/cert.pem
|
data/docs/index.md
CHANGED
@@ -1,29 +1,765 @@
|
|
1
|
-
#
|
1
|
+
# Partner API SDK for Ruby
|
2
|
+
## Installation
|
2
3
|
|
4
|
+
rubygemsからインストールすることができます。
|
3
5
|
```
|
4
|
-
$
|
6
|
+
$ gem install pokepay_partner_ruby_sdk
|
5
7
|
```
|
6
8
|
|
7
|
-
|
9
|
+
ロードパスの通ったところにライブラリが配置されていれば、以下のようにロードできます。
|
8
10
|
|
9
|
-
|
11
|
+
```ruby
|
12
|
+
require "pokepay_partner_ruby_sdk"
|
13
|
+
```
|
14
|
+
|
15
|
+
## Getting started
|
16
|
+
|
17
|
+
基本的な使い方は次のようになります。
|
18
|
+
|
19
|
+
- ライブラリをロード
|
20
|
+
- 設定ファイル(後述)から `Pokepay::Client` オブジェクトを作る
|
21
|
+
- リクエストオブジェクトを作り、`Pokepay::Client` オブジェクトの `send` メソッドに対して渡す
|
22
|
+
- レスポンスオブジェクトを得る
|
10
23
|
|
11
24
|
```ruby
|
12
25
|
require "pokepay_partner_ruby_sdk"
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
res = c.send(Pokepay::Request::CreateTransaction.new(
|
17
|
-
"8b9fbece-73fa-494d-bad5-c7fd9e52f9a0",
|
18
|
-
"78e56df5-dd71-4554-86e5-b0eb8d3781cb",
|
19
|
-
"4b138a4c-8944-4f98-a5c4-96d3c1c415eb",
|
20
|
-
100,
|
21
|
-
200,
|
22
|
-
"チャージテスト"))
|
26
|
+
client = Pokepay::Client.new("/path/to/config.ini")
|
27
|
+
request = Pokepay::Request::SendEcho.new('hello')
|
28
|
+
response = client.send(request)
|
23
29
|
```
|
24
30
|
|
25
|
-
|
31
|
+
レスポンスオブジェクト内にステータスコード、JSONをパースしたハッシュマップ、さらにレスポンス内容のオブジェクトが含まれています。
|
32
|
+
|
33
|
+
## Settings
|
34
|
+
|
35
|
+
設定はINIファイルに記述し、`Pokepay::Client` のコンストラクタにファイルパスを指定します。
|
36
|
+
|
37
|
+
SDKプロジェクトルートに `config.ini.sample` というファイルがありますのでそれを元に必要な情報を記述してください。特に以下の情報は通信の安全性のため必要な項目です。これらはパートナー契約時にお渡ししているものです。
|
38
|
+
|
39
|
+
- `CLIENT_ID`: パートナーAPI クライアントID
|
40
|
+
- `CLIENT_SECRET`: パートナーAPI クライアント秘密鍵
|
41
|
+
- `SSL_KEY_FILE`: SSL秘密鍵ファイルパス
|
42
|
+
- `SSL_CERT_FILE`: SSL証明書ファイルパス
|
43
|
+
|
44
|
+
この他に接続先のサーバURL情報が必要です。
|
45
|
+
|
46
|
+
- `API_BASE_URL`: パートナーAPI サーバURL
|
47
|
+
|
48
|
+
また、この設定ファイルには認証に必要な情報が含まれるため、ファイルの管理・取り扱いに十分注意してください。
|
49
|
+
|
50
|
+
設定ファイル記述例(`config.ini.sample`)
|
26
51
|
|
27
52
|
```
|
28
|
-
|
53
|
+
CLIENT_ID = xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
|
54
|
+
CLIENT_SECRET = yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
|
55
|
+
API_BASE_URL = https://partnerapi-sandbox.pokepay.jp
|
56
|
+
SSL_KEY_FILE = /path/to/key.pem
|
57
|
+
SSL_CERT_FILE = /path/to/cert.pem
|
29
58
|
```
|
59
|
+
|
60
|
+
## Overview
|
61
|
+
|
62
|
+
### APIリクエスト
|
63
|
+
|
64
|
+
Partner APIへの通信はリクエストオブジェクトを作り、`Pokepay::Client.send` メソッドに渡すことで行われます。
|
65
|
+
リクエストクラスは名前空間 `Pokepay::Request` 以下に定義されています。
|
66
|
+
|
67
|
+
たとえば `Pokepay::Request::SendEcho` は送信した内容をそのまま返す処理です。
|
68
|
+
|
69
|
+
```ruby
|
70
|
+
request = Pokepay::Request::SendEcho.new('hello')
|
71
|
+
|
72
|
+
response = client.send(request)
|
73
|
+
# => #<Pokepay::Response::Response 200 OK readbody=>
|
74
|
+
```
|
75
|
+
|
76
|
+
通信の結果として、レスポンスオブジェクトが得られます。
|
77
|
+
これはステータスコードとレスポンスボディ、各レスポンスクラスのオブジェクトをインスタンス変数に持つオブジェクトです。
|
78
|
+
|
79
|
+
```ruby
|
80
|
+
response.code
|
81
|
+
# => 200
|
82
|
+
|
83
|
+
response.body
|
84
|
+
# => {"status"=>"ok", "message"=>"hello"}
|
85
|
+
|
86
|
+
response.object
|
87
|
+
# => #<Pokepay::Response::Echo:0x000055fd7cc0db20 @message="hello">
|
88
|
+
|
89
|
+
response.object.message
|
90
|
+
# => "hello"
|
91
|
+
```
|
92
|
+
|
93
|
+
利用可能なAPI操作については [API Operations](#api-operations) で紹介します。
|
94
|
+
|
95
|
+
<a name="paging"></a>
|
96
|
+
### ページング
|
97
|
+
|
98
|
+
API操作によっては、大量のデータがある場合に備えてページング処理があります。
|
99
|
+
その処理では以下のようなプロパティを持つレスポンスオブジェクトを返します。
|
100
|
+
|
101
|
+
- rows : 列挙するレスポンスクラスのオブジェクトの配列
|
102
|
+
- count : 全体の要素数
|
103
|
+
- pagination : 以下のインスタンス変数を持つオブジェクト
|
104
|
+
- current : 現在のページ位置(1からスタート)
|
105
|
+
- per_page : 1ページ当たりの要素数
|
106
|
+
- max_page : 最後のページ番号
|
107
|
+
- has_prev : 前ページを持つかどうかの真理値
|
108
|
+
- has_next : 次ページを持つかどうかの真理値
|
109
|
+
|
110
|
+
ページングクラスは `Pokepay::Response::Pagination` で定義されています。
|
111
|
+
|
112
|
+
以下にコード例を示します。
|
113
|
+
|
114
|
+
```ruby
|
115
|
+
request = Pokepay::Request::ListTransactions.new({ "page" => 1, "per_page" => 50 })
|
116
|
+
response = client.send(request)
|
117
|
+
|
118
|
+
if response.object.pagination.has_next then
|
119
|
+
next_page = response.object.pagination.current + 1
|
120
|
+
request = Pokepay::Request::ListTransactions.new({ "page" => next_page, "per_page" => 50 })
|
121
|
+
response = client.send(request)
|
122
|
+
end
|
123
|
+
```
|
124
|
+
|
125
|
+
### エラーハンドリング
|
126
|
+
|
127
|
+
エラーの場合は `Net::HTTPBadRequest` などのエラーレスポンスオブジェクトが返ります。
|
128
|
+
エラーレスポンスもステータスコードとレスポンスボディを持ちます。
|
129
|
+
|
130
|
+
```ruby
|
131
|
+
request = Pokepay::Request::SendEcho.new(-1)
|
132
|
+
|
133
|
+
response = client.send(request)
|
134
|
+
# => #<Net::HTTPBadRequest 400 Bad Request readbody=true>
|
135
|
+
|
136
|
+
response.code
|
137
|
+
# => 400
|
138
|
+
|
139
|
+
response.body
|
140
|
+
# => {"type"=>"invalid_parameters", "message"=>"Invalid parameters", "errors"=>{"invalid"=>["message"]}}
|
141
|
+
```
|
142
|
+
<a name="api-operations"></a>
|
143
|
+
## API Operations
|
144
|
+
|
145
|
+
### Transaction
|
146
|
+
|
147
|
+
#### 取引情報を取得する
|
148
|
+
取引を取得します。
|
149
|
+
```ruby
|
150
|
+
response = $client.send(Pokepay::Request::GetTransaction.new(
|
151
|
+
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" // transaction_id: 取引ID
|
152
|
+
))
|
153
|
+
```
|
154
|
+
|
155
|
+
---
|
156
|
+
`transaction_id`
|
157
|
+
取引IDです。
|
158
|
+
|
159
|
+
フィルターとして使われ、指定した取引IDの取引を取得します。
|
160
|
+
|
161
|
+
---
|
162
|
+
成功したときは[Transaction](#transaction)オブジェクトを返します
|
163
|
+
|
164
|
+
#### チャージする
|
165
|
+
チャージ取引を作成します。
|
166
|
+
```ruby
|
167
|
+
response = $client.send(Pokepay::Request::CreateTopupTransaction.new(
|
168
|
+
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // shop_id: 店舗ID
|
169
|
+
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // customer_id: エンドユーザーのID
|
170
|
+
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // private_money_id: マネーID
|
171
|
+
bear_point_shop_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // ポイント支払時の負担店舗ID
|
172
|
+
money_amount: 3515, // マネー額
|
173
|
+
point_amount: 7853, // ポイント額
|
174
|
+
description: "初夏のチャージキャンペーン" // 取引履歴に表示する説明文
|
175
|
+
))
|
176
|
+
```
|
177
|
+
|
178
|
+
---
|
179
|
+
`shop_id`
|
180
|
+
店舗IDです。
|
181
|
+
|
182
|
+
送金元の店舗を指定します。
|
183
|
+
|
184
|
+
---
|
185
|
+
`customer_id`
|
186
|
+
エンドユーザーIDです。
|
187
|
+
|
188
|
+
送金先のエンドユーザーを指定します。
|
189
|
+
|
190
|
+
---
|
191
|
+
`private_money_id`
|
192
|
+
マネーIDです。
|
193
|
+
|
194
|
+
マネーを指定します。
|
195
|
+
|
196
|
+
---
|
197
|
+
`bear_point_shop_id`
|
198
|
+
ポイント支払時の負担店舗IDです。
|
199
|
+
|
200
|
+
ポイント支払い時に実際お金を負担する店舗を指定します。
|
201
|
+
|
202
|
+
---
|
203
|
+
`money_amount`
|
204
|
+
マネー額です。
|
205
|
+
|
206
|
+
送金するマネー額を指定します。
|
207
|
+
|
208
|
+
---
|
209
|
+
`point_amount`
|
210
|
+
ポイント額です。
|
211
|
+
|
212
|
+
送金するポイント額を指定します。
|
213
|
+
|
214
|
+
---
|
215
|
+
`description`
|
216
|
+
取引説明文です。
|
217
|
+
|
218
|
+
任意入力で、取引履歴に表示される説明文です。
|
219
|
+
|
220
|
+
---
|
221
|
+
成功したときは[Transaction](#transaction)オブジェクトを返します
|
222
|
+
|
223
|
+
#### 支払いする
|
224
|
+
支払取引を作成します。
|
225
|
+
支払い時には、エンドユーザーの残高のうち、ポイント残高から優先的に消費されます。
|
226
|
+
|
227
|
+
```ruby
|
228
|
+
response = $client.send(Pokepay::Request::CreatePaymentTransaction.new(
|
229
|
+
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // shop_id: 店舗ID
|
230
|
+
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // customer_id: エンドユーザーID
|
231
|
+
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // private_money_id: マネーID
|
232
|
+
4119, // amount: 支払い額
|
233
|
+
description: "たい焼き(小倉)" // 取引履歴に表示する説明文
|
234
|
+
))
|
235
|
+
```
|
236
|
+
|
237
|
+
---
|
238
|
+
`shop_id`
|
239
|
+
店舗IDです。
|
240
|
+
|
241
|
+
送金先の店舗を指定します。
|
242
|
+
|
243
|
+
---
|
244
|
+
`customer_id`
|
245
|
+
エンドユーザーIDです。
|
246
|
+
|
247
|
+
送金元のエンドユーザーを指定します。
|
248
|
+
|
249
|
+
---
|
250
|
+
`private_money_id`
|
251
|
+
マネーIDです。
|
252
|
+
|
253
|
+
マネーを指定します。
|
254
|
+
|
255
|
+
---
|
256
|
+
`amount`
|
257
|
+
マネー額です。
|
258
|
+
|
259
|
+
送金するマネー額を指定します。
|
260
|
+
|
261
|
+
---
|
262
|
+
`description`
|
263
|
+
取引説明文です。
|
264
|
+
|
265
|
+
任意入力で、取引履歴に表示される説明文です。
|
266
|
+
|
267
|
+
---
|
268
|
+
成功したときは[Transaction](#transaction)オブジェクトを返します
|
269
|
+
|
270
|
+
#### 取引履歴を取得する
|
271
|
+
取引一覧を返します。
|
272
|
+
```ruby
|
273
|
+
response = $client.send(Pokepay::Request::ListTransactions.new(
|
274
|
+
from: "2024-03-14T02:41:24.000000+09:00", // 開始日時
|
275
|
+
to: "2019-04-09T15:58:53.000000+09:00", // 終了日時
|
276
|
+
page: 1, // ページ番号
|
277
|
+
per_page: 50, // 1ページ分の取引数
|
278
|
+
shop_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // 店舗ID
|
279
|
+
customer_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // エンドユーザーID
|
280
|
+
customer_name: "太郎", // エンドユーザー名
|
281
|
+
terminal_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // 端末ID
|
282
|
+
transaction_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // 取引ID
|
283
|
+
organization_code: "pocketchange", // 組織コード
|
284
|
+
private_money_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // マネーID
|
285
|
+
is_modified: true, // キャンセルフラグ
|
286
|
+
types: ["topup", "payment"] // 取引種別 (複数指定可)、チャージ=topup、支払い=payment
|
287
|
+
))
|
288
|
+
```
|
289
|
+
|
290
|
+
---
|
291
|
+
`from`
|
292
|
+
抽出期間の開始日時です。
|
293
|
+
|
294
|
+
フィルターとして使われ、開始日時以降に発生した取引のみ一覧に表示されます。
|
295
|
+
|
296
|
+
---
|
297
|
+
`to`
|
298
|
+
抽出期間の終了日時です。
|
299
|
+
|
300
|
+
フィルターとして使われ、終了日時以前に発生した取引のみ一覧に表示されます。
|
301
|
+
|
302
|
+
---
|
303
|
+
`page`
|
304
|
+
取得したいページ番号です。
|
305
|
+
|
306
|
+
---
|
307
|
+
`per_page`
|
308
|
+
1ページ分の取引数です。
|
309
|
+
|
310
|
+
---
|
311
|
+
`shop_id`
|
312
|
+
店舗IDです。
|
313
|
+
|
314
|
+
フィルターとして使われ、指定された店舗での取引のみ一覧に表示されます。
|
315
|
+
|
316
|
+
---
|
317
|
+
`customer_id`
|
318
|
+
エンドユーザーIDです。
|
319
|
+
|
320
|
+
フィルターとして使われ、指定されたエンドユーザーでの取引のみ一覧に表示されます。
|
321
|
+
|
322
|
+
---
|
323
|
+
`customer_name`
|
324
|
+
エンドユーザー名です。
|
325
|
+
|
326
|
+
フィルターとして使われ、入力された名前に部分一致するエンドユーザーでの取引のみ一覧に表示されます。
|
327
|
+
|
328
|
+
---
|
329
|
+
`terminal_id`
|
330
|
+
端末IDです。
|
331
|
+
|
332
|
+
フィルターとして使われ、指定された端末での取引のみ一覧に表示されます。
|
333
|
+
|
334
|
+
---
|
335
|
+
`transaction_id`
|
336
|
+
取引IDです。
|
337
|
+
|
338
|
+
フィルターとして使われ、指定された取引のみ一覧に表示されます。
|
339
|
+
|
340
|
+
---
|
341
|
+
`organization_code`
|
342
|
+
組織コードです。
|
343
|
+
|
344
|
+
フィルターとして使われ、指定された組織での取引のみ一覧に表示されます。
|
345
|
+
|
346
|
+
---
|
347
|
+
`private_money_id`
|
348
|
+
マネーIDです。
|
349
|
+
|
350
|
+
フィルターとして使われ、指定したマネーでの取引のみ一覧に表示されます。
|
351
|
+
|
352
|
+
---
|
353
|
+
`is_modified`
|
354
|
+
キャンセルフラグです。
|
355
|
+
|
356
|
+
これにtrueを指定するとキャンセルされた取引のみ一覧に表示されます。
|
357
|
+
デフォルト値はfalseで、キャンセルの有無にかかわらず一覧に表示されます。
|
358
|
+
|
359
|
+
---
|
360
|
+
`types`
|
361
|
+
取引の種類でフィルターします。
|
362
|
+
|
363
|
+
以下の種類を指定できます。
|
364
|
+
|
365
|
+
1. topup
|
366
|
+
店舗からエンドユーザーへの送金取引(チャージ)
|
367
|
+
|
368
|
+
2. payment
|
369
|
+
エンドユーザーから店舗への送金取引(支払い)
|
370
|
+
|
371
|
+
3. exchange-outflow
|
372
|
+
他マネーへの流出
|
373
|
+
|
374
|
+
4. exchange-inflow
|
375
|
+
他マネーからの流入
|
376
|
+
|
377
|
+
---
|
378
|
+
成功したときは[PaginatedTransaction](#paginated-transaction)オブジェクトを返します
|
379
|
+
|
380
|
+
#### 返金する
|
381
|
+
```ruby
|
382
|
+
response = $client.send(Pokepay::Request::RefundTransaction.new(
|
383
|
+
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // transaction_id: 取引ID
|
384
|
+
description: "返品対応のため" // 取引履歴に表示する返金事由
|
385
|
+
))
|
386
|
+
```
|
387
|
+
成功したときは[Transfer](#transfer)オブジェクトを返します
|
388
|
+
|
389
|
+
### チャージQRコード
|
390
|
+
|
391
|
+
店舗ユーザが発行し、エンドユーザがポケペイアプリから読み取ることでチャージ取引が発生するQRコードです。
|
392
|
+
|
393
|
+
チャージQRコードを解析すると次のようなURLになります(URLは環境によって異なります)。
|
394
|
+
|
395
|
+
`https://www-sandbox.pokepay.jp/checks/xxxxxxxx-xxxx-xxxxxxxxx-xxxxxxxxxxxx`
|
396
|
+
|
397
|
+
QRコードを読み取る方法以外にも、このURLリンクを直接スマートフォン(iOS/Android)上で開くことによりアプリが起動して取引が行われます。(注意: 上記URLはsandbox環境であるため、アプリもsandbox環境のものである必要があります) 上記URL中の `xxxxxxxx-xxxx-xxxxxxxxx-xxxxxxxxxxxx` の部分がチャージQRコードのIDです。
|
398
|
+
|
399
|
+
#### チャージQRコードの発行
|
400
|
+
```ruby
|
401
|
+
response = $client.send(Pokepay::Request::CreateCheck.new(
|
402
|
+
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // account_id: 送金元の店舗アカウントID
|
403
|
+
money_amount: 9919, // 付与マネー額
|
404
|
+
point_amount: 2608, // 付与ポイント額
|
405
|
+
description: "test check", // 説明文(アプリ上で取引の説明文として表示される)
|
406
|
+
is_onetime: false, // ワンタイムかどうか。真の場合1度読み込まれた時点でそのチャージQRは失効する(デフォルト値は真)
|
407
|
+
usage_limit: 8625, // ワンタイムでない場合、複数ユーザから読み取られ得る。その場合の最大読み取り回数
|
408
|
+
expires_at: "2022-02-18T00:32:55.000000+09:00", // チャージQR自体の失効日時
|
409
|
+
point_expires_at: "2017-12-02T22:53:00.000000+09:00", // チャージQRによって付与されるポイントの失効日時
|
410
|
+
point_expires_in_days: 60, // チャージQRによって付与されるポイントの有効期限(相対指定、単位は日)
|
411
|
+
bear_point_account: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" // ポイント額を負担する店舗アカウントのID
|
412
|
+
))
|
413
|
+
```
|
414
|
+
`money_amount`と`point_amount`の少なくとも一方は指定する必要があります。
|
415
|
+
|
416
|
+
|
417
|
+
---
|
418
|
+
`is_onetime`
|
419
|
+
チャージQRコードが一度の読み取りで失効するときに`true`にします。デフォルト値は`true`です。
|
420
|
+
`false`の場合、そのチャージQRコードは1ユーザについては1回きりですが、複数ユーザによって読み取り可能なQRコードになります。
|
421
|
+
|
422
|
+
|
423
|
+
---
|
424
|
+
`usage_limit`
|
425
|
+
複数ユーザによって読み取り可能なチャージQRコードの読み取り回数に制限をつけるために指定します。
|
426
|
+
省略すると無制限に読み取り可能なチャージQRコードになります。
|
427
|
+
チャージQRコードは管理画面からいつでも無効化(有効化)することができます。
|
428
|
+
|
429
|
+
|
430
|
+
---
|
431
|
+
成功したときは[Check](#check)オブジェクトを返します
|
432
|
+
|
433
|
+
#### チャージQRコードを読み取ることでチャージする
|
434
|
+
通常チャージQRコードはエンドユーザのアプリによって読み取られ、アプリとポケペイサーバとの直接通信によって取引が作られます。 もしエンドユーザとの通信をパートナーのサーバのみに限定したい場合、パートナーのサーバがチャージQRの情報をエンドユーザから代理受けして、サーバ間連携APIによって実際のチャージ取引をリクエストすることになります。
|
435
|
+
|
436
|
+
エンドユーザから受け取ったチャージ用QRコードのIDをエンドユーザIDと共に渡すことでチャージ取引が作られます。
|
437
|
+
|
438
|
+
```ruby
|
439
|
+
response = $client.send(Pokepay::Request::CreateTopupTransactionWithCheck.new(
|
440
|
+
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // check_id: チャージ用QRコードのID
|
441
|
+
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" // customer_id: エンドユーザーのID
|
442
|
+
))
|
443
|
+
```
|
444
|
+
|
445
|
+
---
|
446
|
+
`check_id`
|
447
|
+
チャージ用QRコードのIDです。
|
448
|
+
|
449
|
+
QRコード生成時に送金元店舗のウォレット情報や、送金額などが登録されています。
|
450
|
+
|
451
|
+
---
|
452
|
+
`customer_id`
|
453
|
+
エンドユーザーIDです。
|
454
|
+
|
455
|
+
送金先のエンドユーザーを指定します。
|
456
|
+
|
457
|
+
---
|
458
|
+
成功したときは[Transaction](#transaction)オブジェクトを返します
|
459
|
+
|
460
|
+
### Customer
|
461
|
+
|
462
|
+
#### 新規エンドユーザーウォレットを追加する
|
463
|
+
指定したマネーのウォレットを作成し、同時にそのウォレットを保有するユーザも作成します。
|
464
|
+
```ruby
|
465
|
+
response = $client.send(Pokepay::Request::CreateCustomerAccount.new(
|
466
|
+
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // private_money_id: マネーID
|
467
|
+
user_name: "ポケペイ太郎", // ユーザー名
|
468
|
+
account_name: "ポケペイ太郎のアカウント" // アカウント名
|
469
|
+
))
|
470
|
+
```
|
471
|
+
|
472
|
+
---
|
473
|
+
`private_money_id`
|
474
|
+
マネーIDです。
|
475
|
+
|
476
|
+
これによって作成するウォレットのマネーを指定します。
|
477
|
+
|
478
|
+
---
|
479
|
+
`user_name`
|
480
|
+
ウォレットと共に作成するユーザ名です。省略した場合は空文字となります。
|
481
|
+
|
482
|
+
---
|
483
|
+
`account_name`
|
484
|
+
作成するウォレット名です。省略した場合は空文字となります。
|
485
|
+
|
486
|
+
---
|
487
|
+
成功したときは[AccountWithUser](#account-with-user)オブジェクトを返します
|
488
|
+
|
489
|
+
#### エンドユーザーのウォレット情報を表示する
|
490
|
+
ウォレットを取得します。
|
491
|
+
```ruby
|
492
|
+
response = $client.send(Pokepay::Request::GetAccount.new(
|
493
|
+
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" // account_id: ウォレットID
|
494
|
+
))
|
495
|
+
```
|
496
|
+
|
497
|
+
---
|
498
|
+
`account_id`
|
499
|
+
ウォレットIDです。
|
500
|
+
|
501
|
+
フィルターとして使われ、指定したウォレットIDのウォレットを取得します。
|
502
|
+
|
503
|
+
---
|
504
|
+
成功したときは[AccountDetail](#account-detail)オブジェクトを返します
|
505
|
+
|
506
|
+
#### エンドユーザーの残高内訳を表示する
|
507
|
+
エンドユーザーの残高は有効期限別のリストとして取得できます。
|
508
|
+
```ruby
|
509
|
+
response = $client.send(Pokepay::Request::ListAccountBalances.new(
|
510
|
+
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // account_id: ウォレットID
|
511
|
+
page: 7956, // ページ番号
|
512
|
+
per_page: 4513 // 1ページ分の取引数
|
513
|
+
))
|
514
|
+
```
|
515
|
+
|
516
|
+
---
|
517
|
+
`account_id`
|
518
|
+
ウォレットIDです。
|
519
|
+
|
520
|
+
フィルターとして使われ、指定したウォレットIDのウォレット残高を取得します。
|
521
|
+
|
522
|
+
---
|
523
|
+
`page`
|
524
|
+
取得したいページ番号です。
|
525
|
+
|
526
|
+
---
|
527
|
+
`per_page`
|
528
|
+
1ページ分のウォレット残高数です。
|
529
|
+
|
530
|
+
---
|
531
|
+
成功したときは[PaginatedAccountBalance](#paginated-account-balance)オブジェクトを返します
|
532
|
+
|
533
|
+
### Organization
|
534
|
+
|
535
|
+
#### 新規加盟店組織を追加する
|
536
|
+
```ruby
|
537
|
+
response = $client.send(Pokepay::Request::CreateOrganization.new(
|
538
|
+
"ox_supermarket", // code: 新規組織コード
|
539
|
+
"oxスーパー", // name: 新規組織名
|
540
|
+
["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"], // private_money_ids: 加盟店組織で有効にするマネーIDの配列
|
541
|
+
"1qSYlEPOrX@96su.com", // issuer_admin_user_email: 発行体担当者メールアドレス
|
542
|
+
"Y89xlB3mgj@Y6Ph.com", // member_admin_user_email: 新規組織担当者メールアドレス
|
543
|
+
bank_name: "XYZ銀行", // 銀行名
|
544
|
+
bank_code: "99X", // 銀行金融機関コード
|
545
|
+
bank_branch_name: "ABC支店", // 銀行支店名
|
546
|
+
bank_branch_code: "99X", // 銀行支店コード
|
547
|
+
bank_account_type: "current", // 銀行口座種別 (普通=saving, 当座=current, その他=other)
|
548
|
+
bank_account: 9999999, // 銀行口座番号
|
549
|
+
bank_account_holder_name: "フクザワユキチ", // 口座名義人名
|
550
|
+
contact_name: "佐藤清" // 担当者名
|
551
|
+
))
|
552
|
+
```
|
553
|
+
成功したときは[Organization](#organization)オブジェクトを返します
|
554
|
+
|
555
|
+
### Shop
|
556
|
+
|
557
|
+
#### 新規店舗を追加する
|
558
|
+
```ruby
|
559
|
+
response = $client.send(Pokepay::Request::CreateShop.new(
|
560
|
+
"oxスーパー三田店", // shop_name: 店舗名
|
561
|
+
shop_postal_code: "652-4859", // 店舗の郵便番号
|
562
|
+
shop_address: "東京都港区芝...", // 店舗の住所
|
563
|
+
shop_tel: "096-99-5223", // 店舗の電話番号
|
564
|
+
shop_email: "0ktWQ723w2@IG1J.com", // 店舗のメールアドレス
|
565
|
+
shop_external_id: "lBzqgWY2glpsEhUQhgL9hEwO7oPQpA", // 店舗の外部ID
|
566
|
+
organization_code: "ox-supermarket" // 組織コード
|
567
|
+
))
|
568
|
+
```
|
569
|
+
成功したときは[User](#user)オブジェクトを返します
|
570
|
+
|
571
|
+
### Private Money
|
572
|
+
|
573
|
+
#### 決済加盟店の取引サマリを取得する
|
574
|
+
```ruby
|
575
|
+
response = $client.send(Pokepay::Request::GetPrivateMoneyOrganizationSummaries.new(
|
576
|
+
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // private_money_id: マネーID
|
577
|
+
from: "2017-05-21T20:37:05.000000+09:00", // 開始日時(toと同時に指定する必要有)
|
578
|
+
to: "2018-07-11T00:21:30.000000+09:00", // 終了日時(fromと同時に指定する必要有)
|
579
|
+
page: 1, // ページ番号
|
580
|
+
per_page: 50 // 1ページ分の取引数
|
581
|
+
))
|
582
|
+
```
|
583
|
+
`from`と`to`は同時に指定する必要があります。
|
584
|
+
|
585
|
+
成功したときは[PaginatedPrivateMoneyOrganizationSummaries](#paginated-private-money-organization-summaries)オブジェクトを返します
|
586
|
+
|
587
|
+
## Responses
|
588
|
+
|
589
|
+
<a name="account-with-user"></a>
|
590
|
+
## AccountWithUser
|
591
|
+
* `id (string)`:
|
592
|
+
* `name (string)`:
|
593
|
+
* `is_suspended (boolean)`:
|
594
|
+
* `private_money (PrivateMoney)`:
|
595
|
+
* `user (User)`:
|
596
|
+
|
597
|
+
`private_money`は [PrivateMoney](#private-money) オブジェクトを返します。
|
598
|
+
|
599
|
+
`user`は [User](#user) オブジェクトを返します。
|
600
|
+
|
601
|
+
<a name="account-detail"></a>
|
602
|
+
## AccountDetail
|
603
|
+
* `id (string)`:
|
604
|
+
* `name (string)`:
|
605
|
+
* `is_suspended (boolean)`:
|
606
|
+
* `balance (double)`:
|
607
|
+
* `money_balance (double)`:
|
608
|
+
* `point_balance (double)`:
|
609
|
+
* `private_money (PrivateMoney)`:
|
610
|
+
|
611
|
+
`private_money`は [PrivateMoney](#private-money) オブジェクトを返します。
|
612
|
+
|
613
|
+
<a name="check"></a>
|
614
|
+
## Check
|
615
|
+
* `id (string)`: チャージQRコードのID
|
616
|
+
* `amount (double)`: チャージマネー額 (deprecated)
|
617
|
+
* `money_amount (double)`: チャージマネー額
|
618
|
+
* `point_amount (double)`: チャージポイント額
|
619
|
+
* `description (string)`: チャージQRコードの説明文(アプリ上で取引の説明文として表示される)
|
620
|
+
* `user (User)`: 送金元ユーザ情報
|
621
|
+
* `is_onetime (boolean)`: 使用回数が一回限りかどうか
|
622
|
+
* `is_disabled (boolean)`: 無効化されているかどうか
|
623
|
+
* `expires_at (string)`: チャージQRコード自体の失効日時
|
624
|
+
* `private_money (PrivateMoney)`: 対象マネー情報
|
625
|
+
* `usage_limit (integer)`: 一回限りでない場合の最大読み取り回数
|
626
|
+
* `usage_count (double)`: 一回限りでない場合の現在までに読み取られた回数
|
627
|
+
* `token (string)`: チャージQRコードを解析したときに出てくるURL
|
628
|
+
|
629
|
+
`user`は [User](#user) オブジェクトを返します。
|
630
|
+
|
631
|
+
`private_money`は [PrivateMoney](#private-money) オブジェクトを返します。
|
632
|
+
|
633
|
+
<a name="user"></a>
|
634
|
+
## User
|
635
|
+
* `id (string)`: ユーザー (または店舗) ID
|
636
|
+
* `name (string)`: ユーザー (または店舗) 名
|
637
|
+
* `is_merchant (boolean)`: 店舗ユーザーかどうか
|
638
|
+
|
639
|
+
<a name="organization"></a>
|
640
|
+
## Organization
|
641
|
+
* `code (string)`: 組織コード
|
642
|
+
* `name (string)`: 組織名
|
643
|
+
|
644
|
+
<a name="transaction"></a>
|
645
|
+
## Transaction
|
646
|
+
* `id (string)`: 取引ID
|
647
|
+
* `type (string)`: 取引種別 (チャージ=topup, 支払い=payment)
|
648
|
+
* `is_modified (boolean)`: 返金された取引かどうか
|
649
|
+
* `sender (User)`: 送金者情報
|
650
|
+
* `sender_account (Account)`: 送金ウォレット情報
|
651
|
+
* `receiver (User)`: 受取者情報
|
652
|
+
* `receiver_account (Account)`: 受取ウォレット情報
|
653
|
+
* `amount (double)`: 決済総額 (マネー額 + ポイント額)
|
654
|
+
* `money_amount (double)`: 決済マネー額
|
655
|
+
* `point_amount (double)`: 決済ポイント額
|
656
|
+
* `done_at (string)`: 取引日時
|
657
|
+
* `description (string)`: 取引説明文
|
658
|
+
|
659
|
+
`receiver`と`sender`は [User](#user) オブジェクトを返します。
|
660
|
+
|
661
|
+
`receiver_account`と`sender_account`は [Account](#account) オブジェクトを返します。
|
662
|
+
|
663
|
+
<a name="transfer"></a>
|
664
|
+
## Transfer
|
665
|
+
* `id (string)`:
|
666
|
+
* `sender_account (AccountWithoutPrivateMoneyDetail)`:
|
667
|
+
* `receiver_account (AccountWithoutPrivateMoneyDetail)`:
|
668
|
+
* `amount (double)`:
|
669
|
+
* `money_amount (double)`:
|
670
|
+
* `point_amount (double)`:
|
671
|
+
* `done_at (string)`:
|
672
|
+
* `type (string)`:
|
673
|
+
* `description (string)`:
|
674
|
+
* `transaction_id (string)`:
|
675
|
+
|
676
|
+
`receiver_account`と`sender_account`は [AccountWithoutPrivateMoneyDetail](#account-without-private-money-detail) オブジェクトを返します。
|
677
|
+
|
678
|
+
<a name="paginated-private-money-organization-summaries"></a>
|
679
|
+
## PaginatedPrivateMoneyOrganizationSummaries
|
680
|
+
* `rows (array of PrivateMoneyOrganizationSummaries)`:
|
681
|
+
* `count (integer)`:
|
682
|
+
* `pagination (Pagination)`:
|
683
|
+
|
684
|
+
`rows`は [PrivateMoneyOrganizationSummary](#private-money-organization-summary) オブジェクトの配列を返します。
|
685
|
+
|
686
|
+
`pagination`は [Pagination](#pagination) オブジェクトを返します。
|
687
|
+
|
688
|
+
<a name="paginated-transaction"></a>
|
689
|
+
## PaginatedTransaction
|
690
|
+
* `rows (array of Transactions)`:
|
691
|
+
* `count (integer)`:
|
692
|
+
* `pagination (Pagination)`:
|
693
|
+
|
694
|
+
`rows`は [Transaction](#transaction) オブジェクトの配列を返します。
|
695
|
+
|
696
|
+
`pagination`は [Pagination](#pagination) オブジェクトを返します。
|
697
|
+
|
698
|
+
<a name="paginated-account-balance"></a>
|
699
|
+
## PaginatedAccountBalance
|
700
|
+
* `rows (array of AccountBalances)`:
|
701
|
+
* `count (integer)`:
|
702
|
+
* `pagination (Pagination)`:
|
703
|
+
|
704
|
+
`rows`は [AccountBalance](#account-balance) オブジェクトの配列を返します。
|
705
|
+
|
706
|
+
`pagination`は [Pagination](#pagination) オブジェクトを返します。
|
707
|
+
|
708
|
+
<a name="private-money"></a>
|
709
|
+
## PrivateMoney
|
710
|
+
* `id (string)`: マネーID
|
711
|
+
* `name (string)`: マネー名
|
712
|
+
* `unit (string)`: マネー単位 (例: 円)
|
713
|
+
* `is_exclusive (boolean)`: 会員制のマネーかどうか
|
714
|
+
* `description (string)`: マネー説明文
|
715
|
+
* `oneline_message (string)`: マネーの要約
|
716
|
+
* `organization (Organization)`: マネーを発行した組織
|
717
|
+
* `max_balance (double)`: ウォレットの上限金額
|
718
|
+
* `transfer_limit (double)`: マネーの取引上限額
|
719
|
+
* `type (string)`: マネー種別 (自家型=own, 第三者型=third-party)
|
720
|
+
* `expiration_type (string)`: 有効期限種別 (チャージ日起算=static, 最終利用日起算=last-update, 最終チャージ日起算=last-topup-update)
|
721
|
+
* `enable_topup_by_member (boolean)`: 加盟店によるチャージが有効かどうか
|
722
|
+
* `account_image (string)`: マネーの画像URL
|
723
|
+
|
724
|
+
`organization`は [Organization](#organization) オブジェクトを返します。
|
725
|
+
|
726
|
+
<a name="account"></a>
|
727
|
+
## Account
|
728
|
+
* `id (string)`: ウォレットID
|
729
|
+
* `name (string)`: ウォレット名
|
730
|
+
* `is_suspended (boolean)`: ウォレットが凍結されているかどうか
|
731
|
+
* `private_money (PrivateMoney)`: 設定マネー情報
|
732
|
+
|
733
|
+
`private_money`は [PrivateMoney](#private-money) オブジェクトを返します。
|
734
|
+
|
735
|
+
<a name="account-without-private-money-detail"></a>
|
736
|
+
## AccountWithoutPrivateMoneyDetail
|
737
|
+
* `id (string)`:
|
738
|
+
* `name (string)`:
|
739
|
+
* `is_suspended (boolean)`:
|
740
|
+
* `private_money_id (string)`:
|
741
|
+
* `user (User)`:
|
742
|
+
|
743
|
+
`user`は [User](#user) オブジェクトを返します。
|
744
|
+
|
745
|
+
<a name="private-money-organization-summary"></a>
|
746
|
+
## PrivateMoneyOrganizationSummary
|
747
|
+
* `organization_code (string)`:
|
748
|
+
* `topup (OrganizationSummary)`:
|
749
|
+
* `payment (OrganizationSummary)`:
|
750
|
+
|
751
|
+
`payment`と`topup`は [OrganizationSummary](#organization-summary) オブジェクトを返します。
|
752
|
+
|
753
|
+
<a name="pagination"></a>
|
754
|
+
## Pagination
|
755
|
+
* `current (integer)`:
|
756
|
+
* `per_page (integer)`:
|
757
|
+
* `max_page (integer)`:
|
758
|
+
* `has_prev (boolean)`:
|
759
|
+
* `has_next (boolean)`:
|
760
|
+
|
761
|
+
<a name="account-balance"></a>
|
762
|
+
## AccountBalance
|
763
|
+
* `expires_at (string)`:
|
764
|
+
* `money_amount (double)`:
|
765
|
+
* `point_amount (double)`:
|