pokepay_partner_ruby_sdk 0.1.15.1 → 0.1.19

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 (40) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/README.md +1 -1
  4. data/docs/index.md +1802 -198
  5. data/lib/pokepay_partner_ruby_sdk/client.rb +8 -0
  6. data/lib/pokepay_partner_ruby_sdk/request/create_campaign.rb +20 -0
  7. data/lib/pokepay_partner_ruby_sdk/request/create_cpm_transaction.rb +2 -2
  8. data/lib/pokepay_partner_ruby_sdk/request/create_exchange_transaction.rb +2 -2
  9. data/lib/pokepay_partner_ruby_sdk/request/create_external_transaction.rb +18 -0
  10. data/lib/pokepay_partner_ruby_sdk/request/create_payment_transaction.rb +2 -2
  11. data/lib/pokepay_partner_ruby_sdk/request/create_topup_transaction.rb +2 -2
  12. data/lib/pokepay_partner_ruby_sdk/request/create_topup_transaction_with_check.rb +2 -2
  13. data/lib/pokepay_partner_ruby_sdk/request/create_transaction.rb +2 -2
  14. data/lib/pokepay_partner_ruby_sdk/request/create_transfer_transaction.rb +2 -2
  15. data/lib/pokepay_partner_ruby_sdk/request/create_user_account.rb +15 -0
  16. data/lib/pokepay_partner_ruby_sdk/request/delete_account.rb +15 -0
  17. data/lib/pokepay_partner_ruby_sdk/request/get_campaign.rb +15 -0
  18. data/lib/pokepay_partner_ruby_sdk/request/get_transaction.rb +2 -2
  19. data/lib/pokepay_partner_ruby_sdk/request/list_campaigns.rb +15 -0
  20. data/lib/pokepay_partner_ruby_sdk/request/list_transactions_v2.rb +15 -0
  21. data/lib/pokepay_partner_ruby_sdk/request/list_user_accounts.rb +2 -2
  22. data/lib/pokepay_partner_ruby_sdk/request/refund_external_transaction.rb +15 -0
  23. data/lib/pokepay_partner_ruby_sdk/request/refund_transaction.rb +2 -2
  24. data/lib/pokepay_partner_ruby_sdk/request/update_campaign.rb +15 -0
  25. data/lib/pokepay_partner_ruby_sdk/request/update_customer_account.rb +15 -0
  26. data/lib/pokepay_partner_ruby_sdk/response/account.rb +3 -0
  27. data/lib/pokepay_partner_ruby_sdk/response/account_deleted.rb +11 -0
  28. data/lib/pokepay_partner_ruby_sdk/response/account_detail.rb +5 -0
  29. data/lib/pokepay_partner_ruby_sdk/response/account_status.rb +11 -0
  30. data/lib/pokepay_partner_ruby_sdk/response/account_with_user.rb +3 -0
  31. data/lib/pokepay_partner_ruby_sdk/response/account_without_private_money_detail.rb +3 -0
  32. data/lib/pokepay_partner_ruby_sdk/response/campaign.rb +44 -0
  33. data/lib/pokepay_partner_ruby_sdk/response/paginated_campaigns.rb +16 -0
  34. data/lib/pokepay_partner_ruby_sdk/response/paginated_transaction_v2.rb +19 -0
  35. data/lib/pokepay_partner_ruby_sdk/response/private_money.rb +2 -0
  36. data/lib/pokepay_partner_ruby_sdk/response/transaction_detail.rb +39 -0
  37. data/lib/pokepay_partner_ruby_sdk/version.rb +1 -1
  38. data/lib/pokepay_partner_ruby_sdk.rb +16 -0
  39. data/partner.yaml +1866 -76
  40. metadata +18 -2
