pokepay_partner_ruby_sdk 0.1.18 → 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.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +1 -1
- data/docs/index.md +957 -145
- data/lib/pokepay_partner_ruby_sdk/client.rb +8 -0
- data/lib/pokepay_partner_ruby_sdk/request/get_campaign.rb +15 -0
- data/lib/pokepay_partner_ruby_sdk/request/list_campaigns.rb +15 -0
- data/lib/pokepay_partner_ruby_sdk/request/list_transactions_v2.rb +15 -0
- data/lib/pokepay_partner_ruby_sdk/request/update_account.rb +2 -2
- data/lib/pokepay_partner_ruby_sdk/request/update_campaign.rb +15 -0
- data/lib/pokepay_partner_ruby_sdk/response/account_detail.rb +2 -0
- data/lib/pokepay_partner_ruby_sdk/response/campaign.rb +3 -0
- data/lib/pokepay_partner_ruby_sdk/response/paginated_campaigns.rb +16 -0
- data/lib/pokepay_partner_ruby_sdk/response/paginated_transaction_v2.rb +19 -0
- data/lib/pokepay_partner_ruby_sdk/version.rb +1 -1
- data/lib/pokepay_partner_ruby_sdk.rb +6 -0
- data/partner.yaml +881 -2
- metadata +8 -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トークンによる取引作成
|
@@ -199,13 +200,16 @@ response.body
|
|
199
200
|
- [CreateExternalTransaction](#create-external-transaction): ポケペイ外部取引を作成する
|
200
201
|
- [RefundExternalTransaction](#refund-external-transaction): ポケペイ外部取引をキャンセルする
|
201
202
|
- [CreateCampaign](#create-campaign): ポイント付与キャンペーンを作る
|
203
|
+
- [ListCampaigns](#list-campaigns): キャンペーン一覧を取得する
|
204
|
+
- [GetCampaign](#get-campaign): キャンペーンを取得する
|
205
|
+
- [UpdateCampaign](#update-campaign): ポイント付与キャンペーンを更新する
|
202
206
|
### Transaction
|
203
207
|
<a name="get-cpm-token"></a>
|
204
208
|
#### CPMトークンの状態取得
|
205
209
|
CPMトークンの現在の状態を取得します。CPMトークンの有効期限やCPM取引の状態を返します。
|
206
210
|
```ruby
|
207
211
|
response = $client.send(Pokepay::Request::GetCpmToken.new(
|
208
|
-
"
|
212
|
+
"C0yIYDrOmfZvcfCdES8HHJ" # cpm_token: CPMトークン
|
209
213
|
))
|
210
214
|
```
|
211
215
|
|
@@ -227,8 +231,8 @@ CPM取引時にエンドユーザーが店舗に提示するバーコードを
|
|
227
231
|
取引一覧を返します。
|
228
232
|
```ruby
|
229
233
|
response = $client.send(Pokepay::Request::ListTransactions.new(
|
230
|
-
from: "
|
231
|
-
to: "
|
234
|
+
from: "2023-04-24T17:11:07.000000+09:00", # 開始日時
|
235
|
+
to: "2024-11-07T01:32:00.000000+09:00", # 終了日時
|
232
236
|
page: 1, # ページ番号
|
233
237
|
per_page: 50, # 1ページ分の取引数
|
234
238
|
shop_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # 店舗ID
|
@@ -442,10 +446,10 @@ response = $client.send(Pokepay::Request::CreateTransaction.new(
|
|
442
446
|
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
|
443
447
|
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
|
444
448
|
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
|
445
|
-
money_amount:
|
446
|
-
point_amount:
|
447
|
-
point_expires_at: "
|
448
|
-
description: "
|
449
|
+
money_amount: 1212,
|
450
|
+
point_amount: 5173,
|
451
|
+
point_expires_at: "2022-02-09T19:38:20.000000+09:00", # ポイント有効期限
|
452
|
+
description: "C5y2HNrP34hD1uxIbudPgKcAH4LqtvnYdJrsgVxWy0PirB5ccKSjPsnaJy0xSUaUZ3KYipGveNp11WiSr08uCzB0JSt7hZNL6cvcqBnhGnyRs1ZbgEX46DL0EY9Dfg2K2KSBJ32yceHkpeJS53rQYr"
|
449
453
|
))
|
450
454
|
```
|
451
455
|
|
@@ -462,6 +466,229 @@ response = $client.send(Pokepay::Request::CreateTransaction.new(
|
|
462
466
|
|
463
467
|
---
|
464
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)オブジェクトを返します
|
465
692
|
<a name="create-topup-transaction"></a>
|
466
693
|
#### チャージする
|
467
694
|
チャージ取引を作成します。
|
@@ -471,9 +698,9 @@ response = $client.send(Pokepay::Request::CreateTopupTransaction.new(
|
|
471
698
|
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # customer_id: エンドユーザーのID
|
472
699
|
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # private_money_id: マネーID
|
473
700
|
bear_point_shop_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # ポイント支払時の負担店舗ID
|
474
|
-
money_amount:
|
475
|
-
point_amount:
|
476
|
-
point_expires_at: "
|
701
|
+
money_amount: 3318, # マネー額
|
702
|
+
point_amount: 9708, # ポイント額
|
703
|
+
point_expires_at: "2023-10-20T19:24:03.000000+09:00", # ポイント有効期限
|
477
704
|
description: "初夏のチャージキャンペーン", # 取引履歴に表示する説明文
|
478
705
|
metadata: "{\"key\":\"value\"}", # 取引メタデータ
|
479
706
|
request_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" # リクエストID
|
@@ -615,7 +842,7 @@ response = $client.send(Pokepay::Request::CreatePaymentTransaction.new(
|
|
615
842
|
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # shop_id: 店舗ID
|
616
843
|
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # customer_id: エンドユーザーID
|
617
844
|
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # private_money_id: マネーID
|
618
|
-
|
845
|
+
5365, # amount: 支払い額
|
619
846
|
description: "たい焼き(小倉)", # 取引履歴に表示する説明文
|
620
847
|
metadata: "{\"key\":\"value\"}", # 取引メタデータ
|
621
848
|
products: [{"jan_code":"abc",
|
@@ -628,6 +855,11 @@ response = $client.send(Pokepay::Request::CreatePaymentTransaction.new(
|
|
628
855
|
"unit_price":100,
|
629
856
|
"price": 100,
|
630
857
|
"is_discounted": false,
|
858
|
+
"other":"{}"}, {"jan_code":"abc",
|
859
|
+
"name":"name1",
|
860
|
+
"unit_price":100,
|
861
|
+
"price": 100,
|
862
|
+
"is_discounted": false,
|
631
863
|
"other":"{}"}], # 商品情報データ
|
632
864
|
request_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" # リクエストID
|
633
865
|
))
|
@@ -746,9 +978,9 @@ CPMトークンに設定されたスコープの取引を作ることができ
|
|
746
978
|
|
747
979
|
```ruby
|
748
980
|
response = $client.send(Pokepay::Request::CreateCpmTransaction.new(
|
749
|
-
"
|
981
|
+
"lhP5RwfRsdmSnnsKFojcLO", # cpm_token: CPMトークン
|
750
982
|
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # shop_id: 店舗ID
|
751
|
-
|
983
|
+
3648, # amount: 取引金額
|
752
984
|
description: "たい焼き(小倉)", # 取引説明文
|
753
985
|
metadata: "{\"key\":\"value\"}", # 店舗側メタデータ
|
754
986
|
products: [{"jan_code":"abc",
|
@@ -868,7 +1100,7 @@ response = $client.send(Pokepay::Request::CreateTransferTransaction.new(
|
|
868
1100
|
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # sender_id: 送金元ユーザーID
|
869
1101
|
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # receiver_id: 受取ユーザーID
|
870
1102
|
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # private_money_id: マネーID
|
871
|
-
|
1103
|
+
1909, # amount: 送金額
|
872
1104
|
metadata: "{\"key\":\"value\"}", # 取引メタデータ
|
873
1105
|
description: "たい焼き(小倉)", # 取引履歴に表示する説明文
|
874
1106
|
request_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" # リクエストID
|
@@ -970,8 +1202,8 @@ response = $client.send(Pokepay::Request::CreateExchangeTransaction.new(
|
|
970
1202
|
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
|
971
1203
|
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
|
972
1204
|
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
|
973
|
-
|
974
|
-
description: "
|
1205
|
+
1214,
|
1206
|
+
description: "rZaaP5zVuitJAWBnMTQrqQLb4F279GcsdDtM3uSEYbuaOy1AtJbZFvX4DTrnYj6rE9HuWGm5xmBEPErYjV24xKSbfZiVFE1mx2zGT1xfUftI30JyBIPqdC",
|
975
1207
|
request_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" # リクエストID
|
976
1208
|
))
|
977
1209
|
```
|
@@ -1035,19 +1267,19 @@ response = $client.send(Pokepay::Request::RefundTransaction.new(
|
|
1035
1267
|
####
|
1036
1268
|
```ruby
|
1037
1269
|
response = $client.send(Pokepay::Request::ListTransfers.new(
|
1038
|
-
from: "2022-
|
1039
|
-
to: "
|
1040
|
-
page:
|
1041
|
-
per_page:
|
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,
|
1042
1274
|
shop_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
|
1043
|
-
shop_name: "
|
1275
|
+
shop_name: "nTRvriMMqT8Y2wPxWWXEUoqg0zXsuvc8LF4mbP1h",
|
1044
1276
|
customer_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
|
1045
|
-
customer_name: "
|
1277
|
+
customer_name: "PDbNVjct5yQNjVn35rDh040vhQYw5VlT5PtGoiFuhhxPNxJedAo6IB1JwI4HtHPlHFEuPGo3GkdygOOVSyzQqeTxBrSdGB4t2pP3KohbOZsA8epkaCTJpPbbkD",
|
1046
1278
|
transaction_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
|
1047
1279
|
private_money_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
|
1048
|
-
is_modified:
|
1049
|
-
transaction_types: ["
|
1050
|
-
transfer_types: ["
|
1280
|
+
is_modified: true,
|
1281
|
+
transaction_types: ["payment", "exchange", "topup"],
|
1282
|
+
transfer_types: ["payment", "coupon", "topup", "exchange"], # 取引明細の種類でフィルターします。
|
1051
1283
|
description: "店頭QRコードによる支払い" # 取引詳細説明文
|
1052
1284
|
))
|
1053
1285
|
```
|
@@ -1121,13 +1353,13 @@ QRコードを読み取る方法以外にも、このURLリンクを直接スマ
|
|
1121
1353
|
```ruby
|
1122
1354
|
response = $client.send(Pokepay::Request::CreateCheck.new(
|
1123
1355
|
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # account_id: 送金元の店舗アカウントID
|
1124
|
-
money_amount:
|
1125
|
-
point_amount:
|
1356
|
+
money_amount: 2773, # 付与マネー額
|
1357
|
+
point_amount: 1358, # 付与ポイント額
|
1126
1358
|
description: "test check", # 説明文(アプリ上で取引の説明文として表示される)
|
1127
|
-
is_onetime:
|
1128
|
-
usage_limit:
|
1129
|
-
expires_at: "
|
1130
|
-
point_expires_at: "
|
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によって付与されるポイントの失効日時
|
1131
1363
|
point_expires_in_days: 60, # チャージQRによって付与されるポイントの有効期限(相対指定、単位は日)
|
1132
1364
|
bear_point_account: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" # ポイント額を負担する店舗アカウントのID
|
1133
1365
|
))
|
@@ -1202,18 +1434,18 @@ QRコード生成時に送金元店舗のウォレット情報や、送金額な
|
|
1202
1434
|
支払いQRコード一覧を表示します。
|
1203
1435
|
```ruby
|
1204
1436
|
response = $client.send(Pokepay::Request::ListBills.new(
|
1205
|
-
page:
|
1206
|
-
per_page:
|
1207
|
-
bill_id: "
|
1437
|
+
page: 1152, # ページ番号
|
1438
|
+
per_page: 3474, # 1ページの表示数
|
1439
|
+
bill_id: "wG", # 支払いQRコードのID
|
1208
1440
|
private_money_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # マネーID
|
1209
|
-
organization_code: "-
|
1441
|
+
organization_code: "-sVJ2oS5l", # 組織コード
|
1210
1442
|
description: "test bill", # 取引説明文
|
1211
|
-
created_from: "
|
1212
|
-
created_to: "
|
1443
|
+
created_from: "2021-08-20T22:07:44.000000+09:00", # 作成日時(起点)
|
1444
|
+
created_to: "2021-02-13T11:45:02.000000+09:00", # 作成日時(終点)
|
1213
1445
|
shop_name: "bill test shop1", # 店舗名
|
1214
1446
|
shop_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # 店舗ID
|
1215
|
-
lower_limit_amount:
|
1216
|
-
upper_limit_amount:
|
1447
|
+
lower_limit_amount: 9526, # 金額の範囲によるフィルタ(下限)
|
1448
|
+
upper_limit_amount: 4780, # 金額の範囲によるフィルタ(上限)
|
1217
1449
|
is_disabled: true # 支払いQRコードが無効化されているかどうか
|
1218
1450
|
))
|
1219
1451
|
```
|
@@ -1358,7 +1590,7 @@ response = $client.send(Pokepay::Request::ListBills.new(
|
|
1358
1590
|
response = $client.send(Pokepay::Request::CreateBill.new(
|
1359
1591
|
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # private_money_id: 支払いマネーのマネーID
|
1360
1592
|
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # shop_id: 支払い先(受け取り人)の店舗ID
|
1361
|
-
amount:
|
1593
|
+
amount: 1655, # 支払い額
|
1362
1594
|
description: "test bill" # 説明文(アプリ上で取引の説明文として表示される)
|
1363
1595
|
))
|
1364
1596
|
```
|
@@ -1382,9 +1614,9 @@ response = $client.send(Pokepay::Request::CreateBill.new(
|
|
1382
1614
|
```ruby
|
1383
1615
|
response = $client.send(Pokepay::Request::UpdateBill.new(
|
1384
1616
|
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # bill_id: 支払いQRコードのID
|
1385
|
-
amount:
|
1617
|
+
amount: 1037, # 支払い額
|
1386
1618
|
description: "test bill", # 説明文
|
1387
|
-
is_disabled:
|
1619
|
+
is_disabled: false # 無効化されているかどうか
|
1388
1620
|
))
|
1389
1621
|
```
|
1390
1622
|
|
@@ -1447,9 +1679,9 @@ Cashtrayを作成します。
|
|
1447
1679
|
response = $client.send(Pokepay::Request::CreateCashtray.new(
|
1448
1680
|
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # private_money_id: マネーID
|
1449
1681
|
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # shop_id: 店舗ユーザーID
|
1450
|
-
|
1682
|
+
7128, # amount: 金額
|
1451
1683
|
description: "たい焼き(小倉)", # 取引履歴に表示する説明文
|
1452
|
-
expires_in:
|
1684
|
+
expires_in: 3581 # 失効時間(秒)
|
1453
1685
|
))
|
1454
1686
|
```
|
1455
1687
|
|
@@ -1610,9 +1842,9 @@ Cashtrayの内容を更新します。bodyパラメーターは全て省略可
|
|
1610
1842
|
```ruby
|
1611
1843
|
response = $client.send(Pokepay::Request::UpdateCashtray.new(
|
1612
1844
|
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # cashtray_id: CashtrayのID
|
1613
|
-
amount:
|
1845
|
+
amount: 3771, # 金額
|
1614
1846
|
description: "たい焼き(小倉)", # 取引履歴に表示する説明文
|
1615
|
-
expires_in:
|
1847
|
+
expires_in: 4448 # 失効時間(秒)
|
1616
1848
|
))
|
1617
1849
|
```
|
1618
1850
|
|
@@ -1688,8 +1920,8 @@ response = $client.send(Pokepay::Request::GetAccount.new(
|
|
1688
1920
|
response = $client.send(Pokepay::Request::UpdateAccount.new(
|
1689
1921
|
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # account_id: ウォレットID
|
1690
1922
|
is_suspended: false, # ウォレットが凍結されているかどうか
|
1691
|
-
status: "
|
1692
|
-
can_transfer_topup:
|
1923
|
+
status: "pre-closed", # ウォレット状態
|
1924
|
+
can_transfer_topup: true # チャージ可能かどうか
|
1693
1925
|
))
|
1694
1926
|
```
|
1695
1927
|
|
@@ -1730,7 +1962,7 @@ response = $client.send(Pokepay::Request::UpdateAccount.new(
|
|
1730
1962
|
店舗ユーザーがエンドユーザーにチャージ可能かどうかです。真にするとチャージ可能となり、偽にするとチャージ不可能となります。
|
1731
1963
|
|
1732
1964
|
---
|
1733
|
-
成功したときは[
|
1965
|
+
成功したときは[AccountDetail](#account-detail)オブジェクトを返します
|
1734
1966
|
<a name="delete-account"></a>
|
1735
1967
|
#### ウォレットを退会する
|
1736
1968
|
ウォレットを退会します。一度ウォレットを退会した後は、そのウォレットを再び利用可能な状態に戻すことは出来ません。
|
@@ -1768,10 +2000,10 @@ response = $client.send(Pokepay::Request::DeleteAccount.new(
|
|
1768
2000
|
```ruby
|
1769
2001
|
response = $client.send(Pokepay::Request::ListAccountBalances.new(
|
1770
2002
|
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # account_id: ウォレットID
|
1771
|
-
page:
|
1772
|
-
per_page:
|
1773
|
-
expires_at_from: "2021-
|
1774
|
-
expires_at_to: "
|
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", # 有効期限の期間によるフィルター(終了時点)
|
1775
2007
|
direction: "desc" # 有効期限によるソート順序
|
1776
2008
|
))
|
1777
2009
|
```
|
@@ -1846,11 +2078,11 @@ response = $client.send(Pokepay::Request::ListAccountBalances.new(
|
|
1846
2078
|
```ruby
|
1847
2079
|
response = $client.send(Pokepay::Request::ListAccountExpiredBalances.new(
|
1848
2080
|
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # account_id: ウォレットID
|
1849
|
-
page:
|
1850
|
-
per_page:
|
1851
|
-
expires_at_from: "
|
1852
|
-
expires_at_to: "
|
1853
|
-
direction: "
|
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" # 有効期限によるソート順序
|
1854
2086
|
))
|
1855
2087
|
```
|
1856
2088
|
|
@@ -1924,9 +2156,9 @@ response = $client.send(Pokepay::Request::ListAccountExpiredBalances.new(
|
|
1924
2156
|
```ruby
|
1925
2157
|
response = $client.send(Pokepay::Request::UpdateCustomerAccount.new(
|
1926
2158
|
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # account_id: ウォレットID
|
1927
|
-
status: "
|
1928
|
-
account_name: "
|
1929
|
-
external_id: "
|
2159
|
+
status: "pre-closed", # ウォレット状態
|
2160
|
+
account_name: "2p9irVNMOOMEypf2sbMz5sG1GgyrO7oaIPGJ7JGBC1o5Rc96", # アカウント名
|
2161
|
+
external_id: "mVrWrKd8ZckndPnp3nLoMele3ppOb8vOALeCaVZ" # 外部ID
|
1930
2162
|
))
|
1931
2163
|
```
|
1932
2164
|
|
@@ -1980,15 +2212,15 @@ response = $client.send(Pokepay::Request::UpdateCustomerAccount.new(
|
|
1980
2212
|
```ruby
|
1981
2213
|
response = $client.send(Pokepay::Request::GetCustomerAccounts.new(
|
1982
2214
|
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # private_money_id: マネーID
|
1983
|
-
page:
|
1984
|
-
per_page:
|
1985
|
-
created_at_from: "
|
1986
|
-
created_at_to: "
|
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", # ウォレット作成日によるフィルター(終了時点)
|
1987
2219
|
is_suspended: false, # ウォレットが凍結状態かどうかでフィルターする
|
1988
|
-
status: "
|
1989
|
-
external_id: "
|
1990
|
-
tel: "
|
1991
|
-
email: "
|
2220
|
+
status: "suspended", # ウォレット状態
|
2221
|
+
external_id: "wh096vY0YkfqArkVOxtHaQbqrekxj6KVFbsIqYgBl99", # 外部ID
|
2222
|
+
tel: "08-750326", # エンドユーザーの電話番号
|
2223
|
+
email: "n3SH7ljqEd@pqCc.com" # エンドユーザーのメールアドレス
|
1992
2224
|
))
|
1993
2225
|
```
|
1994
2226
|
|
@@ -2101,7 +2333,7 @@ response = $client.send(Pokepay::Request::CreateCustomerAccount.new(
|
|
2101
2333
|
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # private_money_id: マネーID
|
2102
2334
|
user_name: "ポケペイ太郎", # ユーザー名
|
2103
2335
|
account_name: "ポケペイ太郎のアカウント", # アカウント名
|
2104
|
-
external_id: "
|
2336
|
+
external_id: "OpWjivoOnvdw0Yvld" # 外部ID
|
2105
2337
|
))
|
2106
2338
|
```
|
2107
2339
|
|
@@ -2155,11 +2387,11 @@ PAPIクライアントシステムから利用するPokepayユーザーのIDで
|
|
2155
2387
|
```ruby
|
2156
2388
|
response = $client.send(Pokepay::Request::GetShopAccounts.new(
|
2157
2389
|
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # private_money_id: マネーID
|
2158
|
-
page:
|
2159
|
-
per_page:
|
2160
|
-
created_at_from: "
|
2161
|
-
created_at_to: "
|
2162
|
-
is_suspended:
|
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 # ウォレットが凍結状態かどうかでフィルターする
|
2163
2395
|
))
|
2164
2396
|
```
|
2165
2397
|
|
@@ -2232,10 +2464,10 @@ response = $client.send(Pokepay::Request::ListCustomerTransactions.new(
|
|
2232
2464
|
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # private_money_id: マネーID
|
2233
2465
|
sender_customer_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # 送金エンドユーザーID
|
2234
2466
|
receiver_customer_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # 受取エンドユーザーID
|
2235
|
-
type: "
|
2467
|
+
type: "expire", # 取引種別
|
2236
2468
|
is_modified: true, # キャンセル済みかどうか
|
2237
|
-
from: "
|
2238
|
-
to: "
|
2469
|
+
from: "2018-09-13T17:32:36.000000+09:00", # 開始日時
|
2470
|
+
to: "2016-07-29T17:33:26.000000+09:00", # 終了日時
|
2239
2471
|
page: 1, # ページ番号
|
2240
2472
|
per_page: 50 # 1ページ分の取引数
|
2241
2473
|
))
|
@@ -2371,11 +2603,11 @@ response = $client.send(Pokepay::Request::ListShops.new(
|
|
2371
2603
|
organization_code: "pocketchange", # 組織コード
|
2372
2604
|
private_money_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # マネーID
|
2373
2605
|
name: "oxスーパー三田店", # 店舗名
|
2374
|
-
postal_code: "
|
2606
|
+
postal_code: "344-2283", # 店舗の郵便番号
|
2375
2607
|
address: "東京都港区芝...", # 店舗の住所
|
2376
|
-
tel: "
|
2377
|
-
email: "
|
2378
|
-
external_id: "
|
2608
|
+
tel: "084292628", # 店舗の電話番号
|
2609
|
+
email: "jMmLSHQhe4@tHPd.com", # 店舗のメールアドレス
|
2610
|
+
external_id: "v", # 店舗の外部ID
|
2379
2611
|
page: 1, # ページ番号
|
2380
2612
|
per_page: 50 # 1ページ分の取引数
|
2381
2613
|
))
|
@@ -2500,11 +2732,11 @@ response = $client.send(Pokepay::Request::ListShops.new(
|
|
2500
2732
|
```ruby
|
2501
2733
|
response = $client.send(Pokepay::Request::CreateShop.new(
|
2502
2734
|
"oxスーパー三田店", # shop_name: 店舗名
|
2503
|
-
shop_postal_code: "
|
2735
|
+
shop_postal_code: "083-8015", # 店舗の郵便番号
|
2504
2736
|
shop_address: "東京都港区芝...", # 店舗の住所
|
2505
|
-
shop_tel: "
|
2506
|
-
shop_email: "
|
2507
|
-
shop_external_id: "
|
2737
|
+
shop_tel: "0291516", # 店舗の電話番号
|
2738
|
+
shop_email: "ICt7BPEIsH@w9ia.com", # 店舗のメールアドレス
|
2739
|
+
shop_external_id: "xaPzoaDv6U6SXLkHad9cOSRej1Twb2rv", # 店舗の外部ID
|
2508
2740
|
organization_code: "ox-supermarket" # 組織コード
|
2509
2741
|
))
|
2510
2742
|
```
|
@@ -2514,14 +2746,14 @@ response = $client.send(Pokepay::Request::CreateShop.new(
|
|
2514
2746
|
```ruby
|
2515
2747
|
response = $client.send(Pokepay::Request::CreateShopV2.new(
|
2516
2748
|
"oxスーパー三田店", # name: 店舗名
|
2517
|
-
postal_code: "
|
2749
|
+
postal_code: "0977783", # 店舗の郵便番号
|
2518
2750
|
address: "東京都港区芝...", # 店舗の住所
|
2519
|
-
tel: "
|
2520
|
-
email: "
|
2521
|
-
external_id: "
|
2751
|
+
tel: "0197577-543", # 店舗の電話番号
|
2752
|
+
email: "TtkAPfziyB@2HYx.com", # 店舗のメールアドレス
|
2753
|
+
external_id: "SuFevcjssU2Qn83gWH7hF0T8Nh7eoO6asj", # 店舗の外部ID
|
2522
2754
|
organization_code: "ox-supermarket", # 組織コード
|
2523
|
-
private_money_ids: ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
|
2524
|
-
can_topup_private_money_ids: []
|
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の配列
|
2525
2757
|
))
|
2526
2758
|
```
|
2527
2759
|
|
@@ -2592,13 +2824,13 @@ response = $client.send(Pokepay::Request::GetShop.new(
|
|
2592
2824
|
response = $client.send(Pokepay::Request::UpdateShop.new(
|
2593
2825
|
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # shop_id: 店舗ユーザーID
|
2594
2826
|
name: "oxスーパー三田店", # 店舗名
|
2595
|
-
postal_code: "
|
2827
|
+
postal_code: "0806247", # 店舗の郵便番号
|
2596
2828
|
address: "東京都港区芝...", # 店舗の住所
|
2597
|
-
tel: "
|
2598
|
-
email: "
|
2599
|
-
external_id: "
|
2600
|
-
private_money_ids: [],
|
2601
|
-
can_topup_private_money_ids: []
|
2829
|
+
tel: "0718180047", # 店舗の電話番号
|
2830
|
+
email: "shIHzbucfD@hID3.com", # 店舗のメールアドレス
|
2831
|
+
external_id: "qemlo7JMNmGUe8JtqofMq1TyFcW0Uuc5ug", # 店舗の外部ID
|
2832
|
+
private_money_ids: ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"], # 店舗で有効にするマネーIDの配列
|
2833
|
+
can_topup_private_money_ids: ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"] # 店舗でチャージ可能にするマネーIDの配列
|
2602
2834
|
))
|
2603
2835
|
```
|
2604
2836
|
|
@@ -2699,8 +2931,8 @@ response = $client.send(Pokepay::Request::UpdateShop.new(
|
|
2699
2931
|
```ruby
|
2700
2932
|
response = $client.send(Pokepay::Request::ListUserAccounts.new(
|
2701
2933
|
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # user_id: ユーザーID
|
2702
|
-
page:
|
2703
|
-
per_page:
|
2934
|
+
page: 5526, # ページ番号
|
2935
|
+
per_page: 9523 # 1ページ分の取引数
|
2704
2936
|
))
|
2705
2937
|
```
|
2706
2938
|
|
@@ -2744,8 +2976,8 @@ response = $client.send(Pokepay::Request::ListUserAccounts.new(
|
|
2744
2976
|
response = $client.send(Pokepay::Request::CreateUserAccount.new(
|
2745
2977
|
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # user_id: ユーザーID
|
2746
2978
|
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # private_money_id: マネーID
|
2747
|
-
name: "
|
2748
|
-
external_id: "
|
2979
|
+
name: "pDoeGryI5OQQ9GoRehaS9O2M3fskqX8WbkxbWTp66iGj1lRR9XuMVcs2zeQQbQwb51zUDjfyGpNkIiUDvsd07Li3GyEdt6GGJ1GXo5UPiFJuScrEGcY5I6vYJqEcansSsP2ceIvKP9bgYanQbVQM9Z6RG0kCsPdzwEr5mXGzuLW3FkWi9ZhIojVZoApe0VcAXVJNN81LI44xL3mfrFPu", # ウォレット名
|
2980
|
+
external_id: "EOV" # 外部ID
|
2749
2981
|
))
|
2750
2982
|
```
|
2751
2983
|
|
@@ -2805,8 +3037,8 @@ response = $client.send(Pokepay::Request::GetPrivateMoneys.new(
|
|
2805
3037
|
```ruby
|
2806
3038
|
response = $client.send(Pokepay::Request::GetPrivateMoneyOrganizationSummaries.new(
|
2807
3039
|
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # private_money_id: マネーID
|
2808
|
-
from: "
|
2809
|
-
to: "
|
3040
|
+
from: "2023-08-27T08:46:48.000000+09:00", # 開始日時(toと同時に指定する必要有)
|
3041
|
+
to: "2020-08-12T10:28:28.000000+09:00", # 終了日時(fromと同時に指定する必要有)
|
2810
3042
|
page: 1, # ページ番号
|
2811
3043
|
per_page: 50 # 1ページ分の取引数
|
2812
3044
|
))
|
@@ -2820,10 +3052,10 @@ response = $client.send(Pokepay::Request::GetPrivateMoneyOrganizationSummaries.n
|
|
2820
3052
|
CSVファイルから一括取引をします。
|
2821
3053
|
```ruby
|
2822
3054
|
response = $client.send(Pokepay::Request::BulkCreateTransaction.new(
|
2823
|
-
"
|
2824
|
-
"
|
2825
|
-
"
|
2826
|
-
description: "
|
3055
|
+
"DCyUBg3VaVg5lQKirhrBQImBbFT", # name: 一括取引タスク名
|
3056
|
+
"Gr24", # content: 取引する情報のCSV
|
3057
|
+
"vRn0V1KmKqNhpuD1AS4IxvpFPGaTF6gXtd3n", # request_id: リクエストID
|
3058
|
+
description: "JyyNe74Q2bvFtDokudzPS7PJ09whlF6CVlMKFHkTHEGRWUBVUZa1rmAxzFUF6i" # 一括取引の説明
|
2827
3059
|
))
|
2828
3060
|
```
|
2829
3061
|
|
@@ -2900,7 +3132,7 @@ response = $client.send(Pokepay::Request::CreateExternalTransaction.new(
|
|
2900
3132
|
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # shop_id: 店舗ID
|
2901
3133
|
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # customer_id: エンドユーザーID
|
2902
3134
|
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # private_money_id: マネーID
|
2903
|
-
|
3135
|
+
104, # amount: 取引額
|
2904
3136
|
description: "たい焼き(小倉)", # 取引説明文
|
2905
3137
|
metadata: "{\"key\":\"value\"}", # ポケペイ外部取引メタデータ
|
2906
3138
|
products: [{"jan_code":"abc",
|
@@ -2908,16 +3140,6 @@ response = $client.send(Pokepay::Request::CreateExternalTransaction.new(
|
|
2908
3140
|
"unit_price":100,
|
2909
3141
|
"price": 100,
|
2910
3142
|
"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
3143
|
"other":"{}"}], # 商品情報データ
|
2922
3144
|
request_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" # リクエストID
|
2923
3145
|
))
|
@@ -3049,24 +3271,34 @@ response = $client.send(Pokepay::Request::RefundExternalTransaction.new(
|
|
3049
3271
|
|
3050
3272
|
```ruby
|
3051
3273
|
response = $client.send(Pokepay::Request::CreateCampaign.new(
|
3052
|
-
"
|
3274
|
+
"lI4uoOEnKraNjpsN9SjDxtxrgs7e0dkiAAa8jwX6FLCB1XlvzBazSCE1hEG2EkkP2VIPy7HW7Ee7skB9BB1YNClE0n87A30l6vspNWH9u8x4Yq2mxjIub5W9d4fa79SnOHSfjKkp3QkI11kPUOWIOCC9XRXSkWvgwMdC6YsQVBM615BSLRTB4phpjbt6QHeDKxXdEg3OxGlsZaVSpjoQ6ffYAe6kpXiCTiSBUIe5iqIMOcjyqBKlSFG", # name: キャンペーン名
|
3053
3275
|
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # private_money_id: マネーID
|
3054
|
-
"
|
3055
|
-
"
|
3056
|
-
|
3057
|
-
"
|
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: イベント種別
|
3058
3280
|
bear_point_shop_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # ポイント負担先店舗ID
|
3059
|
-
description: "
|
3281
|
+
description: "qDn2oMYRFh8cqnV2spFoKb7jYgx3gTJKy6dBb3ykYYVRZ4jdyfDGYQa0QPCC60HT399N8hkxoSQFYDUU0HuG332kYdREQC39nZBUv4F8J7UzyDYEv7bctcmIqdmvTV8RBzp0gixsKZWoUeORL98QDv9TW", # キャンペーンの説明文
|
3060
3282
|
status: "disabled", # キャンペーン作成時の状態
|
3061
|
-
point_expires_at: "
|
3062
|
-
point_expires_in_days:
|
3283
|
+
point_expires_at: "2020-08-06T14:45:24.000000+09:00", # ポイント有効期限(絶対日時指定)
|
3284
|
+
point_expires_in_days: 9973, # ポイント有効期限(相対日数指定)
|
3063
3285
|
is_exclusive: false, # キャンペーンの重複設定
|
3064
|
-
subject: "
|
3286
|
+
subject: "all", # ポイント付与の対象金額の種別
|
3065
3287
|
amount_based_point_rules: [{
|
3066
3288
|
"point_amount": 5,
|
3067
3289
|
"point_amount_unit": "percent",
|
3068
3290
|
"subject_more_than_or_equal": 1000,
|
3069
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
|
3070
3302
|
}], # 取引金額ベースのポイント付与ルール
|
3071
3303
|
product_based_point_rules: [{
|
3072
3304
|
"point_amount": 5,
|
@@ -3087,12 +3319,17 @@ response = $client.send(Pokepay::Request::CreateCampaign.new(
|
|
3087
3319
|
"is_multiply_by_count": true,
|
3088
3320
|
"required_count": 2
|
3089
3321
|
}], # 商品情報ベースのポイント付与ルール
|
3090
|
-
applicable_days_of_week: [
|
3322
|
+
applicable_days_of_week: [5, 5, 4], # キャンペーンを適用する曜日 (複数指定)
|
3091
3323
|
applicable_time_ranges: [{
|
3092
3324
|
"from": "12:00",
|
3093
3325
|
"to": "23:59"
|
3326
|
+
}, {
|
3327
|
+
"from": "12:00",
|
3328
|
+
"to": "23:59"
|
3094
3329
|
}], # キャンペーンを適用する時間帯 (複数指定)
|
3095
|
-
applicable_shop_ids: ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"] # キャンペーン適用対象となる店舗IDのリスト
|
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
|
3096
3333
|
))
|
3097
3334
|
```
|
3098
3335
|
|
@@ -3180,6 +3417,7 @@ response = $client.send(Pokepay::Request::CreateCampaign.new(
|
|
3180
3417
|
}
|
3181
3418
|
```
|
3182
3419
|
ポイントを負担する店舗のIDです。デフォルトではマネー発行体の本店が設定されます。
|
3420
|
+
ポイント負担先店舗は後から更新することはできません。
|
3183
3421
|
|
3184
3422
|
---
|
3185
3423
|
`description`
|
@@ -3325,7 +3563,7 @@ event が payment か external-transaction の時のみ有効です。
|
|
3325
3563
|
// 対象商品を2つ以上購入したら500ポイント付与(固定額付与)
|
3326
3564
|
{
|
3327
3565
|
"point_amount": 500,
|
3328
|
-
"point_amount_unit": absolute",
|
3566
|
+
"point_amount_unit": "absolute",
|
3329
3567
|
"product_code": "4912345678904",
|
3330
3568
|
"required_count": 2
|
3331
3569
|
},
|
@@ -3346,21 +3584,561 @@ event が payment か external-transaction の時のみ有効です。
|
|
3346
3584
|
```
|
3347
3585
|
|
3348
3586
|
---
|
3349
|
-
|
3350
|
-
|
3351
|
-
|
3352
|
-
|
3353
|
-
|
3354
|
-
|
3355
|
-
|
3356
|
-
|
3357
|
-
* `is_suspended (boolean)`: ウォレットが凍結されているかどうか
|
3358
|
-
* `status (AccountStatus)`:
|
3359
|
-
* `private_money (PrivateMoney)`: 設定マネー情報
|
3587
|
+
`minimum_number_for_combination_purchase`
|
3588
|
+
```json
|
3589
|
+
{
|
3590
|
+
"type": "integer",
|
3591
|
+
"minimum": 1
|
3592
|
+
}
|
3593
|
+
```
|
3594
|
+
複数種別の商品を同時購入したとき、同時購入キャンペーンの対象となる商品種別数の下限です。デフォルトでは未指定で、指定する場合は1以上の整数を指定します。
|
3360
3595
|
|
3361
|
-
|
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
|
3362
4141
|
|
3363
|
-
`private_money`は [PrivateMoney](#private-money) オブジェクトを返します。
|
3364
4142
|
|
3365
4143
|
<a name="account-with-user"></a>
|
3366
4144
|
## AccountWithUser
|
@@ -3388,6 +4166,7 @@ event が payment か external-transaction の時のみ有効です。
|
|
3388
4166
|
* `point_balance (double)`:
|
3389
4167
|
* `private_money (PrivateMoney)`:
|
3390
4168
|
* `user (User)`:
|
4169
|
+
* `external_id (string)`:
|
3391
4170
|
|
3392
4171
|
`status`は [AccountStatus](#account-status) オブジェクトを返します。
|
3393
4172
|
|
@@ -3567,6 +4346,16 @@ event が payment か external-transaction の時のみ有効です。
|
|
3567
4346
|
|
3568
4347
|
`pagination`は [Pagination](#pagination) オブジェクトを返します。
|
3569
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
|
+
|
3570
4359
|
<a name="paginated-transfers"></a>
|
3571
4360
|
## PaginatedTransfers
|
3572
4361
|
* `rows (array of Transfers)`:
|
@@ -3651,6 +4440,7 @@ event が payment か external-transaction の時のみ有効です。
|
|
3651
4440
|
* `description (string)`: キャンペーン説明文
|
3652
4441
|
* `bear_point_shop (User)`: ポイントを負担する店舗
|
3653
4442
|
* `private_money (PrivateMoney)`: キャンペーンを適用するマネー
|
4443
|
+
* `dest_private_money (PrivateMoney)`: ポイントを付与するマネー
|
3654
4444
|
* `point_calculation_rule (string)`: ポイント計算ルール (banklisp表記)
|
3655
4445
|
* `point_calculation_rule_object (string)`: ポイント計算ルール (JSON文字列による表記)
|
3656
4446
|
* `status (string)`: キャンペーンの現在の状態
|
@@ -3659,7 +4449,17 @@ event が payment か external-transaction の時のみ有効です。
|
|
3659
4449
|
|
3660
4450
|
`bear_point_shop`は [User](#user) オブジェクトを返します。
|
3661
4451
|
|
3662
|
-
`private_money`は [PrivateMoney](#private-money) オブジェクトを返します。
|
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) オブジェクトを返します。
|
3663
4463
|
|
3664
4464
|
<a name="account-status"></a>
|
3665
4465
|
## AccountStatus
|
@@ -3711,6 +4511,18 @@ event が payment か external-transaction の時のみ有効です。
|
|
3711
4511
|
|
3712
4512
|
`account`は [AccountWithUser](#account-with-user) オブジェクトを返します。
|
3713
4513
|
|
4514
|
+
<a name="account"></a>
|
4515
|
+
## Account
|
4516
|
+
* `id (string)`: ウォレットID
|
4517
|
+
* `name (string)`: ウォレット名
|
4518
|
+
* `is_suspended (boolean)`: ウォレットが凍結されているかどうか
|
4519
|
+
* `status (AccountStatus)`:
|
4520
|
+
* `private_money (PrivateMoney)`: 設定マネー情報
|
4521
|
+
|
4522
|
+
`status`は [AccountStatus](#account-status) オブジェクトを返します。
|
4523
|
+
|
4524
|
+
`private_money`は [PrivateMoney](#private-money) オブジェクトを返します。
|
4525
|
+
|
3714
4526
|
<a name="transfer"></a>
|
3715
4527
|
## Transfer
|
3716
4528
|
* `id (string)`:
|