pokepay_partner_ruby_sdk 0.1.14 → 0.1.18

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 (41) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/docs/index.md +1201 -145
  4. data/lib/pokepay_partner_ruby_sdk/client.rb +24 -13
  5. data/lib/pokepay_partner_ruby_sdk/request/create_campaign.rb +20 -0
  6. data/lib/pokepay_partner_ruby_sdk/request/create_cpm_transaction.rb +17 -0
  7. data/lib/pokepay_partner_ruby_sdk/request/create_exchange_transaction.rb +2 -2
  8. data/lib/pokepay_partner_ruby_sdk/request/create_external_transaction.rb +18 -0
  9. data/lib/pokepay_partner_ruby_sdk/request/create_payment_transaction.rb +2 -2
  10. data/lib/pokepay_partner_ruby_sdk/request/create_topup_transaction.rb +2 -2
  11. data/lib/pokepay_partner_ruby_sdk/request/create_topup_transaction_with_check.rb +2 -2
  12. data/lib/pokepay_partner_ruby_sdk/request/create_transaction.rb +2 -2
  13. data/lib/pokepay_partner_ruby_sdk/request/create_transfer_transaction.rb +2 -2
  14. data/lib/pokepay_partner_ruby_sdk/request/create_user_account.rb +15 -0
  15. data/lib/pokepay_partner_ruby_sdk/request/delete_account.rb +15 -0
  16. data/lib/pokepay_partner_ruby_sdk/request/get_cpm_token.rb +15 -0
  17. data/lib/pokepay_partner_ruby_sdk/request/get_transaction.rb +2 -2
  18. data/lib/pokepay_partner_ruby_sdk/request/list_user_accounts.rb +2 -2
  19. data/lib/pokepay_partner_ruby_sdk/request/refund_external_transaction.rb +15 -0
  20. data/lib/pokepay_partner_ruby_sdk/request/refund_transaction.rb +2 -2
  21. data/lib/pokepay_partner_ruby_sdk/request/update_account.rb +2 -2
  22. data/lib/pokepay_partner_ruby_sdk/request/update_customer_account.rb +15 -0
  23. data/lib/pokepay_partner_ruby_sdk/response/account.rb +3 -0
  24. data/lib/pokepay_partner_ruby_sdk/response/account_deleted.rb +11 -0
  25. data/lib/pokepay_partner_ruby_sdk/response/account_detail.rb +3 -0
  26. data/lib/pokepay_partner_ruby_sdk/response/account_status.rb +11 -0
  27. data/lib/pokepay_partner_ruby_sdk/response/account_with_user.rb +3 -0
  28. data/lib/pokepay_partner_ruby_sdk/response/account_without_private_money_detail.rb +3 -0
  29. data/lib/pokepay_partner_ruby_sdk/response/campaign.rb +41 -0
  30. data/lib/pokepay_partner_ruby_sdk/response/cashtray_attempt.rb +1 -1
  31. data/lib/pokepay_partner_ruby_sdk/response/cashtray_with_result.rb +2 -2
  32. data/lib/pokepay_partner_ruby_sdk/response/cpm_token.rb +26 -0
  33. data/lib/pokepay_partner_ruby_sdk/response/external_transaction.rb +31 -0
  34. data/lib/pokepay_partner_ruby_sdk/response/private_money.rb +2 -0
  35. data/lib/pokepay_partner_ruby_sdk/response/product.rb +21 -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 +15 -0
  39. data/partner.yaml +1326 -39
  40. data/pokepay_partner_ruby_sdk.gemspec +3 -3
  41. metadata +21 -6
data/docs/index.md CHANGED
@@ -57,6 +57,20 @@ SSL_KEY_FILE = /path/to/key.pem
57
57
  SSL_CERT_FILE = /path/to/cert.pem
58
58
  ```
59
59
 
60
+ 設定はハッシュで渡すこともできます。
61
+
62
+ ```ruby
63
+ client = Pokepay::Client.new(
64
+ {
65
+ client_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
66
+ client_secret: "yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy",
67
+ api_base_url: "https://partnerapi-sandbox.pokepay.jp",
68
+ ssl_key_file: "/path/to/key.pem",
69
+ ssl_cert_file: "/path/to/cert.pem"
70
+ }
71
+ )
72
+ ```
73
+
60
74
  ## Overview
61
75
 
62
76
  ### APIリクエスト
@@ -142,15 +156,18 @@ response.body
142
156
  <a name="api-operations"></a>
143
157
  ## API Operations
144
158
 
159
+ - [GetCpmToken](#get-cpm-token): CPMトークンの状態取得
145
160
  - [ListTransactions](#list-transactions): 取引履歴を取得する
146
161
  - [CreateTransaction](#create-transaction): チャージする(廃止予定)
147
162
  - [CreateTopupTransaction](#create-topup-transaction): チャージする
148
163
  - [CreatePaymentTransaction](#create-payment-transaction): 支払いする
164
+ - [CreateCpmTransaction](#create-cpm-transaction): CPMトークンによる取引作成
149
165
  - [CreateTransferTransaction](#create-transfer-transaction): 個人間送金
150
166
  - [CreateExchangeTransaction](#create-exchange-transaction):
151
167
  - [GetTransaction](#get-transaction): 取引情報を取得する
152
- - [RefundTransaction](#refund-transaction): 返金する
168
+ - [RefundTransaction](#refund-transaction): 取引をキャンセルする
153
169
  - [ListTransfers](#list-transfers):
170
+ - [CreateCheck](#create-check): チャージQRコードの発行
154
171
  - [CreateTopupTransactionWithCheck](#create-topup-transaction-with-check): チャージQRコードを読み取ることでチャージする
155
172
  - [ListBills](#list-bills): 支払いQRコード一覧を表示する
156
173
  - [CreateBill](#create-bill): 支払いQRコードの発行
@@ -161,8 +178,10 @@ response.body
161
178
  - [UpdateCashtray](#update-cashtray): Cashtrayの情報を更新する
162
179
  - [GetAccount](#get-account): ウォレット情報を表示する
163
180
  - [UpdateAccount](#update-account): ウォレット情報を更新する
181
+ - [DeleteAccount](#delete-account): ウォレットを退会する
164
182
  - [ListAccountBalances](#list-account-balances): エンドユーザーの残高内訳を表示する
165
183
  - [ListAccountExpiredBalances](#list-account-expired-balances): エンドユーザーの失効済みの残高内訳を表示する
184
+ - [UpdateCustomerAccount](#update-customer-account): ウォレット情報を更新する
166
185
  - [GetCustomerAccounts](#get-customer-accounts): エンドユーザーのウォレット一覧を表示する
167
186
  - [CreateCustomerAccount](#create-customer-account): 新規エンドユーザーウォレットを追加する
168
187
  - [GetShopAccounts](#get-shop-accounts): 店舗ユーザーのウォレット一覧を表示する
@@ -173,17 +192,43 @@ response.body
173
192
  - [GetShop](#get-shop): 店舗情報を表示する
174
193
  - [UpdateShop](#update-shop): 店舗情報を更新する
175
194
  - [ListUserAccounts](#list-user-accounts): エンドユーザー、店舗ユーザーのウォレット一覧を表示する
195
+ - [CreateUserAccount](#create-user-account): エンドユーザーのウォレットを作成する
176
196
  - [GetPrivateMoneys](#get-private-moneys): マネー一覧を取得する
177
197
  - [GetPrivateMoneyOrganizationSummaries](#get-private-money-organization-summaries): 決済加盟店の取引サマリを取得する
178
198
  - [BulkCreateTransaction](#bulk-create-transaction): CSVファイル一括取引
199
+ - [CreateExternalTransaction](#create-external-transaction): ポケペイ外部取引を作成する
200
+ - [RefundExternalTransaction](#refund-external-transaction): ポケペイ外部取引をキャンセルする
201
+ - [CreateCampaign](#create-campaign): ポイント付与キャンペーンを作る
179
202
  ### Transaction
203
+ <a name="get-cpm-token"></a>
204
+ #### CPMトークンの状態取得
205
+ CPMトークンの現在の状態を取得します。CPMトークンの有効期限やCPM取引の状態を返します。
206
+ ```ruby
207
+ response = $client.send(Pokepay::Request::GetCpmToken.new(
208
+ "R1aePdc9fGHLcwyelAg5Jr" # cpm_token: CPMトークン
209
+ ))
210
+ ```
211
+
212
+ ---
213
+ `cpm_token`
214
+ ```json
215
+ {
216
+ "type": "string",
217
+ "minLength": 22,
218
+ "maxLength": 22
219
+ }
220
+ ```
221
+ CPM取引時にエンドユーザーが店舗に提示するバーコードを解析して得られる22桁の文字列です。
222
+
223
+ ---
224
+ 成功したときは[CpmToken](#cpm-token)オブジェクトを返します
180
225
  <a name="list-transactions"></a>
181
226
  #### 取引履歴を取得する
182
227
  取引一覧を返します。
183
228
  ```ruby