data/docs/index.md CHANGED
@@ -159,6 +159,7 @@ response.body
159
159
  - [GetCpmToken](#get-cpm-token): CPMトークンの状態取得
160
160
  - [ListTransactions](#list-transactions): 取引履歴を取得する
161
161
  - [CreateTransaction](#create-transaction): チャージする(廃止予定)
162
+ - [ListTransactionsV2](#list-transactions-v2): 取引履歴を取得する
162
163
  - [CreateTopupTransaction](#create-topup-transaction): チャージする
163
164
  - [CreatePaymentTransaction](#create-payment-transaction): 支払いする
164
165
  - [CreateCpmTransaction](#create-cpm-transaction): CPMトークンによる取引作成
@@ -167,6 +168,7 @@ response.body
167
168
  - [GetTransaction](#get-transaction): 取引情報を取得する
168
169
  - [RefundTransaction](#refund-transaction): 取引をキャンセルする
169
170
  - [ListTransfers](#list-transfers):
171
+ - [CreateCheck](#create-check): チャージQRコードの発行
170
172
  - [CreateTopupTransactionWithCheck](#create-topup-transaction-with-check): チャージQRコードを読み取ることでチャージする
171
173
  - [ListBills](#list-bills): 支払いQRコード一覧を表示する
172
174
  - [CreateBill](#create-bill): 支払いQRコードの発行
@@ -177,8 +179,10 @@ response.body
177
179
  - [UpdateCashtray](#update-cashtray): Cashtrayの情報を更新する
178
180
  - [GetAccount](#get-account): ウォレット情報を表示する
179
181
  - [UpdateAccount](#update-account): ウォレット情報を更新する
182
+ - [DeleteAccount](#delete-account): ウォレットを退会する
180
183
  - [ListAccountBalances](#list-account-balances): エンドユーザーの残高内訳を表示する
181
184
  - [ListAccountExpiredBalances](#list-account-expired-balances): エンドユーザーの失効済みの残高内訳を表示する
185
+ - [UpdateCustomerAccount](#update-customer-account): ウォレット情報を更新する
182
186
  - [GetCustomerAccounts](#get-customer-accounts): エンドユーザーのウォレット一覧を表示する
183
187
  - [CreateCustomerAccount](#create-customer-account): 新規エンドユーザーウォレットを追加する
184
188
  - [GetShopAccounts](#get-shop-accounts): 店舗ユーザーのウォレット一覧を表示する
@@ -189,16 +193,23 @@ response.body
189
193
  - [GetShop](#get-shop): 店舗情報を表示する
190
194
  - [UpdateShop](#update-shop): 店舗情報を更新する
191
195
  - [ListUserAccounts](#list-user-accounts): エンドユーザー、店舗ユーザーのウォレット一覧を表示する
196
+ - [CreateUserAccount](#create-user-account): エンドユーザーのウォレットを作成する
192
197
  - [GetPrivateMoneys](#get-private-moneys): マネー一覧を取得する
193
198
  - [GetPrivateMoneyOrganizationSummaries](#get-private-money-organization-summaries): 決済加盟店の取引サマリを取得する
194
199
  - [BulkCreateTransaction](#bulk-create-transaction): CSVファイル一括取引
200
+ - [CreateExternalTransaction](#create-external-transaction): ポケペイ外部取引を作成する
201
+ - [RefundExternalTransaction](#refund-external-transaction): ポケペイ外部取引をキャンセルする
202
+ - [CreateCampaign](#create-campaign): ポイント付与キャンペーンを作る
203
+ - [ListCampaigns](#list-campaigns): キャンペーン一覧を取得する
204
+ - [GetCampaign](#get-campaign): キャンペーンを取得する
205
+ - [UpdateCampaign](#update-campaign): ポイント付与キャンペーンを更新する
195
206
  ### Transaction
196
207
  <a name="get-cpm-token"></a>
197
208
  #### CPMトークンの状態取得
198
209
  CPMトークンの現在の状態を取得します。CPMトークンの有効期限やCPM取引の状態を返します。
199
210
  ```ruby
200
211
  response = $client.send(Pokepay::Request::GetCpmToken.new(
201
- "EKYDjBWPKCwbirzvScUvjs" # cpm_token: CPMトークン
212
+ "C0yIYDrOmfZvcfCdES8HHJ" # cpm_token: CPMトークン
202
213
  ))
203
214
  ```
204
215
 
@@ -220,8 +231,8 @@ CPM取引時にエンドユーザーが店舗に提示するバーコードを
220
231
  取引一覧を返します。
221
232
  ```ruby
222
233
  response = $client.send(Pokepay::Request::ListTransactions.new(
223
- from: "2023-06-11T07:51:21.000000+09:00", # 開始日時
224
- to: "2022-06-22T01:22:59.000000+09:00", # 終了日時
234
+ from: "2023-04-24T17:11:07.000000+09:00", # 開始日時
235
+ to: "2024-11-07T01:32:00.000000+09:00", # 終了日時
225
236
  page: 1, # ページ番号
226
237
  per_page: 50, # 1ページ分の取引数
227
238
  shop_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # 店舗ID
@@ -231,7 +242,7 @@ response = $client.send(Pokepay::Request::ListTransactions.new(
231
242
  transaction_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # 取引ID
232
243
  organization_code: "pocketchange", # 組織コード
233
244
  private_money_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # マネーID
234
- is_modified: false, # キャンセルフラグ
245
+ is_modified: true, # キャンセルフラグ
235
246
  types: ["topup", "payment"], # 取引種別 (複数指定可)、チャージ=topup、支払い=payment
236
247
  description: "店頭QRコードによる支払い" # 取引説明文
237
248
  ))
@@ -385,7 +396,8 @@ response = $client.send(Pokepay::Request::ListTransactions.new(
385
396
  "type": "string",
386
397
  "enum": {
387
398
  "topup": "payment",
388
- "exchange_outflow": "exchange_inflow"
399
+ "exchange_outflow": "exchange_inflow",
400
+ "cashback": "expire"
389
401
  }
390
402
  }
391
403
  }
@@ -401,11 +413,17 @@ response = $client.send(Pokepay::Request::ListTransactions.new(
401
413
  エンドユーザーから店舗への送金取引(支払い)
402
414
 
403
415
  3. exchange-outflow
404
-   他マネーへの流出
416
+ 他マネーへの流出
405
417
 
406
418
  4. exchange-inflow
407
419
  他マネーからの流入
408
420
 
421
+ 5. cashback
422
+ 退会時返金取引
423
+
424
+ 6. expire
425
+ 退会時失効取引
426
+
409
427
  ---
410
428
  `description`
411
429
  ```json
@@ -428,10 +446,10 @@ response = $client.send(Pokepay::Request::CreateTransaction.new(
428
446
  "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
429
447
  "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
430
448
  "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
431
- money_amount: 4169,
432
- point_amount: 2565,
433
- point_expires_at: "2022-07-08T13:32:38.000000+09:00", # ポイント有効期限
434
- description: "jFPIL9qlVMwg0ANEHCj5eM805Swtsg2NkJBDvuxWoqdLq3QmHRbZpwbPRidVG7B6hajGJrCJBxTKH0YU"
449
+ money_amount: 1212,
450
+ point_amount: 5173,
451
+ point_expires_at: "2022-02-09T19:38:20.000000+09:00", # ポイント有効期限
452
+ description: "C5y2HNrP34hD1uxIbudPgKcAH4LqtvnYdJrsgVxWy0PirB5ccKSjPsnaJy0xSUaUZ3KYipGveNp11WiSr08uCzB0JSt7hZNL6cvcqBnhGnyRs1ZbgEX46DL0EY9Dfg2K2KSBJ32yceHkpeJS53rQYr"
435
453
  ))
436
454
  ```
437
455
 
@@ -447,7 +465,230 @@ response = $client.send(Pokepay::Request::CreateTransaction.new(
447
465
  省略した場合はマネーに設定された有効期限と同じものがポイントの有効期限となります。
448
466
 
449
467
  ---
450
- 成功したときは[Transaction](#transaction)オブジェクトを返します
468
+ 成功したときは[TransactionDetail](#transaction-detail)オブジェクトを返します
469
+ <a name="list-transactions-v2"></a>
470
+ #### 取引履歴を取得する
471
+ 取引一覧を返します。
472
+ ```ruby
473
+ response = $client.send(Pokepay::Request::ListTransactionsV2.new(
474
+ "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # private_money_id: マネーID
475
+ organization_code: "pocketchange", # 組織コード
476
+ shop_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # 店舗ID
477
+ terminal_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # 端末ID
478
+ customer_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # エンドユーザーID
479
+ customer_name: "太郎", # エンドユーザー名
480
+ description: "店頭QRコードによる支払い", # 取引説明文
481
+ transaction_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # 取引ID
482
+ is_modified: false, # キャンセルフラグ
483
+ types: ["topup", "payment"], # 取引種別 (複数指定可)、チャージ=topup、支払い=payment
484
+ from: "2019-08-22T02:18:51.000000+09:00", # 開始日時
485
+ to: "2022-04-21T22:06:05.000000+09:00", # 終了日時
486
+ next_page_cursor_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # 次のページへ遷移する際に起点となるtransactionのuuid
487
+ prev_page_cursor_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # 前のページへ遷移する際に起点となるtransactionのuuid
488
+ per_page: 50 # 1ページ分の取引数
489
+ ))
490
+ ```
491
+
492
+ ---
493
+ `private_money_id`
494
+ ```json
495
+ {
496
+ "type": "string",
497
+ "format": "uuid"
498
+ }
499
+ ```
500
+ マネーIDです。
501
+
502
+ 指定したマネーでの取引が一覧に表示されます。
503
+
504
+ ---
505
+ `organization_code`
506
+ ```json
507
+ {
508
+ "type": "string",
509
+ "maxLength": 32,
510
+ "pattern": "^[a-zA-Z0-9-]*$"
511
+ }
512
+ ```
513
+ 組織コードです。
514
+
515
+ フィルターとして使われ、指定された組織での取引のみ一覧に表示されます。
516
+
517
+ ---
518
+ `shop_id`
519
+ ```json
520
+ {
521
+ "type": "string",
522
+ "format": "uuid"
523
+ }
524
+ ```
525
+ 店舗IDです。
526
+
527
+ フィルターとして使われ、指定された店舗での取引のみ一覧に表示されます。
528
+
529
+ ---
530
+ `terminal_id`
531
+ ```json
532
+ {
533
+ "type": "string",
534
+ "format": "uuid"
535
+ }
536
+ ```
537
+ 端末IDです。
538
+
539
+ フィルターとして使われ、指定された端末での取引のみ一覧に表示されます。
540
+
541
+ ---
542
+ `customer_id`
543
+ ```json
544
+ {
545
+ "type": "string",
546
+ "format": "uuid"
547
+ }
548
+ ```
549
+ エンドユーザーIDです。
550
+
551
+ フィルターとして使われ、指定されたエンドユーザーでの取引のみ一覧に表示されます。
552
+
553
+ ---
554
+ `customer_name`
555
+ ```json
556
+ {
557
+ "type": "string",
558
+ "maxLength": 256
559
+ }
560
+ ```
561
+ エンドユーザー名です。
562
+
563
+ フィルターとして使われ、入力された名前に部分一致するエンドユーザーでの取引のみ一覧に表示されます。
564
+
565
+ ---
566
+ `description`
567
+ ```json
568
+ {
569
+ "type": "string",
570
+ "maxLength": 200
571
+ }
572
+ ```
573
+ 取引を指定の取引説明文でフィルターします。
574
+
575
+ 取引説明文が完全一致する取引のみ抽出されます。取引説明文は最大200文字で記録されています。
576
+
577
+ ---
578
+ `transaction_id`
579
+ ```json
580
+ {
581
+ "type": "string",
582
+ "format": "uuid"
583
+ }
584
+ ```
585
+ 取引IDです。
586
+
587
+ フィルターとして使われ、指定された取引のみ一覧に表示されます。
588
+
589
+ ---
590
+ `is_modified`
591
+ ```json
592
+ { "type": "boolean" }
593
+ ```
594
+ キャンセルフラグです。
595
+
596
+ これにtrueを指定するとキャンセルされた取引のみ一覧に表示されます。
597
+ デフォルト値はfalseで、キャンセルの有無にかかわらず一覧に表示されます。
598
+
599
+ ---
600
+ `types`
601
+ ```json
602
+ {
603
+ "type": "array",
604
+ "items": {
605
+ "type": "string",
606
+ "enum": [ "topup", "payment", "exchange_outflow", "exchange_inflow", "cashback" ]
607
+ }
608
+ }
609
+ ```
610
+ 取引の種類でフィルターします。
611
+
612
+ 以下の種類を指定できます。
613
+
614
+ 1. topup
615
+ 店舗からエンドユーザーへの送金取引(チャージ)
616
+
617
+ 2. payment
618
+ エンドユーザーから店舗への送金取引(支払い)
619
+
620
+ 3. exchange-outflow
621
+ 他マネーへの流出
622
+
623
+ 4. exchange-inflow
624
+ 他マネーからの流入
625
+
626
+ 5. cashback
627
+ 退会時返金取引
628
+
629
+ ---
630
+ `from`
631
+ ```json
632
+ {
633
+ "type": "string",
634
+ "format": "date-time"
635
+ }
636
+ ```
637
+ 抽出期間の開始日時です。
638
+
639
+ フィルターとして使われ、開始日時以降に発生した取引のみ一覧に表示されます。
640
+
641
+ ---
642
+ `to`
643
+ ```json
644
+ {
645
+ "type": "string",
646
+ "format": "date-time"
647
+ }
648
+ ```
649
+ 抽出期間の終了日時です。
650
+
651
+ フィルターとして使われ、終了日時以前に発生した取引のみ一覧に表示されます。
652
+
653
+ ---
654
+ `next_page_cursor_id`
655
+ ```json
656
+ {
657
+ "type": "string",
658
+ "format": "uuid"
659
+ }
660
+ ```
661
+ 次のページへ遷移する際に起点となるtransactionのuuid(前のページの末尾の要素のuuid)です。
662
+
663
+ prev_page_cursor_idのtransaction自体は次のページには含まれない。
664
+
665
+ ---
666
+ `prev_page_cursor_id`
667
+ ```json
668
+ {
669
+ "type": "string",
670
+ "format": "uuid"
671
+ }
672
+ ```
673
+ 前のページへ遷移する際に起点となるtransactionのuuid(次のページの先頭の要素のuuid)です。
674
+
675
+ next_page_cursor_idのtransaction自体は前のページには含まれない。
676
+
677
+ ---
678
+ `per_page`
679
+ ```json
680
+ {
681
+ "type": "integer",
682
+ "minimum": 1,
683
+ "maximum": 100
684
+ }
685
+ ```
686
+ 1ページ分の取引数です。
687
+
688
+ デフォルト値は50です。
689
+
690
+ ---
691
+ 成功したときは[PaginatedTransactionV2](#paginated-transaction-v2)オブジェクトを返します
451
692
  <a name="create-topup-transaction"></a>
452
693
  #### チャージする
453
694
  チャージ取引を作成します。
@@ -457,9 +698,9 @@ response = $client.send(Pokepay::Request::CreateTopupTransaction.new(
457
698
  "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # customer_id: エンドユーザーのID
458
699
  "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # private_money_id: マネーID
459
700
  bear_point_shop_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # ポイント支払時の負担店舗ID
460
- money_amount: 6743, # マネー額
461
- point_amount: 734, # ポイント額
462
- point_expires_at: "2025-05-30T13:08:03.000000+09:00", # ポイント有効期限
701
+ money_amount: 3318, # マネー額
702
+ point_amount: 9708, # ポイント額
703
+ point_expires_at: "2023-10-20T19:24:03.000000+09:00", # ポイント有効期限
463
704
  description: "初夏のチャージキャンペーン", # 取引履歴に表示する説明文
464
705
  metadata: "{\"key\":\"value\"}", # 取引メタデータ
465
706
  request_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" # リクエストID
@@ -518,25 +759,27 @@ response = $client.send(Pokepay::Request::CreateTopupTransaction.new(
518
759
  `money_amount`
519
760
  ```json
520
761
  {
521
- "type": "number",
762
+ "type": "integer",
522
763
  "minimum": 0
523
764
  }
524
765
  ```
525
766
  マネー額です。
526
767
 
527
768
  送金するマネー額を指定します。
769
+ デフォルト値は0で、money_amountとpoint_amountの両方が0のときにはinvalid_parameter_both_point_and_money_are_zero(エラーコード400)が返ります。
528
770
 
529
771
  ---
530
772
  `point_amount`
531
773
  ```json
532
774
  {
533
- "type": "number",
775
+ "type": "integer",
534
776
  "minimum": 0
535
777
  }
536
778
  ```
537
779
  ポイント額です。
538
780
 
539
781
  送金するポイント額を指定します。
782
+ デフォルト値は0で、money_amountとpoint_amountの両方が0のときにはinvalid_parameter_both_point_and_money_are_zero(エラーコード400)が返ります。
540
783
 
541
784
  ---
542
785
  `point_expires_at`
@@ -588,7 +831,7 @@ response = $client.send(Pokepay::Request::CreateTopupTransaction.new(
588
831
  リクエストIDを指定したとき、まだそのリクエストIDに対する取引がない場合、新規に取引が作られレスポンスとして返されます。もしそのリクエストIDに対する取引が既にある場合、既存の取引がレスポンスとして返されます。
589
832
 
590
833
  ---
591
- 成功したときは[Transaction](#transaction)オブジェクトを返します
834
+ 成功したときは[TransactionDetail](#transaction-detail)オブジェクトを返します
592
835
  <a name="create-payment-transaction"></a>
593
836
  #### 支払いする
594
837
  支払取引を作成します。
@@ -599,7 +842,7 @@ response = $client.send(Pokepay::Request::CreatePaymentTransaction.new(
599
842
  "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # shop_id: 店舗ID
600
843
  "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # customer_id: エンドユーザーID
601
844
  "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # private_money_id: マネーID
602
- 2221, # amount: 支払い額
845
+ 5365, # amount: 支払い額
603
846
  description: "たい焼き(小倉)", # 取引履歴に表示する説明文
604
847
  metadata: "{\"key\":\"value\"}", # 取引メタデータ
605
848
  products: [{"jan_code":"abc",
@@ -607,6 +850,16 @@ response = $client.send(Pokepay::Request::CreatePaymentTransaction.new(
607
850
  "unit_price":100,
608
851
  "price": 100,
609
852
  "is_discounted": false,
853
+ "other":"{}"}, {"jan_code":"abc",
854
+ "name":"name1",
855
+ "unit_price":100,
856
+ "price": 100,
857
+ "is_discounted": false,
858
+ "other":"{}"}, {"jan_code":"abc",
859
+ "name":"name1",
860
+ "unit_price":100,
861
+ "price": 100,
862
+ "is_discounted": false,
610
863
  "other":"{}"}], # 商品情報データ
611
864
  request_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" # リクエストID
612
865
  ))
@@ -652,7 +905,7 @@ response = $client.send(Pokepay::Request::CreatePaymentTransaction.new(
652
905
  `amount`
653
906
  ```json
654
907
  {
655
- "type": "number",
908
+ "type": "integer",
656
909
  "minimum": 0
657
910
  }
658
911
  ```
@@ -717,7 +970,7 @@ response = $client.send(Pokepay::Request::CreatePaymentTransaction.new(
717
970
  リクエストIDを指定したとき、まだそのリクエストIDに対する取引がない場合、新規に取引が作られレスポンスとして返されます。もしそのリクエストIDに対する取引が既にある場合、既存の取引がレスポンスとして返されます。
718
971
 
719
972
  ---
720
- 成功したときは[Transaction](#transaction)オブジェクトを返します
973
+ 成功したときは[TransactionDetail](#transaction-detail)オブジェクトを返します
721
974
  <a name="create-cpm-transaction"></a>
722
975
  #### CPMトークンによる取引作成
723
976
  CPMトークンにより取引を作成します。
@@ -725,9 +978,9 @@ CPMトークンに設定されたスコープの取引を作ることができ
725
978
 
726
979
  ```ruby
727
980
  response = $client.send(Pokepay::Request::CreateCpmTransaction.new(
728
- "iwJJuJPCjlaztijN3vebjT", # cpm_token: CPMトークン
981
+ "lhP5RwfRsdmSnnsKFojcLO", # cpm_token: CPMトークン
729
982
  "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # shop_id: 店舗ID
730
- 9912, # amount: 取引金額
983
+ 3648, # amount: 取引金額
731
984
  description: "たい焼き(小倉)", # 取引説明文
732
985
  metadata: "{\"key\":\"value\"}", # 店舗側メタデータ
733
986
  products: [{"jan_code":"abc",
@@ -740,11 +993,6 @@ response = $client.send(Pokepay::Request::CreateCpmTransaction.new(
740
993
  "unit_price":100,
741
994
  "price": 100,
742
995
  "is_discounted": false,
743
- "other":"{}"}, {"jan_code":"abc",
744
- "name":"name1",
745
- "unit_price":100,
746
- "price": 100,
747
- "is_discounted": false,
748
996
  "other":"{}"}], # 商品情報データ
749
997
  request_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" # リクエストID
750
998
  ))
@@ -841,7 +1089,7 @@ response = $client.send(Pokepay::Request::CreateCpmTransaction.new(
841
1089
  リクエストIDを指定したとき、まだそのリクエストIDに対する取引がない場合、新規に取引が作られレスポンスとして返されます。もしそのリクエストIDに対する取引が既にある場合、既存の取引がレスポンスとして返されます。
842
1090
 
843
1091
  ---
844
- 成功したときは[Transaction](#transaction)オブジェクトを返します
1092
+ 成功したときは[TransactionDetail](#transaction-detail)オブジェクトを返します
845
1093
  <a name="create-transfer-transaction"></a>
846
1094
  #### 個人間送金
847
1095
  エンドユーザー間での送金取引(個人間送金)を作成します。
@@ -852,7 +1100,7 @@ response = $client.send(Pokepay::Request::CreateTransferTransaction.new(
852
1100
  "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # sender_id: 送金元ユーザーID
853
1101
  "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # receiver_id: 受取ユーザーID
854
1102
  "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # private_money_id: マネーID
855
- 1306, # amount: 送金額
1103
+ 1909, # amount: 送金額
856
1104
  metadata: "{\"key\":\"value\"}", # 取引メタデータ
857
1105
  description: "たい焼き(小倉)", # 取引履歴に表示する説明文
858
1106
  request_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" # リクエストID
@@ -946,7 +1194,7 @@ response = $client.send(Pokepay::Request::CreateTransferTransaction.new(
946
1194
  リクエストIDを指定したとき、まだそのリクエストIDに対する取引がない場合、新規に取引が作られレスポンスとして返されます。もしそのリクエストIDに対する取引が既にある場合、既存の取引がレスポンスとして返されます。
947
1195
 
948
1196
  ---
949
- 成功したときは[Transaction](#transaction)オブジェクトを返します
1197
+ 成功したときは[TransactionDetail](#transaction-detail)オブジェクトを返します
950
1198
  <a name="create-exchange-transaction"></a>
951
1199
  ####
952
1200
  ```ruby
@@ -954,8 +1202,8 @@ response = $client.send(Pokepay::Request::CreateExchangeTransaction.new(
954
1202
  "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
955
1203
  "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
956
1204
  "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
957
- 9015,
958
- description: "9RjYRPCqvnZ1YzdrhG",
1205
+ 1214,
1206
+ description: "rZaaP5zVuitJAWBnMTQrqQLb4F279GcsdDtM3uSEYbuaOy1AtJbZFvX4DTrnYj6rE9HuWGm5xmBEPErYjV24xKSbfZiVFE1mx2zGT1xfUftI30JyBIPqdC",
959
1207
  request_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" # リクエストID
960
1208
  ))
961
1209
  ```
@@ -975,7 +1223,7 @@ response = $client.send(Pokepay::Request::CreateExchangeTransaction.new(
975
1223
  リクエストIDを指定したとき、まだそのリクエストIDに対する取引がない場合、新規に取引が作られレスポンスとして返されます。もしそのリクエストIDに対する取引が既にある場合、既存の取引がレスポンスとして返されます。
976
1224
 
977
1225
  ---
978
- 成功したときは[Transaction](#transaction)オブジェクトを返します
1226
+ 成功したときは[TransactionDetail](#transaction-detail)オブジェクトを返します
979
1227
  <a name="get-transaction"></a>
980
1228
  #### 取引情報を取得する
981
1229
  取引を取得します。
@@ -998,7 +1246,7 @@ response = $client.send(Pokepay::Request::GetTransaction.new(
998
1246
  フィルターとして使われ、指定した取引IDの取引を取得します。
999
1247
 
1000
1248
  ---
1001
- 成功したときは[Transaction](#transaction)オブジェクトを返します
1249
+ 成功したときは[TransactionDetail](#transaction-detail)オブジェクトを返します
1002
1250
  <a name="refund-transaction"></a>
1003
1251
  #### 取引をキャンセルする
1004
1252
  取引IDを指定して取引をキャンセルします。
@@ -1014,24 +1262,24 @@ response = $client.send(Pokepay::Request::RefundTransaction.new(
1014
1262
  description: "返品対応のため" # 取引履歴に表示する返金事由
1015
1263
  ))
1016
1264
  ```
1017
- 成功したときは[Transaction](#transaction)オブジェクトを返します
1265
+ 成功したときは[TransactionDetail](#transaction-detail)オブジェクトを返します
1018
1266
  <a name="list-transfers"></a>
1019
1267
  ####
1020
1268
  ```ruby
1021
1269
  response = $client.send(Pokepay::Request::ListTransfers.new(
1022
- from: "2023-02-09T00:49:53.000000+09:00",
1023
- to: "2017-04-28T12:45:45.000000+09:00",
1024
- page: 6607,
1025
- per_page: 6000,
1270
+ from: "2022-08-08T05:35:45.000000+09:00",
1271
+ to: "2019-06-03T05:41:38.000000+09:00",
1272
+ page: 3134,
1273
+ per_page: 394,
1026
1274
  shop_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
1027
- shop_name: "GDpqqjYUa42NN7jWbTA8sT9CjYdhYyR9ZtWhMAKSZHQ2Tja",
1275
+ shop_name: "nTRvriMMqT8Y2wPxWWXEUoqg0zXsuvc8LF4mbP1h",
1028
1276
  customer_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
1029
- customer_name: "hc0hASAcEibjku1fdQetgL0O7DlAFrkXVihIdQWu7J4NYirXryPP6taqbm6hsnA9hELkacVB4dzDqQ1LbTyVIgVP7fIz1xemnrDx9P7HPwLX5lwWZKuWWf4n5wNPq2rjN28QfQLnQ9Qr2gs4rAyEVt2ws7WkJzpgGUX4mtxobZ9ZCp",
1277
+ customer_name: "PDbNVjct5yQNjVn35rDh040vhQYw5VlT5PtGoiFuhhxPNxJedAo6IB1JwI4HtHPlHFEuPGo3GkdygOOVSyzQqeTxBrSdGB4t2pP3KohbOZsA8epkaCTJpPbbkD",
1030
1278
  transaction_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
1031
1279
  private_money_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
1032
1280
  is_modified: true,
1033
- transaction_types: ["transfer"],
1034
- transfer_types: ["coupon"], # 取引明細の種類でフィルターします。
1281
+ transaction_types: ["payment", "exchange", "topup"],
1282
+ transfer_types: ["payment", "coupon", "topup", "exchange"], # 取引明細の種類でフィルターします。
1035
1283
  description: "店頭QRコードによる支払い" # 取引詳細説明文
1036
1284
  ))
1037
1285
  ```
@@ -1046,7 +1294,8 @@ response = $client.send(Pokepay::Request::ListTransfers.new(
1046
1294
  "enum": {
1047
1295
  "topup": "payment",
1048
1296
  "exchange": "transfer",
1049
- "coupon": "campaign"
1297
+ "coupon": "campaign",
1298
+ "cashback": "expire"
1050
1299
  }
1051
1300
  }
1052
1301
  }
@@ -1070,6 +1319,12 @@ response = $client.send(Pokepay::Request::ListTransfers.new(
1070
1319
  5. coupon
1071
1320
  クーポンによる値引き処理、またはそのキャンセル取引
1072
1321
 
1322
+ 6. cashback
1323
+ 退会時の返金取引
1324
+
1325
+ 7. expire
1326
+ 退会時失効取引
1327
+
1073
1328
  ---
1074
1329
  `description`
1075
1330
  ```json
@@ -1093,6 +1348,46 @@ response = $client.send(Pokepay::Request::ListTransfers.new(
1093
1348
 
1094
1349
  QRコードを読み取る方法以外にも、このURLリンクを直接スマートフォン(iOS/Android)上で開くことによりアプリが起動して取引が行われます。(注意: 上記URLはsandbox環境であるため、アプリもsandbox環境のものである必要があります) 上記URL中の `xxxxxxxx-xxxx-xxxxxxxxx-xxxxxxxxxxxx` の部分がチャージQRコードのIDです。
1095
1350
 
1351
+ <a name="create-check"></a>
1352
+ #### チャージQRコードの発行
1353
+ ```ruby
1354
+ response = $client.send(Pokepay::Request::CreateCheck.new(
1355
+ "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # account_id: 送金元の店舗アカウントID
1356
+ money_amount: 2773, # 付与マネー額
1357
+ point_amount: 1358, # 付与ポイント額
1358
+ description: "test check", # 説明文(アプリ上で取引の説明文として表示される)
1359
+ is_onetime: true, # ワンタイムかどうか。真の場合1度読み込まれた時点でそのチャージQRは失効する(デフォルト値は真)
1360
+ usage_limit: 8593, # ワンタイムでない場合、複数ユーザから読み取られ得る。その場合の最大読み取り回数
1361
+ expires_at: "2019-11-10T13:55:23.000000+09:00", # チャージQR自体の失効日時
1362
+ point_expires_at: "2024-02-07T20:52:41.000000+09:00", # チャージQRによって付与されるポイントの失効日時
1363
+ point_expires_in_days: 60, # チャージQRによって付与されるポイントの有効期限(相対指定、単位は日)
1364
+ bear_point_account: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" # ポイント額を負担する店舗アカウントのID
1365
+ ))
1366
+ ```
1367
+ `money_amount`と`point_amount`の少なくとも一方は指定する必要があります。
1368
+
1369
+
1370
+ ---
1371
+ `is_onetime`
1372
+ ```json
1373
+ { "type": "boolean" }
1374
+ ```
1375
+ チャージQRコードが一度の読み取りで失効するときに`true`にします。デフォルト値は`true`です。
1376
+ `false`の場合、そのチャージQRコードは1ユーザについては1回きりですが、複数ユーザによって読み取り可能なQRコードになります。
1377
+
1378
+
1379
+ ---
1380
+ `usage_limit`
1381
+ ```json
1382
+ { "type": "integer" }
1383
+ ```
1384
+ 複数ユーザによって読み取り可能なチャージQRコードの読み取り回数に制限をつけるために指定します。
1385
+ 省略すると無制限に読み取り可能なチャージQRコードになります。
1386
+ チャージQRコードは管理画面からいつでも無効化(有効化)することができます。
1387
+
1388
+
1389
+ ---
1390
+ 成功したときは[Check](#check)オブジェクトを返します
1096
1391
  <a name="create-topup-transaction-with-check"></a>
1097
1392
  #### チャージQRコードを読み取ることでチャージする
1098
1393
  通常チャージQRコードはエンドユーザーのアプリによって読み取られ、アプリとポケペイサーバとの直接通信によって取引が作られます。 もしエンドユーザーとの通信をパートナーのサーバのみに限定したい場合、パートナーのサーバがチャージQRの情報をエンドユーザーから代理受けして、サーバ間連携APIによって実際のチャージ取引をリクエストすることになります。
@@ -1131,7 +1426,7 @@ QRコード生成時に送金元店舗のウォレット情報や、送金額な
1131
1426
  送金先のエンドユーザーを指定します。
1132
1427
 
1133
1428
  ---
1134
- 成功したときは[Transaction](#transaction)オブジェクトを返します
1429
+ 成功したときは[TransactionDetail](#transaction-detail)オブジェクトを返します
1135
1430
  ### Bill
1136
1431
  支払いQRコード
1137
1432
  <a name="list-bills"></a>
@@ -1139,18 +1434,18 @@ QRコード生成時に送金元店舗のウォレット情報や、送金額な
1139
1434
  支払いQRコード一覧を表示します。
1140
1435
  ```ruby
1141
1436
  response = $client.send(Pokepay::Request::ListBills.new(
1142
- page: 2359, # ページ番号
1143
- per_page: 9119, # 1ページの表示数
1144
- bill_id: "WIbd8", # 支払いQRコードのID
1437
+ page: 1152, # ページ番号
1438
+ per_page: 3474, # 1ページの表示数
1439
+ bill_id: "wG", # 支払いQRコードのID
1145
1440
  private_money_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # マネーID
1146
- organization_code: "U5j-HH14BbFT54v-4FDv-si", # 組織コード
1441
+ organization_code: "-sVJ2oS5l", # 組織コード
1147
1442
  description: "test bill", # 取引説明文
1148
- created_from: "2023-07-11T01:18:59.000000+09:00", # 作成日時(起点)
1149
- created_to: "2018-10-19T23:38:10.000000+09:00", # 作成日時(終点)
1443
+ created_from: "2021-08-20T22:07:44.000000+09:00", # 作成日時(起点)
1444
+ created_to: "2021-02-13T11:45:02.000000+09:00", # 作成日時(終点)
1150
1445
  shop_name: "bill test shop1", # 店舗名
1151
1446
  shop_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # 店舗ID
1152
- lower_limit_amount: 5189, # 金額の範囲によるフィルタ(下限)
1153
- upper_limit_amount: 1460, # 金額の範囲によるフィルタ(上限)
1447
+ lower_limit_amount: 9526, # 金額の範囲によるフィルタ(下限)
1448
+ upper_limit_amount: 4780, # 金額の範囲によるフィルタ(上限)
1154
1449
  is_disabled: true # 支払いQRコードが無効化されているかどうか
1155
1450
  ))
1156
1451
  ```
@@ -1295,7 +1590,7 @@ response = $client.send(Pokepay::Request::ListBills.new(
1295
1590
  response = $client.send(Pokepay::Request::CreateBill.new(
1296
1591
  "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # private_money_id: 支払いマネーのマネーID
1297
1592
  "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # shop_id: 支払い先(受け取り人)の店舗ID
1298
- amount: 7969, # 支払い額
1593
+ amount: 1655, # 支払い額
1299
1594
  description: "test bill" # 説明文(アプリ上で取引の説明文として表示される)
1300
1595
  ))
1301
1596
  ```
@@ -1319,9 +1614,9 @@ response = $client.send(Pokepay::Request::CreateBill.new(
1319
1614
  ```ruby
1320
1615
  response = $client.send(Pokepay::Request::UpdateBill.new(
1321
1616
  "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # bill_id: 支払いQRコードのID
1322
- amount: 9387, # 支払い額
1617
+ amount: 1037, # 支払い額
1323
1618
  description: "test bill", # 説明文
1324
- is_disabled: true # 無効化されているかどうか
1619
+ is_disabled: false # 無効化されているかどうか
1325
1620
  ))
1326
1621
  ```
1327
1622
 
@@ -1384,9 +1679,9 @@ Cashtrayを作成します。
1384
1679
  response = $client.send(Pokepay::Request::CreateCashtray.new(
1385
1680
  "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # private_money_id: マネーID
1386
1681
  "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # shop_id: 店舗ユーザーID
1387
- 4206, # amount: 金額
1682
+ 7128, # amount: 金額
1388
1683
  description: "たい焼き(小倉)", # 取引履歴に表示する説明文
1389
- expires_in: 2971 # 失効時間(秒)
1684
+ expires_in: 3581 # 失効時間(秒)
1390
1685
  ))
1391
1686
  ```
1392
1687
 
@@ -1547,9 +1842,9 @@ Cashtrayの内容を更新します。bodyパラメーターは全て省略可
1547
1842
  ```ruby
1548
1843
  response = $client.send(Pokepay::Request::UpdateCashtray.new(
1549
1844
  "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # cashtray_id: CashtrayのID
1550
- amount: 4180, # 金額
1845
+ amount: 3771, # 金額
1551
1846
  description: "たい焼き(小倉)", # 取引履歴に表示する説明文
1552
- expires_in: 5017 # 失効時間(秒)
1847
+ expires_in: 4448 # 失効時間(秒)
1553
1848
  ))
1554
1849
  ```
1555
1850
 
@@ -1624,7 +1919,9 @@ response = $client.send(Pokepay::Request::GetAccount.new(
1624
1919
  ```ruby
1625
1920
  response = $client.send(Pokepay::Request::UpdateAccount.new(
1626
1921
  "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # account_id: ウォレットID
1627
- is_suspended: false # ウォレットが凍結されているかどうか
1922
+ is_suspended: false, # ウォレットが凍結されているかどうか
1923
+ status: "pre-closed", # ウォレット状態
1924
+ can_transfer_topup: true # チャージ可能かどうか
1628
1925
  ))
1629
1926
  ```
1630
1927
 
@@ -1648,23 +1945,71 @@ response = $client.send(Pokepay::Request::UpdateAccount.new(
1648
1945
  ウォレットの凍結状態です。真にするとウォレットが凍結され、そのウォレットでは新規取引ができなくなります。偽にすると凍結解除されます。
1649
1946
 
1650
1947
  ---
1651
- 成功したときは[AccountDetail](#account-detail)オブジェクトを返します
1652
- <a name="list-account-balances"></a>
1653
- #### エンドユーザーの残高内訳を表示する
1654
- エンドユーザーのウォレット毎の残高を有効期限別のリストとして取得します。
1655
- ```ruby
1656
- response = $client.send(Pokepay::Request::ListAccountBalances.new(
1657
- "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # account_id: ウォレットID
1658
- page: 1398, # ページ番号
1659
- per_page: 295, # 1ページ分の取引数
1660
- expires_at_from: "2018-11-24T12:24:46.000000+09:00", # 有効期限の期間によるフィルター(開始時点)
1661
- expires_at_to: "2021-02-20T21:10:32.000000+09:00", # 有効期限の期間によるフィルター(終了時点)
1662
- direction: "asc" # 有効期限によるソート順序
1663
- ))
1664
- ```
1665
-
1666
- ---
1667
- `account_id`
1948
+ `status`
1949
+ ```json
1950
+ {
1951
+ "type": "string",
1952
+ "enum": [ "active", "suspended", "pre-closed" ]
1953
+ }
1954
+ ```
1955
+ ウォレットの状態です。
1956
+
1957
+ ---
1958
+ `can_transfer_topup`
1959
+ ```json
1960
+ { "type": "boolean" }
1961
+ ```
1962
+ 店舗ユーザーがエンドユーザーにチャージ可能かどうかです。真にするとチャージ可能となり、偽にするとチャージ不可能となります。
1963
+
1964
+ ---
1965
+ 成功したときは[AccountDetail](#account-detail)オブジェクトを返します
1966
+ <a name="delete-account"></a>
1967
+ #### ウォレットを退会する
1968
+ ウォレットを退会します。一度ウォレットを退会した後は、そのウォレットを再び利用可能な状態に戻すことは出来ません。
1969
+ ```ruby
1970
+ response = $client.send(Pokepay::Request::DeleteAccount.new(
1971
+ "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # account_id: ウォレットID
1972
+ cashback: true # 返金有無
1973
+ ))
1974
+ ```
1975
+
1976
+ ---
1977
+ `account_id`
1978
+ ```json
1979
+ {
1980
+ "type": "string",
1981
+ "format": "uuid"
1982
+ }
1983
+ ```
1984
+ ウォレットIDです。
1985
+
1986
+ 指定したウォレットIDのウォレットを退会します。
1987
+
1988
+ ---
1989
+ `cashback`
1990
+ ```json
1991
+ { "type": "boolean" }
1992
+ ```
1993
+ 退会時の返金有無です。エンドユーザに返金を行う場合、真を指定して下さい。現在のマネー残高を全て現金で返金したものとして記録されます。
1994
+
1995
+ ---
1996
+ 成功したときは[AccountDeleted](#account-deleted)オブジェクトを返します
1997
+ <a name="list-account-balances"></a>
1998
+ #### エンドユーザーの残高内訳を表示する
1999
+ エンドユーザーのウォレット毎の残高を有効期限別のリストとして取得します。
2000
+ ```ruby
2001
+ response = $client.send(Pokepay::Request::ListAccountBalances.new(
2002
+ "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # account_id: ウォレットID
2003
+ page: 4466, # ページ番号
2004
+ per_page: 4680, # 1ページ分の取引数
2005
+ expires_at_from: "2021-06-23T10:51:49.000000+09:00", # 有効期限の期間によるフィルター(開始時点)
2006
+ expires_at_to: "2017-07-24T18:09:18.000000+09:00", # 有効期限の期間によるフィルター(終了時点)
2007
+ direction: "desc" # 有効期限によるソート順序
2008
+ ))
2009
+ ```
2010
+
2011
+ ---
2012
+ `account_id`
1668
2013
  ```json
1669
2014
  {
1670
2015
  "type": "string",
@@ -1733,11 +2078,11 @@ response = $client.send(Pokepay::Request::ListAccountBalances.new(
1733
2078
  ```ruby
1734
2079
  response = $client.send(Pokepay::Request::ListAccountExpiredBalances.new(
1735
2080
  "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # account_id: ウォレットID
1736
- page: 3542, # ページ番号
1737
- per_page: 59, # 1ページ分の取引数
1738
- expires_at_from: "2025-03-03T19:58:32.000000+09:00", # 有効期限の期間によるフィルター(開始時点)
1739
- expires_at_to: "2022-07-08T21:11:40.000000+09:00", # 有効期限の期間によるフィルター(終了時点)
1740
- direction: "asc" # 有効期限によるソート順序
2081
+ page: 4074, # ページ番号
2082
+ per_page: 2468, # 1ページ分の取引数
2083
+ expires_at_from: "2023-10-28T19:16:59.000000+09:00", # 有効期限の期間によるフィルター(開始時点)
2084
+ expires_at_to: "2016-05-11T12:44:07.000000+09:00", # 有効期限の期間によるフィルター(終了時点)
2085
+ direction: "desc" # 有効期限によるソート順序
1741
2086
  ))
1742
2087
  ```
1743
2088
 
@@ -1805,20 +2150,77 @@ response = $client.send(Pokepay::Request::ListAccountExpiredBalances.new(
1805
2150
 
1806
2151
  ---
1807
2152
  成功したときは[PaginatedAccountBalance](#paginated-account-balance)オブジェクトを返します
2153
+ <a name="update-customer-account"></a>
2154
+ #### ウォレット情報を更新する
2155
+ ウォレットの状態を更新します。
2156
+ ```ruby
2157
+ response = $client.send(Pokepay::Request::UpdateCustomerAccount.new(
2158
+ "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # account_id: ウォレットID
2159
+ status: "pre-closed", # ウォレット状態
2160
+ account_name: "2p9irVNMOOMEypf2sbMz5sG1GgyrO7oaIPGJ7JGBC1o5Rc96", # アカウント名
2161
+ external_id: "mVrWrKd8ZckndPnp3nLoMele3ppOb8vOALeCaVZ" # 外部ID
2162
+ ))
2163
+ ```
2164
+
2165
+ ---
2166
+ `account_id`
2167
+ ```json
2168
+ {
2169
+ "type": "string",
2170
+ "format": "uuid"
2171
+ }
2172
+ ```
2173
+ ウォレットIDです。
2174
+
2175
+ 指定したウォレットIDのウォレットの状態を更新します。
2176
+
2177
+ ---
2178
+ `status`
2179
+ ```json
2180
+ {
2181
+ "type": "string",
2182
+ "enum": [ "active", "suspended", "pre-closed" ]
2183
+ }
2184
+ ```
2185
+ ウォレットの状態です。
2186
+
2187
+ ---
2188
+ `account_name`
2189
+ ```json
2190
+ {
2191
+ "type": "string",
2192
+ "maxLength": 256
2193
+ }
2194
+ ```
2195
+ 変更するウォレット名です。
2196
+
2197
+ ---
2198
+ `external_id`
2199
+ ```json
2200
+ {
2201
+ "type": "string",
2202
+ "maxLength": 50
2203
+ }
2204
+ ```
2205
+ 変更する外部IDです。
2206
+
2207
+ ---
2208
+ 成功したときは[AccountWithUser](#account-with-user)オブジェクトを返します
1808
2209
  <a name="get-customer-accounts"></a>
1809
2210
  #### エンドユーザーのウォレット一覧を表示する
1810
2211
  マネーを指定してエンドユーザーのウォレット一覧を取得します。
1811
2212
  ```ruby
1812
2213
  response = $client.send(Pokepay::Request::GetCustomerAccounts.new(
1813
2214
  "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # private_money_id: マネーID
1814
- page: 1636, # ページ番号
1815
- per_page: 2198, # 1ページ分のウォレット数
1816
- created_at_from: "2020-07-10T06:47:52.000000+09:00", # ウォレット作成日によるフィルター(開始時点)
1817
- created_at_to: "2023-01-18T13:26:30.000000+09:00", # ウォレット作成日によるフィルター(終了時点)
2215
+ page: 6368, # ページ番号
2216
+ per_page: 8352, # 1ページ分のウォレット数
2217
+ created_at_from: "2023-12-24T08:14:10.000000+09:00", # ウォレット作成日によるフィルター(開始時点)
2218
+ created_at_to: "2017-12-23T12:19:35.000000+09:00", # ウォレット作成日によるフィルター(終了時点)
1818
2219
  is_suspended: false, # ウォレットが凍結状態かどうかでフィルターする
1819
- external_id: "Izv8TjKb1dIcQKtgPEpt9Ynsu0LI4", # 外部ID
1820
- tel: "01172-559", # エンドユーザーの電話番号
1821
- email: "3YpOK96EoF@GxVJ.com" # エンドユーザーのメールアドレス
2220
+ status: "suspended", # ウォレット状態
2221
+ external_id: "wh096vY0YkfqArkVOxtHaQbqrekxj6KVFbsIqYgBl99", # 外部ID
2222
+ tel: "08-750326", # エンドユーザーの電話番号
2223
+ email: "n3SH7ljqEd@pqCc.com" # エンドユーザーのメールアドレス
1822
2224
  ))
1823
2225
  ```
1824
2226
 
@@ -1881,6 +2283,16 @@ response = $client.send(Pokepay::Request::GetCustomerAccounts.new(
1881
2283
  ```
1882
2284
  このパラメータが指定されている場合、ウォレットの凍結状態で結果がフィルターされます。デフォルトでは未指定です。
1883
2285
 
2286
+ ---
2287
+ `status`
2288
+ ```json
2289
+ {
2290
+ "type": "string",
2291
+ "enum": [ "active", "suspended", "pre-closed" ]
2292
+ }
2293
+ ```
2294
+ このパラメータが指定されている場合、ウォレットの状態で結果がフィルターされます。デフォルトでは未指定です。
2295
+
1884
2296
  ---
1885
2297
  `external_id`
1886
2298
  ```json
@@ -1921,7 +2333,7 @@ response = $client.send(Pokepay::Request::CreateCustomerAccount.new(
1921
2333
  "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # private_money_id: マネーID
1922
2334
  user_name: "ポケペイ太郎", # ユーザー名
1923
2335
  account_name: "ポケペイ太郎のアカウント", # アカウント名
1924
- external_id: "NTeRlFM4Xw2YneFRtau24yc1kusN7qW2yhhPFbHNPhRgn" # 外部ID
2336
+ external_id: "OpWjivoOnvdw0Yvld" # 外部ID
1925
2337
  ))
1926
2338
  ```
1927
2339
 
@@ -1975,11 +2387,11 @@ PAPIクライアントシステムから利用するPokepayユーザーのIDで
1975
2387
  ```ruby
1976
2388
  response = $client.send(Pokepay::Request::GetShopAccounts.new(
1977
2389
  "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # private_money_id: マネーID
1978
- page: 8690, # ページ番号
1979
- per_page: 3606, # 1ページ分のウォレット数
1980
- created_at_from: "2018-01-27T06:32:33.000000+09:00", # ウォレット作成日によるフィルター(開始時点)
1981
- created_at_to: "2023-06-23T05:06:56.000000+09:00", # ウォレット作成日によるフィルター(終了時点)
1982
- is_suspended: false # ウォレットが凍結状態かどうかでフィルターする
2390
+ page: 3132, # ページ番号
2391
+ per_page: 8253, # 1ページ分のウォレット数
2392
+ created_at_from: "2025-07-27T06:36:29.000000+09:00", # ウォレット作成日によるフィルター(開始時点)
2393
+ created_at_to: "2018-11-28T02:50:31.000000+09:00", # ウォレット作成日によるフィルター(終了時点)
2394
+ is_suspended: true # ウォレットが凍結状態かどうかでフィルターする
1983
2395
  ))
1984
2396
  ```
1985
2397
 
@@ -2052,10 +2464,10 @@ response = $client.send(Pokepay::Request::ListCustomerTransactions.new(
2052
2464
  "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # private_money_id: マネーID
2053
2465
  sender_customer_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # 送金エンドユーザーID
2054
2466
  receiver_customer_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # 受取エンドユーザーID
2055
- type: "JbOrM", # 取引種別、チャージ=topup、支払い=payment、個人間送金=transfer
2467
+ type: "expire", # 取引種別
2056
2468
  is_modified: true, # キャンセル済みかどうか
2057
- from: "2017-01-07T03:09:17.000000+09:00", # 開始日時
2058
- to: "2021-09-27T18:17:33.000000+09:00", # 終了日時
2469
+ from: "2018-09-13T17:32:36.000000+09:00", # 開始日時
2470
+ to: "2016-07-29T17:33:26.000000+09:00", # 終了日時
2059
2471
  page: 1, # ページ番号
2060
2472
  per_page: 50 # 1ページ分の取引数
2061
2473
  ))
@@ -2099,7 +2511,14 @@ response = $client.send(Pokepay::Request::ListCustomerTransactions.new(
2099
2511
  ---
2100
2512
  `type`
2101
2513
  ```json
2102
- { "type": "string" }
2514
+ {
2515
+ "type": "string",
2516
+ "enum": {
2517
+ "topup": "payment",
2518
+ "exchange": "transfer",
2519
+ "cashback": "expire"
2520
+ }
2521
+ }
2103
2522
  ```
2104
2523
  取引の種類でフィルターします。
2105
2524
 
@@ -2113,6 +2532,10 @@ response = $client.send(Pokepay::Request::ListCustomerTransactions.new(
2113
2532
  他マネーへの流出(outflow)/他マネーからの流入(inflow)
2114
2533
  4. transfer
2115
2534
  個人間送金
2535
+ 5. cashback
2536
+ ウォレット退会時返金
2537
+ 6. expire
2538
+ ウォレット退会時失効
2116
2539
 
2117
2540
  ---
2118
2541
  `is_modified`
@@ -2180,11 +2603,11 @@ response = $client.send(Pokepay::Request::ListShops.new(
2180
2603
  organization_code: "pocketchange", # 組織コード
2181
2604
  private_money_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # マネーID
2182
2605
  name: "oxスーパー三田店", # 店舗名
2183
- postal_code: "6729142", # 店舗の郵便番号
2606
+ postal_code: "344-2283", # 店舗の郵便番号
2184
2607
  address: "東京都港区芝...", # 店舗の住所
2185
- tel: "05-7934492", # 店舗の電話番号
2186
- email: "jt9M12BOno@1Acj.com", # 店舗のメールアドレス
2187
- external_id: "M96oftC7mHhiSDgXKvVy5paxKD2XcOfyMo2", # 店舗の外部ID
2608
+ tel: "084292628", # 店舗の電話番号
2609
+ email: "jMmLSHQhe4@tHPd.com", # 店舗のメールアドレス
2610
+ external_id: "v", # 店舗の外部ID
2188
2611
  page: 1, # ページ番号
2189
2612
  per_page: 50 # 1ページ分の取引数
2190
2613
  ))
@@ -2309,11 +2732,11 @@ response = $client.send(Pokepay::Request::ListShops.new(
2309
2732
  ```ruby
2310
2733
  response = $client.send(Pokepay::Request::CreateShop.new(
2311
2734
  "oxスーパー三田店", # shop_name: 店舗名
2312
- shop_postal_code: "2691189", # 店舗の郵便番号
2735
+ shop_postal_code: "083-8015", # 店舗の郵便番号
2313
2736
  shop_address: "東京都港区芝...", # 店舗の住所
2314
- shop_tel: "0643430858", # 店舗の電話番号
2315
- shop_email: "x6Ov6eGwjQ@Cqxd.com", # 店舗のメールアドレス
2316
- shop_external_id: "tQnDY", # 店舗の外部ID
2737
+ shop_tel: "0291516", # 店舗の電話番号
2738
+ shop_email: "ICt7BPEIsH@w9ia.com", # 店舗のメールアドレス
2739
+ shop_external_id: "xaPzoaDv6U6SXLkHad9cOSRej1Twb2rv", # 店舗の外部ID
2317
2740
  organization_code: "ox-supermarket" # 組織コード
2318
2741
  ))
2319
2742
  ```
@@ -2323,14 +2746,14 @@ response = $client.send(Pokepay::Request::CreateShop.new(
2323
2746
  ```ruby
2324
2747
  response = $client.send(Pokepay::Request::CreateShopV2.new(
2325
2748
  "oxスーパー三田店", # name: 店舗名
2326
- postal_code: "4391483", # 店舗の郵便番号
2749
+ postal_code: "0977783", # 店舗の郵便番号
2327
2750
  address: "東京都港区芝...", # 店舗の住所
2328
- tel: "088152-979", # 店舗の電話番号
2329
- email: "CsXRcUZY47@cpIh.com", # 店舗のメールアドレス
2330
- external_id: "03BvqB7CzLjYHoO28zEE65UlKtMCe12", # 店舗の外部ID
2751
+ tel: "0197577-543", # 店舗の電話番号
2752
+ email: "TtkAPfziyB@2HYx.com", # 店舗のメールアドレス
2753
+ external_id: "SuFevcjssU2Qn83gWH7hF0T8Nh7eoO6asj", # 店舗の外部ID
2331
2754
  organization_code: "ox-supermarket", # 組織コード
2332
- private_money_ids: ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"], # 店舗で有効にするマネーIDの配列
2333
- can_topup_private_money_ids: ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"] # 店舗でチャージ可能にするマネーIDの配列
2755
+ private_money_ids: ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"], # 店舗で有効にするマネーIDの配列
2756
+ can_topup_private_money_ids: ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"] # 店舗でチャージ可能にするマネーIDの配列
2334
2757
  ))
2335
2758
  ```
2336
2759
 
@@ -2401,13 +2824,13 @@ response = $client.send(Pokepay::Request::GetShop.new(
2401
2824
  response = $client.send(Pokepay::Request::UpdateShop.new(
2402
2825
  "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # shop_id: 店舗ユーザーID
2403
2826
  name: "oxスーパー三田店", # 店舗名
2404
- postal_code: "891-6024", # 店舗の郵便番号
2827
+ postal_code: "0806247", # 店舗の郵便番号
2405
2828
  address: "東京都港区芝...", # 店舗の住所
2406
- tel: "0224-585", # 店舗の電話番号
2407
- email: "WnFZLX87qt@edPz.com", # 店舗のメールアドレス
2408
- external_id: "8NdiYCurcmVOPZzwMWHgQ0V", # 店舗の外部ID
2829
+ tel: "0718180047", # 店舗の電話番号
2830
+ email: "shIHzbucfD@hID3.com", # 店舗のメールアドレス
2831
+ external_id: "qemlo7JMNmGUe8JtqofMq1TyFcW0Uuc5ug", # 店舗の外部ID
2409
2832
  private_money_ids: ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"], # 店舗で有効にするマネーIDの配列
2410
- can_topup_private_money_ids: ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"] # 店舗でチャージ可能にするマネーIDの配列
2833
+ can_topup_private_money_ids: ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"] # 店舗でチャージ可能にするマネーIDの配列
2411
2834
  ))
2412
2835
  ```
2413
2836
 
@@ -2507,7 +2930,9 @@ response = $client.send(Pokepay::Request::UpdateShop.new(
2507
2930
  ユーザーIDを指定してそのユーザーのウォレット一覧を取得します。
2508
2931
  ```ruby
2509
2932
  response = $client.send(Pokepay::Request::ListUserAccounts.new(
2510
- "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" # user_id: ユーザーID
2933
+ "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # user_id: ユーザーID
2934
+ page: 5526, # ページ番号
2935
+ per_page: 9523 # 1ページ分の取引数
2511
2936
  ))
2512
2937
  ```
2513
2938
 
@@ -2523,8 +2948,63 @@ response = $client.send(Pokepay::Request::ListUserAccounts.new(
2523
2948
 
2524
2949
  指定したユーザーIDのウォレット一覧を取得します。パートナーキーと紐づく組織が発行しているマネーのウォレットのみが表示されます。
2525
2950
 
2951
+ ---
2952
+ `page`
2953
+ ```json
2954
+ {
2955
+ "type": "integer",
2956
+ "minimum": 1
2957
+ }
2958
+ ```
2959
+ 取得したいページ番号です。デフォルト値は1です。
2960
+
2961
+ ---
2962
+ `per_page`
2963
+ ```json
2964
+ {
2965
+ "type": "integer",
2966
+ "minimum": 1
2967
+ }
2968
+ ```
2969
+ 1ページ当たりのウォレット数です。デフォルト値は50です。
2970
+
2526
2971
  ---
2527
2972
  成功したときは[PaginatedAccountDetails](#paginated-account-details)オブジェクトを返します
2973
+ <a name="create-user-account"></a>
2974
+ #### エンドユーザーのウォレットを作成する
2975
+ ```ruby
2976
+ response = $client.send(Pokepay::Request::CreateUserAccount.new(
2977
+ "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # user_id: ユーザーID
2978
+ "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # private_money_id: マネーID
2979
+ name: "pDoeGryI5OQQ9GoRehaS9O2M3fskqX8WbkxbWTp66iGj1lRR9XuMVcs2zeQQbQwb51zUDjfyGpNkIiUDvsd07Li3GyEdt6GGJ1GXo5UPiFJuScrEGcY5I6vYJqEcansSsP2ceIvKP9bgYanQbVQM9Z6RG0kCsPdzwEr5mXGzuLW3FkWi9ZhIojVZoApe0VcAXVJNN81LI44xL3mfrFPu", # ウォレット名
2980
+ external_id: "EOV" # 外部ID
2981
+ ))
2982
+ ```
2983
+
2984
+ ---
2985
+ `user_id`
2986
+ ```json
2987
+ {
2988
+ "type": "string",
2989
+ "format": "uuid"
2990
+ }
2991
+ ```
2992
+ ユーザーIDです。
2993
+
2994
+ ---
2995
+ `private_money_id`
2996
+ ```json
2997
+ {
2998
+ "type": "string",
2999
+ "format": "uuid"
3000
+ }
3001
+ ```
3002
+ マネーIDです。
3003
+
3004
+ 作成するウォレットのマネーを指定します。このパラメータは必須です。
3005
+
3006
+ ---
3007
+ 成功したときは[AccountDetail](#account-detail)オブジェクトを返します
2528
3008
  ### Private Money
2529
3009
  <a name="get-private-moneys"></a>
2530
3010
  #### マネー一覧を取得する
@@ -2557,8 +3037,8 @@ response = $client.send(Pokepay::Request::GetPrivateMoneys.new(
2557
3037
  ```ruby
2558
3038
  response = $client.send(Pokepay::Request::GetPrivateMoneyOrganizationSummaries.new(
2559
3039
  "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # private_money_id: マネーID
2560
- from: "2024-01-30T11:08:00.000000+09:00", # 開始日時(toと同時に指定する必要有)
2561
- to: "2023-12-25T17:27:23.000000+09:00", # 終了日時(fromと同時に指定する必要有)
3040
+ from: "2023-08-27T08:46:48.000000+09:00", # 開始日時(toと同時に指定する必要有)
3041
+ to: "2020-08-12T10:28:28.000000+09:00", # 終了日時(fromと同時に指定する必要有)
2562
3042
  page: 1, # ページ番号
2563
3043
  per_page: 50 # 1ページ分の取引数
2564
3044
  ))
@@ -2572,10 +3052,10 @@ response = $client.send(Pokepay::Request::GetPrivateMoneyOrganizationSummaries.n
2572
3052
  CSVファイルから一括取引をします。
2573
3053
  ```ruby
2574
3054
  response = $client.send(Pokepay::Request::BulkCreateTransaction.new(
2575
- "pW9b9NBdcz", # name: 一括取引タスク名
2576
- "T", # content: 取引する情報のCSV
2577
- "SynCfTiWLEN2pEbq7ZeB8PVJkE9NzaeTptZ5", # request_id: リクエストID
2578
- description: "kX9rLpagdWQnEnTlLyubwibc5uG9Y4cn6ApRZ5NX6g" # 一括取引の説明
3055
+ "DCyUBg3VaVg5lQKirhrBQImBbFT", # name: 一括取引タスク名
3056
+ "Gr24", # content: 取引する情報のCSV
3057
+ "vRn0V1KmKqNhpuD1AS4IxvpFPGaTF6gXtd3n", # request_id: リクエストID
3058
+ description: "JyyNe74Q2bvFtDokudzPS7PJ09whlF6CVlMKFHkTHEGRWUBVUZa1rmAxzFUF6i" # 一括取引の説明
2579
3059
  ))
2580
3060
  ```
2581
3061
 
@@ -2640,60 +3120,1107 @@ response = $client.send(Pokepay::Request::BulkCreateTransaction.new(
2640
3120
 
2641
3121
  ---
2642
3122
  成功したときは[BulkTransaction](#bulk-transaction)オブジェクトを返します
2643
- ## Responses
3123
+ ### Event
3124
+ <a name="create-external-transaction"></a>
3125
+ #### ポケペイ外部取引を作成する
3126
+ ポケペイ外部取引を作成します。
2644
3127
 
3128
+ ポケペイ外の現金決済やクレジットカード決済に対してポケペイのポイントを付けたいというときに使用します。
2645
3129
 
2646
- <a name="account-with-user"></a>
2647
- ## AccountWithUser
2648
- * `id (string)`:
2649
- * `name (string)`:
2650
- * `is_suspended (boolean)`:
2651
- * `private_money (PrivateMoney)`:
2652
- * `user (User)`:
3130
+ ```ruby
3131
+ response = $client.send(Pokepay::Request::CreateExternalTransaction.new(
3132
+ "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # shop_id: 店舗ID
3133
+ "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # customer_id: エンドユーザーID
3134
+ "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # private_money_id: マネーID
3135
+ 104, # amount: 取引額
3136
+ description: "たい焼き(小倉)", # 取引説明文
3137
+ metadata: "{\"key\":\"value\"}", # ポケペイ外部取引メタデータ
3138
+ products: [{"jan_code":"abc",
3139
+ "name":"name1",
3140
+ "unit_price":100,
3141
+ "price": 100,
3142
+ "is_discounted": false,
3143
+ "other":"{}"}], # 商品情報データ
3144
+ request_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" # リクエストID
3145
+ ))
3146
+ ```
2653
3147
 
2654
- `private_money`は [PrivateMoney](#private-money) オブジェクトを返します。
3148
+ ---
3149
+ `shop_id`
3150
+ ```json
3151
+ {
3152
+ "type": "string",
3153
+ "format": "uuid"
3154
+ }
3155
+ ```
3156
+ 店舗IDです。
2655
3157
 
2656
- `user`は [User](#user) オブジェクトを返します。
3158
+ ポケペイ外部取引が行なう店舗を指定します。
2657
3159
 
2658
- <a name="account-detail"></a>
2659
- ## AccountDetail
2660
- * `id (string)`:
2661
- * `name (string)`:
2662
- * `is_suspended (boolean)`:
2663
- * `balance (double)`:
2664
- * `money_balance (double)`:
2665
- * `point_balance (double)`:
2666
- * `private_money (PrivateMoney)`:
2667
- * `user (User)`:
3160
+ ---
3161
+ `customer_id`
3162
+ ```json
3163
+ {
3164
+ "type": "string",
3165
+ "format": "uuid"
3166
+ }
3167
+ ```
3168
+ エンドユーザーIDです。
2668
3169
 
2669
- `private_money`は [PrivateMoney](#private-money) オブジェクトを返します。
3170
+ エンドユーザーを指定します。
2670
3171
 
2671
- `user`は [User](#user) オブジェクトを返します。
3172
+ ---
3173
+ `private_money_id`
3174
+ ```json
3175
+ {
3176
+ "type": "string",
3177
+ "format": "uuid"
3178
+ }
3179
+ ```
3180
+ マネーIDです。
2672
3181
 
2673
- <a name="bill"></a>
2674
- ## Bill
2675
- * `id (string)`: 支払いQRコードのID
2676
- * `amount (double)`: 支払い額
2677
- * `max_amount (double)`: 支払い額を範囲指定した場合の上限
2678
- * `min_amount (double)`: 支払い額を範囲指定した場合の下限
2679
- * `description (string)`: 支払いQRコードの説明文(アプリ上で取引の説明文として表示される)
2680
- * `account (AccountWithUser)`: 支払いQRコード発行ウォレット
2681
- * `is_disabled (boolean)`: 無効化されているかどうか
2682
- * `token (string)`: 支払いQRコードを解析したときに出てくるURL
3182
+ マネーを指定します。
2683
3183
 
2684
- `account`は [AccountWithUser](#account-with-user) オブジェクトを返します。
3184
+ ---
3185
+ `amount`
3186
+ ```json
3187
+ {
3188
+ "type": "integer",
3189
+ "minimum": 0
3190
+ }
3191
+ ```
3192
+ 取引金額です。
2685
3193
 
2686
- <a name="cpm-token"></a>
2687
- ## CpmToken
2688
- * `cpm_token (string)`:
2689
- * `account (AccountDetail)`:
2690
- * `transaction (Transaction)`:
2691
- * `event (ExternalTransaction)`:
2692
- * `scopes (array of strings)`: 許可された取引種別
2693
- * `expires_at (string)`: CPMトークンの失効日時
2694
- * `metadata (string)`: エンドユーザー側メタデータ
3194
+ ---
3195
+ `description`
3196
+ ```json
3197
+ {
3198
+ "type": "string",
3199
+ "maxLength": 200
3200
+ }
3201
+ ```
3202
+ 取引説明文です。
2695
3203
 
2696
- `account`は [AccountDetail](#account-detail) オブジェクトを返します。
3204
+ 任意入力で、取引履歴に表示される説明文です。
3205
+
3206
+ ---
3207
+ `metadata`
3208
+ ```json
3209
+ {
3210
+ "type": "string",
3211
+ "format": "json"
3212
+ }
3213
+ ```
3214
+ ポケペイ外部取引作成時に指定され、取引と紐付けられるメタデータです。
3215
+
3216
+ 任意入力で、全てのkeyとvalueが文字列であるようなフラットな構造のJSONで指定します。
3217
+
3218
+ ---
3219
+ `products`
3220
+ ```json
3221
+ {
3222
+ "type": "array",
3223
+ "items": { "type": "object" }
3224
+ }
3225
+ ```
3226
+ 一つの取引に含まれる商品情報データです。
3227
+ 以下の内容からなるJSONオブジェクトの配列で指定します。
3228
+
3229
+ - `jan_code`: JANコード。64字以下の文字列
3230
+ - `name`: 商品名。256字以下の文字列
3231
+ - `unit_price`: 商品単価。0以上の数値
3232
+ - `price`: 全体の金額(例: 商品単価 × 個数)。0以上の数値
3233
+ - `is_discounted`: 賞味期限が近いなどの理由で商品が値引きされているかどうかのフラグ。boolean
3234
+ - `other`: その他商品に関する情報。JSONオブジェクトで指定します。
3235
+
3236
+ ---
3237
+ `request_id`
3238
+ ```json
3239
+ {
3240
+ "type": "string",
3241
+ "format": "uuid"
3242
+ }
3243
+ ```
3244
+ 取引作成APIの羃等性を担保するためのリクエスト固有のIDです。
3245
+
3246
+ 取引作成APIで結果が受け取れなかったなどの理由で再試行する際に、二重に取引が作られてしまうことを防ぐために、クライアント側から指定されます。指定は任意で、UUID V4フォーマットでランダム生成した文字列です。リクエストIDは一定期間で削除されます。
3247
+
3248
+ リクエストIDを指定したとき、まだそのリクエストIDに対する取引がない場合、新規に取引が作られレスポンスとして返されます。もしそのリクエストIDに対する取引が既にある場合、既存の取引がレスポンスとして返されます。
3249
+
3250
+ ---
3251
+ 成功したときは[ExternalTransaction](#external-transaction)オブジェクトを返します
3252
+ <a name="refund-external-transaction"></a>
3253
+ #### ポケペイ外部取引をキャンセルする
3254
+ 取引IDを指定して取引をキャンセルします。
3255
+
3256
+ 発行体の管理者は自組織の直営店、または発行しているマネーの決済加盟店組織での取引をキャンセルできます。
3257
+ キャンセル対象のポケペイ外部取引に付随するポイント還元キャンペーンも取り消されます。
3258
+
3259
+ 取引をキャンセルできるのは1回きりです。既にキャンセルされた取引を重ねてキャンセルしようとすると `transaction_already_refunded (422)` エラーが返ります。
3260
+ ```ruby
3261
+ response = $client.send(Pokepay::Request::RefundExternalTransaction.new(
3262
+ "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # event_id: 取引ID
3263
+ description: "返品対応のため" # 取引履歴に表示する返金事由
3264
+ ))
3265
+ ```
3266
+ 成功したときは[ExternalTransaction](#external-transaction)オブジェクトを返します
3267
+ ### Campaign
3268
+ <a name="create-campaign"></a>
3269
+ #### ポイント付与キャンペーンを作る
3270
+ ポイント付与キャンペーンを作成します。
3271
+
3272
+ ```ruby
3273
+ response = $client.send(Pokepay::Request::CreateCampaign.new(
3274
+ "lI4uoOEnKraNjpsN9SjDxtxrgs7e0dkiAAa8jwX6FLCB1XlvzBazSCE1hEG2EkkP2VIPy7HW7Ee7skB9BB1YNClE0n87A30l6vspNWH9u8x4Yq2mxjIub5W9d4fa79SnOHSfjKkp3QkI11kPUOWIOCC9XRXSkWvgwMdC6YsQVBM615BSLRTB4phpjbt6QHeDKxXdEg3OxGlsZaVSpjoQ6ffYAe6kpXiCTiSBUIe5iqIMOcjyqBKlSFG", # name: キャンペーン名
3275
+ "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # private_money_id: マネーID
3276
+ "2022-11-13T02:10:12.000000+09:00", # starts_at: キャンペーン開始日時
3277
+ "2021-09-21T12:28:04.000000+09:00", # ends_at: キャンペーン終了日時
3278
+ 4029, # priority: キャンペーンの適用優先度
3279
+ "topup", # event: イベント種別
3280
+ bear_point_shop_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # ポイント負担先店舗ID
3281
+ description: "qDn2oMYRFh8cqnV2spFoKb7jYgx3gTJKy6dBb3ykYYVRZ4jdyfDGYQa0QPCC60HT399N8hkxoSQFYDUU0HuG332kYdREQC39nZBUv4F8J7UzyDYEv7bctcmIqdmvTV8RBzp0gixsKZWoUeORL98QDv9TW", # キャンペーンの説明文
3282
+ status: "disabled", # キャンペーン作成時の状態
3283
+ point_expires_at: "2020-08-06T14:45:24.000000+09:00", # ポイント有効期限(絶対日時指定)
3284
+ point_expires_in_days: 9973, # ポイント有効期限(相対日数指定)
3285
+ is_exclusive: false, # キャンペーンの重複設定
3286
+ subject: "all", # ポイント付与の対象金額の種別
3287
+ amount_based_point_rules: [{
3288
+ "point_amount": 5,
3289
+ "point_amount_unit": "percent",
3290
+ "subject_more_than_or_equal": 1000,
3291
+ "subject_less_than": 5000
3292
+ }, {
3293
+ "point_amount": 5,
3294
+ "point_amount_unit": "percent",
3295
+ "subject_more_than_or_equal": 1000,
3296
+ "subject_less_than": 5000
3297
+ }, {
3298
+ "point_amount": 5,
3299
+ "point_amount_unit": "percent",
3300
+ "subject_more_than_or_equal": 1000,
3301
+ "subject_less_than": 5000
3302
+ }], # 取引金額ベースのポイント付与ルール
3303
+ product_based_point_rules: [{
3304
+ "point_amount": 5,
3305
+ "point_amount_unit": "percent",
3306
+ "product_code": "4912345678904",
3307
+ "is_multiply_by_count": true,
3308
+ "required_count": 2
3309
+ }, {
3310
+ "point_amount": 5,
3311
+ "point_amount_unit": "percent",
3312
+ "product_code": "4912345678904",
3313
+ "is_multiply_by_count": true,
3314
+ "required_count": 2
3315
+ }, {
3316
+ "point_amount": 5,
3317
+ "point_amount_unit": "percent",
3318
+ "product_code": "4912345678904",
3319
+ "is_multiply_by_count": true,
3320
+ "required_count": 2
3321
+ }], # 商品情報ベースのポイント付与ルール
3322
+ applicable_days_of_week: [5, 5, 4], # キャンペーンを適用する曜日 (複数指定)
3323
+ applicable_time_ranges: [{
3324
+ "from": "12:00",
3325
+ "to": "23:59"
3326
+ }, {
3327
+ "from": "12:00",
3328
+ "to": "23:59"
3329
+ }], # キャンペーンを適用する時間帯 (複数指定)
3330
+ applicable_shop_ids: ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"], # キャンペーン適用対象となる店舗IDのリスト
3331
+ minimum_number_for_combination_purchase: 7983, # 複数種類の商品を同時購入するときの商品種別数の下限
3332
+ dest_private_money_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" # ポイント付与先となるマネーID
3333
+ ))
3334
+ ```
3335
+
3336
+ ---
3337
+ `name`
3338
+ ```json
3339
+ {
3340
+ "type": "string",
3341
+ "maxLength": 256
3342
+ }
3343
+ ```
3344
+ キャンペーン名です(必須項目)。
3345
+
3346
+ ポイント付与によってできるチャージ取引の説明文に転記されます。取引説明文はエンドユーザーからも確認できます。
3347
+
3348
+ ---
3349
+ `private_money_id`
3350
+ ```json
3351
+ {
3352
+ "type": "string",
3353
+ "format": "uuid"
3354
+ }
3355
+ ```
3356
+ キャンペーン対象のマネーのIDです(必須項目)。
3357
+
3358
+ ---
3359
+ `starts_at`
3360
+ ```json
3361
+ {
3362
+ "type": "string",
3363
+ "format": "date-time"
3364
+ }
3365
+ ```
3366
+ キャンペーン開始日時です(必須項目)。
3367
+ キャンペーン期間中のみポイントが付与されます。
3368
+ 開始日時よりも終了日時が前のときはcampaign_invalid_periodエラー(422)になります。
3369
+
3370
+ ---
3371
+ `ends_at`
3372
+ ```json
3373
+ {
3374
+ "type": "string",
3375
+ "format": "date-time"
3376
+ }
3377
+ ```
3378
+ キャンペーン終了日時です(必須項目)。
3379
+ キャンペーン期間中のみポイントが付与されます。
3380
+ 開始日時よりも終了日時が前のときはcampaign_invalid_periodエラー(422)になります。
3381
+
3382
+ ---
3383
+ `priority`
3384
+ ```json
3385
+ { "type": "integer" }
3386
+ ```
3387
+ キャンペーンの適用優先度です。
3388
+
3389
+ 優先度が大きいものから順に適用判定されていきます。
3390
+ キャンペーン期間が重なっている同一の優先度のキャンペーンが存在するとcampaign_period_overlapsエラー(422)になります。
3391
+
3392
+ ---
3393
+ `event`
3394
+ ```json
3395
+ {
3396
+ "type": "string",
3397
+ "enum": [ "topup", "payment", "external-transaction" ]
3398
+ }
3399
+ ```
3400
+ キャンペーンのトリガーとなるイベントの種類を指定します(必須項目)。
3401
+
3402
+ 以下のいずれかを指定できます。
3403
+
3404
+ 1. topup
3405
+ 店舗からエンドユーザーへの送金取引(チャージ)
3406
+ 2. payment
3407
+ エンドユーザーから店舗への送金取引(支払い)
3408
+ 3. external-transaction
3409
+ ポケペイ外の取引(現金決済など)
3410
+
3411
+ ---
3412
+ `bear_point_shop_id`
3413
+ ```json
3414
+ {
3415
+ "type": "string",
3416
+ "format": "uuid"
3417
+ }
3418
+ ```
3419
+ ポイントを負担する店舗のIDです。デフォルトではマネー発行体の本店が設定されます。
3420
+ ポイント負担先店舗は後から更新することはできません。
3421
+
3422
+ ---
3423
+ `description`
3424
+ ```json
3425
+ {
3426
+ "type": "string",
3427
+ "maxLength": 200
3428
+ }
3429
+ ```
3430
+ キャンペーンの内容を記載します。管理画面などでキャンペーンを管理するための説明文になります。
3431
+
3432
+ ---
3433
+ `status`
3434
+ ```json
3435
+ {
3436
+ "type": "string",
3437
+ "enum": { "enabled": "disabled" }
3438
+ }
3439
+ ```
3440
+ キャンペーン作成時の状態を指定します。デフォルトではenabledです。
3441
+
3442
+ 以下のいずれかを指定できます。
3443
+
3444
+ 1. enabled
3445
+ 有効
3446
+ 2. disabled
3447
+ 無効
3448
+
3449
+ ---
3450
+ `point_expires_at`
3451
+ ```json
3452
+ {
3453
+ "type": "string",
3454
+ "format": "date-time"
3455
+ }
3456
+ ```
3457
+ キャンペーンによって付与されるポイントの有効期限を絶対日時で指定します。
3458
+ 省略した場合はマネーに設定された有効期限と同じものがポイントの有効期限となります。
3459
+
3460
+ ---
3461
+ `point_expires_in_days`
3462
+ ```json
3463
+ {
3464
+ "type": "integer",
3465
+ "minimum": 1
3466
+ }
3467
+ ```
3468
+ キャンペーンによって付与されるポイントの有効期限を相対日数で指定します。
3469
+ 省略した場合はマネーに設定された有効期限と同じものがポイントの有効期限となります。
3470
+
3471
+ ---
3472
+ `is_exclusive`
3473
+ ```json
3474
+ { "type": "boolean" }
3475
+ ```
3476
+ キャンペーンの重ね掛けを行うかどうかのフラグです。
3477
+
3478
+ これにtrueを指定すると他のキャンペーンと同時適用されません。デフォルト値はtrueです。
3479
+ falseを指定すると次の優先度の重ね掛け可能なキャンペーンの適用判定に進みます。
3480
+
3481
+ ---
3482
+ `subject`
3483
+ ```json
3484
+ {
3485
+ "type": "string",
3486
+ "enum": { "money": "all" }
3487
+ }
3488
+ ```
3489
+ ポイント付与額を計算する対象となる金額の種類を指定します。デフォルト値はallです。
3490
+ eventとしてexternal-transactionを指定した場合はポイントとマネーの区別がないためsubjectの指定に関わらず常にallとなります。
3491
+
3492
+ 以下のいずれかを指定できます。
3493
+
3494
+ 1. money
3495
+ moneyを指定すると決済額の中で「マネー」を使って支払った額を対象にします
3496
+
3497
+ 2. all
3498
+ all を指定すると決済額全体を対象にします (「ポイント」での取引額を含む)
3499
+ 注意: event を topup にしたときはポイントの付与に対しても適用されます
3500
+
3501
+ ---
3502
+ `amount_based_point_rules`
3503
+ ```json
3504
+ {
3505
+ "type": "array",
3506
+ "items": { "type": "object" }
3507
+ }
3508
+ ```
3509
+ 金額をベースとしてポイント付与を行うルールを指定します。
3510
+ amount_based_point_rules と product_based_point_rules はどちらか一方しか指定できません。
3511
+ 各ルールは一つのみ適用され、条件に重複があった場合は先に記載されたものが優先されます。
3512
+
3513
+ 例:
3514
+ ```javascript
3515
+ [
3516
+ // 1000円以上、5000円未満の決済には 5%
3517
+ {
3518
+ "point_amount": 5,
3519
+ "point_amount_unit": "percent",
3520
+ "subject_more_than_or_equal": 1000,
3521
+ "subject_less_than": 5000
3522
+ },
3523
+ // 5000円以上の決済には 10%
3524
+ {
3525
+ "point_amount": 10,
3526
+ "point_amount_unit": "percent",
3527
+ "subject_more_than_or_equal": 5000
3528
+ },
3529
+ ]
3530
+ ```
3531
+
3532
+ ---
3533
+ `product_based_point_rules`
3534
+ ```json
3535
+ {
3536
+ "type": "array",
3537
+ "items": { "type": "object" }
3538
+ }
3539
+ ```
3540
+ 商品情報をベースとしてポイント付与を行うルールを指定します。
3541
+ ルールは商品ごとに設定可能で、ルールの配列として指定します。
3542
+ amount_based_point_rules と product_based_point_rules はどちらか一方しか指定できません。
3543
+ event が payment か external-transaction の時のみ有効です。
3544
+ 各ルールの順序は問わず、適用可能なものは全て適用されます。
3545
+ 一つの決済の中で複数の商品がキャンペーン適用可能な場合はそれぞれの商品についてのルールが適用され、ポイント付与額はその合算になります。
3546
+
3547
+ 例:
3548
+ ```javascript
3549
+ [
3550
+ // 対象商品の購入額から5%ポイント付与。複数購入時は単価の5%が付与される。
3551
+ {
3552
+ "point_amount": 5,
3553
+ "point_amount_unit": "percent",
3554
+ "product_code": "4912345678904",
3555
+ },
3556
+ // 対象商品の購入額から5%ポイント付与。複数購入時は購入総額の5%が付与される。
3557
+ {
3558
+ "point_amount": 5,
3559
+ "point_amount_unit": "percent",
3560
+ "product_code": "4912345678904",
3561
+ "is_multiply_by_count": true,
3562
+ },
3563
+ // 対象商品を2つ以上購入したら500ポイント付与(固定額付与)
3564
+ {
3565
+ "point_amount": 500,
3566
+ "point_amount_unit": "absolute",
3567
+ "product_code": "4912345678904",
3568
+ "required_count": 2
3569
+ },
3570
+ // 書籍は10%ポイント付与
3571
+ // ※ISBNの形式はレジがポケペイに送信する形式に準じます
3572
+ {
3573
+ "point_amount": 10,
3574
+ "point_amount_unit": "percent",
3575
+ "product_code": "978-%",
3576
+ },
3577
+ // 一部の出版社の書籍は10%ポイント付与
3578
+ {
3579
+ "point_amount": 10,
3580
+ "point_amount_unit": "percent",
3581
+ "product_code": "978-4-01-%", // 旺文社
3582
+ }
3583
+ ]
3584
+ ```
3585
+
3586
+ ---
3587
+ `minimum_number_for_combination_purchase`
3588
+ ```json
3589
+ {
3590
+ "type": "integer",
3591
+ "minimum": 1
3592
+ }
3593
+ ```
3594
+ 複数種別の商品を同時購入したとき、同時購入キャンペーンの対象となる商品種別数の下限です。デフォルトでは未指定で、指定する場合は1以上の整数を指定します。
3595
+
3596
+ このパラメータを指定するときは product_based_point_rules で商品毎のルールが指定されている必要があります。
3597
+ 例えば、A商品とB商品とC商品のうち、キャンペーンの発火のために2商品以上が同時購入される必要があるときは 2 を指定します。
3598
+
3599
+ 例1: 商品A, Bが同時購入されたときに固定ポイント額(200ポイント)付与
3600
+ ```javascript
3601
+ {
3602
+ minimum_number_for_combination_purchase: 2,
3603
+ product_based_point_rules: [
3604
+ {
3605
+ "point_amount": 100,
3606
+ "point_amount_unit": "absolute",
3607
+ "product_code": "商品Aの商品コード"
3608
+ },
3609
+ {
3610
+ "point_amount": 100,
3611
+ "point_amount_unit": "absolute",
3612
+ "product_code": "商品Bの商品コード"
3613
+ }
3614
+ ]
3615
+ }
3616
+ ```
3617
+
3618
+ 例2: 商品A, Bが3個ずつ以上同時購入されたときに固定ポイント額(200ポイント)付与
3619
+ ```javascript
3620
+ {
3621
+ minimum_number_for_combination_purchase: 2,
3622
+ product_based_point_rules: [
3623
+ {
3624
+ "point_amount": 100,
3625
+ "point_amount_unit": "absolute",
3626
+ "product_code": "商品Aの商品コード",
3627
+ "required_count": 3
3628
+ },
3629
+ {
3630
+ "point_amount": 100,
3631
+ "point_amount_unit": "absolute",
3632
+ "product_code": "商品Bの商品コード",
3633
+ "required_count": 3
3634
+ }
3635
+ ]
3636
+ }
3637
+ ```
3638
+
3639
+ 例2: 商品A, B, Cのうち2商品以上が同時購入されたときに総額の10%ポイントが付与
3640
+ ```javascript
3641
+ {
3642
+ minimum_number_for_combination_purchase: 2,
3643
+ product_based_point_rules: [
3644
+ {
3645
+ "point_amount": 10,
3646
+ "point_amount_unit": "percent",
3647
+ "product_code": "商品Aの商品コード",
3648
+ "is_multiply_by_count": true,
3649
+ },
3650
+ {
3651
+ "point_amount": 10,
3652
+ "point_amount_unit": "percent",
3653
+ "product_code": "商品Bの商品コード",
3654
+ "is_multiply_by_count": true,
3655
+ },
3656
+ {
3657
+ "point_amount": 10,
3658
+ "point_amount_unit": "percent",
3659
+ "product_code": "商品Cの商品コード",
3660
+ "is_multiply_by_count": true,
3661
+ }
3662
+ ]
3663
+ }
3664
+ ```
3665
+
3666
+ ---
3667
+ `dest_private_money_id`
3668
+ ```json
3669
+ {
3670
+ "type": "string",
3671
+ "format": "uuid"
3672
+ }
3673
+ ```
3674
+ キャンペーンを駆動するイベントのマネーとは「別のマネー」に対してポイントを付けたいときに、そのマネーIDを指定します。
3675
+
3676
+ ポイント付与先のマネーはキャンペーンを駆動するイベントのマネーと同一発行体が発行しているものに限ります。その他のマネーIDが指定された場合は private_money_not_found (422) が返ります。
3677
+ エンドユーザー、店舗、ポイント負担先店舗はポイント付与先マネーのウォレットを持っている必要があります。持っていない場合はポイントは付きません。
3678
+ 元のイベントのマネーと異なる複数のマネーに対して同時にポイントを付与することはできません。重複可能に設定されている複数のキャンペーンで別々のポイント付与先マネーを指定した場合は最も優先度の高いものが処理され、残りは無視されます。
3679
+ キャンペーンのポイント付与先マネーは後から更新することはできません。
3680
+ デフォルトではポイント付与先はキャンペーンを駆動するイベントのマネー(private_money_idで指定したマネー)になります。
3681
+
3682
+ 別マネーに対するポイント付与は別のtransactionとなります。 RefundTransaction で元のイベントをキャンセルしたときはポイント付与のtransactionもキャンセルされ、逆にポイント付与のtransactionをキャンセルしたときは連動して元のイベントがキャンセルされます。
3683
+
3684
+ ---
3685
+ 成功したときは[Campaign](#campaign)オブジェクトを返します
3686
+ <a name="list-campaigns"></a>
3687
+ #### キャンペーン一覧を取得する
3688
+ マネーIDを指定してキャンペーンを取得します。
3689
+ 発行体の組織マネージャ権限で、自組織が発行するマネーのキャンペーンについてのみ閲覧可能です。
3690
+ 閲覧権限がない場合は unpermitted_admin_user エラー(422)が返ります。
3691
+ ```ruby
3692
+ response = $client.send(Pokepay::Request::ListCampaigns.new(
3693
+ "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # private_money_id: マネーID
3694
+ page: 1, # ページ番号
3695
+ per_page: 50 # 1ページ分の取得数
3696
+ ))
3697
+ ```
3698
+
3699
+ ---
3700
+ `private_money_id`
3701
+ ```json
3702
+ {
3703
+ "type": "string",
3704
+ "format": "uuid"
3705
+ }
3706
+ ```
3707
+ マネーIDです。
3708
+
3709
+ フィルターとして使われ、指定したマネーでのキャンペーンのみ一覧に表示されます。
3710
+
3711
+ ---
3712
+ `page`
3713
+ ```json
3714
+ {
3715
+ "type": "integer",
3716
+ "minimum": 1
3717
+ }
3718
+ ```
3719
+ 取得したいページ番号です。
3720
+
3721
+ ---
3722
+ `per_page`
3723
+ ```json
3724
+ {
3725
+ "type": "integer",
3726
+ "minimum": 1
3727
+ }
3728
+ ```
3729
+ 1ページ分の取得数です。デフォルトでは 20 になっています。
3730
+
3731
+ ---
3732
+ 成功したときは[PaginatedCampaigns](#paginated-campaigns)オブジェクトを返します
3733
+ <a name="get-campaign"></a>
3734
+ #### キャンペーンを取得する
3735
+ IDを指定してキャンペーンを取得します。
3736
+ 発行体の組織マネージャ権限で、自組織が発行するマネーのキャンペーンについてのみ閲覧可能です。
3737
+ 閲覧権限がない場合は unpermitted_admin_user エラー(422)が返ります。
3738
+ ```ruby
3739
+ response = $client.send(Pokepay::Request::GetCampaign.new(
3740
+ "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" # campaign_id: キャンペーンID
3741
+ ))
3742
+ ```
3743
+
3744
+ ---
3745
+ `campaign_id`
3746
+ ```json
3747
+ {
3748
+ "type": "string",
3749
+ "format": "uuid"
3750
+ }
3751
+ ```
3752
+ キャンペーンIDです。
3753
+
3754
+ 指定したIDのキャンペーンを取得します。存在しないIDを指定した場合は404エラー(NotFound)が返ります。
3755
+
3756
+ ---
3757
+ 成功したときは[Campaign](#campaign)オブジェクトを返します
3758
+ <a name="update-campaign"></a>
3759
+ #### ポイント付与キャンペーンを更新する
3760
+ ポイント付与キャンペーンを更新します。
3761
+
3762
+ ```ruby
3763
+ response = $client.send(Pokepay::Request::UpdateCampaign.new(
3764
+ "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # campaign_id: キャンペーンID
3765
+ name: "xR1kiR4daTST401zYU9O5bmxo5R8HDeIrg38UDixRQOsOxJyiut30oRsSLi4FAWjvNFlMGhO7MjoFiHLtN9Yqy7R5Sel4rqjqD6mB2gz0FIdNSbIrXOBo1I3rdkLB5vuUQlHHWHdfJKJGJOe4o3A7Ast7GZKKewMQbpvWdRIf0j2NcGpd9kTg7fbzWuGj28bjzoMkUfQZyG6ql9kvIc3ugQfVcwKEOAlMUYblAnOJUw5uYgLUj2LWIHcZ", # キャンペーン名
3766
+ starts_at: "2016-05-05T15:35:59.000000+09:00", # キャンペーン開始日時
3767
+ ends_at: "2019-01-06T08:56:51.000000+09:00", # キャンペーン終了日時
3768
+ priority: 4521, # キャンペーンの適用優先度
3769
+ event: "topup", # イベント種別
3770
+ description: "h7Upt9fM2ThdFR4ZGmC3lYSdkRdIHlBo7iMGslQeLzTg9FCP6boJkANEWZ0xko5rtXdkjCZ6KXki", # キャンペーンの説明文
3771
+ status: "disabled", # キャンペーン作成時の状態
3772
+ point_expires_at: "2019-07-11T08:00:16.000000+09:00", # ポイント有効期限(絶対日時指定)
3773
+ point_expires_in_days: 9708, # ポイント有効期限(相対日数指定)
3774
+ is_exclusive: false, # キャンペーンの重複設定
3775
+ subject: "all", # ポイント付与の対象金額の種別
3776
+ amount_based_point_rules: [{
3777
+ "point_amount": 5,
3778
+ "point_amount_unit": "percent",
3779
+ "subject_more_than_or_equal": 1000,
3780
+ "subject_less_than": 5000
3781
+ }], # 取引金額ベースのポイント付与ルール
3782
+ product_based_point_rules: [{
3783
+ "point_amount": 5,
3784
+ "point_amount_unit": "percent",
3785
+ "product_code": "4912345678904",
3786
+ "is_multiply_by_count": true,
3787
+ "required_count": 2
3788
+ }, {
3789
+ "point_amount": 5,
3790
+ "point_amount_unit": "percent",
3791
+ "product_code": "4912345678904",
3792
+ "is_multiply_by_count": true,
3793
+ "required_count": 2
3794
+ }, {
3795
+ "point_amount": 5,
3796
+ "point_amount_unit": "percent",
3797
+ "product_code": "4912345678904",
3798
+ "is_multiply_by_count": true,
3799
+ "required_count": 2
3800
+ }], # 商品情報ベースのポイント付与ルール
3801
+ applicable_days_of_week: [4], # キャンペーンを適用する曜日 (複数指定)
3802
+ applicable_time_ranges: [{
3803
+ "from": "12:00",
3804
+ "to": "23:59"
3805
+ }, {
3806
+ "from": "12:00",
3807
+ "to": "23:59"
3808
+ }, {
3809
+ "from": "12:00",
3810
+ "to": "23:59"
3811
+ }], # キャンペーンを適用する時間帯 (複数指定)
3812
+ applicable_shop_ids: ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"], # キャンペーン適用対象となる店舗IDのリスト
3813
+ minimum_number_for_combination_purchase: 7047 # 複数種類の商品を同時購入するときの商品種別数の下限
3814
+ ))
3815
+ ```
3816
+
3817
+ ---
3818
+ `campaign_id`
3819
+ ```json
3820
+ {
3821
+ "type": "string",
3822
+ "format": "uuid"
3823
+ }
3824
+ ```
3825
+ キャンペーンIDです。
3826
+
3827
+ 指定したIDのキャンペーンを更新します。存在しないIDを指定した場合は404エラー(NotFound)が返ります。
3828
+
3829
+ ---
3830
+ `name`
3831
+ ```json
3832
+ {
3833
+ "type": "string",
3834
+ "maxLength": 256
3835
+ }
3836
+ ```
3837
+ キャンペーン名です。
3838
+
3839
+ ポイント付与によってできるチャージ取引の説明文に転記されます。取引説明文はエンドユーザーからも確認できます。
3840
+
3841
+ ---
3842
+ `starts_at`
3843
+ ```json
3844
+ {
3845
+ "type": "string",
3846
+ "format": "date-time"
3847
+ }
3848
+ ```
3849
+ キャンペーン開始日時です。
3850
+ キャンペーン期間中のみポイントが付与されます。
3851
+ 開始日時よりも終了日時が前のときはcampaign_invalid_periodエラー(422)になります。
3852
+
3853
+ ---
3854
+ `ends_at`
3855
+ ```json
3856
+ {
3857
+ "type": "string",
3858
+ "format": "date-time"
3859
+ }
3860
+ ```
3861
+ キャンペーン終了日時です。
3862
+ キャンペーン期間中のみポイントが付与されます。
3863
+ 開始日時よりも終了日時が前のときはcampaign_invalid_periodエラー(422)になります。
3864
+
3865
+ ---
3866
+ `priority`
3867
+ ```json
3868
+ { "type": "integer" }
3869
+ ```
3870
+ キャンペーンの適用優先度です。
3871
+
3872
+ 優先度が大きいものから順に適用判定されていきます。
3873
+ キャンペーン期間が重なっている同一の優先度のキャンペーンが存在するとcampaign_period_overlapsエラー(422)になります。
3874
+
3875
+ ---
3876
+ `event`
3877
+ ```json
3878
+ {
3879
+ "type": "string",
3880
+ "enum": [ "topup", "payment", "external-transaction" ]
3881
+ }
3882
+ ```
3883
+ キャンペーンのトリガーとなるイベントの種類を指定します。
3884
+
3885
+ 以下のいずれかを指定できます。
3886
+
3887
+ 1. topup
3888
+ 店舗からエンドユーザーへの送金取引(チャージ)
3889
+ 2. payment
3890
+ エンドユーザーから店舗への送金取引(支払い)
3891
+ 3. external-transaction
3892
+ ポケペイ外の取引(現金決済など)
3893
+
3894
+ ---
3895
+ `description`
3896
+ ```json
3897
+ {
3898
+ "type": "string",
3899
+ "maxLength": 200
3900
+ }
3901
+ ```
3902
+ キャンペーンの内容を記載します。管理画面などでキャンペーンを管理するための説明文になります。
3903
+
3904
+ ---
3905
+ `status`
3906
+ ```json
3907
+ {
3908
+ "type": "string",
3909
+ "enum": { "enabled": "disabled" }
3910
+ }
3911
+ ```
3912
+ キャンペーン作成時の状態を指定します。デフォルトではenabledです。
3913
+
3914
+ 以下のいずれかを指定できます。
3915
+
3916
+ 1. enabled
3917
+ 有効
3918
+ 2. disabled
3919
+ 無効
3920
+
3921
+ ---
3922
+ `point_expires_at`
3923
+ ```json
3924
+ {
3925
+ "type": "string",
3926
+ "format": "date-time"
3927
+ }
3928
+ ```
3929
+ キャンペーンによって付与されるポイントの有効期限を絶対日時で指定します。
3930
+ 省略した場合はマネーに設定された有効期限と同じものがポイントの有効期限となります。
3931
+
3932
+ ---
3933
+ `point_expires_in_days`
3934
+ ```json
3935
+ {
3936
+ "type": "integer",
3937
+ "minimum": 1
3938
+ }
3939
+ ```
3940
+ キャンペーンによって付与されるポイントの有効期限を相対日数で指定します。
3941
+ 省略した場合はマネーに設定された有効期限と同じものがポイントの有効期限となります。
3942
+
3943
+ ---
3944
+ `is_exclusive`
3945
+ ```json
3946
+ { "type": "boolean" }
3947
+ ```
3948
+ キャンペーンの重ね掛けを行うかどうかのフラグです。
3949
+
3950
+ これにtrueを指定すると他のキャンペーンと同時適用されません。デフォルト値はtrueです。
3951
+ falseを指定すると次の優先度の重ね掛け可能なキャンペーンの適用判定に進みます。
3952
+
3953
+ ---
3954
+ `subject`
3955
+ ```json
3956
+ {
3957
+ "type": "string",
3958
+ "enum": { "money": "all" }
3959
+ }
3960
+ ```
3961
+ ポイント付与額を計算する対象となる金額の種類を指定します。デフォルト値はallです。
3962
+ eventとしてexternal-transactionを指定した場合はポイントとマネーの区別がないためsubjectの指定に関わらず常にallとなります。
3963
+
3964
+ 以下のいずれかを指定できます。
3965
+
3966
+ 1. money
3967
+ moneyを指定すると決済額の中で「マネー」を使って支払った額を対象にします
3968
+
3969
+ 2. all
3970
+ all を指定すると決済額全体を対象にします (「ポイント」での取引額を含む)
3971
+ 注意: event を topup にしたときはポイントの付与に対しても適用されます
3972
+
3973
+ ---
3974
+ `amount_based_point_rules`
3975
+ ```json
3976
+ {
3977
+ "type": "array",
3978
+ "items": { "type": "object" }
3979
+ }
3980
+ ```
3981
+ 金額をベースとしてポイント付与を行うルールを指定します。
3982
+ amount_based_point_rules と product_based_point_rules はどちらか一方しか指定できません。
3983
+ 各ルールは一つのみ適用され、条件に重複があった場合は先に記載されたものが優先されます。
3984
+
3985
+ 例:
3986
+ ```javascript
3987
+ [
3988
+ // 1000円以上、5000円未満の決済には 5%
3989
+ {
3990
+ "point_amount": 5,
3991
+ "point_amount_unit": "percent",
3992
+ "subject_more_than_or_equal": 1000,
3993
+ "subject_less_than": 5000
3994
+ },
3995
+ // 5000円以上の決済には 10%
3996
+ {
3997
+ "point_amount": 10,
3998
+ "point_amount_unit": "percent",
3999
+ "subject_more_than_or_equal": 5000
4000
+ },
4001
+ ]
4002
+ ```
4003
+
4004
+ ---
4005
+ `product_based_point_rules`
4006
+ ```json
4007
+ {
4008
+ "type": "array",
4009
+ "items": { "type": "object" }
4010
+ }
4011
+ ```
4012
+ 商品情報をベースとしてポイント付与を行うルールを指定します。
4013
+ ルールは商品ごとに設定可能で、ルールの配列として指定します。
4014
+ amount_based_point_rules と product_based_point_rules はどちらか一方しか指定できません。
4015
+ event が payment か external-transaction の時のみ有効です。
4016
+ 各ルールの順序は問わず、適用可能なものは全て適用されます。
4017
+ 一つの決済の中で複数の商品がキャンペーン適用可能な場合はそれぞれの商品についてのルールが適用され、ポイント付与額はその合算になります。
4018
+
4019
+ 例:
4020
+ ```javascript
4021
+ [
4022
+ // 対象商品の購入額から5%ポイント付与。複数購入時は単価の5%が付与される。
4023
+ {
4024
+ "point_amount": 5,
4025
+ "point_amount_unit": "percent",
4026
+ "product_code": "4912345678904",
4027
+ },
4028
+ // 対象商品の購入額から5%ポイント付与。複数購入時は購入総額の5%が付与される。
4029
+ {
4030
+ "point_amount": 5,
4031
+ "point_amount_unit": "percent",
4032
+ "product_code": "4912345678904",
4033
+ "is_multiply_by_count": true,
4034
+ },
4035
+ // 対象商品を2つ以上購入したら500ポイント付与(固定額付与)
4036
+ {
4037
+ "point_amount": 500,
4038
+ "point_amount_unit": absolute",
4039
+ "product_code": "4912345678904",
4040
+ "required_count": 2
4041
+ },
4042
+ // 書籍は10%ポイント付与
4043
+ // ※ISBNの形式はレジがポケペイに送信する形式に準じます
4044
+ {
4045
+ "point_amount": 10,
4046
+ "point_amount_unit": "percent",
4047
+ "product_code": "978-%",
4048
+ },
4049
+ // 一部の出版社の書籍は10%ポイント付与
4050
+ {
4051
+ "point_amount": 10,
4052
+ "point_amount_unit": "percent",
4053
+ "product_code": "978-4-01-%", // 旺文社
4054
+ }
4055
+ ]
4056
+ ```
4057
+
4058
+ ---
4059
+ `minimum_number_for_combination_purchase`
4060
+ ```json
4061
+ {
4062
+ "type": "integer",
4063
+ "minimum": 1
4064
+ }
4065
+ ```
4066
+ 複数種別の商品を同時購入したとき、同時購入キャンペーンの対象となる商品種別数の下限です。
4067
+
4068
+ このパラメータを指定するときは product_based_point_rules で商品毎のルールが指定されている必要があります。
4069
+ 例えば、A商品とB商品とC商品のうち、キャンペーンの発火のために2商品以上が同時購入される必要があるときは 2 を指定します。
4070
+
4071
+ 例1: 商品A, Bが同時購入されたときに固定ポイント額(200ポイント)付与
4072
+ ```javascript
4073
+ {
4074
+ minimum_number_for_combination_purchase: 2,
4075
+ product_based_point_rules: [
4076
+ {
4077
+ "point_amount": 100,
4078
+ "point_amount_unit": "absolute",
4079
+ "product_code": "商品Aの商品コード"
4080
+ },
4081
+ {
4082
+ "point_amount": 100,
4083
+ "point_amount_unit": "absolute",
4084
+ "product_code": "商品Bの商品コード"
4085
+ }
4086
+ ]
4087
+ }
4088
+ ```
4089
+
4090
+ 例2: 商品A, Bが3個ずつ以上同時購入されたときに固定ポイント額(200ポイント)付与
4091
+ ```javascript
4092
+ {
4093
+ minimum_number_for_combination_purchase: 2,
4094
+ product_based_point_rules: [
4095
+ {
4096
+ "point_amount": 100,
4097
+ "point_amount_unit": "absolute",
4098
+ "product_code": "商品Aの商品コード",
4099
+ "required_count": 3
4100
+ },
4101
+ {
4102
+ "point_amount": 100,
4103
+ "point_amount_unit": "absolute",
4104
+ "product_code": "商品Bの商品コード",
4105
+ "required_count": 3
4106
+ }
4107
+ ]
4108
+ }
4109
+ ```
4110
+
4111
+ 例2: 商品A, B, Cのうち2商品以上が同時購入されたときに総額の10%ポイントが付与
4112
+ ```javascript
4113
+ {
4114
+ minimum_number_for_combination_purchase: 2,
4115
+ product_based_point_rules: [
4116
+ {
4117
+ "point_amount": 10,
4118
+ "point_amount_unit": "percent",
4119
+ "product_code": "商品Aの商品コード",
4120
+ "is_multiply_by_count": true,
4121
+ },
4122
+ {
4123
+ "point_amount": 10,
4124
+ "point_amount_unit": "percent",
4125
+ "product_code": "商品Bの商品コード",
4126
+ "is_multiply_by_count": true,
4127
+ },
4128
+ {
4129
+ "point_amount": 10,
4130
+ "point_amount_unit": "percent",
4131
+ "product_code": "商品Cの商品コード",
4132
+ "is_multiply_by_count": true,
4133
+ }
4134
+ ]
4135
+ }
4136
+ ```
4137
+
4138
+ ---
4139
+ 成功したときは[Campaign](#campaign)オブジェクトを返します
4140
+ ## Responses
4141
+
4142
+
4143
+ <a name="account-with-user"></a>
4144
+ ## AccountWithUser
4145
+ * `id (string)`:
4146
+ * `name (string)`:
4147
+ * `is_suspended (boolean)`:
4148
+ * `status (AccountStatus)`:
4149
+ * `private_money (PrivateMoney)`:
4150
+ * `user (User)`:
4151
+
4152
+ `status`は [AccountStatus](#account-status) オブジェクトを返します。
4153
+
4154
+ `private_money`は [PrivateMoney](#private-money) オブジェクトを返します。
4155
+
4156
+ `user`は [User](#user) オブジェクトを返します。
4157
+
4158
+ <a name="account-detail"></a>
4159
+ ## AccountDetail
4160
+ * `id (string)`:
4161
+ * `name (string)`:
4162
+ * `is_suspended (boolean)`:
4163
+ * `status (AccountStatus)`:
4164
+ * `balance (double)`:
4165
+ * `money_balance (double)`:
4166
+ * `point_balance (double)`:
4167
+ * `private_money (PrivateMoney)`:
4168
+ * `user (User)`:
4169
+ * `external_id (string)`:
4170
+
4171
+ `status`は [AccountStatus](#account-status) オブジェクトを返します。
4172
+
4173
+ `private_money`は [PrivateMoney](#private-money) オブジェクトを返します。
4174
+
4175
+ `user`は [User](#user) オブジェクトを返します。
4176
+
4177
+ <a name="account-deleted"></a>
4178
+ ## AccountDeleted
4179
+
4180
+ <a name="bill"></a>
4181
+ ## Bill
4182
+ * `id (string)`: 支払いQRコードのID
4183
+ * `amount (double)`: 支払い額
4184
+ * `max_amount (double)`: 支払い額を範囲指定した場合の上限
4185
+ * `min_amount (double)`: 支払い額を範囲指定した場合の下限
4186
+ * `description (string)`: 支払いQRコードの説明文(アプリ上で取引の説明文として表示される)
4187
+ * `account (AccountWithUser)`: 支払いQRコード発行ウォレット
4188
+ * `is_disabled (boolean)`: 無効化されているかどうか
4189
+ * `token (string)`: 支払いQRコードを解析したときに出てくるURL
4190
+
4191
+ `account`は [AccountWithUser](#account-with-user) オブジェクトを返します。
4192
+
4193
+ <a name="check"></a>
4194
+ ## Check
4195
+ * `id (string)`: チャージQRコードのID
4196
+ * `amount (double)`: チャージマネー額 (deprecated)
4197
+ * `money_amount (double)`: チャージマネー額
4198
+ * `point_amount (double)`: チャージポイント額
4199
+ * `description (string)`: チャージQRコードの説明文(アプリ上で取引の説明文として表示される)
4200
+ * `user (User)`: 送金元ユーザ情報
4201
+ * `is_onetime (boolean)`: 使用回数が一回限りかどうか
4202
+ * `is_disabled (boolean)`: 無効化されているかどうか
4203
+ * `expires_at (string)`: チャージQRコード自体の失効日時
4204
+ * `private_money (PrivateMoney)`: 対象マネー情報
4205
+ * `usage_limit (integer)`: 一回限りでない場合の最大読み取り回数
4206
+ * `usage_count (double)`: 一回限りでない場合の現在までに読み取られた回数
4207
+ * `token (string)`: チャージQRコードを解析したときに出てくるURL
4208
+
4209
+ `user`は [User](#user) オブジェクトを返します。
4210
+
4211
+ `private_money`は [PrivateMoney](#private-money) オブジェクトを返します。
4212
+
4213
+ <a name="cpm-token"></a>
4214
+ ## CpmToken
4215
+ * `cpm_token (string)`:
4216
+ * `account (AccountDetail)`:
4217
+ * `transaction (Transaction)`:
4218
+ * `event (ExternalTransaction)`:
4219
+ * `scopes (array of strings)`: 許可された取引種別
4220
+ * `expires_at (string)`: CPMトークンの失効日時
4221
+ * `metadata (string)`: エンドユーザー側メタデータ
4222
+
4223
+ `account`は [AccountDetail](#account-detail) オブジェクトを返します。
2697
4224
 
2698
4225
  `transaction`は [Transaction](#transaction) オブジェクトを返します。
2699
4226
 
@@ -2735,8 +4262,8 @@ response = $client.send(Pokepay::Request::BulkCreateTransaction.new(
2735
4262
  * `name (string)`: ユーザー (または店舗) 名
2736
4263
  * `is_merchant (boolean)`: 店舗ユーザーかどうか
2737
4264
 
2738
- <a name="transaction"></a>
2739
- ## Transaction
4265
+ <a name="transaction-detail"></a>
4266
+ ## TransactionDetail
2740
4267
  * `id (string)`: 取引ID
2741
4268
  * `type (string)`: 取引種別 (チャージ=topup, 支払い=payment)
2742
4269
  * `is_modified (boolean)`: 返金された取引かどうか
@@ -2749,11 +4276,14 @@ response = $client.send(Pokepay::Request::BulkCreateTransaction.new(
2749
4276
  * `point_amount (double)`: 決済ポイント額
2750
4277
  * `done_at (string)`: 取引日時
2751
4278
  * `description (string)`: 取引説明文
4279
+ * `transfers (array of Transfers)`:
2752
4280
 
2753
4281
  `receiver`と`sender`は [User](#user) オブジェクトを返します。
2754
4282
 
2755
4283
  `receiver_account`と`sender_account`は [Account](#account) オブジェクトを返します。
2756
4284
 
4285
+ `transfers`は [Transfer](#transfer) オブジェクトの配列を返します。
4286
+
2757
4287
  <a name="shop-with-accounts"></a>
2758
4288
  ## ShopWithAccounts
2759
4289
  * `id (string)`: 店舗ID
@@ -2780,6 +4310,22 @@ response = $client.send(Pokepay::Request::BulkCreateTransaction.new(
2780
4310
  * `submitted_at (string)`: バルク取引が登録された日時
2781
4311
  * `updated_at (string)`: バルク取引が更新された日時
2782
4312
 
4313
+ <a name="external-transaction"></a>
4314
+ ## ExternalTransaction
4315
+ * `id (string)`: ポケペイ外部取引ID
4316
+ * `is_modified (boolean)`: 返金された取引かどうか
4317
+ * `sender (User)`: 送金者情報
4318
+ * `sender_account (Account)`: 送金ウォレット情報
4319
+ * `receiver (User)`: 受取者情報
4320
+ * `receiver_account (Account)`: 受取ウォレット情報
4321
+ * `amount (double)`: 決済額
4322
+ * `done_at (string)`: 取引日時
4323
+ * `description (string)`: 取引説明文
4324
+
4325
+ `receiver`と`sender`は [User](#user) オブジェクトを返します。
4326
+
4327
+ `receiver_account`と`sender_account`は [Account](#account) オブジェクトを返します。
4328
+
2783
4329
  <a name="paginated-private-money-organization-summaries"></a>
2784
4330
  ## PaginatedPrivateMoneyOrganizationSummaries
2785
4331
  * `rows (array of PrivateMoneyOrganizationSummaries)`:
@@ -2800,6 +4346,16 @@ response = $client.send(Pokepay::Request::BulkCreateTransaction.new(
2800
4346
 
2801
4347
  `pagination`は [Pagination](#pagination) オブジェクトを返します。
2802
4348
 
4349
+ <a name="paginated-transaction-v2"></a>
4350
+ ## PaginatedTransactionV2
4351
+ * `rows (array of Transactions)`:
4352
+ * `per_page (integer)`:
4353
+ * `count (integer)`:
4354
+ * `next_page_cursor_id (string)`:
4355
+ * `prev_page_cursor_id (string)`:
4356
+
4357
+ `rows`は [Transaction](#transaction) オブジェクトの配列を返します。
4358
+
2803
4359
  <a name="paginated-transfers"></a>
2804
4360
  ## PaginatedTransfers
2805
4361
  * `rows (array of Transfers)`:
@@ -2870,6 +4426,44 @@ response = $client.send(Pokepay::Request::BulkCreateTransaction.new(
2870
4426
 
2871
4427
  `pagination`は [Pagination](#pagination) オブジェクトを返します。
2872
4428
 
4429
+ <a name="campaign"></a>
4430
+ ## Campaign
4431
+ * `id (string)`: キャンペーンID
4432
+ * `name (string)`: キャペーン名
4433
+ * `applicable_shops (array of Users)`: キャンペーン適用対象の店舗リスト
4434
+ * `is_exclusive (boolean)`: キャンペーンの重複を許すかどうかのフラグ
4435
+ * `starts_at (string)`: キャンペーン開始日時
4436
+ * `ends_at (string)`: キャンペーン終了日時
4437
+ * `point_expires_at (string)`: キャンペーンによって付与されるポイントの失効日時
4438
+ * `point_expires_in_days (integer)`: キャンペーンによって付与されるポイントの有効期限(相対指定、単位は日)
4439
+ * `priority (integer)`: キャンペーンの優先順位
4440
+ * `description (string)`: キャンペーン説明文
4441
+ * `bear_point_shop (User)`: ポイントを負担する店舗
4442
+ * `private_money (PrivateMoney)`: キャンペーンを適用するマネー
4443
+ * `dest_private_money (PrivateMoney)`: ポイントを付与するマネー
4444
+ * `point_calculation_rule (string)`: ポイント計算ルール (banklisp表記)
4445
+ * `point_calculation_rule_object (string)`: ポイント計算ルール (JSON文字列による表記)
4446
+ * `status (string)`: キャンペーンの現在の状態
4447
+
4448
+ `applicable-shops`は [User](#user) オブジェクトの配列を返します。
4449
+
4450
+ `bear_point_shop`は [User](#user) オブジェクトを返します。
4451
+
4452
+ `dest_private_money`と`private_money`は [PrivateMoney](#private-money) オブジェクトを返します。
4453
+
4454
+ <a name="paginated-campaigns"></a>
4455
+ ## PaginatedCampaigns
4456
+ * `rows (array of Campaigns)`:
4457
+ * `count (integer)`:
4458
+ * `pagination (Pagination)`:
4459
+
4460
+ `rows`は [Campaign](#campaign) オブジェクトの配列を返します。
4461
+
4462
+ `pagination`は [Pagination](#pagination) オブジェクトを返します。
4463
+
4464
+ <a name="account-status"></a>
4465
+ ## AccountStatus
4466
+
2873
4467
  <a name="private-money"></a>
2874
4468
  ## PrivateMoney
2875
4469
  * `id (string)`: マネーID
@@ -2884,18 +4478,22 @@ response = $client.send(Pokepay::Request::BulkCreateTransaction.new(
2884
4478
  * `type (string)`: マネー種別 (自家型=own, 第三者型=third-party)
2885
4479
  * `expiration_type (string)`: 有効期限種別 (チャージ日起算=static, 最終利用日起算=last-update, 最終チャージ日起算=last-topup-update)
2886
4480
  * `enable_topup_by_member (boolean)`: 加盟店によるチャージが有効かどうか
4481
+ * `display_money_and_point (string)`:
2887
4482
 
2888
4483
  `organization`は [Organization](#organization) オブジェクトを返します。
2889
4484
 
2890
- <a name="external-transaction"></a>
2891
- ## ExternalTransaction
2892
- * `id (string)`: ポケペイ外部取引ID
4485
+ <a name="transaction"></a>
4486
+ ## Transaction
4487
+ * `id (string)`: 取引ID
4488
+ * `type (string)`: 取引種別 (チャージ=topup, 支払い=payment)
2893
4489
  * `is_modified (boolean)`: 返金された取引かどうか
2894
4490
  * `sender (User)`: 送金者情報
2895
4491
  * `sender_account (Account)`: 送金ウォレット情報
2896
4492
  * `receiver (User)`: 受取者情報
2897
4493
  * `receiver_account (Account)`: 受取ウォレット情報
2898
- * `amount (double)`: 決済額
4494
+ * `amount (double)`: 決済総額 (マネー額 + ポイント額)
4495
+ * `money_amount (double)`: 決済マネー額
4496
+ * `point_amount (double)`: 決済ポイント額
2899
4497
  * `done_at (string)`: 取引日時
2900
4498
  * `description (string)`: 取引説明文
2901
4499
 
@@ -2918,10 +4516,28 @@ response = $client.send(Pokepay::Request::BulkCreateTransaction.new(
2918
4516
  * `id (string)`: ウォレットID
2919
4517
  * `name (string)`: ウォレット名
2920
4518
  * `is_suspended (boolean)`: ウォレットが凍結されているかどうか
4519
+ * `status (AccountStatus)`:
2921
4520
  * `private_money (PrivateMoney)`: 設定マネー情報
2922
4521
 
4522
+ `status`は [AccountStatus](#account-status) オブジェクトを返します。
4523
+
2923
4524
  `private_money`は [PrivateMoney](#private-money) オブジェクトを返します。
2924
4525
 
4526
+ <a name="transfer"></a>
4527
+ ## Transfer
4528
+ * `id (string)`:
4529
+ * `sender_account (AccountWithoutPrivateMoneyDetail)`:
4530
+ * `receiver_account (AccountWithoutPrivateMoneyDetail)`:
4531
+ * `amount (double)`:
4532
+ * `money_amount (double)`:
4533
+ * `point_amount (double)`:
4534
+ * `done_at (string)`:
4535
+ * `type (string)`:
4536
+ * `description (string)`:
4537
+ * `transaction_id (string)`:
4538
+
4539
+ `receiver_account`と`sender_account`は [AccountWithoutPrivateMoneyDetail](#account-without-private-money-detail) オブジェクトを返します。
4540
+
2925
4541
  <a name="shop-account"></a>
2926
4542
  ## ShopAccount
2927
4543
  * `id (string)`: ウォレットID
@@ -2948,21 +4564,6 @@ response = $client.send(Pokepay::Request::BulkCreateTransaction.new(
2948
4564
  * `has_prev (boolean)`:
2949
4565
  * `has_next (boolean)`:
2950
4566
 
2951
- <a name="transfer"></a>
2952
- ## Transfer
2953
- * `id (string)`:
2954
- * `sender_account (AccountWithoutPrivateMoneyDetail)`:
2955
- * `receiver_account (AccountWithoutPrivateMoneyDetail)`:
2956
- * `amount (double)`:
2957
- * `money_amount (double)`:
2958
- * `point_amount (double)`:
2959
- * `done_at (string)`:
2960
- * `type (string)`:
2961
- * `description (string)`:
2962
- * `transaction_id (string)`:
2963
-
2964
- `receiver_account`と`sender_account`は [AccountWithoutPrivateMoneyDetail](#account-without-private-money-detail) オブジェクトを返します。
2965
-
2966
4567
  <a name="account-balance"></a>
2967
4568
  ## AccountBalance
2968
4569
  * `expires_at (string)`:
@@ -2985,20 +4586,23 @@ response = $client.send(Pokepay::Request::BulkCreateTransaction.new(
2985
4586
  * `code (string)`: 組織コード
2986
4587
  * `name (string)`: 組織名
2987
4588
 
2988
- <a name="organization-summary"></a>
2989
- ## OrganizationSummary
2990
- * `count (integer)`:
2991
- * `money_amount (double)`:
2992
- * `money_count (integer)`:
2993
- * `point_amount (double)`:
2994
- * `point_count (integer)`:
2995
-
2996
4589
  <a name="account-without-private-money-detail"></a>
2997
4590
  ## AccountWithoutPrivateMoneyDetail
2998
4591
  * `id (string)`:
2999
4592
  * `name (string)`:
3000
4593
  * `is_suspended (boolean)`:
4594
+ * `status (AccountStatus)`:
3001
4595
  * `private_money_id (string)`:
3002
4596
  * `user (User)`:
3003
4597
 
4598
+ `status`は [AccountStatus](#account-status) オブジェクトを返します。
4599
+
3004
4600
  `user`は [User](#user) オブジェクトを返します。
4601
+
4602
+ <a name="organization-summary"></a>
4603
+ ## OrganizationSummary
4604
+ * `count (integer)`:
4605
+ * `money_amount (double)`:
4606
+ * `money_count (integer)`:
4607
+ * `point_amount (double)`:
4608
+ * `point_count (integer)`: