pokepay_partner_ruby_sdk 0.1.2 → 0.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/docs/index.md +1053 -203
  4. data/lib/pokepay_partner_ruby_sdk.rb +35 -19
  5. data/lib/pokepay_partner_ruby_sdk/request/bulk_create_transaction.rb +17 -0
  6. data/lib/pokepay_partner_ruby_sdk/request/create_bill.rb +16 -0
  7. data/lib/pokepay_partner_ruby_sdk/request/create_organization.rb +2 -1
  8. data/lib/pokepay_partner_ruby_sdk/request/create_transfer_transaction.rb +18 -0
  9. data/lib/pokepay_partner_ruby_sdk/request/list_account_expired_balances.rb +15 -0
  10. data/lib/pokepay_partner_ruby_sdk/request/list_bills.rb +15 -0
  11. data/lib/pokepay_partner_ruby_sdk/request/list_customer_transactions.rb +15 -0
  12. data/lib/pokepay_partner_ruby_sdk/request/list_shops.rb +15 -0
  13. data/lib/pokepay_partner_ruby_sdk/request/list_user_accounts.rb +15 -0
  14. data/lib/pokepay_partner_ruby_sdk/request/refund_transaction.rb +15 -0
  15. data/lib/pokepay_partner_ruby_sdk/request/update_account.rb +15 -0
  16. data/lib/pokepay_partner_ruby_sdk/request/update_bill.rb +15 -0
  17. data/lib/pokepay_partner_ruby_sdk/response/bill.rb +26 -0
  18. data/lib/pokepay_partner_ruby_sdk/response/bulk_transaction.rb +21 -0
  19. data/lib/pokepay_partner_ruby_sdk/response/paginated_accounts.rb +16 -0
  20. data/lib/pokepay_partner_ruby_sdk/response/paginated_bills.rb +16 -0
  21. data/lib/pokepay_partner_ruby_sdk/response/paginated_shops.rb +16 -0
  22. data/lib/pokepay_partner_ruby_sdk/response/pong.rb +2 -2
  23. data/lib/pokepay_partner_ruby_sdk/response/shop_with_metadata.rb +25 -0
  24. data/lib/pokepay_partner_ruby_sdk/version.rb +1 -1
  25. data/partner.yaml +2387 -0
  26. metadata +23 -7
  27. data/lib/pokepay_partner_ruby_sdk/parameter/product.rb +0 -21
  28. data/lib/pokepay_partner_ruby_sdk/request/create_cpm_transaction.rb +0 -17
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5027b7fd2a102a6e077dc1d3d68ce6c65f8b7216c6320fefcbf3882cba87b146
4
- data.tar.gz: 10a43dad44d77fd654cc0744a17c9996df903ed4f03cc2a671708c2f631a39f8
3
+ metadata.gz: 4820f2638f0bc46dd7d401e8d0d488ee8ebe763f0e1664cc872113ff1a9e45a8
4
+ data.tar.gz: 7fe61418ef2c499d79a261b02209924579d1f16bbf224a2cfd7775d6291ed465
5
5
  SHA512:
6
- metadata.gz: d430a4b622d7ef751ef766ef7b278688d314157d0477c490096db6a1d81e269e290b3c5dbdd62c725375b4934d830948e3bcc9e60e00376f57060abe4e249af4
7
- data.tar.gz: 889991f4824194bd01e404744061857eae3866c571342e775ddd6240c1f103f31bfb2f01459134ac525a3ba312c97fb8439a3846f350e7df239efb1311d95ce5
6
+ metadata.gz: b2e5b0bd0c12fd7ab88b51e328cb39a3eff5d3c35c443f336affae2e9591567dc261335f5683f467b8b550b049662d9aa0b8aa7e45185561d138f71258cb8d0b
7
+ data.tar.gz: a66eb0bfe7ffbc70b581d3f10cce063dc67ce594846d4a1ce541e2c367a2f0643fef79cc769831e8a7afe2b69f6645a068a0d2d55c5cfd6331fbf9939034b445
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- pokepay_partner_ruby_sdk (0.1.2)
4
+ pokepay_partner_ruby_sdk (0.1.8)
5
5
  inifile (~> 3.0.0)
6
6
  json (~> 2.3.0)
7
7
  openssl (~> 2.1.2)
@@ -1,5 +1,4 @@
1
1
  # Partner API SDK for Ruby
2
-
3
2
  ## Installation
4
3
 
5
4
  rubygemsからインストールすることができます。
@@ -140,287 +139,1138 @@ response.code
140
139
  response.body
141
140
  # => {"type"=>"invalid_parameters", "message"=>"Invalid parameters", "errors"=>{"invalid"=>["message"]}}
142
141
  ```
143
-
144
142
  <a name="api-operations"></a>
145
143
  ## API Operations
146
144
 
147
145
  ### Transaction
148
146
 
149
- <a name="get-transaction"></a>
150
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)オブジェクトを返します
151
163
 
164
+ #### チャージする
165
+ チャージ取引を作成します。
152
166
  ```ruby
153
- response = client.send(Pokepay::Request::GetTransaction.new(
154
- "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" # 取引ID
155
- ))
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: 9829, # マネー額
173
+ point_amount: 3839, # ポイント額
174
+ description: "初夏のチャージキャンペーン" # 取引履歴に表示する説明文
175
+ ))
176
+ ```
177
+
178
+ ---
179
+ `shop_id`
180
+ 店舗IDです。
181
+
182
+ 送金元の店舗を指定します。
183
+
184
+ ---
185
+ `customer_id`
186
+ エンドユーザーIDです。
187
+
188
+ 送金先のエンドユーザーを指定します。
156
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
+ 9578, # amount: 支払い額
233
+ description: "たい焼き(小倉)" # 取引履歴に表示する説明文
234
+ ))
157
235
  ```
158
236
 
159
- 成功したときは以下のプロパティを含む `Pokepay::Response::Transaction` オブジェクトをレスポンスとして返します。
237
+ ---
238
+ `shop_id`
239
+ 店舗IDです。
160
240
 
161
- - id (String): 取引ID
162
- - type (String): 取引種別 (チャージ=topup, 支払い=payment)
163
- - is_modified (真理値): 返金された取引かどうか
164
- - sender (Pokepay::Response::User): 送金者情報
165
- - receiver (Pokepay::Response::User): 受取者情報
166
- - sender_account (Pokepay::Response::Account): 送金口座情報
167
- - receiver_account (Pokepay::Response::Account): 受取口座情報
168
- - amount (Numeric): 決済総額 (マネー額 + ポイント額)
169
- - money_amount (Numeric): 決済マネー額
170
- - point_amount (Numeric): 決済ポイント額
171
- - done_at (Time): 取引日時
172
- - description (String): 取引説明文
241
+ 送金先の店舗を指定します。
173
242
 
174
- `sender` と `receiver` は `Pokepay::Response::User` のオブジェクトです。 以下にプロパティを示します。
243
+ ---
244
+ `customer_id`
245
+ エンドユーザーIDです。
175
246
 
176
- - id (String): ユーザー (または店舗) ID
177
- - name (String): ユーザー (または店舗) 名
178
- - is_merchant (真理値): 店舗ユーザーかどうか
247
+ 送金元のエンドユーザーを指定します。
179
248
 
180
- `senderAccount` と `receiverAccount` は `Pokepay::Response::Account` のオブジェクトです。以下にプロパティを示します。
249
+ ---
250
+ `private_money_id`
251
+ マネーIDです。
181
252
 
182
- - id (String): 口座ID
183
- - name (String): 口座名
184
- - is_suspended (真理値): 口座が凍結されているかどうか
185
- - private_money (Pokepay::Response::PrivateMoney): 設定マネー情報
253
+ マネーを指定します。
186
254
 
187
- `privateMoney` は `Pokepay::Response::PrivateMoney` のオブジェクトです。以下にプロパティを示します。
255
+ ---
256
+ `amount`
257
+ マネー額です。
188
258
 