184
229
  response = $client.send(Pokepay::Request::ListTransactions.new(
185
- from: "2017-05-10T09:01:07.000000+09:00", # 開始日時
186
- to: "2017-02-12T17:02:56.000000+09:00", # 終了日時
230
+ from: "2019-03-26T10:40:08.000000+09:00", # 開始日時
231
+ to: "2025-06-28T13:58:26.000000+09:00", # 終了日時
187
232
  page: 1, # ページ番号
188
233
  per_page: 50, # 1ページ分の取引数
189
234
  shop_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # 店舗ID
@@ -193,7 +238,7 @@ response = $client.send(Pokepay::Request::ListTransactions.new(
193
238
  transaction_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # 取引ID
194
239
  organization_code: "pocketchange", # 組織コード
195
240
  private_money_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # マネーID
196
- is_modified: false, # キャンセルフラグ
241
+ is_modified: true, # キャンセルフラグ
197
242
  types: ["topup", "payment"], # 取引種別 (複数指定可)、チャージ=topup、支払い=payment
198
243
  description: "店頭QRコードによる支払い" # 取引説明文
199
244
  ))
@@ -347,7 +392,8 @@ response = $client.send(Pokepay::Request::ListTransactions.new(
347
392
  "type": "string",
348
393
  "enum": {
349
394
  "topup": "payment",
350
- "exchange_outflow": "exchange_inflow"
395
+ "exchange_outflow": "exchange_inflow",
396
+ "cashback": "expire"
351
397
  }
352
398
  }
353
399
  }
@@ -363,11 +409,17 @@ response = $client.send(Pokepay::Request::ListTransactions.new(
363
409
  エンドユーザーから店舗への送金取引(支払い)
364
410
 
365
411
  3. exchange-outflow
366
-   他マネーへの流出
412
+ 他マネーへの流出
367
413
 
368
414
  4. exchange-inflow
369
415
  他マネーからの流入
370
416
 
417
+ 5. cashback
418
+ 退会時返金取引
419
+
420
+ 6. expire
421
+ 退会時失効取引
422
+
371
423
  ---
372
424
  `description`
373
425
  ```json
@@ -390,10 +442,10 @@ response = $client.send(Pokepay::Request::CreateTransaction.new(
390
442
  "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
391
443
  "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
392
444
  "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
393
- money_amount: 5545,
394
- point_amount: 6708,
395
- point_expires_at: "2024-02-06T11:02:52.000000+09:00", # ポイント有効期限
396
- description: "CafuN856J50SdiADG37eydGENMPuSUGCPNHip0"
445
+ money_amount: 5259,
446
+ point_amount: 8639,
447
+ point_expires_at: "2021-12-02T20:12:47.000000+09:00", # ポイント有効期限
448
+ description: "qxXj74j643AIOVakyq8QHWKNric3MBQYWsKtvnxoQJLloM94TQVFchkaVLnKXq1JcpZfZ"
397
449
  ))
398
450
  ```
399
451
 
@@ -409,7 +461,7 @@ response = $client.send(Pokepay::Request::CreateTransaction.new(
409
461
  省略した場合はマネーに設定された有効期限と同じものがポイントの有効期限となります。
410
462
 
411
463
  ---
412
- 成功したときは[Transaction](#transaction)オブジェクトを返します
464
+ 成功したときは[TransactionDetail](#transaction-detail)オブジェクトを返します
413
465
  <a name="create-topup-transaction"></a>
414
466
  #### チャージする
415
467
  チャージ取引を作成します。
@@ -419,10 +471,11 @@ response = $client.send(Pokepay::Request::CreateTopupTransaction.new(
419
471
  "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # customer_id: エンドユーザーのID
420
472
  "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # private_money_id: マネーID
421
473
  bear_point_shop_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # ポイント支払時の負担店舗ID
422
- money_amount: 7001, # マネー額
423
- point_amount: 650, # ポイント額
424
- point_expires_at: "2018-05-18T16:46:21.000000+09:00", # ポイント有効期限
474
+ money_amount: 8612, # マネー額
475
+ point_amount: 5409, # ポイント額
476
+ point_expires_at: "2022-04-20T20:45:17.000000+09:00", # ポイント有効期限
425
477
  description: "初夏のチャージキャンペーン", # 取引履歴に表示する説明文
478
+ metadata: "{\"key\":\"value\"}", # 取引メタデータ
426
479
  request_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" # リクエストID
427
480
  ))
428
481
  ```
@@ -479,25 +532,27 @@ response = $client.send(Pokepay::Request::CreateTopupTransaction.new(
479
532
  `money_amount`
480
533
  ```json
481
534
  {
482
- "type": "number",
535
+ "type": "integer",
483
536
  "minimum": 0
484
537
  }
485
538
  ```
486
539
  マネー額です。
487
540
 
488
541
  送金するマネー額を指定します。
542
+ デフォルト値は0で、money_amountとpoint_amountの両方が0のときにはinvalid_parameter_both_point_and_money_are_zero(エラーコード400)が返ります。
489
543
 
490
544
  ---
491
545
  `point_amount`
492
546
  ```json
493
547
  {
494
- "type": "number",
548
+ "type": "integer",
495
549
  "minimum": 0
496
550
  }
497
551
  ```
498
552
  ポイント額です。
499
553
 
500
554
  送金するポイント額を指定します。
555
+ デフォルト値は0で、money_amountとpoint_amountの両方が0のときにはinvalid_parameter_both_point_and_money_are_zero(エラーコード400)が返ります。
501
556
 
502
557
  ---
503
558
  `point_expires_at`
@@ -522,6 +577,18 @@ response = $client.send(Pokepay::Request::CreateTopupTransaction.new(
522
577
 
523
578
  任意入力で、取引履歴に表示される説明文です。
524
579
 
580
+ ---
581
+ `metadata`
582
+ ```json
583
+ {
584
+ "type": "string",
585
+ "format": "json"
586
+ }
587
+ ```
588
+ 取引作成時に指定されるメタデータです。
589
+
590
+ 任意入力で、全てのkeyとvalueが文字列であるようなフラットな構造のJSON文字列で指定します。
591
+
525
592
  ---
526
593
  `request_id`
527
594
  ```json
@@ -537,7 +604,7 @@ response = $client.send(Pokepay::Request::CreateTopupTransaction.new(
537
604
  リクエストIDを指定したとき、まだそのリクエストIDに対する取引がない場合、新規に取引が作られレスポンスとして返されます。もしそのリクエストIDに対する取引が既にある場合、既存の取引がレスポンスとして返されます。
538
605
 
539
606
  ---
540
- 成功したときは[Transaction](#transaction)オブジェクトを返します
607
+ 成功したときは[TransactionDetail](#transaction-detail)オブジェクトを返します
541
608
  <a name="create-payment-transaction"></a>
542
609
  #### 支払いする
543
610
  支払取引を作成します。
@@ -548,8 +615,20 @@ response = $client.send(Pokepay::Request::CreatePaymentTransaction.new(
548
615
  "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # shop_id: 店舗ID
549
616
  "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # customer_id: エンドユーザーID
550
617
  "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # private_money_id: マネーID
551
- 6244, # amount: 支払い額
618
+ 6066, # amount: 支払い額
552
619
  description: "たい焼き(小倉)", # 取引履歴に表示する説明文
620
+ metadata: "{\"key\":\"value\"}", # 取引メタデータ
621
+ products: [{"jan_code":"abc",
622
+ "name":"name1",
623
+ "unit_price":100,
624
+ "price": 100,
625
+ "is_discounted": false,
626
+ "other":"{}"}, {"jan_code":"abc",
627
+ "name":"name1",
628
+ "unit_price":100,
629
+ "price": 100,
630
+ "is_discounted": false,
631
+ "other":"{}"}], # 商品情報データ
553
632
  request_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" # リクエストID
554
633
  ))
555
634
  ```
@@ -594,7 +673,7 @@ response = $client.send(Pokepay::Request::CreatePaymentTransaction.new(
594
673
  `amount`
595
674
  ```json
596
675
  {
597
- "type": "number",
676
+ "type": "integer",
598
677
  "minimum": 0
599
678
  }
600
679
  ```
@@ -614,6 +693,155 @@ response = $client.send(Pokepay::Request::CreatePaymentTransaction.new(
614
693
 
615
694
  任意入力で、取引履歴に表示される説明文です。
616
695
 
696
+ ---
697
+ `metadata`
698
+ ```json
699
+ {
700
+ "type": "string",
701
+ "format": "json"
702
+ }
703
+ ```
704
+ 取引作成時に指定されるメタデータです。
705
+
706
+ 任意入力で、全てのkeyとvalueが文字列であるようなフラットな構造のJSON文字列で指定します。
707
+
708
+ ---
709
+ `products`
710
+ ```json
711
+ {
712
+ "type": "array",
713
+ "items": { "type": "object" }
714
+ }
715
+ ```
716
+ 一つの取引に含まれる商品情報データです。
717
+ 以下の内容からなるJSONオブジェクトの配列で指定します。
718
+
719
+ - `jan_code`: JANコード。64字以下の文字列
720
+ - `name`: 商品名。256字以下の文字列
721
+ - `unit_price`: 商品単価。0以上の数値
722
+ - `price`: 全体の金額(例: 商品単価 × 個数)。0以上の数値
723
+ - `is_discounted`: 賞味期限が近いなどの理由で商品が値引きされているかどうかのフラグ。boolean
724
+ - `other`: その他商品に関する情報。JSONオブジェクトで指定します。
725
+
726
+ ---
727
+ `request_id`
728
+ ```json
729
+ {
730
+ "type": "string",
731
+ "format": "uuid"
732
+ }
733
+ ```
734
+ 取引作成APIの羃等性を担保するためのリクエスト固有のIDです。
735
+
736
+ 取引作成APIで結果が受け取れなかったなどの理由で再試行する際に、二重に取引が作られてしまうことを防ぐために、クライアント側から指定されます。指定は任意で、UUID V4フォーマットでランダム生成した文字列です。リクエストIDは一定期間で削除されます。
737
+
738
+ リクエストIDを指定したとき、まだそのリクエストIDに対する取引がない場合、新規に取引が作られレスポンスとして返されます。もしそのリクエストIDに対する取引が既にある場合、既存の取引がレスポンスとして返されます。
739
+
740
+ ---
741
+ 成功したときは[TransactionDetail](#transaction-detail)オブジェクトを返します
742
+ <a name="create-cpm-transaction"></a>
743
+ #### CPMトークンによる取引作成
744
+ CPMトークンにより取引を作成します。
745
+ CPMトークンに設定されたスコープの取引を作ることができます。
746
+
747
+ ```ruby
748
+ response = $client.send(Pokepay::Request::CreateCpmTransaction.new(
749
+ "sKCxnRcuSoLNAly4QR5kzf", # cpm_token: CPMトークン
750
+ "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # shop_id: 店舗ID
751
+ 4364, # amount: 取引金額
752
+ description: "たい焼き(小倉)", # 取引説明文
753
+ metadata: "{\"key\":\"value\"}", # 店舗側メタデータ
754
+ products: [{"jan_code":"abc",
755
+ "name":"name1",
756
+ "unit_price":100,
757
+ "price": 100,
758
+ "is_discounted": false,
759
+ "other":"{}"}, {"jan_code":"abc",
760
+ "name":"name1",
761
+ "unit_price":100,
762
+ "price": 100,
763
+ "is_discounted": false,
764
+ "other":"{}"}], # 商品情報データ
765
+ request_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" # リクエストID
766
+ ))
767
+ ```
768
+
769
+ ---
770
+ `cpm_token`
771
+ ```json
772
+ {
773
+ "type": "string",
774
+ "minLength": 22,
775
+ "maxLength": 22
776
+ }
777
+ ```
778
+ エンドユーザーによって作られ、アプリなどに表示され、店舗に対して提示される22桁の文字列です。
779
+
780
+ エンドユーザーによって許可された取引のスコープを持っています。
781
+
782
+ ---
783
+ `shop_id`
784
+ ```json
785
+ {
786
+ "type": "string",
787
+ "format": "uuid"
788
+ }
789
+ ```
790
+ 店舗IDです。
791
+
792
+ 支払いやチャージを行う店舗を指定します。
793
+
794
+ ---
795
+ `amount`
796
+ ```json
797
+ { "type": "number" }
798
+ ```
799
+ 取引金額を指定します。
800
+
801
+ 正の値を与えるとチャージになり、負の値を与えると支払いとなります。
802
+
803
+ ---
804
+ `description`
805
+ ```json
806
+ {
807
+ "type": "string",
808
+ "maxLength": 200
809
+ }
810
+ ```
811
+ 取引説明文です。
812
+
813
+ エンドユーザーアプリの取引履歴などに表示されます。
814
+
815
+ ---
816
+ `metadata`
817
+ ```json
818
+ {
819
+ "type": "string",
820
+ "format": "json"
821
+ }
822
+ ```
823
+ 取引作成時に店舗側から指定されるメタデータです。
824
+
825
+ 任意入力で、全てのkeyとvalueが文字列であるようなフラットな構造のJSON文字列で指定します。
826
+
827
+ ---
828
+ `products`
829
+ ```json
830
+ {
831
+ "type": "array",
832
+ "items": { "type": "object" }
833
+ }
834
+ ```
835
+ 一つの取引に含まれる商品情報データです。
836
+ 以下の内容からなるJSONオブジェクトの配列で指定します。
837
+
838
+ - `jan_code`: JANコード。64字以下の文字列
839
+ - `name`: 商品名。256字以下の文字列
840
+ - `unit_price`: 商品単価。0以上の数値
841
+ - `price`: 全体の金額(例: 商品単価 × 個数)。0以上の数値
842
+ - `is_discounted`: 賞味期限が近いなどの理由で商品が値引きされているかどうかのフラグ。boolean
843
+ - `other`: その他商品に関する情報。JSONオブジェクトで指定します。
844
+
617
845
  ---
618
846
  `request_id`
619
847
  ```json
@@ -629,7 +857,7 @@ response = $client.send(Pokepay::Request::CreatePaymentTransaction.new(
629
857
  リクエストIDを指定したとき、まだそのリクエストIDに対する取引がない場合、新規に取引が作られレスポンスとして返されます。もしそのリクエストIDに対する取引が既にある場合、既存の取引がレスポンスとして返されます。
630
858
 
631
859
  ---
632
- 成功したときは[Transaction](#transaction)オブジェクトを返します
860
+ 成功したときは[TransactionDetail](#transaction-detail)オブジェクトを返します
633
861
  <a name="create-transfer-transaction"></a>
634
862
  #### 個人間送金
635
863
  エンドユーザー間での送金取引(個人間送金)を作成します。
@@ -640,7 +868,8 @@ response = $client.send(Pokepay::Request::CreateTransferTransaction.new(
640
868
  "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # sender_id: 送金元ユーザーID
641
869
  "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # receiver_id: 受取ユーザーID
642
870
  "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # private_money_id: マネーID
643
- 2754, # amount: 送金額
871
+ 6176, # amount: 送金額
872
+ metadata: "{\"key\":\"value\"}", # 取引メタデータ
644
873
  description: "たい焼き(小倉)", # 取引履歴に表示する説明文
645
874
  request_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" # リクエストID
646
875
  ))
@@ -694,6 +923,18 @@ response = $client.send(Pokepay::Request::CreateTransferTransaction.new(
694
923
 
695
924
  送金するマネー額を指定します。
696
925
 
926
+ ---
927
+ `metadata`
928
+ ```json
929
+ {
930
+ "type": "string",
931
+ "format": "json"
932
+ }
933
+ ```
934
+ 取引作成時に指定されるメタデータです。
935
+
936
+ 任意入力で、全てのkeyとvalueが文字列であるようなフラットな構造のJSON文字列で指定します。
937
+
697
938
  ---
698
939
  `description`
699
940
  ```json
@@ -721,7 +962,7 @@ response = $client.send(Pokepay::Request::CreateTransferTransaction.new(
721
962
  リクエストIDを指定したとき、まだそのリクエストIDに対する取引がない場合、新規に取引が作られレスポンスとして返されます。もしそのリクエストIDに対する取引が既にある場合、既存の取引がレスポンスとして返されます。
722
963
 
723
964
  ---
724
- 成功したときは[Transaction](#transaction)オブジェクトを返します
965
+ 成功したときは[TransactionDetail](#transaction-detail)オブジェクトを返します
725
966
  <a name="create-exchange-transaction"></a>
726
967
  ####
727
968
  ```ruby
@@ -729,8 +970,8 @@ response = $client.send(Pokepay::Request::CreateExchangeTransaction.new(
729
970
  "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
730
971
  "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
731
972
  "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
732
- 7140,
733
- description: "Xe1sIjLSVztCspdpKcDGU85LATApzQ2dQG1XtK0UfX1fzmKZw4jAX5TdVMZA3FsBWHTaR7q8iHovbTWoPNbCUX3WmvU0lnYW7MWulxJqejEoXiemEzy22TP2wtSY9IoDSrJUA2sSTBsOwjVmr0",
973
+ 2660,
974
+ description: "7LZFZwhy5RIJGwbFSZ2qU3L9frpqlrETgz3O9wlyQ0TWfR4Gx21zM7WIQGDsPsJyAShBlCJPjtVj6RA58jW2j8noWbhryHKQAP2bBeZkmIh2UeN",
734
975
  request_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" # リクエストID
735
976
  ))
736
977
  ```
@@ -750,7 +991,7 @@ response = $client.send(Pokepay::Request::CreateExchangeTransaction.new(
750
991
  リクエストIDを指定したとき、まだそのリクエストIDに対する取引がない場合、新規に取引が作られレスポンスとして返されます。もしそのリクエストIDに対する取引が既にある場合、既存の取引がレスポンスとして返されます。
751
992
 
752
993
  ---
753
- 成功したときは[Transaction](#transaction)オブジェクトを返します
994
+ 成功したときは[TransactionDetail](#transaction-detail)オブジェクトを返します
754
995
  <a name="get-transaction"></a>
755
996
  #### 取引情報を取得する
756
997
  取引を取得します。
@@ -773,33 +1014,40 @@ response = $client.send(Pokepay::Request::GetTransaction.new(
773
1014
  フィルターとして使われ、指定した取引IDの取引を取得します。
774
1015
 
775
1016
  ---
776
- 成功したときは[Transaction](#transaction)オブジェクトを返します
1017
+ 成功したときは[TransactionDetail](#transaction-detail)オブジェクトを返します
777
1018
  <a name="refund-transaction"></a>
778
- #### 返金する
1019
+ #### 取引をキャンセルする
1020
+ 取引IDを指定して取引をキャンセルします。
1021
+
1022
+ 発行体の管理者は自組織の直営店、または発行しているマネーの決済加盟店組織での取引をキャンセルできます。
1023
+ キャンセル対象の取引に付随するポイント還元キャンペーンやクーポン適用も取り消されます。
1024
+
1025
+ チャージ取引のキャンセル時に返金すべき残高が足りないときは `account_balance_not_enough (422)` エラーが返ります。
1026
+ 取引をキャンセルできるのは1回きりです。既にキャンセルされた取引を重ねてキャンセルしようとすると `transaction_already_refunded (422)` エラーが返ります。
779
1027
  ```ruby
780
1028
  response = $client.send(Pokepay::Request::RefundTransaction.new(
781
1029
  "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # transaction_id: 取引ID
782
1030
  description: "返品対応のため" # 取引履歴に表示する返金事由
783
1031
  ))
784
1032
  ```
785
- 成功したときは[Transaction](#transaction)オブジェクトを返します
1033
+ 成功したときは[TransactionDetail](#transaction-detail)オブジェクトを返します
786
1034
  <a name="list-transfers"></a>
787
1035
  ####
788
1036
  ```ruby
789
1037
  response = $client.send(Pokepay::Request::ListTransfers.new(
790
- from: "2020-12-08T12:26:18.000000+09:00",
791
- to: "2017-11-24T07:36:36.000000+09:00",
792
- page: 4740,
793
- per_page: 1712,
1038
+ from: "2022-09-29T17:26:58.000000+09:00",
1039
+ to: "2021-08-10T06:43:48.000000+09:00",
1040
+ page: 4607,
1041
+ per_page: 4277,
794
1042
  shop_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
795
- shop_name: "79fqhITnnz7WaCAiQd9B8sle88sl7rSWKN9oQjHsNX48VkSyiuzE1L2wv36YuE4jwp0IiR44I5KLiOrRKq3qxtTGifN6KrraD5uojwDmQdLNOKHIlDiaOh78QfhNbZ3YfGhlbqaOElvScjtjkG1",
1043
+ shop_name: "7tEp9MnaMKkPTTOh4KlFXKgt",
796
1044
  customer_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
797
- customer_name: "WEjltqaYkhp7caXjUtBcNe9XyY4wthFo0glXBErIUB1p7aPMzXnAdDrY96Gn0OAQ9xSN0zfKx7ivixiVqjgvBNcsQLQxAtJm",
1045
+ customer_name: "xsqVTYrrSHZ1a0tz4EzkuhUCHWp85qyAYWUJWst1yIlHOt0XiM6Qkur8SbZd3wcuCesxkTgeUlIAlQvL5t780R8L5VrLxzRQlVu0ZdkmHWdPUiVDqeHPcQVtlOjSB31Mxq8SXpxSHJRZi52y7KvoeklIR5ig74Fkbtbb0SlK2KbT8BQ8WxGHxi6f0cuW1ZhxLtCHCm7yUfJm7Fg98YgjSKRGLQpNx8ciNrKweGJtnG",
798
1046
  transaction_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
799
1047
  private_money_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
800
- is_modified: true,
801
- transaction_types: ["transfer", "payment", "topup", "exchange"],
802
- transfer_types: ["exchange", "payment", "campaign", "transfer"], # 取引明細の種類でフィルターします。
1048
+ is_modified: false,
1049
+ transaction_types: ["exchange", "topup", "cashback", "transfer", "expire"],
1050
+ transfer_types: ["coupon", "topup", "cashback", "exchange", "payment", "transfer", "campaign"], # 取引明細の種類でフィルターします。
803
1051
  description: "店頭QRコードによる支払い" # 取引詳細説明文
804
1052
  ))
805
1053
  ```
@@ -814,7 +1062,8 @@ response = $client.send(Pokepay::Request::ListTransfers.new(
814
1062
  "enum": {
815
1063
  "topup": "payment",
816
1064
  "exchange": "transfer",
817
- "coupon": "campaign"
1065
+ "coupon": "campaign",
1066
+ "cashback": "expire"
818
1067
  }
819
1068
  }
820
1069
  }
@@ -838,6 +1087,12 @@ response = $client.send(Pokepay::Request::ListTransfers.new(
838
1087
  5. coupon
839
1088
  クーポンによる値引き処理、またはそのキャンセル取引
840
1089
 
1090
+ 6. cashback
1091
+ 退会時の返金取引
1092
+
1093
+ 7. expire
1094
+ 退会時失効取引
1095
+
841
1096
  ---
842
1097
  `description`
843
1098
  ```json
@@ -861,6 +1116,46 @@ response = $client.send(Pokepay::Request::ListTransfers.new(
861
1116
 
862
1117
  QRコードを読み取る方法以外にも、このURLリンクを直接スマートフォン(iOS/Android)上で開くことによりアプリが起動して取引が行われます。(注意: 上記URLはsandbox環境であるため、アプリもsandbox環境のものである必要があります) 上記URL中の `xxxxxxxx-xxxx-xxxxxxxxx-xxxxxxxxxxxx` の部分がチャージQRコードのIDです。
863
1118
 
1119
+ <a name="create-check"></a>
1120
+ #### チャージQRコードの発行
1121
+ ```ruby
1122
+ response = $client.send(Pokepay::Request::CreateCheck.new(
1123
+ "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # account_id: 送金元の店舗アカウントID
1124
+ money_amount: 7907, # 付与マネー額
1125
+ point_amount: 4457, # 付与ポイント額
1126
+ description: "test check", # 説明文(アプリ上で取引の説明文として表示される)
1127
+ is_onetime: false, # ワンタイムかどうか。真の場合1度読み込まれた時点でそのチャージQRは失効する(デフォルト値は真)
1128
+ usage_limit: 6907, # ワンタイムでない場合、複数ユーザから読み取られ得る。その場合の最大読み取り回数
1129
+ expires_at: "2024-10-26T13:29:44.000000+09:00", # チャージQR自体の失効日時
1130
+ point_expires_at: "2023-06-12T09:55:16.000000+09:00", # チャージQRによって付与されるポイントの失効日時
1131
+ point_expires_in_days: 60, # チャージQRによって付与されるポイントの有効期限(相対指定、単位は日)
1132
+ bear_point_account: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" # ポイント額を負担する店舗アカウントのID
1133
+ ))
1134
+ ```
1135
+ `money_amount`と`point_amount`の少なくとも一方は指定する必要があります。
1136
+
1137
+
1138
+ ---
1139
+ `is_onetime`
1140
+ ```json
1141
+ { "type": "boolean" }
1142
+ ```
1143
+ チャージQRコードが一度の読み取りで失効するときに`true`にします。デフォルト値は`true`です。
1144
+ `false`の場合、そのチャージQRコードは1ユーザについては1回きりですが、複数ユーザによって読み取り可能なQRコードになります。
1145
+
1146
+
1147
+ ---
1148
+ `usage_limit`
1149
+ ```json
1150
+ { "type": "integer" }
1151
+ ```
1152
+ 複数ユーザによって読み取り可能なチャージQRコードの読み取り回数に制限をつけるために指定します。
1153
+ 省略すると無制限に読み取り可能なチャージQRコードになります。
1154
+ チャージQRコードは管理画面からいつでも無効化(有効化)することができます。
1155
+
1156
+
1157
+ ---
1158
+ 成功したときは[Check](#check)オブジェクトを返します
864
1159
  <a name="create-topup-transaction-with-check"></a>
865
1160
  #### チャージQRコードを読み取ることでチャージする
866
1161
  通常チャージQRコードはエンドユーザーのアプリによって読み取られ、アプリとポケペイサーバとの直接通信によって取引が作られます。 もしエンドユーザーとの通信をパートナーのサーバのみに限定したい場合、パートナーのサーバがチャージQRの情報をエンドユーザーから代理受けして、サーバ間連携APIによって実際のチャージ取引をリクエストすることになります。
@@ -899,7 +1194,7 @@ QRコード生成時に送金元店舗のウォレット情報や、送金額な
899
1194
  送金先のエンドユーザーを指定します。
900
1195
 
901
1196
  ---
902
- 成功したときは[Transaction](#transaction)オブジェクトを返します
1197
+ 成功したときは[TransactionDetail](#transaction-detail)オブジェクトを返します
903
1198
  ### Bill
904
1199
  支払いQRコード
905
1200
  <a name="list-bills"></a>
@@ -907,19 +1202,19 @@ QRコード生成時に送金元店舗のウォレット情報や、送金額な
907
1202
  支払いQRコード一覧を表示します。
908
1203
  ```ruby
909
1204
  response = $client.send(Pokepay::Request::ListBills.new(
910
- page: 5974, # ページ番号
911
- per_page: 4994, # 1ページの表示数
912
- bill_id: "kNd3", # 支払いQRコードのID
1205
+ page: 6577, # ページ番号
1206
+ per_page: 1765, # 1ページの表示数
1207
+ bill_id: "d", # 支払いQRコードのID
913
1208
  private_money_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # マネーID
914
- organization_code: "jUp3-N--X92Fbs--D0fn--Hx6Q-zy1", # 組織コード
1209
+ organization_code: "-ct6-xMB5y4--o-", # 組織コード
915
1210
  description: "test bill", # 取引説明文
916
- created_from: "2017-04-21T18:37:28.000000+09:00", # 作成日時(起点)
917
- created_to: "2021-05-08T05:36:00.000000+09:00", # 作成日時(終点)
1211
+ created_from: "2022-03-20T08:28:32.000000+09:00", # 作成日時(起点)
1212
+ created_to: "2017-11-05T16:56:15.000000+09:00", # 作成日時(終点)
918
1213
  shop_name: "bill test shop1", # 店舗名
919
1214
  shop_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # 店舗ID
920
- lower_limit_amount: 6767, # 金額の範囲によるフィルタ(下限)
921
- upper_limit_amount: 2585, # 金額の範囲によるフィルタ(上限)
922
- is_disabled: false # 支払いQRコードが無効化されているかどうか
1215
+ lower_limit_amount: 7582, # 金額の範囲によるフィルタ(下限)
1216
+ upper_limit_amount: 2572, # 金額の範囲によるフィルタ(上限)
1217
+ is_disabled: true # 支払いQRコードが無効化されているかどうか
923
1218
  ))
924
1219
  ```
925
1220
 
@@ -1063,7 +1358,7 @@ response = $client.send(Pokepay::Request::ListBills.new(
1063
1358
  response = $client.send(Pokepay::Request::CreateBill.new(
1064
1359
  "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # private_money_id: 支払いマネーのマネーID
1065
1360
  "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # shop_id: 支払い先(受け取り人)の店舗ID
1066
- amount: 8458, # 支払い額
1361
+ amount: 4674, # 支払い額
1067
1362
  description: "test bill" # 説明文(アプリ上で取引の説明文として表示される)
1068
1363
  ))
1069
1364
  ```
@@ -1087,9 +1382,9 @@ response = $client.send(Pokepay::Request::CreateBill.new(
1087
1382
  ```ruby
1088
1383
  response = $client.send(Pokepay::Request::UpdateBill.new(
1089
1384
  "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # bill_id: 支払いQRコードのID
1090
- amount: 45, # 支払い額
1385
+ amount: 4185, # 支払い額
1091
1386
  description: "test bill", # 説明文
1092
- is_disabled: false # 無効化されているかどうか
1387
+ is_disabled: true # 無効化されているかどうか
1093
1388
  ))
1094
1389
  ```
1095
1390
 
@@ -1152,9 +1447,9 @@ Cashtrayを作成します。
1152
1447
  response = $client.send(Pokepay::Request::CreateCashtray.new(
1153
1448
  "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # private_money_id: マネーID
1154
1449
  "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # shop_id: 店舗ユーザーID
1155
- 6575, # amount: 金額
1450
+ 5014, # amount: 金額
1156
1451
  description: "たい焼き(小倉)", # 取引履歴に表示する説明文
1157
- expires_in: 1228 # 失効時間(秒)
1452
+ expires_in: 2273 # 失効時間(秒)
1158
1453
  ))
1159
1454
  ```
1160
1455
 
@@ -1315,9 +1610,9 @@ Cashtrayの内容を更新します。bodyパラメーターは全て省略可
1315
1610
  ```ruby
1316
1611
  response = $client.send(Pokepay::Request::UpdateCashtray.new(
1317
1612
  "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # cashtray_id: CashtrayのID
1318
- amount: 7001, # 金額
1613
+ amount: 7304, # 金額
1319
1614
  description: "たい焼き(小倉)", # 取引履歴に表示する説明文
1320
- expires_in: 6822 # 失効時間(秒)
1615
+ expires_in: 5490 # 失効時間(秒)
1321
1616
  ))
1322
1617
  ```
1323
1618
 
@@ -1392,7 +1687,9 @@ response = $client.send(Pokepay::Request::GetAccount.new(
1392
1687
  ```ruby
1393
1688
  response = $client.send(Pokepay::Request::UpdateAccount.new(
1394
1689
  "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # account_id: ウォレットID
1395
- is_suspended: false # ウォレットが凍結されているかどうか
1690
+ is_suspended: false, # ウォレットが凍結されているかどうか
1691
+ status: "active", # ウォレット状態
1692
+ can_transfer_topup: false # チャージ可能かどうか
1396
1693
  ))
1397
1694
  ```
1398
1695
 
@@ -1416,18 +1713,66 @@ response = $client.send(Pokepay::Request::UpdateAccount.new(
1416
1713
  ウォレットの凍結状態です。真にするとウォレットが凍結され、そのウォレットでは新規取引ができなくなります。偽にすると凍結解除されます。
1417
1714
 
1418
1715
  ---
1419
- 成功したときは[AccountDetail](#account-detail)オブジェクトを返します
1716
+ `status`
1717
+ ```json
1718
+ {
1719
+ "type": "string",
1720
+ "enum": [ "active", "suspended", "pre-closed" ]
1721
+ }
1722
+ ```
1723
+ ウォレットの状態です。
1724
+
1725
+ ---
1726
+ `can_transfer_topup`
1727
+ ```json
1728
+ { "type": "boolean" }
1729
+ ```
1730
+ 店舗ユーザーがエンドユーザーにチャージ可能かどうかです。真にするとチャージ可能となり、偽にするとチャージ不可能となります。
1731
+
1732
+ ---
1733
+ 成功したときは[Account](#account)オブジェクトを返します
1734
+ <a name="delete-account"></a>
1735
+ #### ウォレットを退会する
1736
+ ウォレットを退会します。一度ウォレットを退会した後は、そのウォレットを再び利用可能な状態に戻すことは出来ません。
1737
+ ```ruby
1738
+ response = $client.send(Pokepay::Request::DeleteAccount.new(
1739
+ "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # account_id: ウォレットID
1740
+ cashback: true # 返金有無
1741
+ ))
1742
+ ```
1743
+
1744
+ ---
1745
+ `account_id`
1746
+ ```json
1747
+ {
1748
+ "type": "string",
1749
+ "format": "uuid"
1750
+ }
1751
+ ```
1752
+ ウォレットIDです。
1753
+
1754
+ 指定したウォレットIDのウォレットを退会します。
1755
+
1756
+ ---
1757
+ `cashback`
1758
+ ```json
1759
+ { "type": "boolean" }
1760
+ ```
1761
+ 退会時の返金有無です。エンドユーザに返金を行う場合、真を指定して下さい。現在のマネー残高を全て現金で返金したものとして記録されます。
1762
+
1763
+ ---
1764
+ 成功したときは[AccountDeleted](#account-deleted)オブジェクトを返します
1420
1765
  <a name="list-account-balances"></a>
1421
1766
  #### エンドユーザーの残高内訳を表示する
1422
1767
  エンドユーザーのウォレット毎の残高を有効期限別のリストとして取得します。
1423
1768
  ```ruby
1424
1769
  response = $client.send(Pokepay::Request::ListAccountBalances.new(
1425
1770
  "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # account_id: ウォレットID
1426
- page: 2373, # ページ番号
1427
- per_page: 451, # 1ページ分の取引数
1428
- expires_at_from: "2023-01-18T09:59:31.000000+09:00", # 有効期限の期間によるフィルター(開始時点)
1429
- expires_at_to: "2016-09-25T04:41:30.000000+09:00", # 有効期限の期間によるフィルター(終了時点)
1430
- direction: "asc" # 有効期限によるソート順序
1771
+ page: 2391, # ページ番号
1772
+ per_page: 9946, # 1ページ分の取引数
1773
+ expires_at_from: "2021-03-24T19:43:55.000000+09:00", # 有効期限の期間によるフィルター(開始時点)
1774
+ expires_at_to: "2021-12-13T05:47:45.000000+09:00", # 有効期限の期間によるフィルター(終了時点)
1775
+ direction: "desc" # 有効期限によるソート順序
1431
1776
  ))
1432
1777
  ```
1433
1778
 
@@ -1501,10 +1846,10 @@ response = $client.send(Pokepay::Request::ListAccountBalances.new(
1501
1846
  ```ruby
1502
1847
  response = $client.send(Pokepay::Request::ListAccountExpiredBalances.new(
1503
1848
  "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # account_id: ウォレットID
1504
- page: 1228, # ページ番号
1505
- per_page: 7032, # 1ページ分の取引数
1506
- expires_at_from: "2023-02-16T15:27:38.000000+09:00", # 有効期限の期間によるフィルター(開始時点)
1507
- expires_at_to: "2025-04-18T14:51:29.000000+09:00", # 有効期限の期間によるフィルター(終了時点)
1849
+ page: 83, # ページ番号
1850
+ per_page: 7171, # 1ページ分の取引数
1851
+ expires_at_from: "2019-12-07T11:35:18.000000+09:00", # 有効期限の期間によるフィルター(開始時点)
1852
+ expires_at_to: "2017-01-08T17:52:45.000000+09:00", # 有効期限の期間によるフィルター(終了時点)
1508
1853
  direction: "asc" # 有効期限によるソート順序
1509
1854
  ))
1510
1855
  ```
@@ -1573,20 +1918,77 @@ response = $client.send(Pokepay::Request::ListAccountExpiredBalances.new(
1573
1918
 
1574
1919
  ---
1575
1920
  成功したときは[PaginatedAccountBalance](#paginated-account-balance)オブジェクトを返します
1921
+ <a name="update-customer-account"></a>
1922
+ #### ウォレット情報を更新する
1923
+ ウォレットの状態を更新します。
1924
+ ```ruby
1925
+ response = $client.send(Pokepay::Request::UpdateCustomerAccount.new(
1926
+ "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # account_id: ウォレットID
1927
+ status: "active", # ウォレット状態
1928
+ account_name: "qoj4yKOsEPCrpQPvSjUDltH", # アカウント名
1929
+ external_id: "57ysDpO4lTbJ9d" # 外部ID
1930
+ ))
1931
+ ```
1932
+
1933
+ ---
1934
+ `account_id`
1935
+ ```json
1936
+ {
1937
+ "type": "string",
1938
+ "format": "uuid"
1939
+ }
1940
+ ```
1941
+ ウォレットIDです。
1942
+
1943
+ 指定したウォレットIDのウォレットの状態を更新します。
1944
+
1945
+ ---
1946
+ `status`
1947
+ ```json
1948
+ {
1949
+ "type": "string",
1950
+ "enum": [ "active", "suspended", "pre-closed" ]
1951
+ }
1952
+ ```
1953
+ ウォレットの状態です。
1954
+
1955
+ ---
1956
+ `account_name`
1957
+ ```json
1958
+ {
1959
+ "type": "string",
1960
+ "maxLength": 256
1961
+ }
1962
+ ```
1963
+ 変更するウォレット名です。
1964
+
1965
+ ---
1966
+ `external_id`
1967
+ ```json
1968
+ {
1969
+ "type": "string",
1970
+ "maxLength": 50
1971
+ }
1972
+ ```
1973
+ 変更する外部IDです。
1974
+
1975
+ ---
1976
+ 成功したときは[AccountWithUser](#account-with-user)オブジェクトを返します
1576
1977
  <a name="get-customer-accounts"></a>
1577
1978
  #### エンドユーザーのウォレット一覧を表示する
1578
1979
  マネーを指定してエンドユーザーのウォレット一覧を取得します。
1579
1980
  ```ruby
1580
1981
  response = $client.send(Pokepay::Request::GetCustomerAccounts.new(
1581
1982
  "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # private_money_id: マネーID
1582
- page: 4539, # ページ番号
1583
- per_page: 2772, # 1ページ分のウォレット数
1584
- created_at_from: "2023-12-25T19:33:57.000000+09:00", # ウォレット作成日によるフィルター(開始時点)
1585
- created_at_to: "2020-11-16T21:21:47.000000+09:00", # ウォレット作成日によるフィルター(終了時点)
1586
- is_suspended: true, # ウォレットが凍結状態かどうかでフィルターする
1587
- external_id: "vjsqVkcSInvOjFPIL9qlVM", # 外部ID
1588
- tel: "07018335-9579", # エンドユーザーの電話番号
1589
- email: "805Swtsg2N@kJBD.com" # エンドユーザーのメールアドレス
1983
+ page: 7724, # ページ番号
1984
+ per_page: 2969, # 1ページ分のウォレット数
1985
+ created_at_from: "2020-10-14T02:46:28.000000+09:00", # ウォレット作成日によるフィルター(開始時点)
1986
+ created_at_to: "2019-02-01T11:03:45.000000+09:00", # ウォレット作成日によるフィルター(終了時点)
1987
+ is_suspended: false, # ウォレットが凍結状態かどうかでフィルターする
1988
+ status: "pre-closed", # ウォレット状態
1989
+ external_id: "N", # 外部ID
1990
+ tel: "08723-9295", # エンドユーザーの電話番号
1991
+ email: "CYxA4AjI47@p6qt.com" # エンドユーザーのメールアドレス
1590
1992
  ))
1591
1993
  ```
1592
1994
 
@@ -1649,6 +2051,16 @@ response = $client.send(Pokepay::Request::GetCustomerAccounts.new(
1649
2051
  ```
1650
2052
  このパラメータが指定されている場合、ウォレットの凍結状態で結果がフィルターされます。デフォルトでは未指定です。
1651
2053
 
2054
+ ---
2055
+ `status`
2056
+ ```json
2057
+ {
2058
+ "type": "string",
2059
+ "enum": [ "active", "suspended", "pre-closed" ]
2060
+ }
2061
+ ```
2062
+ このパラメータが指定されている場合、ウォレットの状態で結果がフィルターされます。デフォルトでは未指定です。
2063
+
1652
2064
  ---
1653
2065
  `external_id`
1654
2066
  ```json
@@ -1689,7 +2101,7 @@ response = $client.send(Pokepay::Request::CreateCustomerAccount.new(
1689
2101
  "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # private_money_id: マネーID
1690
2102
  user_name: "ポケペイ太郎", # ユーザー名
1691
2103
  account_name: "ポケペイ太郎のアカウント", # アカウント名
1692
- external_id: "WoqdLq3QmHRbZpwbP" # 外部ID
2104
+ external_id: "saCpt80GzH" # 外部ID
1693
2105
  ))
1694
2106
  ```
1695
2107
 
@@ -1743,10 +2155,10 @@ PAPIクライアントシステムから利用するPokepayユーザーのIDで
1743
2155
  ```ruby
1744
2156
  response = $client.send(Pokepay::Request::GetShopAccounts.new(
1745
2157
  "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # private_money_id: マネーID
1746
- page: 83, # ページ番号
1747
- per_page: 5866, # 1ページ分のウォレット数
1748
- created_at_from: "2021-03-18T09:33:18.000000+09:00", # ウォレット作成日によるフィルター(開始時点)
1749
- created_at_to: "2019-10-15T23:24:49.000000+09:00", # ウォレット作成日によるフィルター(終了時点)
2158
+ page: 6413, # ページ番号
2159
+ per_page: 1586, # 1ページ分のウォレット数
2160
+ created_at_from: "2022-11-13T22:33:50.000000+09:00", # ウォレット作成日によるフィルター(開始時点)
2161
+ created_at_to: "2017-09-13T23:45:00.000000+09:00", # ウォレット作成日によるフィルター(終了時点)
1750
2162
  is_suspended: false # ウォレットが凍結状態かどうかでフィルターする
1751
2163
  ))
1752
2164
  ```
@@ -1820,10 +2232,10 @@ response = $client.send(Pokepay::Request::ListCustomerTransactions.new(
1820
2232
  "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # private_money_id: マネーID
1821
2233
  sender_customer_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # 送金エンドユーザーID
1822
2234
  receiver_customer_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # 受取エンドユーザーID
1823
- type: "B6hajGJrCJ", # 取引種別、チャージ=topup、支払い=payment、個人間送金=transfer
2235
+ type: "exchange", # 取引種別
1824
2236
  is_modified: true, # キャンセル済みかどうか
1825
- from: "2019-02-13T12:10:46.000000+09:00", # 開始日時
1826
- to: "2017-02-20T06:05:40.000000+09:00", # 終了日時
2237
+ from: "2015-11-09T20:57:13.000000+09:00", # 開始日時
2238
+ to: "2022-01-15T17:32:30.000000+09:00", # 終了日時
1827
2239
  page: 1, # ページ番号
1828
2240
  per_page: 50 # 1ページ分の取引数
1829
2241
  ))
@@ -1867,7 +2279,14 @@ response = $client.send(Pokepay::Request::ListCustomerTransactions.new(
1867
2279
  ---
1868
2280
  `type`
1869
2281
  ```json
1870
- { "type": "string" }
2282
+ {
2283
+ "type": "string",
2284
+ "enum": {
2285
+ "topup": "payment",
2286
+ "exchange": "transfer",
2287
+ "cashback": "expire"
2288
+ }
2289
+ }
1871
2290
  ```
1872
2291
  取引の種類でフィルターします。
1873
2292
 
@@ -1881,6 +2300,10 @@ response = $client.send(Pokepay::Request::ListCustomerTransactions.new(
1881
2300
  他マネーへの流出(outflow)/他マネーからの流入(inflow)
1882
2301
  4. transfer
1883
2302
  個人間送金
2303
+ 5. cashback
2304
+ ウォレット退会時返金
2305
+ 6. expire
2306
+ ウォレット退会時失効
1884
2307
 
1885
2308
  ---
1886
2309
  `is_modified`
@@ -1948,11 +2371,11 @@ response = $client.send(Pokepay::Request::ListShops.new(
1948
2371
  organization_code: "pocketchange", # 組織コード
1949
2372
  private_money_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # マネーID
1950
2373
  name: "oxスーパー三田店", # 店舗名
1951
- postal_code: "800-9576", # 店舗の郵便番号
2374
+ postal_code: "3815756", # 店舗の郵便番号
1952
2375
  address: "東京都港区芝...", # 店舗の住所
1953
- tel: "089682-5023", # 店舗の電話番号
1954
- email: "jlaztijN3v@ebjT.com", # 店舗のメールアドレス
1955
- external_id: "69RjYRPCqvnZ1YzdrhGH7XKNoGDpqqjY", # 店舗の外部ID
2376
+ tel: "08108719-5344", # 店舗の電話番号
2377
+ email: "tQD6SAh41f@Zii8.com", # 店舗のメールアドレス
2378
+ external_id: "4vybd1Jsf0jR3rzbwtxyn2FAh1zUed", # 店舗の外部ID
1956
2379
  page: 1, # ページ番号
1957
2380
  per_page: 50 # 1ページ分の取引数
1958
2381
  ))
@@ -2077,11 +2500,11 @@ response = $client.send(Pokepay::Request::ListShops.new(
2077
2500
  ```ruby
2078
2501
  response = $client.send(Pokepay::Request::CreateShop.new(
2079
2502
  "oxスーパー三田店", # shop_name: 店舗名
2080
- shop_postal_code: "5142087", # 店舗の郵便番号
2503
+ shop_postal_code: "7504932", # 店舗の郵便番号
2081
2504
  shop_address: "東京都港区芝...", # 店舗の住所
2082
- shop_tel: "0074-18354932", # 店舗の電話番号
2083
- shop_email: "YdhYyR9ZtW@hMAK.com", # 店舗のメールアドレス
2084
- shop_external_id: "ZHQ2Tjahc0hASAcEibjk", # 店舗の外部ID
2505
+ shop_tel: "0410-88688", # 店舗の電話番号
2506
+ shop_email: "VgjPvTnTRb@AGxJ.com", # 店舗のメールアドレス
2507
+ shop_external_id: "FBzSBdN9rH7Ml90EeuZgaP20pyyEjfyZn", # 店舗の外部ID
2085
2508
  organization_code: "ox-supermarket" # 組織コード
2086
2509
  ))
2087
2510
  ```
@@ -2091,14 +2514,14 @@ response = $client.send(Pokepay::Request::CreateShop.new(
2091
2514
  ```ruby
2092
2515
  response = $client.send(Pokepay::Request::CreateShopV2.new(
2093
2516
  "oxスーパー三田店", # name: 店舗名
2094
- postal_code: "5184159", # 店舗の郵便番号
2517
+ postal_code: "2838156", # 店舗の郵便番号
2095
2518
  address: "東京都港区芝...", # 店舗の住所
2096
- tel: "07-97912", # 店舗の電話番号
2097
- email: "FrkXVihIdQ@Wu7J.com", # 店舗のメールアドレス
2098
- external_id: "4NYirXryPP6taqbm6hsnA9hELka", # 店舗の外部ID
2519
+ tel: "06203260", # 店舗の電話番号
2520
+ email: "Uo9BhqQxq9@FR8V.com", # 店舗のメールアドレス
2521
+ external_id: "F2gH7EAnlFEgMmyi8jmBN0T8", # 店舗の外部ID
2099
2522
  organization_code: "ox-supermarket", # 組織コード
2100
- private_money_ids: ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"], # 店舗で有効にするマネーIDの配列
2101
- can_topup_private_money_ids: ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"] # 店舗でチャージ可能にするマネーIDの配列
2523
+ private_money_ids: ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"], # 店舗で有効にするマネーIDの配列
2524
+ can_topup_private_money_ids: [] # 店舗でチャージ可能にするマネーIDの配列
2102
2525
  ))
2103
2526
  ```
2104
2527
 
@@ -2169,12 +2592,12 @@ response = $client.send(Pokepay::Request::GetShop.new(
2169
2592
  response = $client.send(Pokepay::Request::UpdateShop.new(
2170
2593
  "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # shop_id: 店舗ユーザーID
2171
2594
  name: "oxスーパー三田店", # 店舗名
2172
- postal_code: "376-2080", # 店舗の郵便番号
2595
+ postal_code: "7161029", # 店舗の郵便番号
2173
2596
  address: "東京都港区芝...", # 店舗の住所
2174
- tel: "041115489", # 店舗の電話番号
2175
- email: "VIgVP7fIz1@xemn.com", # 店舗のメールアドレス
2176
- external_id: "x9P7H", # 店舗の外部ID
2177
- private_money_ids: ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"], # 店舗で有効にするマネーIDの配列
2597
+ tel: "0970036", # 店舗の電話番号
2598
+ email: "T4AzeoZEOY@uu1R.com", # 店舗のメールアドレス
2599
+ external_id: "qlWwyCNVezT", # 店舗の外部ID
2600
+ private_money_ids: [], # 店舗で有効にするマネーIDの配列
2178
2601
  can_topup_private_money_ids: [] # 店舗でチャージ可能にするマネーIDの配列
2179
2602
  ))
2180
2603
  ```
@@ -2275,7 +2698,9 @@ response = $client.send(Pokepay::Request::UpdateShop.new(
2275
2698
  ユーザーIDを指定してそのユーザーのウォレット一覧を取得します。
2276
2699
  ```ruby
2277
2700
  response = $client.send(Pokepay::Request::ListUserAccounts.new(
2278
- "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" # user_id: ユーザーID
2701
+ "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # user_id: ユーザーID
2702
+ page: 6283, # ページ番号
2703
+ per_page: 196 # 1ページ分の取引数
2279
2704
  ))
2280
2705
  ```
2281
2706
 
@@ -2292,10 +2717,65 @@ response = $client.send(Pokepay::Request::ListUserAccounts.new(
2292
2717
  指定したユーザーIDのウォレット一覧を取得します。パートナーキーと紐づく組織が発行しているマネーのウォレットのみが表示されます。
2293
2718
 
2294
2719
  ---
2295
- 成功したときは[PaginatedAccountDetails](#paginated-account-details)オブジェクトを返します
2296
- ### Private Money
2297
- <a name="get-private-moneys"></a>
2298
- #### マネー一覧を取得する
2720
+ `page`
2721
+ ```json
2722
+ {
2723
+ "type": "integer",
2724
+ "minimum": 1
2725
+ }
2726
+ ```
2727
+ 取得したいページ番号です。デフォルト値は1です。
2728
+
2729
+ ---
2730
+ `per_page`
2731
+ ```json
2732
+ {
2733
+ "type": "integer",
2734
+ "minimum": 1
2735
+ }
2736
+ ```
2737
+ 1ページ当たりのウォレット数です。デフォルト値は50です。
2738
+
2739
+ ---
2740
+ 成功したときは[PaginatedAccountDetails](#paginated-account-details)オブジェクトを返します
2741
+ <a name="create-user-account"></a>
2742
+ #### エンドユーザーのウォレットを作成する
2743
+ ```ruby
2744
+ response = $client.send(Pokepay::Request::CreateUserAccount.new(
2745
+ "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # user_id: ユーザーID
2746
+ "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # private_money_id: マネーID
2747
+ name: "N00F2Vhn3XqmCSMDzeEDKcNHBIUBy90lbfxByyLgJllatyS0exoVZwnX2Y3MjJVkSKFu78PD8Nsi0ghqRiHIikuwLQAi0YorDHLBFs4pFpuxUcIrb43g0nK7tb3btHVGJJQejQb3sdWfi2Z2Wvmx0ZqLEwxwj8U4A4KZBQdvuQb5QYDYt7CyctlhtAXqf6uerXtmVp3iPqRhb6DnnO4ty3", # ウォレット名
2748
+ external_id: "khtTfaQWLq" # 外部ID
2749
+ ))
2750
+ ```
2751
+
2752
+ ---
2753
+ `user_id`
2754
+ ```json
2755
+ {
2756
+ "type": "string",
2757
+ "format": "uuid"
2758
+ }
2759
+ ```
2760
+ ユーザーIDです。
2761
+
2762
+ ---
2763
+ `private_money_id`
2764
+ ```json
2765
+ {
2766
+ "type": "string",
2767
+ "format": "uuid"
2768
+ }
2769
+ ```
2770
+ マネーIDです。
2771
+
2772
+ 作成するウォレットのマネーを指定します。このパラメータは必須です。
2773
+
2774
+ ---
2775
+ 成功したときは[AccountDetail](#account-detail)オブジェクトを返します
2776
+ ### Private Money
2777
+ <a name="get-private-moneys"></a>
2778
+ #### マネー一覧を取得する
2299
2779
  マネーの一覧を取得します。
2300
2780
  パートナーキーの管理者が発行体組織に属している場合、自組織が加盟または発行しているマネーの一覧を返します。また、`organization_code`として決済加盟店の組織コードを指定した場合、発行マネーのうち、その決済加盟店組織が加盟しているマネーの一覧を返します。
2301
2781
  パートナーキーの管理者が決済加盟店組織に属している場合は、自組織が加盟しているマネーの一覧を返します。
@@ -2325,8 +2805,8 @@ response = $client.send(Pokepay::Request::GetPrivateMoneys.new(
2325
2805
  ```ruby
2326
2806
  response = $client.send(Pokepay::Request::GetPrivateMoneyOrganizationSummaries.new(
2327
2807
  "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # private_money_id: マネーID
2328
- from: "2016-05-21T23:00:33.000000+09:00", # 開始日時(toと同時に指定する必要有)
2329
- to: "2021-05-24T13:34:12.000000+09:00", # 終了日時(fromと同時に指定する必要有)
2808
+ from: "2017-03-02T22:10:21.000000+09:00", # 開始日時(toと同時に指定する必要有)
2809
+ to: "2023-11-05T19:18:54.000000+09:00", # 終了日時(fromと同時に指定する必要有)
2330
2810
  page: 1, # ページ番号
2331
2811
  per_page: 50 # 1ページ分の取引数
2332
2812
  ))
@@ -2340,10 +2820,10 @@ response = $client.send(Pokepay::Request::GetPrivateMoneyOrganizationSummaries.n
2340
2820
  CSVファイルから一括取引をします。
2341
2821
  ```ruby
2342
2822
  response = $client.send(Pokepay::Request::BulkCreateTransaction.new(
2343
- "lwWZKuWWf4n5wNPq2rjN28", # name: 一括取引タスク名
2344
- "QfQLnQ9Qr", # content: 取引する情報のCSV
2345
- "2gs4rAyEVt2ws7WkJzpgGUX4mtxobZ9ZCpNJ", # request_id: リクエストID
2346
- description: "ZG6LzTWIbd8ZNVrafdiivNn4NbNLXIdoiqtrelImUNmLeKEfXUc2dQExu22E4bXnTsrAuXzc" # 一括取引の説明
2823
+ "FbA6TsT4r", # name: 一括取引タスク名
2824
+ "SzhCtzrr", # content: 取引する情報のCSV
2825
+ "QIFeK35Z3EF7SWnLL5qkYPGTd8wILW6Ubji6", # request_id: リクエストID
2826
+ description: "nDV" # 一括取引の説明
2347
2827
  ))
2348
2828
  ```
2349
2829
 
@@ -2408,17 +2888,491 @@ response = $client.send(Pokepay::Request::BulkCreateTransaction.new(
2408
2888
 
2409
2889
  ---
2410
2890
  成功したときは[BulkTransaction](#bulk-transaction)オブジェクトを返します
2891
+ ### Event
2892
+ <a name="create-external-transaction"></a>
2893
+ #### ポケペイ外部取引を作成する
2894
+ ポケペイ外部取引を作成します。
2895
+
2896
+ ポケペイ外の現金決済やクレジットカード決済に対してポケペイのポイントを付けたいというときに使用します。
2897
+
2898
+ ```ruby
2899
+ response = $client.send(Pokepay::Request::CreateExternalTransaction.new(
2900
+ "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # shop_id: 店舗ID
2901
+ "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # customer_id: エンドユーザーID
2902
+ "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # private_money_id: マネーID
2903
+ 95, # amount: 取引額
2904
+ description: "たい焼き(小倉)", # 取引説明文
2905
+ metadata: "{\"key\":\"value\"}", # ポケペイ外部取引メタデータ
2906
+ products: [{"jan_code":"abc",
2907
+ "name":"name1",
2908
+ "unit_price":100,
2909
+ "price": 100,
2910
+ "is_discounted": false,
2911
+ "other":"{}"}, {"jan_code":"abc",
2912
+ "name":"name1",
2913
+ "unit_price":100,
2914
+ "price": 100,
2915
+ "is_discounted": false,
2916
+ "other":"{}"}, {"jan_code":"abc",
2917
+ "name":"name1",
2918
+ "unit_price":100,
2919
+ "price": 100,
2920
+ "is_discounted": false,
2921
+ "other":"{}"}], # 商品情報データ
2922
+ request_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" # リクエストID
2923
+ ))
2924
+ ```
2925
+
2926
+ ---
2927
+ `shop_id`
2928
+ ```json
2929
+ {
2930
+ "type": "string",
2931
+ "format": "uuid"
2932
+ }
2933
+ ```
2934
+ 店舗IDです。
2935
+
2936
+ ポケペイ外部取引が行なう店舗を指定します。
2937
+
2938
+ ---
2939
+ `customer_id`
2940
+ ```json
2941
+ {
2942
+ "type": "string",
2943
+ "format": "uuid"
2944
+ }
2945
+ ```
2946
+ エンドユーザーIDです。
2947
+
2948
+ エンドユーザーを指定します。
2949
+
2950
+ ---
2951
+ `private_money_id`
2952
+ ```json
2953
+ {
2954
+ "type": "string",
2955
+ "format": "uuid"
2956
+ }
2957
+ ```
2958
+ マネーIDです。
2959
+
2960
+ マネーを指定します。
2961
+
2962
+ ---
2963
+ `amount`
2964
+ ```json
2965
+ {
2966
+ "type": "integer",
2967
+ "minimum": 0
2968
+ }
2969
+ ```
2970
+ 取引金額です。
2971
+
2972
+ ---
2973
+ `description`
2974
+ ```json
2975
+ {
2976
+ "type": "string",
2977
+ "maxLength": 200
2978
+ }
2979
+ ```
2980
+ 取引説明文です。
2981
+
2982
+ 任意入力で、取引履歴に表示される説明文です。
2983
+
2984
+ ---
2985
+ `metadata`
2986
+ ```json
2987
+ {
2988
+ "type": "string",
2989
+ "format": "json"
2990
+ }
2991
+ ```
2992
+ ポケペイ外部取引作成時に指定され、取引と紐付けられるメタデータです。
2993
+
2994
+ 任意入力で、全てのkeyとvalueが文字列であるようなフラットな構造のJSONで指定します。
2995
+
2996
+ ---
2997
+ `products`
2998
+ ```json
2999
+ {
3000
+ "type": "array",
3001
+ "items": { "type": "object" }
3002
+ }
3003
+ ```
3004
+ 一つの取引に含まれる商品情報データです。
3005
+ 以下の内容からなるJSONオブジェクトの配列で指定します。
3006
+
3007
+ - `jan_code`: JANコード。64字以下の文字列
3008
+ - `name`: 商品名。256字以下の文字列
3009
+ - `unit_price`: 商品単価。0以上の数値
3010
+ - `price`: 全体の金額(例: 商品単価 × 個数)。0以上の数値
3011
+ - `is_discounted`: 賞味期限が近いなどの理由で商品が値引きされているかどうかのフラグ。boolean
3012
+ - `other`: その他商品に関する情報。JSONオブジェクトで指定します。
3013
+
3014
+ ---
3015
+ `request_id`
3016
+ ```json
3017
+ {
3018
+ "type": "string",
3019
+ "format": "uuid"
3020
+ }
3021
+ ```
3022
+ 取引作成APIの羃等性を担保するためのリクエスト固有のIDです。
3023
+
3024
+ 取引作成APIで結果が受け取れなかったなどの理由で再試行する際に、二重に取引が作られてしまうことを防ぐために、クライアント側から指定されます。指定は任意で、UUID V4フォーマットでランダム生成した文字列です。リクエストIDは一定期間で削除されます。
3025
+
3026
+ リクエストIDを指定したとき、まだそのリクエストIDに対する取引がない場合、新規に取引が作られレスポンスとして返されます。もしそのリクエストIDに対する取引が既にある場合、既存の取引がレスポンスとして返されます。
3027
+
3028
+ ---
3029
+ 成功したときは[ExternalTransaction](#external-transaction)オブジェクトを返します
3030
+ <a name="refund-external-transaction"></a>
3031
+ #### ポケペイ外部取引をキャンセルする
3032
+ 取引IDを指定して取引をキャンセルします。
3033
+
3034
+ 発行体の管理者は自組織の直営店、または発行しているマネーの決済加盟店組織での取引をキャンセルできます。
3035
+ キャンセル対象のポケペイ外部取引に付随するポイント還元キャンペーンも取り消されます。
3036
+
3037
+ 取引をキャンセルできるのは1回きりです。既にキャンセルされた取引を重ねてキャンセルしようとすると `transaction_already_refunded (422)` エラーが返ります。
3038
+ ```ruby
3039
+ response = $client.send(Pokepay::Request::RefundExternalTransaction.new(
3040
+ "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # event_id: 取引ID
3041
+ description: "返品対応のため" # 取引履歴に表示する返金事由
3042
+ ))
3043
+ ```
3044
+ 成功したときは[ExternalTransaction](#external-transaction)オブジェクトを返します
3045
+ ### Campaign
3046
+ <a name="create-campaign"></a>
3047
+ #### ポイント付与キャンペーンを作る
3048
+ ポイント付与キャンペーンを作成します。
3049
+
3050
+ ```ruby
3051
+ response = $client.send(Pokepay::Request::CreateCampaign.new(
3052
+ "wtt0eE996vZBp0zzwPN5DIhcy9tg03Xeu2UN5sKl9fYJxmaO84WKiqpzyFwc0O5qDH6cAdyVZn4o55A5DSTN7FZ8Y8t8MIK7GdyM50XmxAy3ATlXa99m3Ela8zcR94JgHtiXrfi45gdORj3Jla3Pfb8OgNhhqnfBQjVsClPPd45bUBovESo5O7DwwlNZPFf6xG0YeVkLQLhc7hbuv3B8S8pH3eqOx8cOR3TFR9a8hMUM", # name: キャンペーン名
3053
+ "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # private_money_id: マネーID
3054
+ "2018-11-06T20:41:56.000000+09:00", # starts_at: キャンペーン開始日時
3055
+ "2024-06-22T00:29:14.000000+09:00", # ends_at: キャンペーン終了日時
3056
+ 1038, # priority: キャンペーンの適用優先度
3057
+ "external-transaction", # event: イベント種別
3058
+ bear_point_shop_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # ポイント負担先店舗ID
3059
+ description: "dIKeKSciqwdkkgvqZQpEwqxxIpXTryBWY7YmTtJYjps5n0FjmTFvO6PZjVX87PLzR29oTCv16fPXjhVlLpKgtr0aXml0I8A7sPYx7KWs9GrfkcGFxlkTYjYgPlxnzpf9XcHDiw8sqMTw9CGMrp", # キャンペーンの説明文
3060
+ status: "disabled", # キャンペーン作成時の状態
3061
+ point_expires_at: "2023-11-04T20:25:42.000000+09:00", # ポイント有効期限(絶対日時指定)
3062
+ point_expires_in_days: 2215, # ポイント有効期限(相対日数指定)
3063
+ is_exclusive: false, # キャンペーンの重複設定
3064
+ subject: "money", # ポイント付与の対象金額の種別
3065
+ amount_based_point_rules: [{
3066
+ "point_amount": 5,
3067
+ "point_amount_unit": "percent",
3068
+ "subject_more_than_or_equal": 1000,
3069
+ "subject_less_than": 5000
3070
+ }], # 取引金額ベースのポイント付与ルール
3071
+ product_based_point_rules: [{
3072
+ "point_amount": 5,
3073
+ "point_amount_unit": "percent",
3074
+ "product_code": "4912345678904",
3075
+ "is_multiply_by_count": true,
3076
+ "required_count": 2
3077
+ }, {
3078
+ "point_amount": 5,
3079
+ "point_amount_unit": "percent",
3080
+ "product_code": "4912345678904",
3081
+ "is_multiply_by_count": true,
3082
+ "required_count": 2
3083
+ }, {
3084
+ "point_amount": 5,
3085
+ "point_amount_unit": "percent",
3086
+ "product_code": "4912345678904",
3087
+ "is_multiply_by_count": true,
3088
+ "required_count": 2
3089
+ }], # 商品情報ベースのポイント付与ルール
3090
+ applicable_days_of_week: [6], # キャンペーンを適用する曜日 (複数指定)
3091
+ applicable_time_ranges: [{
3092
+ "from": "12:00",
3093
+ "to": "23:59"
3094
+ }], # キャンペーンを適用する時間帯 (複数指定)
3095
+ applicable_shop_ids: ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"] # キャンペーン適用対象となる店舗IDのリスト
3096
+ ))
3097
+ ```
3098
+
3099
+ ---
3100
+ `name`
3101
+ ```json
3102
+ {
3103
+ "type": "string",
3104
+ "maxLength": 256
3105
+ }
3106
+ ```
3107
+ キャンペーン名です(必須項目)。
3108
+
3109
+ ポイント付与によってできるチャージ取引の説明文に転記されます。取引説明文はエンドユーザーからも確認できます。
3110
+
3111
+ ---
3112
+ `private_money_id`
3113
+ ```json
3114
+ {
3115
+ "type": "string",
3116
+ "format": "uuid"
3117
+ }
3118
+ ```
3119
+ キャンペーン対象のマネーのIDです(必須項目)。
3120
+
3121
+ ---
3122
+ `starts_at`
3123
+ ```json
3124
+ {
3125
+ "type": "string",
3126
+ "format": "date-time"
3127
+ }
3128
+ ```
3129
+ キャンペーン開始日時です(必須項目)。
3130
+ キャンペーン期間中のみポイントが付与されます。
3131
+ 開始日時よりも終了日時が前のときはcampaign_invalid_periodエラー(422)になります。
3132
+
3133
+ ---
3134
+ `ends_at`
3135
+ ```json
3136
+ {
3137
+ "type": "string",
3138
+ "format": "date-time"
3139
+ }
3140
+ ```
3141
+ キャンペーン終了日時です(必須項目)。
3142
+ キャンペーン期間中のみポイントが付与されます。
3143
+ 開始日時よりも終了日時が前のときはcampaign_invalid_periodエラー(422)になります。
3144
+
3145
+ ---
3146
+ `priority`
3147
+ ```json
3148
+ { "type": "integer" }
3149
+ ```
3150
+ キャンペーンの適用優先度です。
3151
+
3152
+ 優先度が大きいものから順に適用判定されていきます。
3153
+ キャンペーン期間が重なっている同一の優先度のキャンペーンが存在するとcampaign_period_overlapsエラー(422)になります。
3154
+
3155
+ ---
3156
+ `event`
3157
+ ```json
3158
+ {
3159
+ "type": "string",
3160
+ "enum": [ "topup", "payment", "external-transaction" ]
3161
+ }
3162
+ ```
3163
+ キャンペーンのトリガーとなるイベントの種類を指定します(必須項目)。
3164
+
3165
+ 以下のいずれかを指定できます。
3166
+
3167
+ 1. topup
3168
+ 店舗からエンドユーザーへの送金取引(チャージ)
3169
+ 2. payment
3170
+ エンドユーザーから店舗への送金取引(支払い)
3171
+ 3. external-transaction
3172
+ ポケペイ外の取引(現金決済など)
3173
+
3174
+ ---
3175
+ `bear_point_shop_id`
3176
+ ```json
3177
+ {
3178
+ "type": "string",
3179
+ "format": "uuid"
3180
+ }
3181
+ ```
3182
+ ポイントを負担する店舗のIDです。デフォルトではマネー発行体の本店が設定されます。
3183
+
3184
+ ---
3185
+ `description`
3186
+ ```json
3187
+ {
3188
+ "type": "string",
3189
+ "maxLength": 200
3190
+ }
3191
+ ```
3192
+ キャンペーンの内容を記載します。管理画面などでキャンペーンを管理するための説明文になります。
3193
+
3194
+ ---
3195
+ `status`
3196
+ ```json
3197
+ {
3198
+ "type": "string",
3199
+ "enum": { "enabled": "disabled" }
3200
+ }
3201
+ ```
3202
+ キャンペーン作成時の状態を指定します。デフォルトではenabledです。
3203
+
3204
+ 以下のいずれかを指定できます。
3205
+
3206
+ 1. enabled
3207
+ 有効
3208
+ 2. disabled
3209
+ 無効
3210
+
3211
+ ---
3212
+ `point_expires_at`
3213
+ ```json
3214
+ {
3215
+ "type": "string",
3216
+ "format": "date-time"
3217
+ }
3218
+ ```
3219
+ キャンペーンによって付与されるポイントの有効期限を絶対日時で指定します。
3220
+ 省略した場合はマネーに設定された有効期限と同じものがポイントの有効期限となります。
3221
+
3222
+ ---
3223
+ `point_expires_in_days`
3224
+ ```json
3225
+ {
3226
+ "type": "integer",
3227
+ "minimum": 1
3228
+ }
3229
+ ```
3230
+ キャンペーンによって付与されるポイントの有効期限を相対日数で指定します。
3231
+ 省略した場合はマネーに設定された有効期限と同じものがポイントの有効期限となります。
3232
+
3233
+ ---
3234
+ `is_exclusive`
3235
+ ```json
3236
+ { "type": "boolean" }
3237
+ ```
3238
+ キャンペーンの重ね掛けを行うかどうかのフラグです。
3239
+
3240
+ これにtrueを指定すると他のキャンペーンと同時適用されません。デフォルト値はtrueです。
3241
+ falseを指定すると次の優先度の重ね掛け可能なキャンペーンの適用判定に進みます。
3242
+
3243
+ ---
3244
+ `subject`
3245
+ ```json
3246
+ {
3247
+ "type": "string",
3248
+ "enum": { "money": "all" }
3249
+ }
3250
+ ```
3251
+ ポイント付与額を計算する対象となる金額の種類を指定します。デフォルト値はallです。
3252
+ eventとしてexternal-transactionを指定した場合はポイントとマネーの区別がないためsubjectの指定に関わらず常にallとなります。
3253
+
3254
+ 以下のいずれかを指定できます。
3255
+
3256
+ 1. money
3257
+ moneyを指定すると決済額の中で「マネー」を使って支払った額を対象にします
3258
+
3259
+ 2. all
3260
+ all を指定すると決済額全体を対象にします (「ポイント」での取引額を含む)
3261
+ 注意: event を topup にしたときはポイントの付与に対しても適用されます
3262
+
3263
+ ---
3264
+ `amount_based_point_rules`
3265
+ ```json
3266
+ {
3267
+ "type": "array",
3268
+ "items": { "type": "object" }
3269
+ }
3270
+ ```
3271
+ 金額をベースとしてポイント付与を行うルールを指定します。
3272
+ amount_based_point_rules と product_based_point_rules はどちらか一方しか指定できません。
3273
+ 各ルールは一つのみ適用され、条件に重複があった場合は先に記載されたものが優先されます。
3274
+
3275
+ 例:
3276
+ ```javascript
3277
+ [
3278
+ // 1000円以上、5000円未満の決済には 5%
3279
+ {
3280
+ "point_amount": 5,
3281
+ "point_amount_unit": "percent",
3282
+ "subject_more_than_or_equal": 1000,
3283
+ "subject_less_than": 5000
3284
+ },
3285
+ // 5000円以上の決済には 10%
3286
+ {
3287
+ "point_amount": 10,
3288
+ "point_amount_unit": "percent",
3289
+ "subject_more_than_or_equal": 5000
3290
+ },
3291
+ ]
3292
+ ```
3293
+
3294
+ ---
3295
+ `product_based_point_rules`
3296
+ ```json
3297
+ {
3298
+ "type": "array",
3299
+ "items": { "type": "object" }
3300
+ }
3301
+ ```
3302
+ 商品情報をベースとしてポイント付与を行うルールを指定します。
3303
+ ルールは商品ごとに設定可能で、ルールの配列として指定します。
3304
+ amount_based_point_rules と product_based_point_rules はどちらか一方しか指定できません。
3305
+ event が payment か external-transaction の時のみ有効です。
3306
+ 各ルールの順序は問わず、適用可能なものは全て適用されます。
3307
+ 一つの決済の中で複数の商品がキャンペーン適用可能な場合はそれぞれの商品についてのルールが適用され、ポイント付与額はその合算になります。
3308
+
3309
+ 例:
3310
+ ```javascript
3311
+ [
3312
+ // 対象商品の購入額から5%ポイント付与。複数購入時は単価の5%が付与される。
3313
+ {
3314
+ "point_amount": 5,
3315
+ "point_amount_unit": "percent",
3316
+ "product_code": "4912345678904",
3317
+ },
3318
+ // 対象商品の購入額から5%ポイント付与。複数購入時は購入総額の5%が付与される。
3319
+ {
3320
+ "point_amount": 5,
3321
+ "point_amount_unit": "percent",
3322
+ "product_code": "4912345678904",
3323
+ "is_multiply_by_count": true,
3324
+ },
3325
+ // 対象商品を2つ以上購入したら500ポイント付与(固定額付与)
3326
+ {
3327
+ "point_amount": 500,
3328
+ "point_amount_unit": absolute",
3329
+ "product_code": "4912345678904",
3330
+ "required_count": 2
3331
+ },
3332
+ // 書籍は10%ポイント付与
3333
+ // ※ISBNの形式はレジがポケペイに送信する形式に準じます
3334
+ {
3335
+ "point_amount": 10,
3336
+ "point_amount_unit": "percent",
3337
+ "product_code": "978-%",
3338
+ },
3339
+ // 一部の出版社の書籍は10%ポイント付与
3340
+ {
3341
+ "point_amount": 10,
3342
+ "point_amount_unit": "percent",
3343
+ "product_code": "978-4-01-%", // 旺文社
3344
+ }
3345
+ ]
3346
+ ```
3347
+
3348
+ ---
3349
+ 成功したときは[Campaign](#campaign)オブジェクトを返します
2411
3350
  ## Responses
2412
3351
 
2413
3352
 
3353
+ <a name="account"></a>
3354
+ ## Account
3355
+ * `id (string)`: ウォレットID
3356
+ * `name (string)`: ウォレット名
3357
+ * `is_suspended (boolean)`: ウォレットが凍結されているかどうか
3358
+ * `status (AccountStatus)`:
3359
+ * `private_money (PrivateMoney)`: 設定マネー情報
3360
+
3361
+ `status`は [AccountStatus](#account-status) オブジェクトを返します。
3362
+
3363
+ `private_money`は [PrivateMoney](#private-money) オブジェクトを返します。
3364
+
2414
3365
  <a name="account-with-user"></a>
2415
3366
  ## AccountWithUser
2416
3367
  * `id (string)`:
2417
3368
  * `name (string)`:
2418
3369
  * `is_suspended (boolean)`:
3370
+ * `status (AccountStatus)`:
2419
3371
  * `private_money (PrivateMoney)`:
2420
3372
  * `user (User)`:
2421
3373
 
3374
+ `status`は [AccountStatus](#account-status) オブジェクトを返します。
3375
+
2422
3376
  `private_money`は [PrivateMoney](#private-money) オブジェクトを返します。
2423
3377
 
2424
3378
  `user`は [User](#user) オブジェクトを返します。
@@ -2428,16 +3382,22 @@ response = $client.send(Pokepay::Request::BulkCreateTransaction.new(
2428
3382
  * `id (string)`:
2429
3383
  * `name (string)`:
2430
3384
  * `is_suspended (boolean)`:
3385
+ * `status (AccountStatus)`:
2431
3386
  * `balance (double)`:
2432
3387
  * `money_balance (double)`:
2433
3388
  * `point_balance (double)`:
2434
3389
  * `private_money (PrivateMoney)`:
2435
3390
  * `user (User)`:
2436
3391
 
3392
+ `status`は [AccountStatus](#account-status) オブジェクトを返します。
3393
+
2437
3394
  `private_money`は [PrivateMoney](#private-money) オブジェクトを返します。
2438
3395
 
2439
3396
  `user`は [User](#user) オブジェクトを返します。
2440
3397
 
3398
+ <a name="account-deleted"></a>
3399
+ ## AccountDeleted
3400
+
2441
3401
  <a name="bill"></a>
2442
3402
  ## Bill
2443
3403
  * `id (string)`: 支払いQRコードのID
@@ -2451,6 +3411,42 @@ response = $client.send(Pokepay::Request::BulkCreateTransaction.new(
2451
3411
 
2452
3412
  `account`は [AccountWithUser](#account-with-user) オブジェクトを返します。
2453
3413
 
3414
+ <a name="check"></a>
3415
+ ## Check
3416
+ * `id (string)`: チャージQRコードのID
3417
+ * `amount (double)`: チャージマネー額 (deprecated)
3418
+ * `money_amount (double)`: チャージマネー額
3419
+ * `point_amount (double)`: チャージポイント額
3420
+ * `description (string)`: チャージQRコードの説明文(アプリ上で取引の説明文として表示される)
3421
+ * `user (User)`: 送金元ユーザ情報
3422
+ * `is_onetime (boolean)`: 使用回数が一回限りかどうか
3423
+ * `is_disabled (boolean)`: 無効化されているかどうか
3424
+ * `expires_at (string)`: チャージQRコード自体の失効日時
3425
+ * `private_money (PrivateMoney)`: 対象マネー情報
3426
+ * `usage_limit (integer)`: 一回限りでない場合の最大読み取り回数
3427
+ * `usage_count (double)`: 一回限りでない場合の現在までに読み取られた回数
3428
+ * `token (string)`: チャージQRコードを解析したときに出てくるURL
3429
+
3430
+ `user`は [User](#user) オブジェクトを返します。
3431
+
3432
+ `private_money`は [PrivateMoney](#private-money) オブジェクトを返します。
3433
+
3434
+ <a name="cpm-token"></a>
3435
+ ## CpmToken
3436
+ * `cpm_token (string)`:
3437
+ * `account (AccountDetail)`:
3438
+ * `transaction (Transaction)`:
3439
+ * `event (ExternalTransaction)`:
3440
+ * `scopes (array of strings)`: 許可された取引種別
3441
+ * `expires_at (string)`: CPMトークンの失効日時
3442
+ * `metadata (string)`: エンドユーザー側メタデータ
3443
+
3444
+ `account`は [AccountDetail](#account-detail) オブジェクトを返します。
3445
+
3446
+ `transaction`は [Transaction](#transaction) オブジェクトを返します。
3447
+
3448
+ `event`は [ExternalTransaction](#external-transaction) オブジェクトを返します。
3449
+
2454
3450
  <a name="cashtray"></a>
2455
3451
  ## Cashtray
2456
3452
  * `id (string)`: Cashtray自体のIDです。
@@ -2487,8 +3483,8 @@ response = $client.send(Pokepay::Request::BulkCreateTransaction.new(
2487
3483
  * `name (string)`: ユーザー (または店舗) 名
2488
3484
  * `is_merchant (boolean)`: 店舗ユーザーかどうか
2489
3485
 
2490
- <a name="transaction"></a>
2491
- ## Transaction
3486
+ <a name="transaction-detail"></a>
3487
+ ## TransactionDetail
2492
3488
  * `id (string)`: 取引ID
2493
3489
  * `type (string)`: 取引種別 (チャージ=topup, 支払い=payment)
2494
3490
  * `is_modified (boolean)`: 返金された取引かどうか
@@ -2501,11 +3497,14 @@ response = $client.send(Pokepay::Request::BulkCreateTransaction.new(
2501
3497
  * `point_amount (double)`: 決済ポイント額
2502
3498
  * `done_at (string)`: 取引日時
2503
3499
  * `description (string)`: 取引説明文
3500
+ * `transfers (array of Transfers)`:
2504
3501
 
2505
3502
  `receiver`と`sender`は [User](#user) オブジェクトを返します。
2506
3503
 
2507
3504
  `receiver_account`と`sender_account`は [Account](#account) オブジェクトを返します。
2508
3505
 
3506
+ `transfers`は [Transfer](#transfer) オブジェクトの配列を返します。
3507
+
2509
3508
  <a name="shop-with-accounts"></a>
2510
3509
  ## ShopWithAccounts
2511
3510
  * `id (string)`: 店舗ID
@@ -2532,6 +3531,22 @@ response = $client.send(Pokepay::Request::BulkCreateTransaction.new(
2532
3531
  * `submitted_at (string)`: バルク取引が登録された日時
2533
3532
  * `updated_at (string)`: バルク取引が更新された日時
2534
3533
 
3534
+ <a name="external-transaction"></a>
3535
+ ## ExternalTransaction
3536
+ * `id (string)`: ポケペイ外部取引ID
3537
+ * `is_modified (boolean)`: 返金された取引かどうか
3538
+ * `sender (User)`: 送金者情報
3539
+ * `sender_account (Account)`: 送金ウォレット情報
3540
+ * `receiver (User)`: 受取者情報
3541
+ * `receiver_account (Account)`: 受取ウォレット情報
3542
+ * `amount (double)`: 決済額
3543
+ * `done_at (string)`: 取引日時
3544
+ * `description (string)`: 取引説明文
3545
+
3546
+ `receiver`と`sender`は [User](#user) オブジェクトを返します。
3547
+
3548
+ `receiver_account`と`sender_account`は [Account](#account) オブジェクトを返します。
3549
+
2535
3550
  <a name="paginated-private-money-organization-summaries"></a>
2536
3551
  ## PaginatedPrivateMoneyOrganizationSummaries
2537
3552
  * `rows (array of PrivateMoneyOrganizationSummaries)`:
@@ -2622,6 +3637,33 @@ response = $client.send(Pokepay::Request::BulkCreateTransaction.new(
2622
3637
 
2623
3638
  `pagination`は [Pagination](#pagination) オブジェクトを返します。
2624
3639
 
3640
+ <a name="campaign"></a>
3641
+ ## Campaign
3642
+ * `id (string)`: キャンペーンID
3643
+ * `name (string)`: キャペーン名
3644
+ * `applicable_shops (array of Users)`: キャンペーン適用対象の店舗リスト
3645
+ * `is_exclusive (boolean)`: キャンペーンの重複を許すかどうかのフラグ
3646
+ * `starts_at (string)`: キャンペーン開始日時
3647
+ * `ends_at (string)`: キャンペーン終了日時
3648
+ * `point_expires_at (string)`: キャンペーンによって付与されるポイントの失効日時
3649
+ * `point_expires_in_days (integer)`: キャンペーンによって付与されるポイントの有効期限(相対指定、単位は日)
3650
+ * `priority (integer)`: キャンペーンの優先順位
3651
+ * `description (string)`: キャンペーン説明文
3652
+ * `bear_point_shop (User)`: ポイントを負担する店舗
3653
+ * `private_money (PrivateMoney)`: キャンペーンを適用するマネー
3654
+ * `point_calculation_rule (string)`: ポイント計算ルール (banklisp表記)
3655
+ * `point_calculation_rule_object (string)`: ポイント計算ルール (JSON文字列による表記)
3656
+ * `status (string)`: キャンペーンの現在の状態
3657
+
3658
+ `applicable-shops`は [User](#user) オブジェクトの配列を返します。
3659
+
3660
+ `bear_point_shop`は [User](#user) オブジェクトを返します。
3661
+
3662
+ `private_money`は [PrivateMoney](#private-money) オブジェクトを返します。
3663
+
3664
+ <a name="account-status"></a>
3665
+ ## AccountStatus
3666
+
2625
3667
  <a name="private-money"></a>
2626
3668
  ## PrivateMoney
2627
3669
  * `id (string)`: マネーID
@@ -2636,9 +3678,29 @@ response = $client.send(Pokepay::Request::BulkCreateTransaction.new(
2636
3678
  * `type (string)`: マネー種別 (自家型=own, 第三者型=third-party)
2637
3679
  * `expiration_type (string)`: 有効期限種別 (チャージ日起算=static, 最終利用日起算=last-update, 最終チャージ日起算=last-topup-update)
2638
3680
  * `enable_topup_by_member (boolean)`: 加盟店によるチャージが有効かどうか
3681
+ * `display_money_and_point (string)`:
2639
3682
 
2640
3683
  `organization`は [Organization](#organization) オブジェクトを返します。
2641
3684
 
3685
+ <a name="transaction"></a>
3686
+ ## Transaction
3687
+ * `id (string)`: 取引ID
3688
+ * `type (string)`: 取引種別 (チャージ=topup, 支払い=payment)
3689
+ * `is_modified (boolean)`: 返金された取引かどうか
3690
+ * `sender (User)`: 送金者情報
3691
+ * `sender_account (Account)`: 送金ウォレット情報
3692
+ * `receiver (User)`: 受取者情報
3693
+ * `receiver_account (Account)`: 受取ウォレット情報
3694
+ * `amount (double)`: 決済総額 (マネー額 + ポイント額)
3695
+ * `money_amount (double)`: 決済マネー額
3696
+ * `point_amount (double)`: 決済ポイント額
3697
+ * `done_at (string)`: 取引日時
3698
+ * `description (string)`: 取引説明文
3699
+
3700
+ `receiver`と`sender`は [User](#user) オブジェクトを返します。
3701
+
3702
+ `receiver_account`と`sender_account`は [Account](#account) オブジェクトを返します。
3703
+
2642
3704
  <a name="cashtray-attempt"></a>
2643
3705
  ## CashtrayAttempt
2644
3706
  * `account (AccountWithUser)`: エンドユーザーのウォレット
@@ -2649,14 +3711,20 @@ response = $client.send(Pokepay::Request::BulkCreateTransaction.new(
2649
3711
 
2650
3712
  `account`は [AccountWithUser](#account-with-user) オブジェクトを返します。
2651
3713
 
2652
- <a name="account"></a>
2653
- ## Account
2654
- * `id (string)`: ウォレットID
2655
- * `name (string)`: ウォレット名
2656
- * `is_suspended (boolean)`: ウォレットが凍結されているかどうか
2657
- * `private_money (PrivateMoney)`: 設定マネー情報
3714
+ <a name="transfer"></a>
3715
+ ## Transfer
3716
+ * `id (string)`:
3717
+ * `sender_account (AccountWithoutPrivateMoneyDetail)`:
3718
+ * `receiver_account (AccountWithoutPrivateMoneyDetail)`:
3719
+ * `amount (double)`:
3720
+ * `money_amount (double)`:
3721
+ * `point_amount (double)`:
3722
+ * `done_at (string)`:
3723
+ * `type (string)`:
3724
+ * `description (string)`:
3725
+ * `transaction_id (string)`:
2658
3726
 
2659
- `private_money`は [PrivateMoney](#private-money) オブジェクトを返します。
3727
+ `receiver_account`と`sender_account`は [AccountWithoutPrivateMoneyDetail](#account-without-private-money-detail) オブジェクトを返します。
2660
3728
 
2661
3729
  <a name="shop-account"></a>
2662
3730
  ## ShopAccount
@@ -2684,21 +3752,6 @@ response = $client.send(Pokepay::Request::BulkCreateTransaction.new(
2684
3752
  * `has_prev (boolean)`:
2685
3753
  * `has_next (boolean)`:
2686
3754
 
2687
- <a name="transfer"></a>
2688
- ## Transfer
2689
- * `id (string)`:
2690
- * `sender_account (AccountWithoutPrivateMoneyDetail)`:
2691
- * `receiver_account (AccountWithoutPrivateMoneyDetail)`:
2692
- * `amount (double)`:
2693
- * `money_amount (double)`:
2694
- * `point_amount (double)`:
2695
- * `done_at (string)`:
2696
- * `type (string)`:
2697
- * `description (string)`:
2698
- * `transaction_id (string)`:
2699
-
2700
- `receiver_account`と`sender_account`は [AccountWithoutPrivateMoneyDetail](#account-without-private-money-detail) オブジェクトを返します。
2701
-
2702
3755
  <a name="account-balance"></a>
2703
3756
  ## AccountBalance
2704
3757
  * `expires_at (string)`:
@@ -2721,20 +3774,23 @@ response = $client.send(Pokepay::Request::BulkCreateTransaction.new(
2721
3774
  * `code (string)`: 組織コード
2722
3775
  * `name (string)`: 組織名
2723
3776
 
2724
- <a name="organization-summary"></a>
2725
- ## OrganizationSummary
2726
- * `count (integer)`:
2727
- * `money_amount (double)`:
2728
- * `money_count (integer)`:
2729
- * `point_amount (double)`:
2730
- * `point_count (integer)`:
2731
-
2732
3777
  <a name="account-without-private-money-detail"></a>
2733
3778
  ## AccountWithoutPrivateMoneyDetail
2734
3779
  * `id (string)`:
2735
3780
  * `name (string)`:
2736
3781
  * `is_suspended (boolean)`:
3782
+ * `status (AccountStatus)`:
2737
3783
  * `private_money_id (string)`:
2738
3784
  * `user (User)`:
2739
3785
 
3786
+ `status`は [AccountStatus](#account-status) オブジェクトを返します。
3787
+
2740
3788
  `user`は [User](#user) オブジェクトを返します。
3789
+
3790
+ <a name="organization-summary"></a>
3791
+ ## OrganizationSummary
3792
+ * `count (integer)`:
3793
+ * `money_amount (double)`:
3794
+ * `money_count (integer)`:
3795
+ * `point_amount (double)`:
3796
+ * `point_count (integer)`: