pokepay_partner_ruby_sdk 0.1.17 → 0.1.18
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/docs/index.md +738 -150
- data/lib/pokepay_partner_ruby_sdk/request/create_campaign.rb +20 -0
- data/lib/pokepay_partner_ruby_sdk/request/create_cpm_transaction.rb +2 -2
- data/lib/pokepay_partner_ruby_sdk/request/create_exchange_transaction.rb +2 -2
- data/lib/pokepay_partner_ruby_sdk/request/create_payment_transaction.rb +2 -2
- data/lib/pokepay_partner_ruby_sdk/request/create_topup_transaction.rb +2 -2
- data/lib/pokepay_partner_ruby_sdk/request/create_topup_transaction_with_check.rb +2 -2
- data/lib/pokepay_partner_ruby_sdk/request/create_transaction.rb +2 -2
- data/lib/pokepay_partner_ruby_sdk/request/create_transfer_transaction.rb +2 -2
- data/lib/pokepay_partner_ruby_sdk/request/delete_account.rb +15 -0
- data/lib/pokepay_partner_ruby_sdk/request/get_transaction.rb +2 -2
- data/lib/pokepay_partner_ruby_sdk/request/refund_external_transaction.rb +2 -2
- data/lib/pokepay_partner_ruby_sdk/request/refund_transaction.rb +2 -2
- data/lib/pokepay_partner_ruby_sdk/request/update_account.rb +2 -2
- data/lib/pokepay_partner_ruby_sdk/request/update_customer_account.rb +15 -0
- data/lib/pokepay_partner_ruby_sdk/response/account.rb +3 -0
- data/lib/pokepay_partner_ruby_sdk/response/account_deleted.rb +11 -0
- data/lib/pokepay_partner_ruby_sdk/response/account_detail.rb +3 -0
- data/lib/pokepay_partner_ruby_sdk/response/account_status.rb +11 -0
- data/lib/pokepay_partner_ruby_sdk/response/account_with_user.rb +3 -0
- data/lib/pokepay_partner_ruby_sdk/response/account_without_private_money_detail.rb +3 -0
- data/lib/pokepay_partner_ruby_sdk/response/campaign.rb +41 -0
- data/lib/pokepay_partner_ruby_sdk/response/private_money.rb +2 -0
- data/lib/pokepay_partner_ruby_sdk/response/transaction_detail.rb +39 -0
- data/lib/pokepay_partner_ruby_sdk/version.rb +1 -1
- data/lib/pokepay_partner_ruby_sdk.rb +7 -0
- data/partner.yaml +693 -24
- metadata +9 -2
data/docs/index.md
CHANGED
@@ -167,6 +167,7 @@ response.body
|
|
167
167
|
- [GetTransaction](#get-transaction): 取引情報を取得する
|
168
168
|
- [RefundTransaction](#refund-transaction): 取引をキャンセルする
|
169
169
|
- [ListTransfers](#list-transfers):
|
170
|
+
- [CreateCheck](#create-check): チャージQRコードの発行
|
170
171
|
- [CreateTopupTransactionWithCheck](#create-topup-transaction-with-check): チャージQRコードを読み取ることでチャージする
|
171
172
|
- [ListBills](#list-bills): 支払いQRコード一覧を表示する
|
172
173
|
- [CreateBill](#create-bill): 支払いQRコードの発行
|
@@ -177,8 +178,10 @@ response.body
|
|
177
178
|
- [UpdateCashtray](#update-cashtray): Cashtrayの情報を更新する
|
178
179
|
- [GetAccount](#get-account): ウォレット情報を表示する
|
179
180
|
- [UpdateAccount](#update-account): ウォレット情報を更新する
|
181
|
+
- [DeleteAccount](#delete-account): ウォレットを退会する
|
180
182
|
- [ListAccountBalances](#list-account-balances): エンドユーザーの残高内訳を表示する
|
181
183
|
- [ListAccountExpiredBalances](#list-account-expired-balances): エンドユーザーの失効済みの残高内訳を表示する
|
184
|
+
- [UpdateCustomerAccount](#update-customer-account): ウォレット情報を更新する
|
182
185
|
- [GetCustomerAccounts](#get-customer-accounts): エンドユーザーのウォレット一覧を表示する
|
183
186
|
- [CreateCustomerAccount](#create-customer-account): 新規エンドユーザーウォレットを追加する
|
184
187
|
- [GetShopAccounts](#get-shop-accounts): 店舗ユーザーのウォレット一覧を表示する
|
@@ -195,13 +198,14 @@ response.body
|
|
195
198
|
- [BulkCreateTransaction](#bulk-create-transaction): CSVファイル一括取引
|
196
199
|
- [CreateExternalTransaction](#create-external-transaction): ポケペイ外部取引を作成する
|
197
200
|
- [RefundExternalTransaction](#refund-external-transaction): ポケペイ外部取引をキャンセルする
|
201
|
+
- [CreateCampaign](#create-campaign): ポイント付与キャンペーンを作る
|
198
202
|
### Transaction
|
199
203
|
<a name="get-cpm-token"></a>
|
200
204
|
#### CPMトークンの状態取得
|
201
205
|
CPMトークンの現在の状態を取得します。CPMトークンの有効期限やCPM取引の状態を返します。
|
202
206
|
```ruby
|
203
207
|
response = $client.send(Pokepay::Request::GetCpmToken.new(
|
204
|
-
"
|
208
|
+
"R1aePdc9fGHLcwyelAg5Jr" # cpm_token: CPMトークン
|
205
209
|
))
|
206
210
|
```
|
207
211
|
|
@@ -223,8 +227,8 @@ CPM取引時にエンドユーザーが店舗に提示するバーコードを
|
|
223
227
|
取引一覧を返します。
|
224
228
|
```ruby
|
225
229
|
response = $client.send(Pokepay::Request::ListTransactions.new(
|
226
|
-
from: "
|
227
|
-
to: "
|
230
|
+
from: "2019-03-26T10:40:08.000000+09:00", # 開始日時
|
231
|
+
to: "2025-06-28T13:58:26.000000+09:00", # 終了日時
|
228
232
|
page: 1, # ページ番号
|
229
233
|
per_page: 50, # 1ページ分の取引数
|
230
234
|
shop_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # 店舗ID
|
@@ -234,7 +238,7 @@ response = $client.send(Pokepay::Request::ListTransactions.new(
|
|
234
238
|
transaction_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # 取引ID
|
235
239
|
organization_code: "pocketchange", # 組織コード
|
236
240
|
private_money_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # マネーID
|
237
|
-
is_modified:
|
241
|
+
is_modified: true, # キャンセルフラグ
|
238
242
|
types: ["topup", "payment"], # 取引種別 (複数指定可)、チャージ=topup、支払い=payment
|
239
243
|
description: "店頭QRコードによる支払い" # 取引説明文
|
240
244
|
))
|
@@ -388,7 +392,8 @@ response = $client.send(Pokepay::Request::ListTransactions.new(
|
|
388
392
|
"type": "string",
|
389
393
|
"enum": {
|
390
394
|
"topup": "payment",
|
391
|
-
"exchange_outflow": "exchange_inflow"
|
395
|
+
"exchange_outflow": "exchange_inflow",
|
396
|
+
"cashback": "expire"
|
392
397
|
}
|
393
398
|
}
|
394
399
|
}
|
@@ -404,11 +409,17 @@ response = $client.send(Pokepay::Request::ListTransactions.new(
|
|
404
409
|
エンドユーザーから店舗への送金取引(支払い)
|
405
410
|
|
406
411
|
3. exchange-outflow
|
407
|
-
|
412
|
+
他マネーへの流出
|
408
413
|
|
409
414
|
4. exchange-inflow
|
410
415
|
他マネーからの流入
|
411
416
|
|
417
|
+
5. cashback
|
418
|
+
退会時返金取引
|
419
|
+
|
420
|
+
6. expire
|
421
|
+
退会時失効取引
|
422
|
+
|
412
423
|
---
|
413
424
|
`description`
|
414
425
|
```json
|
@@ -431,10 +442,10 @@ response = $client.send(Pokepay::Request::CreateTransaction.new(
|
|
431
442
|
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
|
432
443
|
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
|
433
444
|
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
|
434
|
-
money_amount:
|
435
|
-
point_amount:
|
436
|
-
point_expires_at: "
|
437
|
-
description: "
|
445
|
+
money_amount: 5259,
|
446
|
+
point_amount: 8639,
|
447
|
+
point_expires_at: "2021-12-02T20:12:47.000000+09:00", # ポイント有効期限
|
448
|
+
description: "qxXj74j643AIOVakyq8QHWKNric3MBQYWsKtvnxoQJLloM94TQVFchkaVLnKXq1JcpZfZ"
|
438
449
|
))
|
439
450
|
```
|
440
451
|
|
@@ -450,7 +461,7 @@ response = $client.send(Pokepay::Request::CreateTransaction.new(
|
|
450
461
|
省略した場合はマネーに設定された有効期限と同じものがポイントの有効期限となります。
|
451
462
|
|
452
463
|
---
|
453
|
-
成功したときは[
|
464
|
+
成功したときは[TransactionDetail](#transaction-detail)オブジェクトを返します
|
454
465
|
<a name="create-topup-transaction"></a>
|
455
466
|
#### チャージする
|
456
467
|
チャージ取引を作成します。
|
@@ -460,9 +471,9 @@ response = $client.send(Pokepay::Request::CreateTopupTransaction.new(
|
|
460
471
|
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # customer_id: エンドユーザーのID
|
461
472
|
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # private_money_id: マネーID
|
462
473
|
bear_point_shop_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # ポイント支払時の負担店舗ID
|
463
|
-
money_amount:
|
464
|
-
point_amount:
|
465
|
-
point_expires_at: "
|
474
|
+
money_amount: 8612, # マネー額
|
475
|
+
point_amount: 5409, # ポイント額
|
476
|
+
point_expires_at: "2022-04-20T20:45:17.000000+09:00", # ポイント有効期限
|
466
477
|
description: "初夏のチャージキャンペーン", # 取引履歴に表示する説明文
|
467
478
|
metadata: "{\"key\":\"value\"}", # 取引メタデータ
|
468
479
|
request_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" # リクエストID
|
@@ -521,25 +532,27 @@ response = $client.send(Pokepay::Request::CreateTopupTransaction.new(
|
|
521
532
|
`money_amount`
|
522
533
|
```json
|
523
534
|
{
|
524
|
-
"type": "
|
535
|
+
"type": "integer",
|
525
536
|
"minimum": 0
|
526
537
|
}
|
527
538
|
```
|
528
539
|
マネー額です。
|
529
540
|
|
530
541
|
送金するマネー額を指定します。
|
542
|
+
デフォルト値は0で、money_amountとpoint_amountの両方が0のときにはinvalid_parameter_both_point_and_money_are_zero(エラーコード400)が返ります。
|
531
543
|
|
532
544
|
---
|
533
545
|
`point_amount`
|
534
546
|
```json
|
535
547
|
{
|
536
|
-
"type": "
|
548
|
+
"type": "integer",
|
537
549
|
"minimum": 0
|
538
550
|
}
|
539
551
|
```
|
540
552
|
ポイント額です。
|
541
553
|
|
542
554
|
送金するポイント額を指定します。
|
555
|
+
デフォルト値は0で、money_amountとpoint_amountの両方が0のときにはinvalid_parameter_both_point_and_money_are_zero(エラーコード400)が返ります。
|
543
556
|
|
544
557
|
---
|
545
558
|
`point_expires_at`
|
@@ -591,7 +604,7 @@ response = $client.send(Pokepay::Request::CreateTopupTransaction.new(
|
|
591
604
|
リクエストIDを指定したとき、まだそのリクエストIDに対する取引がない場合、新規に取引が作られレスポンスとして返されます。もしそのリクエストIDに対する取引が既にある場合、既存の取引がレスポンスとして返されます。
|
592
605
|
|
593
606
|
---
|
594
|
-
成功したときは[
|
607
|
+
成功したときは[TransactionDetail](#transaction-detail)オブジェクトを返します
|
595
608
|
<a name="create-payment-transaction"></a>
|
596
609
|
#### 支払いする
|
597
610
|
支払取引を作成します。
|
@@ -602,7 +615,7 @@ response = $client.send(Pokepay::Request::CreatePaymentTransaction.new(
|
|
602
615
|
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # shop_id: 店舗ID
|
603
616
|
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # customer_id: エンドユーザーID
|
604
617
|
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # private_money_id: マネーID
|
605
|
-
|
618
|
+
6066, # amount: 支払い額
|
606
619
|
description: "たい焼き(小倉)", # 取引履歴に表示する説明文
|
607
620
|
metadata: "{\"key\":\"value\"}", # 取引メタデータ
|
608
621
|
products: [{"jan_code":"abc",
|
@@ -660,7 +673,7 @@ response = $client.send(Pokepay::Request::CreatePaymentTransaction.new(
|
|
660
673
|
`amount`
|
661
674
|
```json
|
662
675
|
{
|
663
|
-
"type": "
|
676
|
+
"type": "integer",
|
664
677
|
"minimum": 0
|
665
678
|
}
|
666
679
|
```
|
@@ -725,7 +738,7 @@ response = $client.send(Pokepay::Request::CreatePaymentTransaction.new(
|
|
725
738
|
リクエストIDを指定したとき、まだそのリクエストIDに対する取引がない場合、新規に取引が作られレスポンスとして返されます。もしそのリクエストIDに対する取引が既にある場合、既存の取引がレスポンスとして返されます。
|
726
739
|
|
727
740
|
---
|
728
|
-
成功したときは[
|
741
|
+
成功したときは[TransactionDetail](#transaction-detail)オブジェクトを返します
|
729
742
|
<a name="create-cpm-transaction"></a>
|
730
743
|
#### CPMトークンによる取引作成
|
731
744
|
CPMトークンにより取引を作成します。
|
@@ -733,9 +746,9 @@ CPMトークンに設定されたスコープの取引を作ることができ
|
|
733
746
|
|
734
747
|
```ruby
|
735
748
|
response = $client.send(Pokepay::Request::CreateCpmTransaction.new(
|
736
|
-
"
|
749
|
+
"sKCxnRcuSoLNAly4QR5kzf", # cpm_token: CPMトークン
|
737
750
|
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # shop_id: 店舗ID
|
738
|
-
|
751
|
+
4364, # amount: 取引金額
|
739
752
|
description: "たい焼き(小倉)", # 取引説明文
|
740
753
|
metadata: "{\"key\":\"value\"}", # 店舗側メタデータ
|
741
754
|
products: [{"jan_code":"abc",
|
@@ -743,6 +756,11 @@ response = $client.send(Pokepay::Request::CreateCpmTransaction.new(
|
|
743
756
|
"unit_price":100,
|
744
757
|
"price": 100,
|
745
758
|
"is_discounted": false,
|
759
|
+
"other":"{}"}, {"jan_code":"abc",
|
760
|
+
"name":"name1",
|
761
|
+
"unit_price":100,
|
762
|
+
"price": 100,
|
763
|
+
"is_discounted": false,
|
746
764
|
"other":"{}"}], # 商品情報データ
|
747
765
|
request_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" # リクエストID
|
748
766
|
))
|
@@ -839,7 +857,7 @@ response = $client.send(Pokepay::Request::CreateCpmTransaction.new(
|
|
839
857
|
リクエストIDを指定したとき、まだそのリクエストIDに対する取引がない場合、新規に取引が作られレスポンスとして返されます。もしそのリクエストIDに対する取引が既にある場合、既存の取引がレスポンスとして返されます。
|
840
858
|
|
841
859
|
---
|
842
|
-
成功したときは[
|
860
|
+
成功したときは[TransactionDetail](#transaction-detail)オブジェクトを返します
|
843
861
|
<a name="create-transfer-transaction"></a>
|
844
862
|
#### 個人間送金
|
845
863
|
エンドユーザー間での送金取引(個人間送金)を作成します。
|
@@ -850,7 +868,7 @@ response = $client.send(Pokepay::Request::CreateTransferTransaction.new(
|
|
850
868
|
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # sender_id: 送金元ユーザーID
|
851
869
|
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # receiver_id: 受取ユーザーID
|
852
870
|
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # private_money_id: マネーID
|
853
|
-
|
871
|
+
6176, # amount: 送金額
|
854
872
|
metadata: "{\"key\":\"value\"}", # 取引メタデータ
|
855
873
|
description: "たい焼き(小倉)", # 取引履歴に表示する説明文
|
856
874
|
request_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" # リクエストID
|
@@ -944,7 +962,7 @@ response = $client.send(Pokepay::Request::CreateTransferTransaction.new(
|
|
944
962
|
リクエストIDを指定したとき、まだそのリクエストIDに対する取引がない場合、新規に取引が作られレスポンスとして返されます。もしそのリクエストIDに対する取引が既にある場合、既存の取引がレスポンスとして返されます。
|
945
963
|
|
946
964
|
---
|
947
|
-
成功したときは[
|
965
|
+
成功したときは[TransactionDetail](#transaction-detail)オブジェクトを返します
|
948
966
|
<a name="create-exchange-transaction"></a>
|
949
967
|
####
|
950
968
|
```ruby
|
@@ -952,8 +970,8 @@ response = $client.send(Pokepay::Request::CreateExchangeTransaction.new(
|
|
952
970
|
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
|
953
971
|
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
|
954
972
|
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
|
955
|
-
|
956
|
-
description: "
|
973
|
+
2660,
|
974
|
+
description: "7LZFZwhy5RIJGwbFSZ2qU3L9frpqlrETgz3O9wlyQ0TWfR4Gx21zM7WIQGDsPsJyAShBlCJPjtVj6RA58jW2j8noWbhryHKQAP2bBeZkmIh2UeN",
|
957
975
|
request_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" # リクエストID
|
958
976
|
))
|
959
977
|
```
|
@@ -973,7 +991,7 @@ response = $client.send(Pokepay::Request::CreateExchangeTransaction.new(
|
|
973
991
|
リクエストIDを指定したとき、まだそのリクエストIDに対する取引がない場合、新規に取引が作られレスポンスとして返されます。もしそのリクエストIDに対する取引が既にある場合、既存の取引がレスポンスとして返されます。
|
974
992
|
|
975
993
|
---
|
976
|
-
成功したときは[
|
994
|
+
成功したときは[TransactionDetail](#transaction-detail)オブジェクトを返します
|
977
995
|
<a name="get-transaction"></a>
|
978
996
|
#### 取引情報を取得する
|
979
997
|
取引を取得します。
|
@@ -996,7 +1014,7 @@ response = $client.send(Pokepay::Request::GetTransaction.new(
|
|
996
1014
|
フィルターとして使われ、指定した取引IDの取引を取得します。
|
997
1015
|
|
998
1016
|
---
|
999
|
-
成功したときは[
|
1017
|
+
成功したときは[TransactionDetail](#transaction-detail)オブジェクトを返します
|
1000
1018
|
<a name="refund-transaction"></a>
|
1001
1019
|
#### 取引をキャンセルする
|
1002
1020
|
取引IDを指定して取引をキャンセルします。
|
@@ -1012,24 +1030,24 @@ response = $client.send(Pokepay::Request::RefundTransaction.new(
|
|
1012
1030
|
description: "返品対応のため" # 取引履歴に表示する返金事由
|
1013
1031
|
))
|
1014
1032
|
```
|
1015
|
-
成功したときは[
|
1033
|
+
成功したときは[TransactionDetail](#transaction-detail)オブジェクトを返します
|
1016
1034
|
<a name="list-transfers"></a>
|
1017
1035
|
####
|
1018
1036
|
```ruby
|
1019
1037
|
response = $client.send(Pokepay::Request::ListTransfers.new(
|
1020
|
-
from: "
|
1021
|
-
to: "
|
1022
|
-
page:
|
1023
|
-
per_page:
|
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,
|
1024
1042
|
shop_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
|
1025
|
-
shop_name: "
|
1043
|
+
shop_name: "7tEp9MnaMKkPTTOh4KlFXKgt",
|
1026
1044
|
customer_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
|
1027
|
-
customer_name: "
|
1045
|
+
customer_name: "xsqVTYrrSHZ1a0tz4EzkuhUCHWp85qyAYWUJWst1yIlHOt0XiM6Qkur8SbZd3wcuCesxkTgeUlIAlQvL5t780R8L5VrLxzRQlVu0ZdkmHWdPUiVDqeHPcQVtlOjSB31Mxq8SXpxSHJRZi52y7KvoeklIR5ig74Fkbtbb0SlK2KbT8BQ8WxGHxi6f0cuW1ZhxLtCHCm7yUfJm7Fg98YgjSKRGLQpNx8ciNrKweGJtnG",
|
1028
1046
|
transaction_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
|
1029
1047
|
private_money_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
|
1030
|
-
is_modified:
|
1031
|
-
transaction_types: ["exchange", "
|
1032
|
-
transfer_types: ["campaign"],
|
1048
|
+
is_modified: false,
|
1049
|
+
transaction_types: ["exchange", "topup", "cashback", "transfer", "expire"],
|
1050
|
+
transfer_types: ["coupon", "topup", "cashback", "exchange", "payment", "transfer", "campaign"], # 取引明細の種類でフィルターします。
|
1033
1051
|
description: "店頭QRコードによる支払い" # 取引詳細説明文
|
1034
1052
|
))
|
1035
1053
|
```
|
@@ -1044,7 +1062,8 @@ response = $client.send(Pokepay::Request::ListTransfers.new(
|
|
1044
1062
|
"enum": {
|
1045
1063
|
"topup": "payment",
|
1046
1064
|
"exchange": "transfer",
|
1047
|
-
"coupon": "campaign"
|
1065
|
+
"coupon": "campaign",
|
1066
|
+
"cashback": "expire"
|
1048
1067
|
}
|
1049
1068
|
}
|
1050
1069
|
}
|
@@ -1068,6 +1087,12 @@ response = $client.send(Pokepay::Request::ListTransfers.new(
|
|
1068
1087
|
5. coupon
|
1069
1088
|
クーポンによる値引き処理、またはそのキャンセル取引
|
1070
1089
|
|
1090
|
+
6. cashback
|
1091
|
+
退会時の返金取引
|
1092
|
+
|
1093
|
+
7. expire
|
1094
|
+
退会時失効取引
|
1095
|
+
|
1071
1096
|
---
|
1072
1097
|
`description`
|
1073
1098
|
```json
|
@@ -1091,6 +1116,46 @@ response = $client.send(Pokepay::Request::ListTransfers.new(
|
|
1091
1116
|
|
1092
1117
|
QRコードを読み取る方法以外にも、このURLリンクを直接スマートフォン(iOS/Android)上で開くことによりアプリが起動して取引が行われます。(注意: 上記URLはsandbox環境であるため、アプリもsandbox環境のものである必要があります) 上記URL中の `xxxxxxxx-xxxx-xxxxxxxxx-xxxxxxxxxxxx` の部分がチャージQRコードのIDです。
|
1093
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)オブジェクトを返します
|
1094
1159
|
<a name="create-topup-transaction-with-check"></a>
|
1095
1160
|
#### チャージQRコードを読み取ることでチャージする
|
1096
1161
|
通常チャージQRコードはエンドユーザーのアプリによって読み取られ、アプリとポケペイサーバとの直接通信によって取引が作られます。 もしエンドユーザーとの通信をパートナーのサーバのみに限定したい場合、パートナーのサーバがチャージQRの情報をエンドユーザーから代理受けして、サーバ間連携APIによって実際のチャージ取引をリクエストすることになります。
|
@@ -1129,7 +1194,7 @@ QRコード生成時に送金元店舗のウォレット情報や、送金額な
|
|
1129
1194
|
送金先のエンドユーザーを指定します。
|
1130
1195
|
|
1131
1196
|
---
|
1132
|
-
成功したときは[
|
1197
|
+
成功したときは[TransactionDetail](#transaction-detail)オブジェクトを返します
|
1133
1198
|
### Bill
|
1134
1199
|
支払いQRコード
|
1135
1200
|
<a name="list-bills"></a>
|
@@ -1137,19 +1202,19 @@ QRコード生成時に送金元店舗のウォレット情報や、送金額な
|
|
1137
1202
|
支払いQRコード一覧を表示します。
|
1138
1203
|
```ruby
|
1139
1204
|
response = $client.send(Pokepay::Request::ListBills.new(
|
1140
|
-
page:
|
1141
|
-
per_page:
|
1142
|
-
bill_id: "
|
1205
|
+
page: 6577, # ページ番号
|
1206
|
+
per_page: 1765, # 1ページの表示数
|
1207
|
+
bill_id: "d", # 支払いQRコードのID
|
1143
1208
|
private_money_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # マネーID
|
1144
|
-
organization_code: "
|
1209
|
+
organization_code: "-ct6-xMB5y4--o-", # 組織コード
|
1145
1210
|
description: "test bill", # 取引説明文
|
1146
|
-
created_from: "2022-
|
1147
|
-
created_to: "
|
1211
|
+
created_from: "2022-03-20T08:28:32.000000+09:00", # 作成日時(起点)
|
1212
|
+
created_to: "2017-11-05T16:56:15.000000+09:00", # 作成日時(終点)
|
1148
1213
|
shop_name: "bill test shop1", # 店舗名
|
1149
1214
|
shop_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # 店舗ID
|
1150
|
-
lower_limit_amount:
|
1151
|
-
upper_limit_amount:
|
1152
|
-
is_disabled:
|
1215
|
+
lower_limit_amount: 7582, # 金額の範囲によるフィルタ(下限)
|
1216
|
+
upper_limit_amount: 2572, # 金額の範囲によるフィルタ(上限)
|
1217
|
+
is_disabled: true # 支払いQRコードが無効化されているかどうか
|
1153
1218
|
))
|
1154
1219
|
```
|
1155
1220
|
|
@@ -1293,7 +1358,7 @@ response = $client.send(Pokepay::Request::ListBills.new(
|
|
1293
1358
|
response = $client.send(Pokepay::Request::CreateBill.new(
|
1294
1359
|
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # private_money_id: 支払いマネーのマネーID
|
1295
1360
|
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # shop_id: 支払い先(受け取り人)の店舗ID
|
1296
|
-
amount:
|
1361
|
+
amount: 4674, # 支払い額
|
1297
1362
|
description: "test bill" # 説明文(アプリ上で取引の説明文として表示される)
|
1298
1363
|
))
|
1299
1364
|
```
|
@@ -1317,9 +1382,9 @@ response = $client.send(Pokepay::Request::CreateBill.new(
|
|
1317
1382
|
```ruby
|
1318
1383
|
response = $client.send(Pokepay::Request::UpdateBill.new(
|
1319
1384
|
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # bill_id: 支払いQRコードのID
|
1320
|
-
amount:
|
1385
|
+
amount: 4185, # 支払い額
|
1321
1386
|
description: "test bill", # 説明文
|
1322
|
-
is_disabled:
|
1387
|
+
is_disabled: true # 無効化されているかどうか
|
1323
1388
|
))
|
1324
1389
|
```
|
1325
1390
|
|
@@ -1382,9 +1447,9 @@ Cashtrayを作成します。
|
|
1382
1447
|
response = $client.send(Pokepay::Request::CreateCashtray.new(
|
1383
1448
|
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # private_money_id: マネーID
|
1384
1449
|
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # shop_id: 店舗ユーザーID
|
1385
|
-
|
1450
|
+
5014, # amount: 金額
|
1386
1451
|
description: "たい焼き(小倉)", # 取引履歴に表示する説明文
|
1387
|
-
expires_in:
|
1452
|
+
expires_in: 2273 # 失効時間(秒)
|
1388
1453
|
))
|
1389
1454
|
```
|
1390
1455
|
|
@@ -1545,9 +1610,9 @@ Cashtrayの内容を更新します。bodyパラメーターは全て省略可
|
|
1545
1610
|
```ruby
|
1546
1611
|
response = $client.send(Pokepay::Request::UpdateCashtray.new(
|
1547
1612
|
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # cashtray_id: CashtrayのID
|
1548
|
-
amount:
|
1613
|
+
amount: 7304, # 金額
|
1549
1614
|
description: "たい焼き(小倉)", # 取引履歴に表示する説明文
|
1550
|
-
expires_in:
|
1615
|
+
expires_in: 5490 # 失効時間(秒)
|
1551
1616
|
))
|
1552
1617
|
```
|
1553
1618
|
|
@@ -1622,7 +1687,9 @@ response = $client.send(Pokepay::Request::GetAccount.new(
|
|
1622
1687
|
```ruby
|
1623
1688
|
response = $client.send(Pokepay::Request::UpdateAccount.new(
|
1624
1689
|
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # account_id: ウォレットID
|
1625
|
-
is_suspended: false
|
1690
|
+
is_suspended: false, # ウォレットが凍結されているかどうか
|
1691
|
+
status: "active", # ウォレット状態
|
1692
|
+
can_transfer_topup: false # チャージ可能かどうか
|
1626
1693
|
))
|
1627
1694
|
```
|
1628
1695
|
|
@@ -1646,17 +1713,65 @@ response = $client.send(Pokepay::Request::UpdateAccount.new(
|
|
1646
1713
|
ウォレットの凍結状態です。真にするとウォレットが凍結され、そのウォレットでは新規取引ができなくなります。偽にすると凍結解除されます。
|
1647
1714
|
|
1648
1715
|
---
|
1649
|
-
|
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)オブジェクトを返します
|
1650
1765
|
<a name="list-account-balances"></a>
|
1651
1766
|
#### エンドユーザーの残高内訳を表示する
|
1652
1767
|
エンドユーザーのウォレット毎の残高を有効期限別のリストとして取得します。
|
1653
1768
|
```ruby
|
1654
1769
|
response = $client.send(Pokepay::Request::ListAccountBalances.new(
|
1655
1770
|
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # account_id: ウォレットID
|
1656
|
-
page:
|
1657
|
-
per_page:
|
1658
|
-
expires_at_from: "
|
1659
|
-
expires_at_to: "
|
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", # 有効期限の期間によるフィルター(終了時点)
|
1660
1775
|
direction: "desc" # 有効期限によるソート順序
|
1661
1776
|
))
|
1662
1777
|
```
|
@@ -1731,10 +1846,10 @@ response = $client.send(Pokepay::Request::ListAccountBalances.new(
|
|
1731
1846
|
```ruby
|
1732
1847
|
response = $client.send(Pokepay::Request::ListAccountExpiredBalances.new(
|
1733
1848
|
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # account_id: ウォレットID
|
1734
|
-
page:
|
1735
|
-
per_page:
|
1736
|
-
expires_at_from: "2019-
|
1737
|
-
expires_at_to: "
|
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", # 有効期限の期間によるフィルター(終了時点)
|
1738
1853
|
direction: "asc" # 有効期限によるソート順序
|
1739
1854
|
))
|
1740
1855
|
```
|
@@ -1803,20 +1918,77 @@ response = $client.send(Pokepay::Request::ListAccountExpiredBalances.new(
|
|
1803
1918
|
|
1804
1919
|
---
|
1805
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)オブジェクトを返します
|
1806
1977
|
<a name="get-customer-accounts"></a>
|
1807
1978
|
#### エンドユーザーのウォレット一覧を表示する
|
1808
1979
|
マネーを指定してエンドユーザーのウォレット一覧を取得します。
|
1809
1980
|
```ruby
|
1810
1981
|
response = $client.send(Pokepay::Request::GetCustomerAccounts.new(
|
1811
1982
|
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # private_money_id: マネーID
|
1812
|
-
page:
|
1813
|
-
per_page:
|
1814
|
-
created_at_from: "
|
1815
|
-
created_at_to: "
|
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", # ウォレット作成日によるフィルター(終了時点)
|
1816
1987
|
is_suspended: false, # ウォレットが凍結状態かどうかでフィルターする
|
1817
|
-
|
1818
|
-
|
1819
|
-
|
1988
|
+
status: "pre-closed", # ウォレット状態
|
1989
|
+
external_id: "N", # 外部ID
|
1990
|
+
tel: "08723-9295", # エンドユーザーの電話番号
|
1991
|
+
email: "CYxA4AjI47@p6qt.com" # エンドユーザーのメールアドレス
|
1820
1992
|
))
|
1821
1993
|
```
|
1822
1994
|
|
@@ -1879,6 +2051,16 @@ response = $client.send(Pokepay::Request::GetCustomerAccounts.new(
|
|
1879
2051
|
```
|
1880
2052
|
このパラメータが指定されている場合、ウォレットの凍結状態で結果がフィルターされます。デフォルトでは未指定です。
|
1881
2053
|
|
2054
|
+
---
|
2055
|
+
`status`
|
2056
|
+
```json
|
2057
|
+
{
|
2058
|
+
"type": "string",
|
2059
|
+
"enum": [ "active", "suspended", "pre-closed" ]
|
2060
|
+
}
|
2061
|
+
```
|
2062
|
+
このパラメータが指定されている場合、ウォレットの状態で結果がフィルターされます。デフォルトでは未指定です。
|
2063
|
+
|
1882
2064
|
---
|
1883
2065
|
`external_id`
|
1884
2066
|
```json
|
@@ -1919,7 +2101,7 @@ response = $client.send(Pokepay::Request::CreateCustomerAccount.new(
|
|
1919
2101
|
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # private_money_id: マネーID
|
1920
2102
|
user_name: "ポケペイ太郎", # ユーザー名
|
1921
2103
|
account_name: "ポケペイ太郎のアカウント", # アカウント名
|
1922
|
-
external_id: "
|
2104
|
+
external_id: "saCpt80GzH" # 外部ID
|
1923
2105
|
))
|
1924
2106
|
```
|
1925
2107
|
|
@@ -1973,11 +2155,11 @@ PAPIクライアントシステムから利用するPokepayユーザーのIDで
|
|
1973
2155
|
```ruby
|
1974
2156
|
response = $client.send(Pokepay::Request::GetShopAccounts.new(
|
1975
2157
|
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # private_money_id: マネーID
|
1976
|
-
page:
|
1977
|
-
per_page:
|
1978
|
-
created_at_from: "
|
1979
|
-
created_at_to: "
|
1980
|
-
is_suspended:
|
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", # ウォレット作成日によるフィルター(終了時点)
|
2162
|
+
is_suspended: false # ウォレットが凍結状態かどうかでフィルターする
|
1981
2163
|
))
|
1982
2164
|
```
|
1983
2165
|
|
@@ -2050,10 +2232,10 @@ response = $client.send(Pokepay::Request::ListCustomerTransactions.new(
|
|
2050
2232
|
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # private_money_id: マネーID
|
2051
2233
|
sender_customer_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # 送金エンドユーザーID
|
2052
2234
|
receiver_customer_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # 受取エンドユーザーID
|
2053
|
-
type: "
|
2054
|
-
is_modified:
|
2055
|
-
from: "
|
2056
|
-
to: "
|
2235
|
+
type: "exchange", # 取引種別
|
2236
|
+
is_modified: true, # キャンセル済みかどうか
|
2237
|
+
from: "2015-11-09T20:57:13.000000+09:00", # 開始日時
|
2238
|
+
to: "2022-01-15T17:32:30.000000+09:00", # 終了日時
|
2057
2239
|
page: 1, # ページ番号
|
2058
2240
|
per_page: 50 # 1ページ分の取引数
|
2059
2241
|
))
|
@@ -2097,7 +2279,14 @@ response = $client.send(Pokepay::Request::ListCustomerTransactions.new(
|
|
2097
2279
|
---
|
2098
2280
|
`type`
|
2099
2281
|
```json
|
2100
|
-
{
|
2282
|
+
{
|
2283
|
+
"type": "string",
|
2284
|
+
"enum": {
|
2285
|
+
"topup": "payment",
|
2286
|
+
"exchange": "transfer",
|
2287
|
+
"cashback": "expire"
|
2288
|
+
}
|
2289
|
+
}
|
2101
2290
|
```
|
2102
2291
|
取引の種類でフィルターします。
|
2103
2292
|
|
@@ -2111,6 +2300,10 @@ response = $client.send(Pokepay::Request::ListCustomerTransactions.new(
|
|
2111
2300
|
他マネーへの流出(outflow)/他マネーからの流入(inflow)
|
2112
2301
|
4. transfer
|
2113
2302
|
個人間送金
|
2303
|
+
5. cashback
|
2304
|
+
ウォレット退会時返金
|
2305
|
+
6. expire
|
2306
|
+
ウォレット退会時失効
|
2114
2307
|
|
2115
2308
|
---
|
2116
2309
|
`is_modified`
|
@@ -2178,11 +2371,11 @@ response = $client.send(Pokepay::Request::ListShops.new(
|
|
2178
2371
|
organization_code: "pocketchange", # 組織コード
|
2179
2372
|
private_money_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # マネーID
|
2180
2373
|
name: "oxスーパー三田店", # 店舗名
|
2181
|
-
postal_code: "
|
2374
|
+
postal_code: "3815756", # 店舗の郵便番号
|
2182
2375
|
address: "東京都港区芝...", # 店舗の住所
|
2183
|
-
tel: "
|
2184
|
-
email: "
|
2185
|
-
external_id: "
|
2376
|
+
tel: "08108719-5344", # 店舗の電話番号
|
2377
|
+
email: "tQD6SAh41f@Zii8.com", # 店舗のメールアドレス
|
2378
|
+
external_id: "4vybd1Jsf0jR3rzbwtxyn2FAh1zUed", # 店舗の外部ID
|
2186
2379
|
page: 1, # ページ番号
|
2187
2380
|
per_page: 50 # 1ページ分の取引数
|
2188
2381
|
))
|
@@ -2307,11 +2500,11 @@ response = $client.send(Pokepay::Request::ListShops.new(
|
|
2307
2500
|
```ruby
|
2308
2501
|
response = $client.send(Pokepay::Request::CreateShop.new(
|
2309
2502
|
"oxスーパー三田店", # shop_name: 店舗名
|
2310
|
-
shop_postal_code: "
|
2503
|
+
shop_postal_code: "7504932", # 店舗の郵便番号
|
2311
2504
|
shop_address: "東京都港区芝...", # 店舗の住所
|
2312
|
-
shop_tel: "
|
2313
|
-
shop_email: "
|
2314
|
-
shop_external_id: "
|
2505
|
+
shop_tel: "0410-88688", # 店舗の電話番号
|
2506
|
+
shop_email: "VgjPvTnTRb@AGxJ.com", # 店舗のメールアドレス
|
2507
|
+
shop_external_id: "FBzSBdN9rH7Ml90EeuZgaP20pyyEjfyZn", # 店舗の外部ID
|
2315
2508
|
organization_code: "ox-supermarket" # 組織コード
|
2316
2509
|
))
|
2317
2510
|
```
|
@@ -2321,14 +2514,14 @@ response = $client.send(Pokepay::Request::CreateShop.new(
|
|
2321
2514
|
```ruby
|
2322
2515
|
response = $client.send(Pokepay::Request::CreateShopV2.new(
|
2323
2516
|
"oxスーパー三田店", # name: 店舗名
|
2324
|
-
postal_code: "
|
2517
|
+
postal_code: "2838156", # 店舗の郵便番号
|
2325
2518
|
address: "東京都港区芝...", # 店舗の住所
|
2326
|
-
tel: "
|
2327
|
-
email: "
|
2328
|
-
external_id: "
|
2519
|
+
tel: "06203260", # 店舗の電話番号
|
2520
|
+
email: "Uo9BhqQxq9@FR8V.com", # 店舗のメールアドレス
|
2521
|
+
external_id: "F2gH7EAnlFEgMmyi8jmBN0T8", # 店舗の外部ID
|
2329
2522
|
organization_code: "ox-supermarket", # 組織コード
|
2330
2523
|
private_money_ids: ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"], # 店舗で有効にするマネーIDの配列
|
2331
|
-
can_topup_private_money_ids: [
|
2524
|
+
can_topup_private_money_ids: [] # 店舗でチャージ可能にするマネーIDの配列
|
2332
2525
|
))
|
2333
2526
|
```
|
2334
2527
|
|
@@ -2399,13 +2592,13 @@ response = $client.send(Pokepay::Request::GetShop.new(
|
|
2399
2592
|
response = $client.send(Pokepay::Request::UpdateShop.new(
|
2400
2593
|
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # shop_id: 店舗ユーザーID
|
2401
2594
|
name: "oxスーパー三田店", # 店舗名
|
2402
|
-
postal_code: "
|
2595
|
+
postal_code: "7161029", # 店舗の郵便番号
|
2403
2596
|
address: "東京都港区芝...", # 店舗の住所
|
2404
|
-
tel: "
|
2405
|
-
email: "
|
2406
|
-
external_id: "
|
2407
|
-
private_money_ids: [
|
2408
|
-
can_topup_private_money_ids: [
|
2597
|
+
tel: "0970036", # 店舗の電話番号
|
2598
|
+
email: "T4AzeoZEOY@uu1R.com", # 店舗のメールアドレス
|
2599
|
+
external_id: "qlWwyCNVezT", # 店舗の外部ID
|
2600
|
+
private_money_ids: [], # 店舗で有効にするマネーIDの配列
|
2601
|
+
can_topup_private_money_ids: [] # 店舗でチャージ可能にするマネーIDの配列
|
2409
2602
|
))
|
2410
2603
|
```
|
2411
2604
|
|
@@ -2506,8 +2699,8 @@ response = $client.send(Pokepay::Request::UpdateShop.new(
|
|
2506
2699
|
```ruby
|
2507
2700
|
response = $client.send(Pokepay::Request::ListUserAccounts.new(
|
2508
2701
|
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # user_id: ユーザーID
|
2509
|
-
page:
|
2510
|
-
per_page:
|
2702
|
+
page: 6283, # ページ番号
|
2703
|
+
per_page: 196 # 1ページ分の取引数
|
2511
2704
|
))
|
2512
2705
|
```
|
2513
2706
|
|
@@ -2551,8 +2744,8 @@ response = $client.send(Pokepay::Request::ListUserAccounts.new(
|
|
2551
2744
|
response = $client.send(Pokepay::Request::CreateUserAccount.new(
|
2552
2745
|
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # user_id: ユーザーID
|
2553
2746
|
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # private_money_id: マネーID
|
2554
|
-
name: "
|
2555
|
-
external_id: "
|
2747
|
+
name: "N00F2Vhn3XqmCSMDzeEDKcNHBIUBy90lbfxByyLgJllatyS0exoVZwnX2Y3MjJVkSKFu78PD8Nsi0ghqRiHIikuwLQAi0YorDHLBFs4pFpuxUcIrb43g0nK7tb3btHVGJJQejQb3sdWfi2Z2Wvmx0ZqLEwxwj8U4A4KZBQdvuQb5QYDYt7CyctlhtAXqf6uerXtmVp3iPqRhb6DnnO4ty3", # ウォレット名
|
2748
|
+
external_id: "khtTfaQWLq" # 外部ID
|
2556
2749
|
))
|
2557
2750
|
```
|
2558
2751
|
|
@@ -2612,8 +2805,8 @@ response = $client.send(Pokepay::Request::GetPrivateMoneys.new(
|
|
2612
2805
|
```ruby
|
2613
2806
|
response = $client.send(Pokepay::Request::GetPrivateMoneyOrganizationSummaries.new(
|
2614
2807
|
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # private_money_id: マネーID
|
2615
|
-
from: "2017-
|
2616
|
-
to: "
|
2808
|
+
from: "2017-03-02T22:10:21.000000+09:00", # 開始日時(toと同時に指定する必要有)
|
2809
|
+
to: "2023-11-05T19:18:54.000000+09:00", # 終了日時(fromと同時に指定する必要有)
|
2617
2810
|
page: 1, # ページ番号
|
2618
2811
|
per_page: 50 # 1ページ分の取引数
|
2619
2812
|
))
|
@@ -2627,10 +2820,10 @@ response = $client.send(Pokepay::Request::GetPrivateMoneyOrganizationSummaries.n
|
|
2627
2820
|
CSVファイルから一括取引をします。
|
2628
2821
|
```ruby
|
2629
2822
|
response = $client.send(Pokepay::Request::BulkCreateTransaction.new(
|
2630
|
-
"
|
2631
|
-
"
|
2632
|
-
"
|
2633
|
-
description: "
|
2823
|
+
"FbA6TsT4r", # name: 一括取引タスク名
|
2824
|
+
"SzhCtzrr", # content: 取引する情報のCSV
|
2825
|
+
"QIFeK35Z3EF7SWnLL5qkYPGTd8wILW6Ubji6", # request_id: リクエストID
|
2826
|
+
description: "nDV" # 一括取引の説明
|
2634
2827
|
))
|
2635
2828
|
```
|
2636
2829
|
|
@@ -2707,9 +2900,9 @@ response = $client.send(Pokepay::Request::CreateExternalTransaction.new(
|
|
2707
2900
|
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # shop_id: 店舗ID
|
2708
2901
|
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # customer_id: エンドユーザーID
|
2709
2902
|
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # private_money_id: マネーID
|
2710
|
-
|
2903
|
+
95, # amount: 取引額
|
2711
2904
|
description: "たい焼き(小倉)", # 取引説明文
|
2712
|
-
metadata: "
|
2905
|
+
metadata: "{\"key\":\"value\"}", # ポケペイ外部取引メタデータ
|
2713
2906
|
products: [{"jan_code":"abc",
|
2714
2907
|
"name":"name1",
|
2715
2908
|
"unit_price":100,
|
@@ -2720,6 +2913,11 @@ response = $client.send(Pokepay::Request::CreateExternalTransaction.new(
|
|
2720
2913
|
"unit_price":100,
|
2721
2914
|
"price": 100,
|
2722
2915
|
"is_discounted": false,
|
2916
|
+
"other":"{}"}, {"jan_code":"abc",
|
2917
|
+
"name":"name1",
|
2918
|
+
"unit_price":100,
|
2919
|
+
"price": 100,
|
2920
|
+
"is_discounted": false,
|
2723
2921
|
"other":"{}"}], # 商品情報データ
|
2724
2922
|
request_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" # リクエストID
|
2725
2923
|
))
|
@@ -2765,7 +2963,7 @@ response = $client.send(Pokepay::Request::CreateExternalTransaction.new(
|
|
2765
2963
|
`amount`
|
2766
2964
|
```json
|
2767
2965
|
{
|
2768
|
-
"type": "
|
2966
|
+
"type": "integer",
|
2769
2967
|
"minimum": 0
|
2770
2968
|
}
|
2771
2969
|
```
|
@@ -2839,22 +3037,342 @@ response = $client.send(Pokepay::Request::CreateExternalTransaction.new(
|
|
2839
3037
|
取引をキャンセルできるのは1回きりです。既にキャンセルされた取引を重ねてキャンセルしようとすると `transaction_already_refunded (422)` エラーが返ります。
|
2840
3038
|
```ruby
|
2841
3039
|
response = $client.send(Pokepay::Request::RefundExternalTransaction.new(
|
2842
|
-
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", #
|
3040
|
+
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # event_id: 取引ID
|
2843
3041
|
description: "返品対応のため" # 取引履歴に表示する返金事由
|
2844
3042
|
))
|
2845
3043
|
```
|
2846
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)オブジェクトを返します
|
2847
3350
|
## Responses
|
2848
3351
|
|
2849
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
|
+
|
2850
3365
|
<a name="account-with-user"></a>
|
2851
3366
|
## AccountWithUser
|
2852
3367
|
* `id (string)`:
|
2853
3368
|
* `name (string)`:
|
2854
3369
|
* `is_suspended (boolean)`:
|
3370
|
+
* `status (AccountStatus)`:
|
2855
3371
|
* `private_money (PrivateMoney)`:
|
2856
3372
|
* `user (User)`:
|
2857
3373
|
|
3374
|
+
`status`は [AccountStatus](#account-status) オブジェクトを返します。
|
3375
|
+
|
2858
3376
|
`private_money`は [PrivateMoney](#private-money) オブジェクトを返します。
|
2859
3377
|
|
2860
3378
|
`user`は [User](#user) オブジェクトを返します。
|
@@ -2864,16 +3382,22 @@ response = $client.send(Pokepay::Request::RefundExternalTransaction.new(
|
|
2864
3382
|
* `id (string)`:
|
2865
3383
|
* `name (string)`:
|
2866
3384
|
* `is_suspended (boolean)`:
|
3385
|
+
* `status (AccountStatus)`:
|
2867
3386
|
* `balance (double)`:
|
2868
3387
|
* `money_balance (double)`:
|
2869
3388
|
* `point_balance (double)`:
|
2870
3389
|
* `private_money (PrivateMoney)`:
|
2871
3390
|
* `user (User)`:
|
2872
3391
|
|
3392
|
+
`status`は [AccountStatus](#account-status) オブジェクトを返します。
|
3393
|
+
|
2873
3394
|
`private_money`は [PrivateMoney](#private-money) オブジェクトを返します。
|
2874
3395
|
|
2875
3396
|
`user`は [User](#user) オブジェクトを返します。
|
2876
3397
|
|
3398
|
+
<a name="account-deleted"></a>
|
3399
|
+
## AccountDeleted
|
3400
|
+
|
2877
3401
|
<a name="bill"></a>
|
2878
3402
|
## Bill
|
2879
3403
|
* `id (string)`: 支払いQRコードのID
|
@@ -2887,6 +3411,26 @@ response = $client.send(Pokepay::Request::RefundExternalTransaction.new(
|
|
2887
3411
|
|
2888
3412
|
`account`は [AccountWithUser](#account-with-user) オブジェクトを返します。
|
2889
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
|
+
|
2890
3434
|
<a name="cpm-token"></a>
|
2891
3435
|
## CpmToken
|
2892
3436
|
* `cpm_token (string)`:
|
@@ -2939,8 +3483,8 @@ response = $client.send(Pokepay::Request::RefundExternalTransaction.new(
|
|
2939
3483
|
* `name (string)`: ユーザー (または店舗) 名
|
2940
3484
|
* `is_merchant (boolean)`: 店舗ユーザーかどうか
|
2941
3485
|
|
2942
|
-
<a name="transaction"></a>
|
2943
|
-
##
|
3486
|
+
<a name="transaction-detail"></a>
|
3487
|
+
## TransactionDetail
|
2944
3488
|
* `id (string)`: 取引ID
|
2945
3489
|
* `type (string)`: 取引種別 (チャージ=topup, 支払い=payment)
|
2946
3490
|
* `is_modified (boolean)`: 返金された取引かどうか
|
@@ -2953,11 +3497,14 @@ response = $client.send(Pokepay::Request::RefundExternalTransaction.new(
|
|
2953
3497
|
* `point_amount (double)`: 決済ポイント額
|
2954
3498
|
* `done_at (string)`: 取引日時
|
2955
3499
|
* `description (string)`: 取引説明文
|
3500
|
+
* `transfers (array of Transfers)`:
|
2956
3501
|
|
2957
3502
|
`receiver`と`sender`は [User](#user) オブジェクトを返します。
|
2958
3503
|
|
2959
3504
|
`receiver_account`と`sender_account`は [Account](#account) オブジェクトを返します。
|
2960
3505
|
|
3506
|
+
`transfers`は [Transfer](#transfer) オブジェクトの配列を返します。
|
3507
|
+
|
2961
3508
|
<a name="shop-with-accounts"></a>
|
2962
3509
|
## ShopWithAccounts
|
2963
3510
|
* `id (string)`: 店舗ID
|
@@ -3090,6 +3637,33 @@ response = $client.send(Pokepay::Request::RefundExternalTransaction.new(
|
|
3090
3637
|
|
3091
3638
|
`pagination`は [Pagination](#pagination) オブジェクトを返します。
|
3092
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
|
+
|
3093
3667
|
<a name="private-money"></a>
|
3094
3668
|
## PrivateMoney
|
3095
3669
|
* `id (string)`: マネーID
|
@@ -3104,9 +3678,29 @@ response = $client.send(Pokepay::Request::RefundExternalTransaction.new(
|
|
3104
3678
|
* `type (string)`: マネー種別 (自家型=own, 第三者型=third-party)
|
3105
3679
|
* `expiration_type (string)`: 有効期限種別 (チャージ日起算=static, 最終利用日起算=last-update, 最終チャージ日起算=last-topup-update)
|
3106
3680
|
* `enable_topup_by_member (boolean)`: 加盟店によるチャージが有効かどうか
|
3681
|
+
* `display_money_and_point (string)`:
|
3107
3682
|
|
3108
3683
|
`organization`は [Organization](#organization) オブジェクトを返します。
|
3109
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
|
+
|
3110
3704
|
<a name="cashtray-attempt"></a>
|
3111
3705
|
## CashtrayAttempt
|
3112
3706
|
* `account (AccountWithUser)`: エンドユーザーのウォレット
|
@@ -3117,14 +3711,20 @@ response = $client.send(Pokepay::Request::RefundExternalTransaction.new(
|
|
3117
3711
|
|
3118
3712
|
`account`は [AccountWithUser](#account-with-user) オブジェクトを返します。
|
3119
3713
|
|
3120
|
-
<a name="
|
3121
|
-
##
|
3122
|
-
* `id (string)`:
|
3123
|
-
* `
|
3124
|
-
* `
|
3125
|
-
* `
|
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)`:
|
3126
3726
|
|
3127
|
-
`
|
3727
|
+
`receiver_account`と`sender_account`は [AccountWithoutPrivateMoneyDetail](#account-without-private-money-detail) オブジェクトを返します。
|
3128
3728
|
|
3129
3729
|
<a name="shop-account"></a>
|
3130
3730
|
## ShopAccount
|
@@ -3152,21 +3752,6 @@ response = $client.send(Pokepay::Request::RefundExternalTransaction.new(
|
|
3152
3752
|
* `has_prev (boolean)`:
|
3153
3753
|
* `has_next (boolean)`:
|
3154
3754
|
|
3155
|
-
<a name="transfer"></a>
|
3156
|
-
## Transfer
|
3157
|
-
* `id (string)`:
|
3158
|
-
* `sender_account (AccountWithoutPrivateMoneyDetail)`:
|
3159
|
-
* `receiver_account (AccountWithoutPrivateMoneyDetail)`:
|
3160
|
-
* `amount (double)`:
|
3161
|
-
* `money_amount (double)`:
|
3162
|
-
* `point_amount (double)`:
|
3163
|
-
* `done_at (string)`:
|
3164
|
-
* `type (string)`:
|
3165
|
-
* `description (string)`:
|
3166
|
-
* `transaction_id (string)`:
|
3167
|
-
|
3168
|
-
`receiver_account`と`sender_account`は [AccountWithoutPrivateMoneyDetail](#account-without-private-money-detail) オブジェクトを返します。
|
3169
|
-
|
3170
3755
|
<a name="account-balance"></a>
|
3171
3756
|
## AccountBalance
|
3172
3757
|
* `expires_at (string)`:
|
@@ -3189,20 +3774,23 @@ response = $client.send(Pokepay::Request::RefundExternalTransaction.new(
|
|
3189
3774
|
* `code (string)`: 組織コード
|
3190
3775
|
* `name (string)`: 組織名
|
3191
3776
|
|
3192
|
-
<a name="organization-summary"></a>
|
3193
|
-
## OrganizationSummary
|
3194
|
-
* `count (integer)`:
|
3195
|
-
* `money_amount (double)`:
|
3196
|
-
* `money_count (integer)`:
|
3197
|
-
* `point_amount (double)`:
|
3198
|
-
* `point_count (integer)`:
|
3199
|
-
|
3200
3777
|
<a name="account-without-private-money-detail"></a>
|
3201
3778
|
## AccountWithoutPrivateMoneyDetail
|
3202
3779
|
* `id (string)`:
|
3203
3780
|
* `name (string)`:
|
3204
3781
|
* `is_suspended (boolean)`:
|
3782
|
+
* `status (AccountStatus)`:
|
3205
3783
|
* `private_money_id (string)`:
|
3206
3784
|
* `user (User)`:
|
3207
3785
|
|
3786
|
+
`status`は [AccountStatus](#account-status) オブジェクトを返します。
|
3787
|
+
|
3208
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)`:
|