189
- - id (String): マネーID
190
- - name (String): マネー名
191
- - unit (String): マネー単位 (例: 円)
192
- - is_exclusive (真理値): 会員制のマネーかどうか
193
- - description (String): マネー説明文
194
- - max_balance (Numeric): 口座の上限金額
195
- - transfer_limit (Numeric): マネーの取引上限額
196
- - type (String): マネー種別 (自家型=own, 第三者型=third-party)
197
- - expiration_type (String): 有効期限種別 (チャージ日時起算=static, 最終利用日時起算=last-update)
259
+ 送金するマネー額を指定します。
198
260
 
199
- #### チャージする
261
+ ---
262
+ `description`
263
+ 取引説明文です。
264
+
265
+ 任意入力で、取引履歴に表示される説明文です。
266
+
267
+ ---
268
+ 成功したときは[Transaction](#transaction)オブジェクトを返します
269
+
270
+ #### 個人間送金
271
+ エンドユーザー間での送金取引(個人間送金)を作成します。
272
+ 個人間送金で送れるのはマネーのみで、ポイントを送ることはできません。送金元のマネー残高のうち、有効期限が最も遠いものから順に送金されます。
200
273
 
201
274
  ```ruby
202
- response = client.send(Pokepay::Request::CreateTopupTransaction.new(
203
- "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # 店舗ID
204
- "yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy", # エンドユーザーのID
205
- "zzzzzzzz-zzzz-zzzz-zzzz-zzzzzzzzzzzz", # 送るマネーのID
206
- {
207
- "money_amount" => 100, # チャージマネー額
208
- "point_amount" => 200, # チャージするポイント額 (任意)
209
- "description" => "チャージテスト" # 取引履歴に表示する説明文 (任意)
210
- }))
275
+ response = $client.send(Pokepay::Request::CreateTransferTransaction.new(
276
+ "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # sender_id: 送金元ユーザーID
277
+ "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # receiver_id: 受取ユーザーID
278
+ "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # private_money_id: マネーID
279
+ 2298, # amount: 送金額
280
+ description: "たい焼き(小倉)" # 取引履歴に表示する説明文
281
+ ))
211
282
  ```
212
283
 
213
- 成功したときは `Pokepay::Response::Transaction` を持つレスポンスオブジェクトを返します。
214
- プロパティは [取引情報を取得する](#get-transaction) を参照してください。
284
+ ---
285
+ `sender_id`
286
+ エンドユーザーIDです。
215
287
 
216
- #### 支払いする
288
+ 送金元のエンドユーザー(送り主)を指定します。
289
+
290
+ ---
291
+ `receiver_id`
292
+ エンドユーザーIDです。
293
+
294
+ 送金先のエンドユーザー(受け取り人)を指定します。
295
+
296
+ ---
297
+ `private_money_id`
298
+ マネーIDです。
299
+
300
+ マネーを指定します。
301
+
302
+ ---
303
+ `amount`
304
+ マネー額です。
217
305
 
306
+ 送金するマネー額を指定します。
307
+
308
+ ---
309
+ `description`
310
+ 取引説明文です。
311
+
312
+ 任意入力で、取引履歴に表示される説明文です。
313
+
314
+ ---
315
+ 成功したときは[Transaction](#transaction)オブジェクトを返します
316
+
317
+ #### 取引履歴を取得する
318
+ 取引一覧を返します。
218
319
  ```ruby
219
- response = client.send(Pokepay::Request::CreatePaymentTransaction.new(
220
- "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # 店舗ID
221
- "yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy", # エンドユーザーのID
222
- "zzzzzzzz-zzzz-zzzz-zzzz-zzzzzzzzzzzz", # 支払うマネーのID
223
- 100, # 支払い額
224
- {
225
- "description" => "たい焼き(小倉)" # 取引履歴に表示する説明文 (任意)
226
- }))
320
+ response = $client.send(Pokepay::Request::ListTransactions.new(
321
+ from: "2022-12-14T10:46:43.000000+09:00", # 開始日時
322
+ to: "2024-01-27T16:51:48.000000+09:00", # 終了日時
323
+ page: 1, # ページ番号
324
+ per_page: 50, # 1ページ分の取引数
325
+ shop_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # 店舗ID
326
+ customer_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # エンドユーザーID
327
+ customer_name: "太郎", # エンドユーザー名
328
+ terminal_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # 端末ID
329
+ transaction_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # 取引ID
330
+ organization_code: "pocketchange", # 組織コード
331
+ private_money_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # マネーID
332
+ is_modified: true, # キャンセルフラグ
333
+ types: ["topup", "payment"] # 取引種別 (複数指定可)、チャージ=topup、支払い=payment
334
+ ))
227
335
  ```
228
336
 
229
- 成功したときは `Pokepay::Response::Transaction` オブジェクトをレスポンスとして返します。
230
- プロパティは [取引情報を取得する](#get-transaction) を参照してください。
337
+ ---
338
+ `from`
339
+ 抽出期間の開始日時です。
340
+
341
+ フィルターとして使われ、開始日時以降に発生した取引のみ一覧に表示されます。
342
+
343
+ ---
344
+ `to`
345
+ 抽出期間の終了日時です。
346
+
347
+ フィルターとして使われ、終了日時以前に発生した取引のみ一覧に表示されます。
348
+
349
+ ---
350
+ `page`
351
+ 取得したいページ番号です。
352
+
353
+ ---
354
+ `per_page`
355
+ 1ページ分の取引数です。
356
+
357
+ ---
358
+ `shop_id`
359
+ 店舗IDです。
360
+
361
+ フィルターとして使われ、指定された店舗での取引のみ一覧に表示されます。
231
362
 
232
- #### チャージ用QRコードを読み取ることでチャージする
363
+ ---
364
+ `customer_id`
365
+ エンドユーザーIDです。
233
366
 
234
- チャージ用QRコードを解析すると次のようなURLになります(URLは環境によって異なります)。
367
+ フィルターとして使われ、指定されたエンドユーザーでの取引のみ一覧に表示されます。
368
+
369
+ ---
370
+ `customer_name`
371
+ エンドユーザー名です。
372
+
373
+ フィルターとして使われ、入力された名前に部分一致するエンドユーザーでの取引のみ一覧に表示されます。
374
+
375
+ ---
376
+ `terminal_id`
377
+ 端末IDです。
378
+
379
+ フィルターとして使われ、指定された端末での取引のみ一覧に表示されます。
380
+
381
+ ---
382
+ `transaction_id`
383
+ 取引IDです。
384
+
385
+ フィルターとして使われ、指定された取引のみ一覧に表示されます。
386
+
387
+ ---
388
+ `organization_code`
389
+ 組織コードです。
390
+
391
+ フィルターとして使われ、指定された組織での取引のみ一覧に表示されます。
392
+
393
+ ---
394
+ `private_money_id`
395
+ マネーIDです。
396
+
397
+ フィルターとして使われ、指定したマネーでの取引のみ一覧に表示されます。
398
+
399
+ ---
400
+ `is_modified`
401
+ キャンセルフラグです。
402
+
403
+ これにtrueを指定するとキャンセルされた取引のみ一覧に表示されます。
404
+ デフォルト値はfalseで、キャンセルの有無にかかわらず一覧に表示されます。
405
+
406
+ ---
407
+ `types`
408
+ 取引の種類でフィルターします。
409
+
410
+ 以下の種類を指定できます。
411
+
412
+ 1. topup
413
+ 店舗からエンドユーザーへの送金取引(チャージ)
414
+
415
+ 2. payment
416
+ エンドユーザーから店舗への送金取引(支払い)
417
+
418
+ 3. exchange-outflow
419
+   他マネーへの流出
420
+
421
+ 4. exchange-inflow
422
+ 他マネーからの流入
423
+
424
+ ---
425
+ 成功したときは[PaginatedTransaction](#paginated-transaction)オブジェクトを返します
426
+
427
+ #### 返金する
428
+ ```ruby
429
+ response = $client.send(Pokepay::Request::RefundTransaction.new(
430
+ "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # transaction_id: 取引ID
431
+ description: "返品対応のため" # 取引履歴に表示する返金事由
432
+ ))
433
+ ```
434
+ 成功したときは[Transfer](#transfer)オブジェクトを返します
435
+
436
+ ### チャージQRコード
437
+
438
+ 店舗ユーザが発行し、エンドユーザがポケペイアプリから読み取ることでチャージ取引が発生するQRコードです。
439
+
440
+ チャージQRコードを解析すると次のようなURLになります(URLは環境によって異なります)。
235
441
 
236
442
  `https://www-sandbox.pokepay.jp/checks/xxxxxxxx-xxxx-xxxxxxxxx-xxxxxxxxxxxx`
237
443
 
238
- この `xxxxxxxx-xxxx-xxxxxxxxx-xxxxxxxxxxxx` の部分がチャージ用QRコードのIDです。
239
- これを以下のようにエンドユーザIDと共に渡すことでチャージ取引が作られます。
444
+ QRコードを読み取る方法以外にも、このURLリンクを直接スマートフォン(iOS/Android)上で開くことによりアプリが起動して取引が行われます。(注意: 上記URLはsandbox環境であるため、アプリもsandbox環境のものである必要があります) 上記URL中の `xxxxxxxx-xxxx-xxxxxxxxx-xxxxxxxxxxxx` の部分がチャージQRコードのIDです。
240
445
 
446
+ #### チャージQRコードの発行
241
447
  ```ruby
242
- response = client.send(Pokepay::Request::CreateTopupTransactionWithCheck.new(
243
- "xxxxxxxx-xxxx-xxxxxxxxx-xxxxxxxxxxxx", # チャージ用QRコードのID
244
- "yyyyyyyy-yyyy-yyyyyyyyy-yyyyyyyyyyyy" # エンドユーザーのID
245
- ))
448
+ response = $client.send(Pokepay::Request::CreateCheck.new(
449
+ "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # account_id: 送金元の店舗アカウントID
450
+ money_amount: 4826, # 付与マネー額
451
+ point_amount: 2394, # 付与ポイント額
452
+ description: "test check", # 説明文(アプリ上で取引の説明文として表示される)
453
+ is_onetime: true, # ワンタイムかどうか。真の場合1度読み込まれた時点でそのチャージQRは失効する(デフォルト値は真)
454
+ usage_limit: 3826, # ワンタイムでない場合、複数ユーザから読み取られ得る。その場合の最大読み取り回数
455
+ expires_at: "2019-02-22T16:57:44.000000+09:00", # チャージQR自体の失効日時
456
+ point_expires_at: "2024-02-13T17:41:07.000000+09:00", # チャージQRによって付与されるポイントの失効日時
457
+ point_expires_in_days: 60, # チャージQRによって付与されるポイントの有効期限(相対指定、単位は日)
458
+ bear_point_account: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" # ポイント額を負担する店舗アカウントのID
459
+ ))
246
460
  ```
461
+ `money_amount`と`point_amount`の少なくとも一方は指定する必要があります。
247
462
 
248
- 成功したときは `Pokepay::Response::Transaction` オブジェクトをレスポンスとして返します。
249
- プロパティは [取引情報を取得する](#get-transaction) を参照してください。
250
463
 
251
- #### 取引履歴を取得する
464
+ ---
465
+ `is_onetime`
466
+ チャージQRコードが一度の読み取りで失効するときに`true`にします。デフォルト値は`true`です。
467
+ `false`の場合、そのチャージQRコードは1ユーザについては1回きりですが、複数ユーザによって読み取り可能なQRコードになります。
468
+
469
+
470
+ ---
471
+ `usage_limit`
472
+ 複数ユーザによって読み取り可能なチャージQRコードの読み取り回数に制限をつけるために指定します。
473
+ 省略すると無制限に読み取り可能なチャージQRコードになります。
474
+ チャージQRコードは管理画面からいつでも無効化(有効化)することができます。
475
+
476
+
477
+ ---
478
+ 成功したときは[Check](#check)オブジェクトを返します
479
+
480
+ #### チャージQRコードを読み取ることでチャージする
481
+ 通常チャージQRコードはエンドユーザのアプリによって読み取られ、アプリとポケペイサーバとの直接通信によって取引が作られます。 もしエンドユーザとの通信をパートナーのサーバのみに限定したい場合、パートナーのサーバがチャージQRの情報をエンドユーザから代理受けして、サーバ間連携APIによって実際のチャージ取引をリクエストすることになります。
482
+
483
+ エンドユーザから受け取ったチャージ用QRコードのIDをエンドユーザIDと共に渡すことでチャージ取引が作られます。
252
484
 
253
485
  ```ruby
254
- response = client.send(Pokepay::Request::ListTransactions.new(
255
- {
256
- # ページング
257
- "page" => 1,
258
- "per_page" => 50,
259
-
260
- # フィルタオプション (すべて任意)
261
- # 期間指定 (ISO8601形式の文字列)
262
- "from" => "2019-01-01T00:00:00+09:00",
263
- "to" => "2019-07-30T18:13:39+09:00",
264
-
265
- # 検索オプション
266
- "customer_id" => "xxxxxxxxxxxxxxxxx", # エンドユーザーID
267
- "customer_name" => "福沢", # エンドユーザー名
268
- "transaction_id" => "24bba30c......", # 取引ID
269
- "shop_id" => "456a820b......", # 店舗ID
270
- "terminal_id" => "d8023185......", # 端末ID
271
- "organization" => "pocketchange", # 組織コード
272
- "private_money_id" => "9ff644fc......", # マネーID
273
- "is_modified" => true, # キャンセルされた取引のみ検索するか
274
- # 取引種別 (複数指定可)、チャージ=topup、支払い=payment
275
- "types" => ["topup", "payment"],
276
- }))
277
- ```
278
-
279
- 成功したときは `Pokepay::Response::Transaction` を `rows` に含むページングオブジェクトを返します。
280
- 詳細は [ページング](#paging) を参照してください。
486
+ response = $client.send(Pokepay::Request::CreateTopupTransactionWithCheck.new(
487
+ "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # check_id: チャージ用QRコードのID
488
+ "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" # customer_id: エンドユーザーのID
489
+ ))
490
+ ```
281
491
 
282
- ### Customer
492
+ ---
493
+ `check_id`
494
+ チャージ用QRコードのIDです。
495
+
496
+ QRコード生成時に送金元店舗のウォレット情報や、送金額などが登録されています。
497
+
498
+ ---
499
+ `customer_id`
500
+ エンドユーザーIDです。
283
501
 
284
- #### 新規エンドユーザー口座を追加する
502
+ 送金先のエンドユーザーを指定します。
285
503
 
504
+ ---
505
+ 成功したときは[Transaction](#transaction)オブジェクトを返します
506
+
507
+ ### 支払いQRコード
508
+
509
+ #### 支払いQRコード一覧を表示する
510
+ 支払いQRコード一覧を表示します。
286
511
  ```ruby
287
- response = client.send(Pokepay::Request::CreateCustomerAccount.new(
288
- "zzzzzzzz-zzzz-zzzz-zzzz-zzzzzzzzzzzz", # マネーのID
289
- {
290
- "user_name" => "ポケペイ太郎", # ユーザー名 (任意)
291
- "account_name" => "ポケペイ太郎のアカウント" # アカウント名 (任意)
292
- }))
512
+ response = $client.send(Pokepay::Request::ListBills.new(
513
+ page: 6649, # ページ番号
514
+ per_page: 2896, # 1ページの表示数
515
+ bill_id: "3x6r1", # 支払いQRコードのID
516
+ private_money_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # マネーID
517
+ organization_code: "70s2krAk--iSH3DW--7--d----N", # 組織コード
518
+ description: "test bill", # 取引説明文
519
+ created_from: "2022-07-07T06:17:16.000000+09:00", # 作成日時(起点)
520
+ created_to: "2024-09-06T18:44:09.000000+09:00", # 作成日時(終点)
521
+ shop_name: "bill test shop1", # 店舗名
522
+ shop_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # 店舗ID
523
+ lower_limit_amount: 8780, # 金額の範囲によるフィルタ(下限)
524
+ upper_limit_amount: 8338, # 金額の範囲によるフィルタ(上限)
525
+ is_disabled: true # 支払いQRコードが無効化されているかどうか
526
+ ))
293
527
  ```
294
528
 
295
- 成功したときは以下のプロパティを持つ `Pokepay::Response::AccountWithUser` のオブジェクトをレスポンスとして返します。
529
+ ---
530
+ `page`
531
+ 取得したいページ番号です。
532
+
533
+ ---
534
+ `per_page`
535
+ 1ページに表示する支払いQRコードの数です。
536
+
537
+ ---
538
+ `bill_id`
539
+ 支払いQRコードのIDを指定して検索します。IDは部分一致で検索できます。
540
+
541
+ ---
542
+ `private_money_id`
543
+ 支払いQRコードの送金元ウォレットのマネーIDでフィルターします。
544
+
545
+ ---
546
+ `organization_code`
547
+ 支払いQRコードの送金元店舗が所属する組織の組織コードでフィルターします。
548
+
549
+ ---
550
+ `description`
551
+ 支払いQRコードを読み取ることで作られた取引の説明文としてアプリなどに表示されます。
552
+
553
+ ---
554
+ `created_from`
555
+ 支払いQRコードの作成日時でフィルターします。
556
+
557
+ これ以降に作成された支払いQRコードのみ一覧に表示されます。
558
+
559
+ ---
560
+ `created_to`
561
+ 支払いQRコードの作成日時でフィルターします。
562
+
563
+ これ以前に作成された支払いQRコードのみ一覧に表示されます。
564
+
565
+ ---
566
+ `shop_name`
567
+ 支払いQRコードを作成した店舗名でフィルターします。
296
568
 
297
- - id (string): 口座ID
298
- - name (string): 口座名
299
- - isSuspended (bool): 口座が凍結されているかどうか
300
- - privateMoney (Response\PrivateMoney): 設定マネー情報
301
- - user (Response\User): ユーザーIDなどを含むユーザー情報
569
+ ---
570
+ `shop_id`
571
+ 支払いQRコードを作成した店舗IDでフィルターします。
302
572
 
303
- #### エンドユーザーの口座情報を表示する
573
+ ---
574
+ `lower_limit_amount`
575
+ 支払いQRコードの金額の下限を指定してフィルターします。
304
576
 
577
+ ---
578
+ `upper_limit_amount`
579
+ 支払いQRコードの金額の上限を指定してフィルターします。
580
+
581
+ ---
582
+ `is_disabled`
583
+ 支払いQRコードが無効化されているかどうかを表します。デフォルト値は偽(有効)です。
584
+
585
+ ---
586
+ 成功したときは[PaginatedBills](#paginated-bills)オブジェクトを返します
587
+
588
+ #### 支払いQRコードの発行
589
+ 支払いQRコードの内容を更新します。支払い先の店舗ユーザーは指定したマネーのウォレットを持っている必要があります。
590
+ ```ruby
591
+ response = $client.send(Pokepay::Request::CreateBill.new(
592
+ "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # private_money_id: 支払いマネーのマネーID
593
+ "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # shop_id: 支払い先(受け取り人)の店舗ID
594
+ amount: 9137, # 支払い額
595
+ description: "test bill" # 説明文(アプリ上で取引の説明文として表示される)
596
+ ))
597
+ ```
598
+
599
+ ---
600
+ `amount`
601
+ 支払いQRコードを支払い額を指定します。省略するかnullを渡すと任意金額の支払いQRコードとなり、エンドユーザーがアプリで読み取った際に金額を入力します。
602
+
603
+ ---
604
+ 成功したときは[Bill](#bill)オブジェクトを返します
605
+
606
+ #### 支払いQRコードの更新
607
+ 支払いQRコードの内容を更新します。パラメータは全て省略可能で、指定したもののみ更新されます。
608
+ ```ruby
609
+ response = $client.send(Pokepay::Request::UpdateBill.new(
610
+ "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # bill_id: 支払いQRコードのID
611
+ amount: 8582, # 支払い額
612
+ description: "test bill", # 説明文
613
+ is_disabled: false # 無効化されているかどうか
614
+ ))
615
+ ```
616
+
617
+ ---
618
+ `bill_id`
619
+ 更新対象の支払いQRコードのIDです。
620
+
621
+ ---
622
+ `amount`
623
+ 支払いQRコードを支払い額を指定します。nullを渡すと任意金額の支払いQRコードとなり、エンドユーザーがアプリで読み取った際に金額を入力します。
624
+
625
+ ---
626
+ `description`
627
+ 支払いQRコードの詳細説明文です。アプリ上で取引の説明文として表示されます。
628
+
629
+ ---
630
+ `is_disabled`
631
+ 支払いQRコードが無効化されているかどうかを指定します。真にすると無効化され、偽にすると有効化します。
632
+
633
+ ---
634
+ 成功したときは[Bill](#bill)オブジェクトを返します
635
+
636
+ ### Customer
637
+
638
+ #### 新規エンドユーザーウォレットを追加する
639
+ 指定したマネーのウォレットを作成し、同時にそのウォレットを保有するユーザも作成します。
640
+ ```ruby
641
+ response = $client.send(Pokepay::Request::CreateCustomerAccount.new(
642
+ "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # private_money_id: マネーID
643
+ user_name: "ポケペイ太郎", # ユーザー名
644
+ account_name: "ポケペイ太郎のアカウント" # アカウント名
645
+ ))
646
+ ```
647
+
648
+ ---
649
+ `private_money_id`
650
+ マネーIDです。
651
+
652
+ これによって作成するウォレットのマネーを指定します。
653
+
654
+ ---
655
+ `user_name`
656
+ ウォレットと共に作成するユーザ名です。省略した場合は空文字となります。
657
+
658
+ ---
659
+ `account_name`
660
+ 作成するウォレット名です。省略した場合は空文字となります。
661
+
662
+ ---
663
+ 成功したときは[AccountWithUser](#account-with-user)オブジェクトを返します
664
+
665
+ #### ウォレット情報を表示する
666
+ ウォレットを取得します。
305
667
  ```ruby
306
- response = client.send(Pokepay::Request::GetAccount.new(
307
- "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" # 口座ID
308
- ))
668
+ response = $client.send(Pokepay::Request::GetAccount.new(
669
+ "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" # account_id: ウォレットID
670
+ ))
309
671
  ```
310
672
 
311
- 成功したときは以下のプロパティを持つ `Pokepay::Response::AccountDetail` のオブジェクトをレスポンスとして返します。
673
+ ---
674
+ `account_id`
675
+ ウォレットIDです。
676
+
677
+ フィルターとして使われ、指定したウォレットIDのウォレットを取得します。
312
678
 
313
- - id (string): 口座ID
314
- - name (string): 口座名
315
- - isSuspended (bool): 口座が凍結されているかどうか
316
- - balance (double): 総残高
317
- - moneyBalance (double): 総マネー残高
318
- - pointBalance (double): 総ポイント残高
319
- - privateMoney (Response\PrivateMoney): 設定マネー情報
679
+ ---
680
+ 成功したときは[AccountDetail](#account-detail)オブジェクトを返します
320
681
 
321
682
  #### エンドユーザーの残高内訳を表示する
683
+ エンドユーザーのウォレット毎の残高を有効期限別のリストとして取得します。
684
+ ```ruby
685
+ response = $client.send(Pokepay::Request::ListAccountBalances.new(
686
+ "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # account_id: ウォレットID
687
+ page: 1912, # ページ番号
688
+ per_page: 4503, # 1ページ分の取引数
689
+ expires_at_from: "2021-11-26T22:06:49.000000+09:00", # 有効期限の期間によるフィルター(開始時点)
690
+ expires_at_to: "2019-12-08T14:37:45.000000+09:00", # 有効期限の期間によるフィルター(終了時点)
691
+ direction: "asc" # 有効期限によるソート順序
692
+ ))
693
+ ```
694
+
695
+ ---
696
+ `account_id`
697
+ ウォレットIDです。
698
+
699
+ フィルターとして使われ、指定したウォレットIDのウォレット残高を取得します。
700
+
701
+ ---
702
+ `page`
703
+ 取得したいページ番号です。デフォルト値は1です。
704
+
705
+ ---
706
+ `per_page`
707
+ 1ページ分のウォレット残高数です。デフォルト値は30です。
708
+
709
+ ---
710
+ `expires_at_from`
711
+ 有効期限の期間によるフィルターの開始時点のタイムスタンプです。デフォルトでは未指定です。
712
+
713
+ ---
714
+ `expires_at_to`
715
+ 有効期限の期間によるフィルターの終了時点のタイムスタンプです。デフォルトでは未指定です。
716
+
717
+ ---
718
+ `direction`
719
+ 有効期限によるソートの順序を指定します。デフォルト値はasc (昇順)です。
322
720
 
323
- エンドユーザーの残高は有効期限別のリストとして取得できます。
721
+ ---
722
+ 成功したときは[PaginatedAccountBalance](#paginated-account-balance)オブジェクトを返します
324
723
 
724
+ #### エンドユーザーの失効済みの残高内訳を表示する
725
+ エンドユーザーのウォレット毎の失効済みの残高を有効期限別のリストとして取得します。
726
+ ```ruby
727
+ response = $client.send(Pokepay::Request::ListAccountExpiredBalances.new(
728
+ "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # account_id: ウォレットID
729
+ page: 7446, # ページ番号
730
+ per_page: 9384, # 1ページ分の取引数
731
+ expires_at_from: "2020-08-10T16:38:08.000000+09:00", # 有効期限の期間によるフィルター(開始時点)
732
+ expires_at_to: "2024-03-31T04:16:45.000000+09:00", # 有効期限の期間によるフィルター(終了時点)
733
+ direction: "asc" # 有効期限によるソート順序
734
+ ))
735
+ ```
736
+
737
+ ---
738
+ `account_id`
739
+ ウォレットIDです。
740
+
741
+ フィルターとして使われ、指定したウォレットIDのウォレット残高を取得します。
742
+
743
+ ---
744
+ `page`
745
+ 取得したいページ番号です。デフォルト値は1です。
746
+
747
+ ---
748
+ `per_page`
749
+ 1ページ分のウォレット残高数です。デフォルト値は30です。
750
+
751
+ ---
752
+ `expires_at_from`
753
+ 有効期限の期間によるフィルターの開始時点のタイムスタンプです。デフォルトでは未指定です。
754
+
755
+ ---
756
+ `expires_at_to`
757
+ 有効期限の期間によるフィルターの終了時点のタイムスタンプです。デフォルトでは未指定です。
758
+
759
+ ---
760
+ `direction`
761
+ 有効期限によるソートの順序を指定します。デフォルト値はdesc (降順)です。
762
+
763
+ ---
764
+ 成功したときは[PaginatedAccountBalance](#paginated-account-balance)オブジェクトを返します
765
+
766
+ #### 取引履歴を取得する
767
+ 取引一覧を返します。
325
768
  ```ruby
326
- response = client.send(Pokepay::Request::ListAccountBalances.new(
327
- "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # 口座ID
328
- ))
769
+ response = $client.send(Pokepay::Request::ListCustomerTransactions.new(
770
+ "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # private_money_id: マネーID
771
+ sender_customer_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # 送金エンドユーザーID
772
+ receiver_customer_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # 受取エンドユーザーID
773
+ type: "sFsWbo7bpQ", # 取引種別、チャージ=topup、支払い=payment、個人間送金=transfer
774
+ is_modified: true, # キャンセル済みかどうか
775
+ from: "2021-04-11T02:43:13.000000+09:00", # 開始日時
776
+ to: "2022-03-18T03:41:42.000000+09:00", # 終了日時
777
+ page: 1, # ページ番号
778
+ per_page: 50 # 1ページ分の取引数
779
+ ))
329
780
  ```
330
781
 
331
- 成功したときは `Pokepay::Response::AccountBalance` を `rows` に含むページングオブジェクトを返します。
332
- 詳細は [ページング](#paging) を参照してください。
782
+ ---
783
+ `private_money_id`
784
+ マネーIDです。
785
+ フィルターとして使われ、指定したマネーでの取引のみ一覧に表示されます。
333
786
 
334
- `Pokepay::Response::AccountBalance` のプロパティは以下の通りです。
787
+ ---
788
+ `sender_customer_id`
789
+ 送金ユーザーIDです。
335
790
 
336
- - expiresAt (DateTime): 失効日時
337
- - moneyAmount (double): マネー額
338
- - pointAmount (double): ポイント額
791
+ フィルターとして使われ、指定された送金ユーザーでの取引のみ一覧に表示されます。
792
+
793
+ ---
794
+ `receiver_customer_id`
795
+ 受取ユーザーIDです。
796
+
797
+ フィルターとして使われ、指定された受取ユーザーでの取引のみ一覧に表示されます。
798
+
799
+ ---
800
+ `type`
801
+ 取引の種類でフィルターします。
802
+
803
+ 以下の種類を指定できます。
804
+
805
+ 1. topup
806
+ 店舗からエンドユーザーへの送金取引(チャージ)
807
+ 2. payment
808
+ エンドユーザーから店舗への送金取引(支払い)
809
+ 3. exchange
810
+ 他マネーへの流出(outflow)/他マネーからの流入(inflow)
811
+ 4. transfer
812
+ 個人間送金
813
+
814
+ ---
815
+ `is_modified`
816
+ キャンセル済みかどうかを判定するフラグです。
817
+
818
+ これにtrueを指定するとキャンセルされた取引のみ一覧に表示されます。
819
+ falseを指定するとキャンセルされていない取引のみ一覧に表示されます
820
+ 何も指定しなければキャンセルの有無にかかわらず一覧に表示されます。
821
+
822
+ ---
823
+ `from`
824
+ 抽出期間の開始日時です。
825
+
826
+ フィルターとして使われ、開始日時以降に発生した取引のみ一覧に表示されます。
827
+
828
+ ---
829
+ `to`
830
+ 抽出期間の終了日時です。
831
+
832
+ フィルターとして使われ、終了日時以前に発生した取引のみ一覧に表示されます。
833
+
834
+ ---
835
+ `page`
836
+ 取得したいページ番号です。
837
+
838
+ ---
839
+ `per_page`
840
+ 1ページ分の取引数です。
841
+
842
+ ---
843
+ 成功したときは[PaginatedTransaction](#paginated-transaction)オブジェクトを返します
339
844
 
340
845
  ### Organization
341
846
 
342
847
  #### 新規加盟店組織を追加する
343
-
344
848
  ```ruby
345
- response = client.send(Pokepay::Request::CreateOrganization.new(
346
- "ox_supermarket", # 新規組織コード
347
- "oxスーパー", # 新規組織名
348
- "pay@xx-issuer-company.jp", # 発行体担当者メールアドレス
349
- "admin+pokepay@ox-supermarket.com", # 新規組織担当者メールアドレス
350
- {
351
- # 追加データ (すべて任意)
352
- "bank_name" => "XYZ銀行", # 銀行名
353
- "bank_code" => "999X", # 銀行金融機関コード
354
- "bank_branch_name" => "ABC支店", # 銀行支店名
355
- "bank_banch_code" => "99X", # 銀行支店コード
356
- "bank_account_type" => "saving", # 銀行口座種別 (普通=saving, 当座=current, その他=other)
357
- "bank_account" => "9999999", # 銀行口座番号
358
- "bank_account_holder_name" => "フクザワユキチ", # 口座名義人名
359
- }))
360
- ```
361
-
362
- 成功したときには以下のプロパティを持つ `Pokepay::Response::Organization` のオブジェクトをレスポンスとして返します。
363
-
364
- - code (string): 組織コード
365
- - name (string): 組織名
849
+ response = $client.send(Pokepay::Request::CreateOrganization.new(
850
+ "ox_supermarket", # code: 新規組織コード
851
+ "oxスーパー", # name: 新規組織名
852
+ ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"], # private_money_ids: 加盟店組織で有効にするマネーIDの配列
853
+ "PszkN335U1@t4DY.com", # issuer_admin_user_email: 発行体担当者メールアドレス
854
+ "suiE88p3Ho@g0k8.com", # member_admin_user_email: 新規組織担当者メールアドレス
855
+ bank_name: "XYZ銀行", # 銀行名
856
+ bank_code: "99X", # 銀行金融機関コード
857
+ bank_branch_name: "ABC支店", # 銀行支店名
858
+ bank_branch_code: "99X", # 銀行支店コード
859
+ bank_account_type: "saving", # 銀行口座種別 (普通=saving, 当座=current, その他=other)
860
+ bank_account: 9999999, # 銀行口座番号
861
+ bank_account_holder_name: "フクザワユキチ", # 口座名義人名
862
+ contact_name: "佐藤清" # 担当者名
863
+ ))
864
+ ```
865
+ 成功したときは[Organization](#organization)オブジェクトを返します
366
866
 
367
867
  ### Shop
368
868
 
369
869
  #### 新規店舗を追加する
870
+ ```ruby
871
+ response = $client.send(Pokepay::Request::CreateShop.new(
872
+ "oxスーパー三田店", # shop_name: 店舗名
873
+ shop_postal_code: "805-5907", # 店舗の郵便番号
874
+ shop_address: "東京都港区芝...", # 店舗の住所
875
+ shop_tel: "06-01122", # 店舗の電話番号
876
+ shop_email: "n8ATMTNMME@yVAp.com", # 店舗のメールアドレス
877
+ shop_external_id: "kaDeYuOtBoCZgc4gwc8RSE7", # 店舗の外部ID
878
+ organization_code: "ox-supermarket" # 組織コード
879
+ ))
880
+ ```
881
+ 成功したときは[User](#user)オブジェクトを返します
882
+
883
+ #### 店舗一覧を取得する
884
+ ```ruby
885
+ response = $client.send(Pokepay::Request::ListShops.new(
886
+ organization_code: "pocketchange", # 組織コード
887
+ private_money_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # マネーID
888
+ name: "oxスーパー三田店", # 店舗名
889
+ postal_code: "257-1310", # 店舗の郵便番号
890
+ address: "東京都港区芝...", # 店舗の住所
891
+ tel: "0689-859-5517", # 店舗の電話番号
892
+ email: "pb9AHk6UF1@UjWU.com", # 店舗のメールアドレス
893
+ external_id: "yw97H5Wi0UlM5hWRopq8fm3QjwrUJD", # 店舗の外部ID
894
+ page: 1, # ページ番号
895
+ per_page: 50 # 1ページ分の取引数
896
+ ))
897
+ ```
898
+
899
+ ---
900
+ `organization_code`
901
+ このパラメータを渡すとその組織の店舗のみが返され、省略すると加盟店も含む店舗が返されます。
902
+
903
+
904
+ ---
905
+ `private_money_id`
906
+ このパラメータを渡すとそのマネーのウォレットを持つ店舗のみが返されます。
370
907
 
908
+
909
+ ---
910
+ `name`
911
+ このパラメータを渡すとその名前の店舗のみが返されます。
912
+
913
+
914
+ ---
915
+ `postal_code`
916
+ このパラメータを渡すとその郵便番号が登録された店舗のみが返されます。
917
+
918
+
919
+ ---
920
+ `address`
921
+ このパラメータを渡すとその住所が登録された店舗のみが返されます。
922
+
923
+
924
+ ---
925
+ `tel`
926
+ このパラメータを渡すとその電話番号が登録された店舗のみが返されます。
927
+
928
+
929
+ ---
930
+ `email`
931
+ このパラメータを渡すとそのメールアドレスが登録された店舗のみが返されます。
932
+
933
+
934
+ ---
935
+ `external_id`
936
+ このパラメータを渡すとその外部IDが登録された店舗のみが返されます。
937
+
938
+
939
+ ---
940
+ `page`
941
+ 取得したいページ番号です。
942
+
943
+ ---
944
+ `per_page`
945
+ 1ページ分の取引数です。
946
+
947
+ ---
948
+ 成功したときは[PaginatedShops](#paginated-shops)オブジェクトを返します
949
+
950
+ ### Account
951
+
952
+ #### エンドユーザー、店舗ユーザーのウォレット一覧を表示する
953
+ ユーザーIDを指定してそのユーザーのウォレット一覧を取得します。
371
954
  ```ruby
372
- response = client.send(Pokepay::Request::CreateShop.new(
373
- "OXスーパー三田店", # 店舗名
374
- {
375
- # 追加データ (すべて任意)
376
- "shop_postal_code" => "108-0014", # 店舗の郵便番号
377
- "shop_address" => "東京都港区芝...", # 店舗の住所
378
- "shop_tel" => "03-xxxx...", # 店舗の電話番号
379
- "shop_email" => "mita@ox-supermarket.com", # 店舗のメールアドレス
380
- "shop_external_id" => "mita0309", # 店舗の外部ID
381
- }))
955
+ response = $client.send(Pokepay::Request::ListUserAccounts.new(
956
+ "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" # user_id: ユーザーID
957
+ ))
382
958
  ```
383
959
 
384
- 成功したときは以下のプロパティを持つ `Pokepay::Response::User` のオブジェクトをレスポンスとして返します。
960
+ ---
961
+ `user_id`
962
+ ユーザーIDです。
963
+
964
+ 指定したユーザーIDのウォレット一覧を取得します。パートナーキーと紐づく組織が発行しているマネーのウォレットのみが表示されます。
385
965
 
386
- - id (string): 店舗ID
387
- - name (string): 店舗名
388
- - isMerchant (bool): 店舗かどうかのフラグ (この場合は常に真)
966
+ ---
967
+ 成功したときは[PaginatedAccounts](#paginated-accounts)オブジェクトを返します
389
968
 
390
969
  ### Private Money
391
970
 
392
971
  #### 決済加盟店の取引サマリを取得する
972
+ ```ruby
973
+ response = $client.send(Pokepay::Request::GetPrivateMoneyOrganizationSummaries.new(
974
+ "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # private_money_id: マネーID
975
+ from: "2021-01-27T10:09:02.000000+09:00", # 開始日時(toと同時に指定する必要有)
976
+ to: "2016-02-05T23:42:53.000000+09:00", # 終了日時(fromと同時に指定する必要有)
977
+ page: 1, # ページ番号
978
+ per_page: 50 # 1ページ分の取引数
979
+ ))
980
+ ```
981
+ `from`と`to`は同時に指定する必要があります。
982
+
983
+ 成功したときは[PaginatedPrivateMoneyOrganizationSummaries](#paginated-private-money-organization-summaries)オブジェクトを返します
393
984
 
985
+ ### バルクチャージ
986
+
987
+ #### CSVファイル一括取引
988
+ CSVファイルから一括取引をします。
394
989
  ```ruby
395
- response = client.send(Pokepay::Request::GetPrivateMoneyOrganizationSummaries.new(
396
- "zzzzzzzz-zzzz-zzzz-zzzz-zzzzzzzzzzzz", # マネーのID
397
- {
398
- # フィルタオプション (すべて任意)
399
- # 期間指定 (ISO8601形式の文字列、またはDateTimeオブジェクト)
400
- # fromとtoを指定する場合は同時に指定する必要あり。
401
- # デフォルトではfromは昨日0時、toは当日0時。
402
- "from" => "2019-01-01T00:00:00+09:00",
403
- "to" => "2019-07-31T18:13:39+09:00",
404
-
405
- # ページングオプション
406
- "page" => 1,
407
- "per_page" => 50
408
- }))
409
- ```
410
-
411
- 成功したときは `Pokepay::Response::PrivateMoneyOrganizationSummary` を `rows` に含むページングオブジェクトを返します。
412
- 以下にプロパティを示します。
413
-
414
- - organizationCode (string): 組織コード
415
- - topup (Response::OrganizationSummary): チャージのサマリ情報
416
- - payment (Response::OrganizationSummary): 支払いのサマリ情報
417
-
418
- `Pokepay::Response::OrganizationSummary` のプロパティを以下に示します。
419
-
420
- - count (integer): 取引数
421
- - moneyAmount (double): 取引マネー総額
422
- - moneyCount (integer): マネー取引数
423
- - pointAmount (double): 取引ポイント総額
424
- - pointCount (integer): ポイント取引数
425
-
426
- ページングについての詳細は [ページング](#paging) を参照してください。
990
+ response = $client.send(Pokepay::Request::BulkCreateTransaction.new(
991
+ "IEgbGEOQG1PZp7fjd9", # name: 一括取引タスク名
992
+ "1zgh1", # content: 取引する情報のCSV
993
+ "RHHtL55R7YEprCJ0U4QnLZWmGvTqLQwaZ9vO", # request_id: リクエストID
994
+ description: "v67spoRoPKUgWvYVa3Gv9xbfzvgScohGvfvszFZKZ0fsirdyb8N5N4uLXeppDXZ9aq2pYugtiiL7qWoYElTKmZkEzCv7OKUa8NeEnF41oUMWRj1" # 一括取引の説明
995
+ ))
996
+ ```
997
+
998
+ ---
999
+ `name`
1000
+ 一括取引タスクの管理用の名前です。
1001
+
1002
+ ---
1003
+ `description`
1004
+ 一括取引タスクの管理用の説明文です。
1005
+
1006
+ ---
1007
+ `content`
1008
+ 一括取引する情報を書いたCSVの文字列です。
1009
+ 1行目はヘッダ行で、2行目以降の各行にカンマ区切りの取引データを含みます。
1010
+ カラムは以下の7つです。任意のカラムには空文字を指定します。
1011
+
1012
+ - `type`: 取引種別
1013
+ - 必須。'topup' または 'payment'
1014
+ - `sender_account_id`: 送金ウォレットID
1015
+ - 必須。UUID
1016
+ - `receiver_account_id`: 受取ウォレットID
1017
+ - 必須。UUID
1018
+ - `money_amount`: マネー額
1019
+ - 任意。ただし `point_amount` といずれかが必須。0以上の数字
1020
+ - `point_amount`: ポイント額
1021
+ - 任意。ただし `money_amount` といずれかが必須。0以上の数字
1022
+ - `bear_account_id`: ポイント負担ウォレットID
1023
+ - `point_amount` があるときは必須。UUID
1024
+ - `point_expires_at`: ポイントの有効期限
1025
+ - 任意。指定がないときはマネーに設定された有効期限を適用
1026
+
1027
+ ---
1028
+ `request_id`
1029
+ 重複したリクエストを判断するためのユニークID。ランダムな36字の文字列を生成して渡してください。
1030
+
1031
+ ---
1032
+ 成功したときは[BulkTransaction](#bulk-transaction)オブジェクトを返します
1033
+
1034
+ ## Responses
1035
+
1036
+
1037
+ <a name="account-with-user"></a>
1038
+ ## AccountWithUser
1039
+ * `id (string)`:
1040
+ * `name (string)`:
1041
+ * `is_suspended (boolean)`:
1042
+ * `private_money (PrivateMoney)`:
1043
+ * `user (User)`:
1044
+
1045
+ `private_money`は [PrivateMoney](#private-money) オブジェクトを返します。
1046
+
1047
+ `user`は [User](#user) オブジェクトを返します。
1048
+
1049
+ <a name="account-detail"></a>
1050
+ ## AccountDetail
1051
+ * `id (string)`:
1052
+ * `name (string)`:
1053
+ * `is_suspended (boolean)`:
1054
+ * `balance (double)`:
1055
+ * `money_balance (double)`:
1056
+ * `point_balance (double)`:
1057
+ * `private_money (PrivateMoney)`:
1058
+
1059
+ `private_money`は [PrivateMoney](#private-money) オブジェクトを返します。
1060
+
1061
+ <a name="bill"></a>
1062
+ ## Bill
1063
+ * `id (string)`: 支払いQRコードのID
1064
+ * `amount (double)`: 支払い額
1065
+ * `max_amount (double)`: 支払い額を範囲指定した場合の上限
1066
+ * `min_amount (double)`: 支払い額を範囲指定した場合の下限
1067
+ * `description (string)`: 支払いQRコードの説明文(アプリ上で取引の説明文として表示される)
1068
+ * `account (AccountWithUser)`: 支払いQRコード発行ウォレット
1069
+ * `is_disabled (boolean)`: 無効化されているかどうか
1070
+ * `token (string)`:
1071
+
1072
+ `account`は [AccountWithUser](#account-with-user) オブジェクトを返します。
1073
+
1074
+ <a name="check"></a>
1075
+ ## Check
1076
+ * `id (string)`: チャージQRコードのID
1077
+ * `amount (double)`: チャージマネー額 (deprecated)
1078
+ * `money_amount (double)`: チャージマネー額
1079
+ * `point_amount (double)`: チャージポイント額
1080
+ * `description (string)`: チャージQRコードの説明文(アプリ上で取引の説明文として表示される)
1081
+ * `user (User)`: 送金元ユーザ情報
1082
+ * `is_onetime (boolean)`: 使用回数が一回限りかどうか
1083
+ * `is_disabled (boolean)`: 無効化されているかどうか
1084
+ * `expires_at (string)`: チャージQRコード自体の失効日時
1085
+ * `private_money (PrivateMoney)`: 対象マネー情報
1086
+ * `usage_limit (integer)`: 一回限りでない場合の最大読み取り回数
1087
+ * `usage_count (double)`: 一回限りでない場合の現在までに読み取られた回数
1088
+ * `token (string)`: チャージQRコードを解析したときに出てくるURL
1089
+
1090
+ `user`は [User](#user) オブジェクトを返します。
1091
+
1092
+ `private_money`は [PrivateMoney](#private-money) オブジェクトを返します。
1093
+
1094
+ <a name="user"></a>
1095
+ ## User
1096
+ * `id (string)`: ユーザー (または店舗) ID
1097
+ * `name (string)`: ユーザー (または店舗) 名
1098
+ * `is_merchant (boolean)`: 店舗ユーザーかどうか
1099
+
1100
+ <a name="organization"></a>
1101
+ ## Organization
1102
+ * `code (string)`: 組織コード
1103
+ * `name (string)`: 組織名
1104
+
1105
+ <a name="transaction"></a>
1106
+ ## Transaction
1107
+ * `id (string)`: 取引ID
1108
+ * `type (string)`: 取引種別 (チャージ=topup, 支払い=payment)
1109
+ * `is_modified (boolean)`: 返金された取引かどうか
1110
+ * `sender (User)`: 送金者情報
1111
+ * `sender_account (Account)`: 送金ウォレット情報
1112
+ * `receiver (User)`: 受取者情報
1113
+ * `receiver_account (Account)`: 受取ウォレット情報
1114
+ * `amount (double)`: 決済総額 (マネー額 + ポイント額)
1115
+ * `money_amount (double)`: 決済マネー額
1116
+ * `point_amount (double)`: 決済ポイント額
1117
+ * `done_at (string)`: 取引日時
1118
+ * `description (string)`: 取引説明文
1119
+
1120
+ `receiver`と`sender`は [User](#user) オブジェクトを返します。
1121
+
1122
+ `receiver_account`と`sender_account`は [Account](#account) オブジェクトを返します。
1123
+
1124
+ <a name="bulk-transaction"></a>
1125
+ ## BulkTransaction
1126
+ * `request_id (string)`: リクエストID
1127
+ * `name (string)`: バルクチャージ管理用の名前
1128
+ * `description (string)`: バルクチャージ管理用の説明文
1129
+ * `status (string)`: バルクチャージの状態
1130
+ * `submitted_at (string)`: バルクチャージが登録された日時
1131
+ * `updated_at (string)`: バルクチャージが更新された日時
1132
+
1133
+ <a name="transfer"></a>
1134
+ ## Transfer
1135
+ * `id (string)`:
1136
+ * `sender_account (AccountWithoutPrivateMoneyDetail)`:
1137
+ * `receiver_account (AccountWithoutPrivateMoneyDetail)`:
1138
+ * `amount (double)`:
1139
+ * `money_amount (double)`:
1140
+ * `point_amount (double)`:
1141
+ * `done_at (string)`:
1142
+ * `type (string)`:
1143
+ * `description (string)`:
1144
+ * `transaction_id (string)`:
1145
+
1146
+ `receiver_account`と`sender_account`は [AccountWithoutPrivateMoneyDetail](#account-without-private-money-detail) オブジェクトを返します。
1147
+
1148
+ <a name="paginated-private-money-organization-summaries"></a>
1149
+ ## PaginatedPrivateMoneyOrganizationSummaries
1150
+ * `rows (array of PrivateMoneyOrganizationSummaries)`:
1151
+ * `count (integer)`:
1152
+ * `pagination (Pagination)`:
1153
+
1154
+ `rows`は [PrivateMoneyOrganizationSummary](#private-money-organization-summary) オブジェクトの配列を返します。
1155
+
1156
+ `pagination`は [Pagination](#pagination) オブジェクトを返します。
1157
+
1158
+ <a name="paginated-transaction"></a>
1159
+ ## PaginatedTransaction
1160
+ * `rows (array of Transactions)`:
1161
+ * `count (integer)`:
1162
+ * `pagination (Pagination)`:
1163
+
1164
+ `rows`は [Transaction](#transaction) オブジェクトの配列を返します。
1165
+
1166
+ `pagination`は [Pagination](#pagination) オブジェクトを返します。
1167
+
1168
+ <a name="paginated-accounts"></a>
1169
+ ## PaginatedAccounts
1170
+ * `rows (array of Accounts)`:
1171
+ * `count (integer)`:
1172
+ * `pagination (Pagination)`:
1173
+
1174
+ `rows`は [Account](#account) オブジェクトの配列を返します。
1175
+
1176
+ `pagination`は [Pagination](#pagination) オブジェクトを返します。
1177
+
1178
+ <a name="paginated-account-balance"></a>
1179
+ ## PaginatedAccountBalance
1180
+ * `rows (array of AccountBalances)`:
1181
+ * `count (integer)`:
1182
+ * `pagination (Pagination)`:
1183
+
1184
+ `rows`は [AccountBalance](#account-balance) オブジェクトの配列を返します。
1185
+
1186
+ `pagination`は [Pagination](#pagination) オブジェクトを返します。
1187
+
1188
+ <a name="paginated-shops"></a>
1189
+ ## PaginatedShops
1190
+ * `rows (array of ShopWithMetadatas)`:
1191
+ * `count (integer)`:
1192
+ * `pagination (Pagination)`:
1193
+
1194
+ `rows`は [ShopWithMetadata](#shop-with-metadata) オブジェクトの配列を返します。
1195
+
1196
+ `pagination`は [Pagination](#pagination) オブジェクトを返します。
1197
+
1198
+ <a name="paginated-bills"></a>
1199
+ ## PaginatedBills
1200
+ * `rows (array of Bills)`:
1201
+ * `count (integer)`:
1202
+ * `pagination (Pagination)`:
1203
+
1204
+ `rows`は [Bill](#bill) オブジェクトの配列を返します。
1205
+
1206
+ `pagination`は [Pagination](#pagination) オブジェクトを返します。
1207
+
1208
+ <a name="private-money"></a>
1209
+ ## PrivateMoney
1210
+ * `id (string)`: マネーID
1211
+ * `name (string)`: マネー名
1212
+ * `unit (string)`: マネー単位 (例: 円)
1213
+ * `is_exclusive (boolean)`: 会員制のマネーかどうか
1214
+ * `description (string)`: マネー説明文
1215
+ * `oneline_message (string)`: マネーの要約
1216
+ * `organization (Organization)`: マネーを発行した組織
1217
+ * `max_balance (double)`: ウォレットの上限金額
1218
+ * `transfer_limit (double)`: マネーの取引上限額
1219
+ * `type (string)`: マネー種別 (自家型=own, 第三者型=third-party)
1220
+ * `expiration_type (string)`: 有効期限種別 (チャージ日起算=static, 最終利用日起算=last-update, 最終チャージ日起算=last-topup-update)
1221
+ * `enable_topup_by_member (boolean)`: 加盟店によるチャージが有効かどうか
1222
+ * `account_image (string)`: マネーの画像URL
1223
+
1224
+ `organization`は [Organization](#organization) オブジェクトを返します。
1225
+
1226
+ <a name="account"></a>
1227
+ ## Account
1228
+ * `id (string)`: ウォレットID
1229
+ * `name (string)`: ウォレット名
1230
+ * `is_suspended (boolean)`: ウォレットが凍結されているかどうか
1231
+ * `private_money (PrivateMoney)`: 設定マネー情報
1232
+
1233
+ `private_money`は [PrivateMoney](#private-money) オブジェクトを返します。
1234
+
1235
+ <a name="account-without-private-money-detail"></a>
1236
+ ## AccountWithoutPrivateMoneyDetail
1237
+ * `id (string)`:
1238
+ * `name (string)`:
1239
+ * `is_suspended (boolean)`:
1240
+ * `private_money_id (string)`:
1241
+ * `user (User)`:
1242
+
1243
+ `user`は [User](#user) オブジェクトを返します。
1244
+
1245
+ <a name="private-money-organization-summary"></a>
1246
+ ## PrivateMoneyOrganizationSummary
1247
+ * `organization_code (string)`:
1248
+ * `topup (OrganizationSummary)`:
1249
+ * `payment (OrganizationSummary)`:
1250
+
1251
+ `payment`と`topup`は [OrganizationSummary](#organization-summary) オブジェクトを返します。
1252
+
1253
+ <a name="pagination"></a>
1254
+ ## Pagination
1255
+ * `current (integer)`:
1256
+ * `per_page (integer)`:
1257
+ * `max_page (integer)`:
1258
+ * `has_prev (boolean)`:
1259
+ * `has_next (boolean)`:
1260
+
1261
+ <a name="account-balance"></a>
1262
+ ## AccountBalance
1263
+ * `expires_at (string)`:
1264
+ * `money_amount (double)`:
1265
+ * `point_amount (double)`:
1266
+
1267
+ <a name="shop-with-metadata"></a>
1268
+ ## ShopWithMetadata
1269
+ * `id (string)`: 店舗ID
1270
+ * `name (string)`: 店舗名
1271
+ * `organization_code (string)`: 組織コード
1272
+ * `postal_code (string)`: 店舗の郵便番号
1273
+ * `address (string)`: 店舗の住所
1274
+ * `tel (string)`: 店舗の電話番号
1275
+ * `email (string)`: 店舗のメールアドレス
1276
+ * `external_id (string)`: 店舗の外部ID