bootpay-backend-ruby 3.0.0.pre.alpha.2 → 3.0.0.pre.alpha.4
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/.gitignore +5 -1
- data/CHANGELOG.md +14 -0
- data/Gemfile +1 -1
- data/bootpay-backend-ruby.gemspec +9 -1
- data/lib/bootpay/bootpay-rest-client.rb +7 -2
- data/lib/bootpay/concern/authenticate.rb +19 -17
- data/lib/bootpay/concern/cash_receipt.rb +1 -1
- data/lib/bootpay/concern/payment.rb +2 -1
- data/lib/bootpay/concern/rest.rb +19 -1
- data/lib/bootpay/concern/sdk.rb +16 -0
- data/lib/bootpay/concern/subscription.rb +15 -28
- data/lib/bootpay/concern/token.rb +13 -0
- data/lib/bootpay/concern/wallet.rb +4 -25
- data/lib/bootpay-backend-ruby.rb +4 -0
- data/lib/bootpay_storage/concern/csv.rb +18 -0
- data/lib/bootpay_storage/concern/image.rb +12 -0
- data/lib/bootpay_storage/concern/rest.rb +45 -0
- data/lib/bootpay_storage/concern.rb +2 -0
- data/lib/bootpay_store/bootpay-store-rest-client.rb +7 -6
- data/lib/bootpay_store/concern/alimtalk_message.rb +67 -0
- data/lib/bootpay_store/concern/alimtalk_official.rb +63 -0
- data/lib/bootpay_store/concern/alimtalk_optout.rb +72 -0
- data/lib/bootpay_store/concern/alimtalk_send.rb +83 -0
- data/lib/bootpay_store/concern/alimtalk_sender.rb +105 -0
- data/lib/bootpay_store/concern/alimtalk_template.rb +215 -0
- data/lib/bootpay_store/concern/alimtalk_webhook.rb +84 -0
- data/lib/bootpay_store/concern/invoice.rb +102 -0
- data/lib/bootpay_store/concern/mall_setting.rb +385 -0
- data/lib/bootpay_store/concern/order.rb +74 -0
- data/lib/bootpay_store/concern/order_subscription.rb +391 -0
- data/lib/bootpay_store/concern/payment.rb +119 -0
- data/lib/bootpay_store/concern/product.rb +175 -0
- data/lib/bootpay_store/concern/rest.rb +91 -1
- data/lib/bootpay_store/concern/store.rb +31 -0
- data/lib/bootpay_store/concern/supervisor.rb +211 -0
- data/lib/bootpay_store/concern/token.rb +4 -4
- data/lib/bootpay_store/concern/user.rb +325 -0
- data/lib/bootpay_store/concern/user_group.rb +221 -0
- data/lib/bootpay_store/concern/webhook.rb +17 -0
- data/lib/bootpay_store/concern.rb +38 -28
- data/lib/version.rb +1 -1
- metadata +39 -5
|
@@ -0,0 +1,385 @@
|
|
|
1
|
+
module BootpayStore::Concern::MallSetting
|
|
2
|
+
extend ActiveSupport::Concern
|
|
3
|
+
|
|
4
|
+
included do
|
|
5
|
+
# 몰 설정 조회 (GET /v1/mall-setting)
|
|
6
|
+
# supervisor scope 토큰 전용
|
|
7
|
+
# Comment by Claude
|
|
8
|
+
# @date: 2026-05-04
|
|
9
|
+
def get_mall_setting(idempotency_key: nil)
|
|
10
|
+
request(
|
|
11
|
+
uri: 'mall-setting',
|
|
12
|
+
method: :get,
|
|
13
|
+
headers: {
|
|
14
|
+
'Idempotency-Key' => idempotency_key.presence || SecureRandom.uuid,
|
|
15
|
+
'Bootpay-Role' => 'supervisor'
|
|
16
|
+
}
|
|
17
|
+
)
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
# 몰 설정 수정 (PUT /v1/mall-setting)
|
|
21
|
+
# supervisor scope 토큰 전용
|
|
22
|
+
# 요청 바디는 flatten 형식이며 전달된 값(non-nil)만 서버로 전송된다.
|
|
23
|
+
# Comment by Claude
|
|
24
|
+
# @date: 2026-05-04
|
|
25
|
+
# rubocop:disable Metrics/MethodLength, Metrics/AbcSize, Metrics/ParameterLists
|
|
26
|
+
def update_mall_setting(idempotency_key: nil,
|
|
27
|
+
normal_widget_key: nil,
|
|
28
|
+
subscription_widget_key: nil,
|
|
29
|
+
seller_name: nil,
|
|
30
|
+
seller_name_en: nil,
|
|
31
|
+
biz_email: nil,
|
|
32
|
+
biz_tel: nil,
|
|
33
|
+
biz_fax: nil,
|
|
34
|
+
registration_no: nil,
|
|
35
|
+
corp_reg_no: nil,
|
|
36
|
+
mail_order_sales_number: nil,
|
|
37
|
+
owner_name: nil,
|
|
38
|
+
zip: nil,
|
|
39
|
+
addr_1: nil,
|
|
40
|
+
addr_2: nil,
|
|
41
|
+
privacy_name: nil,
|
|
42
|
+
privacy_email: nil,
|
|
43
|
+
name: nil,
|
|
44
|
+
description: nil,
|
|
45
|
+
status: nil,
|
|
46
|
+
invoice_title: nil,
|
|
47
|
+
use_logo: nil,
|
|
48
|
+
logo: nil,
|
|
49
|
+
use_favicon: nil,
|
|
50
|
+
favicon: nil,
|
|
51
|
+
use_open_graph: nil,
|
|
52
|
+
og_image: nil,
|
|
53
|
+
use_signature: nil,
|
|
54
|
+
signature: nil,
|
|
55
|
+
use_operation_time: nil,
|
|
56
|
+
customer_service_center_operation_time: nil,
|
|
57
|
+
rest_start_hour: nil,
|
|
58
|
+
rest_start_minute: nil,
|
|
59
|
+
rest_end_hour: nil,
|
|
60
|
+
rest_end_minute: nil,
|
|
61
|
+
rest_day: nil,
|
|
62
|
+
hosting_service: nil,
|
|
63
|
+
use_non_member_order: nil,
|
|
64
|
+
use_age_accept_19: nil,
|
|
65
|
+
use_age_accept_14: nil,
|
|
66
|
+
use_age_accept_parent_name: nil,
|
|
67
|
+
use_age_accept_parent_birth: nil,
|
|
68
|
+
use_age_accept_parent_email: nil,
|
|
69
|
+
use_membership_collect_phone: nil,
|
|
70
|
+
use_membership_collect_tel: nil,
|
|
71
|
+
use_membership_collect_email: nil,
|
|
72
|
+
use_membership_collect_address: nil,
|
|
73
|
+
use_membership_collect_bank: nil,
|
|
74
|
+
use_membership_collect_birth: nil,
|
|
75
|
+
use_membership_collect_gender: nil,
|
|
76
|
+
use_membership_collect_interest: nil,
|
|
77
|
+
membership_collect_interest_number: nil,
|
|
78
|
+
use_membership_collect_customs: nil,
|
|
79
|
+
use_membership_collect_nickname: nil,
|
|
80
|
+
use_membership_collect_recommend_id: nil,
|
|
81
|
+
recommend_id_point_to: nil,
|
|
82
|
+
recommend_id_point_from: nil,
|
|
83
|
+
use_membership_collect_business: nil,
|
|
84
|
+
use_membership_collect_register: nil,
|
|
85
|
+
membership_only_business: nil,
|
|
86
|
+
use_corporate_department: nil,
|
|
87
|
+
sub_group_type: nil,
|
|
88
|
+
use_corporate_signup_approval: nil,
|
|
89
|
+
corporate_email_domains: nil,
|
|
90
|
+
use_corporate_auto_approve: nil,
|
|
91
|
+
use_corporate_invite_only: nil,
|
|
92
|
+
use_member_info_phone: nil,
|
|
93
|
+
use_member_info_tel: nil,
|
|
94
|
+
use_member_info_email: nil,
|
|
95
|
+
use_member_info_address: nil,
|
|
96
|
+
use_member_info_bank: nil,
|
|
97
|
+
use_member_info_birth: nil,
|
|
98
|
+
use_member_info_gender: nil,
|
|
99
|
+
use_member_info_customs: nil,
|
|
100
|
+
use_member_info_nickname: nil,
|
|
101
|
+
use_member_info_register: nil,
|
|
102
|
+
orderer_collect_phone: nil,
|
|
103
|
+
orderer_collect_tel: nil,
|
|
104
|
+
orderer_collect_email: nil,
|
|
105
|
+
order_prefix: nil,
|
|
106
|
+
use_order_cancel: nil,
|
|
107
|
+
use_oder_cancel_approval: nil,
|
|
108
|
+
order_cancel_reasons: nil,
|
|
109
|
+
order_cancel_reason_required_type: nil,
|
|
110
|
+
order_cancel_request_message: nil,
|
|
111
|
+
order_cancel_done_message: nil,
|
|
112
|
+
use_general_membership: nil,
|
|
113
|
+
general_membership_duplication: nil,
|
|
114
|
+
use_certification: nil,
|
|
115
|
+
certification_type: nil,
|
|
116
|
+
general_membership_id_type: nil,
|
|
117
|
+
use_membership_duplication_email: nil,
|
|
118
|
+
use_membership_duplication_phone: nil,
|
|
119
|
+
use_social_membership: nil,
|
|
120
|
+
social_membership_type: nil,
|
|
121
|
+
use_point: nil,
|
|
122
|
+
use_point_transaction: nil,
|
|
123
|
+
point_display_name: nil,
|
|
124
|
+
point_min_balance: nil,
|
|
125
|
+
point_not_condition: nil,
|
|
126
|
+
point_condition: nil,
|
|
127
|
+
use_point_max_rate: nil,
|
|
128
|
+
point_max_rate: nil,
|
|
129
|
+
use_point_max_amount: nil,
|
|
130
|
+
point_max_amount: nil,
|
|
131
|
+
point_rate: nil,
|
|
132
|
+
point_calc_type1: nil,
|
|
133
|
+
point_calc_type2: nil,
|
|
134
|
+
use_point_advance_discount: nil,
|
|
135
|
+
point_advance_discount_rate: nil,
|
|
136
|
+
use_point_expire: nil,
|
|
137
|
+
point_expire_type: nil,
|
|
138
|
+
point_issue_event_type: nil,
|
|
139
|
+
point_issue_delay_days: nil,
|
|
140
|
+
use_open_market: nil,
|
|
141
|
+
use_product_approval: nil,
|
|
142
|
+
use_product_review: nil,
|
|
143
|
+
use_product_review_point: nil,
|
|
144
|
+
product_review_point: nil,
|
|
145
|
+
product_review_photo_point: nil,
|
|
146
|
+
use_product_review_answer: nil,
|
|
147
|
+
use_product_review_auto_answer: nil,
|
|
148
|
+
product_review_auto_answer_minute: nil,
|
|
149
|
+
product_review_auto_answer_text: nil,
|
|
150
|
+
use_product_qna: nil,
|
|
151
|
+
product_qna_member_auth: nil,
|
|
152
|
+
use_product_qna_answer_option: nil,
|
|
153
|
+
use_notice: nil,
|
|
154
|
+
use_qna: nil,
|
|
155
|
+
use_faq: nil,
|
|
156
|
+
use_chat_support: nil,
|
|
157
|
+
chat_support_type: nil,
|
|
158
|
+
chat_support_key: nil,
|
|
159
|
+
use_dormant: nil,
|
|
160
|
+
dormant_year: nil,
|
|
161
|
+
dormant_restore: nil,
|
|
162
|
+
use_withdrawal: nil,
|
|
163
|
+
use_withdrawal_guide_message: nil,
|
|
164
|
+
use_withdrawal_guide_message_after: nil,
|
|
165
|
+
withdrawal_guide_message_after: nil,
|
|
166
|
+
use_withdrawal_auto: nil,
|
|
167
|
+
withdrawal_auto_year: nil,
|
|
168
|
+
use_subscription_aggregate_transaction: nil,
|
|
169
|
+
subscription_month_day: nil,
|
|
170
|
+
subscription_week_day: nil,
|
|
171
|
+
use_limit: nil,
|
|
172
|
+
limit_month_purchase: nil,
|
|
173
|
+
limit_week_purchase: nil,
|
|
174
|
+
use_limit_payment: nil,
|
|
175
|
+
use_limit_message: nil,
|
|
176
|
+
terms_of_service: nil,
|
|
177
|
+
terms_of_privacy_policy: nil,
|
|
178
|
+
terms_of_privacy_collect: nil,
|
|
179
|
+
terms_of_privacy_third: nil,
|
|
180
|
+
payment_timeout: nil,
|
|
181
|
+
product_sort_type: nil,
|
|
182
|
+
mall_theme_type: nil,
|
|
183
|
+
catalog_display_type: nil,
|
|
184
|
+
catalog_headline: nil,
|
|
185
|
+
catalog_bg_color: nil,
|
|
186
|
+
catalog_view_type_pc: nil,
|
|
187
|
+
catalog_view_type_mobile: nil,
|
|
188
|
+
catalog_product_sort_type: nil,
|
|
189
|
+
use_cart: nil,
|
|
190
|
+
cart_storage_period: nil,
|
|
191
|
+
cart_max_limit: nil,
|
|
192
|
+
cart_add_action: nil,
|
|
193
|
+
cart_direct_purchase: nil,
|
|
194
|
+
cart_option_change: nil,
|
|
195
|
+
cart_discount_display: nil,
|
|
196
|
+
use_wishlist: nil,
|
|
197
|
+
wishlist_max_limit: nil,
|
|
198
|
+
cart_wishlist_display: nil)
|
|
199
|
+
request(
|
|
200
|
+
uri: 'mall-setting',
|
|
201
|
+
method: :put,
|
|
202
|
+
headers: {
|
|
203
|
+
'Idempotency-Key' => idempotency_key.presence || SecureRandom.uuid,
|
|
204
|
+
'Bootpay-Role' => 'supervisor'
|
|
205
|
+
},
|
|
206
|
+
payload:
|
|
207
|
+
{
|
|
208
|
+
normal_widget_key: normal_widget_key,
|
|
209
|
+
subscription_widget_key: subscription_widget_key,
|
|
210
|
+
seller_name: seller_name,
|
|
211
|
+
seller_name_en: seller_name_en,
|
|
212
|
+
biz_email: biz_email,
|
|
213
|
+
biz_tel: biz_tel,
|
|
214
|
+
biz_fax: biz_fax,
|
|
215
|
+
registration_no: registration_no,
|
|
216
|
+
corp_reg_no: corp_reg_no,
|
|
217
|
+
mail_order_sales_number: mail_order_sales_number,
|
|
218
|
+
owner_name: owner_name,
|
|
219
|
+
zip: zip,
|
|
220
|
+
addr_1: addr_1,
|
|
221
|
+
addr_2: addr_2,
|
|
222
|
+
privacy_name: privacy_name,
|
|
223
|
+
privacy_email: privacy_email,
|
|
224
|
+
name: name,
|
|
225
|
+
description: description,
|
|
226
|
+
status: status,
|
|
227
|
+
invoice_title: invoice_title,
|
|
228
|
+
use_logo: use_logo,
|
|
229
|
+
logo: logo,
|
|
230
|
+
use_favicon: use_favicon,
|
|
231
|
+
favicon: favicon,
|
|
232
|
+
use_open_graph: use_open_graph,
|
|
233
|
+
og_image: og_image,
|
|
234
|
+
use_signature: use_signature,
|
|
235
|
+
signature: signature,
|
|
236
|
+
use_operation_time: use_operation_time,
|
|
237
|
+
customer_service_center_operation_time: customer_service_center_operation_time,
|
|
238
|
+
rest_start_hour: rest_start_hour,
|
|
239
|
+
rest_start_minute: rest_start_minute,
|
|
240
|
+
rest_end_hour: rest_end_hour,
|
|
241
|
+
rest_end_minute: rest_end_minute,
|
|
242
|
+
rest_day: rest_day,
|
|
243
|
+
hosting_service: hosting_service,
|
|
244
|
+
use_non_member_order: use_non_member_order,
|
|
245
|
+
use_age_accept_19: use_age_accept_19,
|
|
246
|
+
use_age_accept_14: use_age_accept_14,
|
|
247
|
+
use_age_accept_parent_name: use_age_accept_parent_name,
|
|
248
|
+
use_age_accept_parent_birth: use_age_accept_parent_birth,
|
|
249
|
+
use_age_accept_parent_email: use_age_accept_parent_email,
|
|
250
|
+
use_membership_collect_phone: use_membership_collect_phone,
|
|
251
|
+
use_membership_collect_tel: use_membership_collect_tel,
|
|
252
|
+
use_membership_collect_email: use_membership_collect_email,
|
|
253
|
+
use_membership_collect_address: use_membership_collect_address,
|
|
254
|
+
use_membership_collect_bank: use_membership_collect_bank,
|
|
255
|
+
use_membership_collect_birth: use_membership_collect_birth,
|
|
256
|
+
use_membership_collect_gender: use_membership_collect_gender,
|
|
257
|
+
use_membership_collect_interest: use_membership_collect_interest,
|
|
258
|
+
membership_collect_interest_number: membership_collect_interest_number,
|
|
259
|
+
use_membership_collect_customs: use_membership_collect_customs,
|
|
260
|
+
use_membership_collect_nickname: use_membership_collect_nickname,
|
|
261
|
+
use_membership_collect_recommend_id: use_membership_collect_recommend_id,
|
|
262
|
+
recommend_id_point_to: recommend_id_point_to,
|
|
263
|
+
recommend_id_point_from: recommend_id_point_from,
|
|
264
|
+
use_membership_collect_business: use_membership_collect_business,
|
|
265
|
+
use_membership_collect_register: use_membership_collect_register,
|
|
266
|
+
membership_only_business: membership_only_business,
|
|
267
|
+
use_corporate_department: use_corporate_department,
|
|
268
|
+
sub_group_type: sub_group_type,
|
|
269
|
+
use_corporate_signup_approval: use_corporate_signup_approval,
|
|
270
|
+
corporate_email_domains: corporate_email_domains,
|
|
271
|
+
use_corporate_auto_approve: use_corporate_auto_approve,
|
|
272
|
+
use_corporate_invite_only: use_corporate_invite_only,
|
|
273
|
+
use_member_info_phone: use_member_info_phone,
|
|
274
|
+
use_member_info_tel: use_member_info_tel,
|
|
275
|
+
use_member_info_email: use_member_info_email,
|
|
276
|
+
use_member_info_address: use_member_info_address,
|
|
277
|
+
use_member_info_bank: use_member_info_bank,
|
|
278
|
+
use_member_info_birth: use_member_info_birth,
|
|
279
|
+
use_member_info_gender: use_member_info_gender,
|
|
280
|
+
use_member_info_customs: use_member_info_customs,
|
|
281
|
+
use_member_info_nickname: use_member_info_nickname,
|
|
282
|
+
use_member_info_register: use_member_info_register,
|
|
283
|
+
orderer_collect_phone: orderer_collect_phone,
|
|
284
|
+
orderer_collect_tel: orderer_collect_tel,
|
|
285
|
+
orderer_collect_email: orderer_collect_email,
|
|
286
|
+
order_prefix: order_prefix,
|
|
287
|
+
use_order_cancel: use_order_cancel,
|
|
288
|
+
use_oder_cancel_approval: use_oder_cancel_approval,
|
|
289
|
+
order_cancel_reasons: order_cancel_reasons,
|
|
290
|
+
order_cancel_reason_required_type: order_cancel_reason_required_type,
|
|
291
|
+
order_cancel_request_message: order_cancel_request_message,
|
|
292
|
+
order_cancel_done_message: order_cancel_done_message,
|
|
293
|
+
use_general_membership: use_general_membership,
|
|
294
|
+
general_membership_duplication: general_membership_duplication,
|
|
295
|
+
use_certification: use_certification,
|
|
296
|
+
certification_type: certification_type,
|
|
297
|
+
general_membership_id_type: general_membership_id_type,
|
|
298
|
+
use_membership_duplication_email: use_membership_duplication_email,
|
|
299
|
+
use_membership_duplication_phone: use_membership_duplication_phone,
|
|
300
|
+
use_social_membership: use_social_membership,
|
|
301
|
+
social_membership_type: social_membership_type,
|
|
302
|
+
use_point: use_point,
|
|
303
|
+
use_point_transaction: use_point_transaction,
|
|
304
|
+
point_display_name: point_display_name,
|
|
305
|
+
point_min_balance: point_min_balance,
|
|
306
|
+
point_not_condition: point_not_condition,
|
|
307
|
+
point_condition: point_condition,
|
|
308
|
+
use_point_max_rate: use_point_max_rate,
|
|
309
|
+
point_max_rate: point_max_rate,
|
|
310
|
+
use_point_max_amount: use_point_max_amount,
|
|
311
|
+
point_max_amount: point_max_amount,
|
|
312
|
+
point_rate: point_rate,
|
|
313
|
+
point_calc_type1: point_calc_type1,
|
|
314
|
+
point_calc_type2: point_calc_type2,
|
|
315
|
+
use_point_advance_discount: use_point_advance_discount,
|
|
316
|
+
point_advance_discount_rate: point_advance_discount_rate,
|
|
317
|
+
use_point_expire: use_point_expire,
|
|
318
|
+
point_expire_type: point_expire_type,
|
|
319
|
+
point_issue_event_type: point_issue_event_type,
|
|
320
|
+
point_issue_delay_days: point_issue_delay_days,
|
|
321
|
+
use_open_market: use_open_market,
|
|
322
|
+
use_product_approval: use_product_approval,
|
|
323
|
+
use_product_review: use_product_review,
|
|
324
|
+
use_product_review_point: use_product_review_point,
|
|
325
|
+
product_review_point: product_review_point,
|
|
326
|
+
product_review_photo_point: product_review_photo_point,
|
|
327
|
+
use_product_review_answer: use_product_review_answer,
|
|
328
|
+
use_product_review_auto_answer: use_product_review_auto_answer,
|
|
329
|
+
product_review_auto_answer_minute: product_review_auto_answer_minute,
|
|
330
|
+
product_review_auto_answer_text: product_review_auto_answer_text,
|
|
331
|
+
use_product_qna: use_product_qna,
|
|
332
|
+
product_qna_member_auth: product_qna_member_auth,
|
|
333
|
+
use_product_qna_answer_option: use_product_qna_answer_option,
|
|
334
|
+
use_notice: use_notice,
|
|
335
|
+
use_qna: use_qna,
|
|
336
|
+
use_faq: use_faq,
|
|
337
|
+
use_chat_support: use_chat_support,
|
|
338
|
+
chat_support_type: chat_support_type,
|
|
339
|
+
chat_support_key: chat_support_key,
|
|
340
|
+
use_dormant: use_dormant,
|
|
341
|
+
dormant_year: dormant_year,
|
|
342
|
+
dormant_restore: dormant_restore,
|
|
343
|
+
use_withdrawal: use_withdrawal,
|
|
344
|
+
use_withdrawal_guide_message: use_withdrawal_guide_message,
|
|
345
|
+
use_withdrawal_guide_message_after: use_withdrawal_guide_message_after,
|
|
346
|
+
withdrawal_guide_message_after: withdrawal_guide_message_after,
|
|
347
|
+
use_withdrawal_auto: use_withdrawal_auto,
|
|
348
|
+
withdrawal_auto_year: withdrawal_auto_year,
|
|
349
|
+
use_subscription_aggregate_transaction: use_subscription_aggregate_transaction,
|
|
350
|
+
subscription_month_day: subscription_month_day,
|
|
351
|
+
subscription_week_day: subscription_week_day,
|
|
352
|
+
use_limit: use_limit,
|
|
353
|
+
limit_month_purchase: limit_month_purchase,
|
|
354
|
+
limit_week_purchase: limit_week_purchase,
|
|
355
|
+
use_limit_payment: use_limit_payment,
|
|
356
|
+
use_limit_message: use_limit_message,
|
|
357
|
+
terms_of_service: terms_of_service,
|
|
358
|
+
terms_of_privacy_policy: terms_of_privacy_policy,
|
|
359
|
+
terms_of_privacy_collect: terms_of_privacy_collect,
|
|
360
|
+
terms_of_privacy_third: terms_of_privacy_third,
|
|
361
|
+
payment_timeout: payment_timeout,
|
|
362
|
+
product_sort_type: product_sort_type,
|
|
363
|
+
mall_theme_type: mall_theme_type,
|
|
364
|
+
catalog_display_type: catalog_display_type,
|
|
365
|
+
catalog_headline: catalog_headline,
|
|
366
|
+
catalog_bg_color: catalog_bg_color,
|
|
367
|
+
catalog_view_type_pc: catalog_view_type_pc,
|
|
368
|
+
catalog_view_type_mobile: catalog_view_type_mobile,
|
|
369
|
+
catalog_product_sort_type: catalog_product_sort_type,
|
|
370
|
+
use_cart: use_cart,
|
|
371
|
+
cart_storage_period: cart_storage_period,
|
|
372
|
+
cart_max_limit: cart_max_limit,
|
|
373
|
+
cart_add_action: cart_add_action,
|
|
374
|
+
cart_direct_purchase: cart_direct_purchase,
|
|
375
|
+
cart_option_change: cart_option_change,
|
|
376
|
+
cart_discount_display: cart_discount_display,
|
|
377
|
+
use_wishlist: use_wishlist,
|
|
378
|
+
wishlist_max_limit: wishlist_max_limit,
|
|
379
|
+
cart_wishlist_display: cart_wishlist_display
|
|
380
|
+
}.compact
|
|
381
|
+
)
|
|
382
|
+
end
|
|
383
|
+
# rubocop:enable Metrics/MethodLength, Metrics/AbcSize, Metrics/ParameterLists
|
|
384
|
+
end
|
|
385
|
+
end
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
module BootpayStore::Concern::Order
|
|
2
|
+
extend ActiveSupport::Concern
|
|
3
|
+
|
|
4
|
+
included do
|
|
5
|
+
# 주문 목록을 조회한다
|
|
6
|
+
# Comment by GOSOMI
|
|
7
|
+
# @date: 2025-06-19
|
|
8
|
+
# @date: 26-08-14 limit 인자 추가.
|
|
9
|
+
# 서버가 limit 을 20 으로 하드코딩하고 있었는데 params[:limit] 수용(기본 20 · 최대 50)으로 바뀌었다.
|
|
10
|
+
# 50 초과를 보내도 서버가 50 으로 클램프한다.
|
|
11
|
+
# ⚠️ 날짜 키는 search_date_from/to. 서버는 css_at/cse_at 도 별칭으로 받지만 SDK 는 정식 키만 쓴다.
|
|
12
|
+
# @date: 26-08-26 order_subscription_ids·subscription_billing_type 인자 추가.
|
|
13
|
+
# 둘 다 서버(#index)가 읽고 있었는데 SDK 에 인자가 없어 구독 계약별·결제유형별 필터를 못 걸었다.
|
|
14
|
+
# order_subscription_ids 는 서버가 콤마 문자열과 배열을 모두 받으므로 status 와 같이 콤마로 join 한다.
|
|
15
|
+
# 같은 날, 값이 비었을 때 status=&payment_status= 를 실어 보내던 것도 정리했다(서버는 무시했지만 노이즈).
|
|
16
|
+
def orders(status: [], payment_status: [], keyword: nil, page: 1, limit: 20, cs_type: nil,
|
|
17
|
+
search_date_from: nil, search_date_to: nil,
|
|
18
|
+
user_id: nil, user_group_id: nil, order_subscription_ids: [],
|
|
19
|
+
subscription_billing_type: nil, idempotency_key: nil)
|
|
20
|
+
request(
|
|
21
|
+
uri: 'orders',
|
|
22
|
+
method: :get,
|
|
23
|
+
headers: {
|
|
24
|
+
'Idempotency-Key' => idempotency_key.presence || SecureRandom.uuid,
|
|
25
|
+
'Bootpay-Role' => 'user'
|
|
26
|
+
},
|
|
27
|
+
params:
|
|
28
|
+
{
|
|
29
|
+
status: Array(status).join(',').presence,
|
|
30
|
+
payment_status: Array(payment_status).join(',').presence,
|
|
31
|
+
keyword: keyword,
|
|
32
|
+
cs_type: cs_type,
|
|
33
|
+
search_date_from: search_date_from,
|
|
34
|
+
search_date_to: search_date_to,
|
|
35
|
+
page: page,
|
|
36
|
+
limit: limit,
|
|
37
|
+
user_id: user_id,
|
|
38
|
+
user_group_id: user_group_id,
|
|
39
|
+
order_subscription_ids: Array(order_subscription_ids).join(',').presence,
|
|
40
|
+
subscription_billing_type: subscription_billing_type
|
|
41
|
+
}.compact
|
|
42
|
+
)
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# 주문 상세를 조회한다
|
|
46
|
+
def order_detail(order_number:, idempotency_key: nil)
|
|
47
|
+
request(
|
|
48
|
+
uri: "orders/#{order_number}",
|
|
49
|
+
method: :get,
|
|
50
|
+
headers: {
|
|
51
|
+
'Idempotency-Key' => idempotency_key.presence || SecureRandom.uuid,
|
|
52
|
+
'Bootpay-Role' => 'user'
|
|
53
|
+
}
|
|
54
|
+
)
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# 주문 결제 승인
|
|
58
|
+
# Comment by GOSOMI
|
|
59
|
+
# @date: 2025-10-28
|
|
60
|
+
def order_confirm(order_number:, idempotency_key: nil)
|
|
61
|
+
request(
|
|
62
|
+
uri: 'order/confirm',
|
|
63
|
+
method: :post,
|
|
64
|
+
headers: {
|
|
65
|
+
'Idempotency-Key' => idempotency_key.presence || SecureRandom.uuid,
|
|
66
|
+
'Bootpay-Role' => 'user'
|
|
67
|
+
},
|
|
68
|
+
payload: {
|
|
69
|
+
order_number: order_number
|
|
70
|
+
}
|
|
71
|
+
)
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
end
|