pokepay_partner_ruby_sdk 0.3.2 → 0.3.6
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/.github/workflows/release-pr.yml +18 -0
- data/Gemfile.lock +1 -1
- data/docs/README.md +269 -0
- data/docs/account.md +159 -0
- data/docs/bank_pay.md +235 -0
- data/docs/bill.md +365 -0
- data/docs/bulk.md +121 -0
- data/docs/campaign.md +1749 -0
- data/docs/cashtray.md +318 -0
- data/docs/check.md +883 -0
- data/docs/coupon.md +724 -0
- data/docs/customer.md +1042 -0
- data/docs/error-response.csv +839 -0
- data/docs/event.md +308 -0
- data/docs/index.md +1279 -305
- data/docs/organization.md +292 -0
- data/docs/private_money.md +213 -0
- data/docs/responses.md +711 -0
- data/docs/shop.md +678 -0
- data/docs/transaction.md +2021 -0
- data/docs/transfer.md +686 -0
- data/docs/user.md +3 -0
- data/docs/user_device.md +134 -0
- data/docs/webhook.md +231 -0
- data/lib/pokepay_partner_ruby_sdk/request/activate_user_device.rb +15 -0
- data/lib/pokepay_partner_ruby_sdk/request/create_bank.rb +17 -0
- data/lib/pokepay_partner_ruby_sdk/request/create_bank_topup_transaction.rb +18 -0
- data/lib/pokepay_partner_ruby_sdk/request/create_coupon.rb +19 -0
- data/lib/pokepay_partner_ruby_sdk/request/create_external_transaction.rb +2 -2
- data/lib/pokepay_partner_ruby_sdk/request/create_transaction_with_cashtray.rb +16 -0
- data/lib/pokepay_partner_ruby_sdk/request/create_user_device.rb +15 -0
- data/lib/pokepay_partner_ruby_sdk/request/delete_webhook.rb +15 -0
- data/lib/pokepay_partner_ruby_sdk/request/get_check.rb +15 -0
- data/lib/pokepay_partner_ruby_sdk/request/get_coupon.rb +1 -1
- data/lib/pokepay_partner_ruby_sdk/request/get_external_transaction_by_request_id.rb +15 -0
- data/lib/pokepay_partner_ruby_sdk/request/get_user_device.rb +15 -0
- data/lib/pokepay_partner_ruby_sdk/request/list_banks.rb +15 -0
- data/lib/pokepay_partner_ruby_sdk/request/list_checks.rb +15 -0
- data/lib/pokepay_partner_ruby_sdk/request/list_organizations.rb +15 -0
- data/lib/pokepay_partner_ruby_sdk/request/refund_external_transaction.rb +2 -2
- data/lib/pokepay_partner_ruby_sdk/request/update_check.rb +15 -0
- data/lib/pokepay_partner_ruby_sdk/request/update_coupon.rb +15 -0
- data/lib/pokepay_partner_ruby_sdk/response/bank.rb +28 -0
- data/lib/pokepay_partner_ruby_sdk/response/bank_registering_info.rb +13 -0
- data/lib/pokepay_partner_ruby_sdk/response/banks.rb +13 -0
- data/lib/pokepay_partner_ruby_sdk/response/campaign.rb +6 -0
- data/lib/pokepay_partner_ruby_sdk/response/check.rb +2 -0
- data/lib/pokepay_partner_ruby_sdk/response/external_transaction_detail.rb +34 -0
- data/lib/pokepay_partner_ruby_sdk/response/organization_summary.rb +4 -0
- data/lib/pokepay_partner_ruby_sdk/response/paginated_checks.rb +16 -0
- data/lib/pokepay_partner_ruby_sdk/response/paginated_organizations.rb +16 -0
- data/lib/pokepay_partner_ruby_sdk/response/private_money_summary.rb +4 -0
- data/lib/pokepay_partner_ruby_sdk/response/product.rb +2 -0
- data/lib/pokepay_partner_ruby_sdk/response/user_device.rb +18 -0
- data/lib/pokepay_partner_ruby_sdk/version.rb +1 -1
- data/lib/pokepay_partner_ruby_sdk.rb +26 -4
- data/partner.yaml +1578 -216
- metadata +46 -2
data/docs/event.md
ADDED
@@ -0,0 +1,308 @@
|
|
1
|
+
# Event
|
2
|
+
|
3
|
+
<a name="create-external-transaction"></a>
|
4
|
+
## CreateExternalTransaction: ポケペイ外部取引を作成する
|
5
|
+
ポケペイ外部取引を作成します。
|
6
|
+
|
7
|
+
ポケペイ外の現金決済やクレジットカード決済に対してポケペイのポイントを付けたいというときに使用します。
|
8
|
+
|
9
|
+
|
10
|
+
```RUBY
|
11
|
+
response = $client.send(Pokepay::Request::CreateExternalTransaction.new(
|
12
|
+
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # shop_id: 店舗ID
|
13
|
+
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # customer_id: エンドユーザーID
|
14
|
+
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # private_money_id: マネーID
|
15
|
+
6907, # amount: 取引額
|
16
|
+
description: "たい焼き(小倉)", # 取引説明文
|
17
|
+
metadata: "{\"key\":\"value\"}", # ポケペイ外部取引メタデータ
|
18
|
+
products: [{"jan_code":"abc",
|
19
|
+
"name":"name1",
|
20
|
+
"unit_price":100,
|
21
|
+
"price": 100,
|
22
|
+
"quantity": 1,
|
23
|
+
"is_discounted": false,
|
24
|
+
"other":"{}"}], # 商品情報データ
|
25
|
+
request_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # リクエストID
|
26
|
+
done_at: "2023-08-17T17:06:58.000000Z" # ポケペイ外部取引の実施時間
|
27
|
+
))
|
28
|
+
```
|
29
|
+
|
30
|
+
|
31
|
+
|
32
|
+
### Parameters
|
33
|
+
**`shop_id`**
|
34
|
+
|
35
|
+
|
36
|
+
店舗IDです。
|
37
|
+
|
38
|
+
ポケペイ外部取引が行なう店舗を指定します。
|
39
|
+
|
40
|
+
```json
|
41
|
+
{
|
42
|
+
"type": "string",
|
43
|
+
"format": "uuid"
|
44
|
+
}
|
45
|
+
```
|
46
|
+
|
47
|
+
**`customer_id`**
|
48
|
+
|
49
|
+
|
50
|
+
エンドユーザーIDです。
|
51
|
+
|
52
|
+
エンドユーザーを指定します。
|
53
|
+
|
54
|
+
```json
|
55
|
+
{
|
56
|
+
"type": "string",
|
57
|
+
"format": "uuid"
|
58
|
+
}
|
59
|
+
```
|
60
|
+
|
61
|
+
**`private_money_id`**
|
62
|
+
|
63
|
+
|
64
|
+
マネーIDです。
|
65
|
+
|
66
|
+
マネーを指定します。
|
67
|
+
|
68
|
+
```json
|
69
|
+
{
|
70
|
+
"type": "string",
|
71
|
+
"format": "uuid"
|
72
|
+
}
|
73
|
+
```
|
74
|
+
|
75
|
+
**`amount`**
|
76
|
+
|
77
|
+
|
78
|
+
取引金額です。
|
79
|
+
|
80
|
+
```json
|
81
|
+
{
|
82
|
+
"type": "integer",
|
83
|
+
"minimum": 0
|
84
|
+
}
|
85
|
+
```
|
86
|
+
|
87
|
+
**`description`**
|
88
|
+
|
89
|
+
|
90
|
+
取引説明文です。
|
91
|
+
|
92
|
+
任意入力で、取引履歴に表示される説明文です。
|
93
|
+
|
94
|
+
```json
|
95
|
+
{
|
96
|
+
"type": "string",
|
97
|
+
"maxLength": 200
|
98
|
+
}
|
99
|
+
```
|
100
|
+
|
101
|
+
**`metadata`**
|
102
|
+
|
103
|
+
|
104
|
+
ポケペイ外部取引作成時に指定され、取引と紐付けられるメタデータです。
|
105
|
+
|
106
|
+
任意入力で、全てのkeyとvalueが文字列であるようなフラットな構造のJSONで指定します。
|
107
|
+
|
108
|
+
```json
|
109
|
+
{
|
110
|
+
"type": "string",
|
111
|
+
"format": "json"
|
112
|
+
}
|
113
|
+
```
|
114
|
+
|
115
|
+
**`products`**
|
116
|
+
|
117
|
+
|
118
|
+
一つの取引に含まれる商品情報データです。
|
119
|
+
以下の内容からなるJSONオブジェクトの配列で指定します。
|
120
|
+
|
121
|
+
- `jan_code`: JANコード。64字以下の文字列
|
122
|
+
- `name`: 商品名。256字以下の文字列
|
123
|
+
- `unit_price`: 商品単価。0以上の数値
|
124
|
+
- `price`: 全体の金額(例: 商品単価 × 個数)。0以上の数値
|
125
|
+
- `quantity`: 商品の個数。この値が指定された場合、priceから算出される個数よりも優先されます。
|
126
|
+
- `is_discounted`: 賞味期限が近いなどの理由で商品が値引きされているかどうかのフラグ。boolean
|
127
|
+
- `other`: その他商品に関する情報。JSONオブジェクトで指定します。
|
128
|
+
|
129
|
+
```json
|
130
|
+
{
|
131
|
+
"type": "array",
|
132
|
+
"items": {
|
133
|
+
"type": "object"
|
134
|
+
}
|
135
|
+
}
|
136
|
+
```
|
137
|
+
|
138
|
+
**`request_id`**
|
139
|
+
|
140
|
+
|
141
|
+
取引作成APIの羃等性を担保するためのリクエスト固有のIDです。
|
142
|
+
|
143
|
+
取引作成APIで結果が受け取れなかったなどの理由で再試行する際に、二重に取引が作られてしまうことを防ぐために、クライアント側から指定されます。指定は任意で、UUID V4フォーマットでランダム生成した文字列です。リクエストIDは一定期間で削除されます。
|
144
|
+
|
145
|
+
リクエストIDを指定したとき、まだそのリクエストIDに対する取引がない場合、新規に取引が作られレスポンスとして返されます。もしそのリクエストIDに対する取引が既にある場合、既存の取引がレスポンスとして返されます。
|
146
|
+
|
147
|
+
```json
|
148
|
+
{
|
149
|
+
"type": "string",
|
150
|
+
"format": "uuid"
|
151
|
+
}
|
152
|
+
```
|
153
|
+
|
154
|
+
**`done_at`**
|
155
|
+
|
156
|
+
|
157
|
+
ポケペイ外部取引が実際に起こった時間です。
|
158
|
+
時間帯指定のポイント付与キャンペーンでの取引時間の計算に使われます。
|
159
|
+
デフォルトではCreateExternalTransactionがリクエストされた時間になります。
|
160
|
+
|
161
|
+
```json
|
162
|
+
{
|
163
|
+
"type": "string",
|
164
|
+
"format": "date-time"
|
165
|
+
}
|
166
|
+
```
|
167
|
+
|
168
|
+
|
169
|
+
|
170
|
+
成功したときは
|
171
|
+
[ExternalTransactionDetail](./responses.md#external-transaction-detail)
|
172
|
+
を返します
|
173
|
+
|
174
|
+
### Error Responses
|
175
|
+
|status|type|ja|en|
|
176
|
+
|---|---|---|---|
|
177
|
+
|400|invalid_parameters|項目が無効です|Invalid parameters|
|
178
|
+
|403|unpermitted_admin_user|この管理ユーザには権限がありません|Admin does not have permission|
|
179
|
+
|410|transaction_canceled|取引がキャンセルされました|Transaction was canceled|
|
180
|
+
|422|customer_user_not_found||The customer user is not found|
|
181
|
+
|422|shop_user_not_found|店舗が見つかりません|The shop user is not found|
|
182
|
+
|422|private_money_not_found||Private money not found|
|
183
|
+
|422|invalid_metadata|メタデータの形式が不正です|Invalid metadata format|
|
184
|
+
|422|customer_account_not_found||The customer account is not found|
|
185
|
+
|422|shop_account_not_found||The shop account is not found|
|
186
|
+
|422|account_suspended|アカウントは停止されています|The account is suspended|
|
187
|
+
|422|account_closed|アカウントは退会しています|The account is closed|
|
188
|
+
|422|account_can_not_topup|この店舗からはチャージできません|account can not topup|
|
189
|
+
|422|account_currency_mismatch|アカウント間で通貨が異なっています|Currency mismatch between accounts|
|
190
|
+
|422|account_pre_closed|アカウントは退会準備中です|The account is pre-closed|
|
191
|
+
|422|account_not_accessible|アカウントにアクセスできません|The account is not accessible by this user|
|
192
|
+
|422|terminal_is_invalidated|端末は無効化されています|The terminal is already invalidated|
|
193
|
+
|422|same_account_transaction|同じアカウントに送信しています|Sending to the same account|
|
194
|
+
|422|transaction_has_done|取引は完了しており、キャンセルすることはできません|Transaction has been copmpleted and cannot be canceled|
|
195
|
+
|422|transaction_invalid_done_at|取引完了日が無効です|Transaction completion date is invalid|
|
196
|
+
|422|transaction_invalid_amount|取引金額が数値ではないか、受け入れられない桁数です|Transaction amount is not a number or cannot be accepted for this currency|
|
197
|
+
|422|account_restricted|特定のアカウントの支払いに制限されています|The account is restricted to pay for a specific account|
|
198
|
+
|422|account_balance_not_enough|口座残高が不足してます|The account balance is not enough|
|
199
|
+
|422|c2c_transfer_not_allowed|このマネーではユーザ間マネー譲渡は利用できません|Customer to customer transfer is not available for this money|
|
200
|
+
|422|account_transfer_limit_exceeded|取引金額が上限を超えました|Too much amount to transfer|
|
201
|
+
|422|account_balance_exceeded|口座残高が上限を超えました|The account balance exceeded the limit|
|
202
|
+
|422|account_money_topup_transfer_limit_exceeded|マネーチャージ金額が上限を超えました|Too much amount to money topup transfer|
|
203
|
+
|422|account_total_topup_limit_range|期間内での合計チャージ額上限に達しました|Entire period topup limit reached|
|
204
|
+
|422|account_total_topup_limit_entire_period|全期間での合計チャージ額上限に達しました|Entire period topup limit reached|
|
205
|
+
|422|coupon_unavailable_shop|このクーポンはこの店舗では使用できません。|This coupon is unavailable for this shop.|
|
206
|
+
|422|coupon_already_used|このクーポンは既に使用済みです。|This coupon is already used.|
|
207
|
+
|422|coupon_not_received|このクーポンは受け取られていません。|This coupon is not received.|
|
208
|
+
|422|coupon_not_sent|このウォレットに対して配信されていないクーポンです。|This coupon is not sent to this account yet.|
|
209
|
+
|422|coupon_amount_not_enough|このクーポンを使用するには支払い額が足りません。|The payment amount not enough to use this coupon.|
|
210
|
+
|422|coupon_not_payment|クーポンは支払いにのみ使用できます。|Coupons can only be used for payment.|
|
211
|
+
|422|coupon_unavailable|このクーポンは使用できません。|This coupon is unavailable.|
|
212
|
+
|503|temporarily_unavailable||Service Unavailable|
|
213
|
+
|
214
|
+
|
215
|
+
|
216
|
+
---
|
217
|
+
|
218
|
+
|
219
|
+
<a name="refund-external-transaction"></a>
|
220
|
+
## RefundExternalTransaction: ポケペイ外部取引をキャンセルする
|
221
|
+
取引IDを指定して取引をキャンセルします。
|
222
|
+
|
223
|
+
発行体の管理者は自組織の直営店、または発行しているマネーの決済加盟店組織での取引をキャンセルできます。
|
224
|
+
キャンセル対象のポケペイ外部取引に付随するポイント還元キャンペーンも取り消されます。
|
225
|
+
|
226
|
+
取引をキャンセルできるのは1回きりです。既にキャンセルされた取引を重ねてキャンセルしようとすると `transaction_already_refunded (422)` エラーが返ります。
|
227
|
+
|
228
|
+
```RUBY
|
229
|
+
response = $client.send(Pokepay::Request::RefundExternalTransaction.new(
|
230
|
+
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", # event_id: 取引ID
|
231
|
+
description: "返品対応のため" # 取引履歴に表示する返金事由
|
232
|
+
))
|
233
|
+
```
|
234
|
+
|
235
|
+
|
236
|
+
|
237
|
+
### Parameters
|
238
|
+
**`event_id`**
|
239
|
+
|
240
|
+
|
241
|
+
|
242
|
+
```json
|
243
|
+
{
|
244
|
+
"type": "string",
|
245
|
+
"format": "uuid"
|
246
|
+
}
|
247
|
+
```
|
248
|
+
|
249
|
+
**`description`**
|
250
|
+
|
251
|
+
|
252
|
+
|
253
|
+
```json
|
254
|
+
{
|
255
|
+
"type": "string",
|
256
|
+
"maxLength": 200
|
257
|
+
}
|
258
|
+
```
|
259
|
+
|
260
|
+
|
261
|
+
|
262
|
+
成功したときは
|
263
|
+
[ExternalTransactionDetail](./responses.md#external-transaction-detail)
|
264
|
+
を返します
|
265
|
+
|
266
|
+
|
267
|
+
|
268
|
+
---
|
269
|
+
|
270
|
+
|
271
|
+
<a name="get-external-transaction-by-request-id"></a>
|
272
|
+
## GetExternalTransactionByRequestId: リクエストIDからポケペイ外部取引を取得する
|
273
|
+
リクエストIDを指定してポケペイ外部取引を取得します。
|
274
|
+
|
275
|
+
発行体の管理者は自組織発行のマネーに紐付くポケペイ外部取引を取得できます。
|
276
|
+
|
277
|
+
```RUBY
|
278
|
+
response = $client.send(Pokepay::Request::GetExternalTransactionByRequestId.new(
|
279
|
+
"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" # request_id: リクエストID
|
280
|
+
))
|
281
|
+
```
|
282
|
+
|
283
|
+
|
284
|
+
|
285
|
+
### Parameters
|
286
|
+
**`request_id`**
|
287
|
+
|
288
|
+
|
289
|
+
|
290
|
+
```json
|
291
|
+
{
|
292
|
+
"type": "string",
|
293
|
+
"format": "uuid"
|
294
|
+
}
|
295
|
+
```
|
296
|
+
|
297
|
+
|
298
|
+
|
299
|
+
成功したときは
|
300
|
+
[ExternalTransactionDetail](./responses.md#external-transaction-detail)
|
301
|
+
を返します
|
302
|
+
|
303
|
+
|
304
|
+
|
305
|
+
---
|
306
|
+
|
307
|
+
|
308
|
+
|