
1package main
2
3import (
4 "bytes"
5 "demo/wxpay_brand_utility"
6 "encoding/json"
7 "fmt"
8 "net/http"
9 "net/url"
10 "strings"
11 "time"
12)
13
14func main() {
15
16 config, err := wxpay_brand_utility.CreateBrandConfig(
17 "xxxxxxxx",
18 "1DDE55AD98Exxxxxxxxxx",
19 "/path/to/apiclient_key.pem",
20 "PUB_KEY_ID_xxxxxxxxxxxxx",
21 "/path/to/wxp_pub.pem",
22 )
23 if err != nil {
24 fmt.Println(err)
25 return
26 }
27
28 request := &ConfirmSendUserProductCouponRequest{
29 ProductCouponId: wxpay_brand_utility.String("1000000013"),
30 StockId: wxpay_brand_utility.String("1000000013001"),
31 CouponCode: wxpay_brand_utility.String("Code_123456"),
32 Appid: wxpay_brand_utility.String("wx233544546545989"),
33 Openid: wxpay_brand_utility.String("oh-394z-6CGkNoJrsDLTTUKiAnp4"),
34 OutRequestNo: wxpay_brand_utility.String("MCHCONFIRM202003101234"),
35 }
36
37 response, err := ConfirmSendUserProductCoupon(config, request)
38 if err != nil {
39 fmt.Printf("请求失败: %+v\n", err)
40
41 return
42 }
43
44
45 fmt.Printf("请求成功: %+v\n", response)
46}
47
48func ConfirmSendUserProductCoupon(config *wxpay_brand_utility.BrandConfig, request *ConfirmSendUserProductCouponRequest) (response *UserProductCouponEntity, err error) {
49 const (
50 host = "https://api.mch.weixin.qq.com"
51 method = "POST"
52 path = "/brand/marketing/product-coupon/users/{openid}/coupons/{coupon_code}/confirm"
53 )
54
55 reqUrl, err := url.Parse(fmt.Sprintf("%s%s", host, path))
56 if err != nil {
57 return nil, err
58 }
59 reqUrl.Path = strings.Replace(reqUrl.Path, "{coupon_code}", url.PathEscape(*request.CouponCode), -1)
60 reqUrl.Path = strings.Replace(reqUrl.Path, "{openid}", url.PathEscape(*request.Openid), -1)
61 reqBody, err := json.Marshal(request)
62 if err != nil {
63 return nil, err
64 }
65 httpRequest, err := http.NewRequest(method, reqUrl.String(), bytes.NewReader(reqBody))
66 if err != nil {
67 return nil, err
68 }
69 httpRequest.Header.Set("Accept", "application/json")
70 httpRequest.Header.Set("Wechatpay-Serial", config.WechatPayPublicKeyId())
71 httpRequest.Header.Set("Content-Type", "application/json")
72 authorization, err := wxpay_brand_utility.BuildAuthorization(config.BrandId(), config.CertificateSerialNo(), config.PrivateKey(), method, reqUrl.RequestURI(), reqBody)
73 if err != nil {
74 return nil, err
75 }
76 httpRequest.Header.Set("Authorization", authorization)
77
78 client := &http.Client{}
79 httpResponse, err := client.Do(httpRequest)
80 if err != nil {
81 return nil, err
82 }
83 respBody, err := wxpay_brand_utility.ExtractResponseBody(httpResponse)
84 if err != nil {
85 return nil, err
86 }
87 if httpResponse.StatusCode >= 200 && httpResponse.StatusCode < 300 {
88
89 err = wxpay_brand_utility.ValidateResponse(
90 config.WechatPayPublicKeyId(),
91 config.WechatPayPublicKey(),
92 &httpResponse.Header,
93 respBody,
94 )
95 if err != nil {
96 return nil, err
97 }
98 response := &UserProductCouponEntity{}
99 if err := json.Unmarshal(respBody, response); err != nil {
100 return nil, err
101 }
102
103 return response, nil
104 } else {
105 return nil, wxpay_brand_utility.NewApiException(
106 httpResponse.StatusCode,
107 httpResponse.Header,
108 respBody,
109 )
110 }
111}
112
113type ConfirmSendUserProductCouponRequest struct {
114 ProductCouponId *string `json:"product_coupon_id,omitempty"`
115 StockId *string `json:"stock_id,omitempty"`
116 CouponCode *string `json:"coupon_code,omitempty"`
117 Appid *string `json:"appid,omitempty"`
118 Openid *string `json:"openid,omitempty"`
119 OutRequestNo *string `json:"out_request_no,omitempty"`
120}
121
122func (o *ConfirmSendUserProductCouponRequest) MarshalJSON() ([]byte, error) {
123 type Alias ConfirmSendUserProductCouponRequest
124 a := &struct {
125 CouponCode *string `json:"coupon_code,omitempty"`
126 Openid *string `json:"openid,omitempty"`
127 *Alias
128 }{
129
130 CouponCode: nil,
131 Openid: nil,
132 Alias: (*Alias)(o),
133 }
134 return json.Marshal(a)
135}
136
137type UserProductCouponEntity struct {
138 CouponCode *string `json:"coupon_code,omitempty"`
139 CouponState *UserProductCouponState `json:"coupon_state,omitempty"`
140 ValidBeginTime *time.Time `json:"valid_begin_time,omitempty"`
141 ValidEndTime *time.Time `json:"valid_end_time,omitempty"`
142 ReceiveTime *string `json:"receive_time,omitempty"`
143 SendRequestNo *string `json:"send_request_no,omitempty"`
144 SendChannel *UserProductCouponSendChannel `json:"send_channel,omitempty"`
145 ConfirmRequestNo *string `json:"confirm_request_no,omitempty"`
146 ConfirmTime *time.Time `json:"confirm_time,omitempty"`
147 DeactivateRequestNo *string `json:"deactivate_request_no,omitempty"`
148 DeactivateTime *string `json:"deactivate_time,omitempty"`
149 DeactivateReason *string `json:"deactivate_reason,omitempty"`
150 SingleUsageDetail *CouponUsageDetail `json:"single_usage_detail,omitempty"`
151 ProgressiveBundleUsageDetail *CouponUsageDetail `json:"progressive_bundle_usage_detail,omitempty"`
152 UserProductCouponBundleInfo *UserProductCouponBundleInfo `json:"user_product_coupon_bundle_info,omitempty"`
153 ProductCoupon *ProductCouponEntity `json:"product_coupon,omitempty"`
154 Stock *StockEntity `json:"stock,omitempty"`
155 Attach *string `json:"attach,omitempty"`
156 ChannelCustomInfo *string `json:"channel_custom_info,omitempty"`
157 CouponTagInfo *CouponTagInfo `json:"coupon_tag_info,omitempty"`
158}
159
160type UserProductCouponState string
161
162func (e UserProductCouponState) Ptr() *UserProductCouponState {
163 return &e
164}
165
166const (
167 USERPRODUCTCOUPONSTATE_CONFIRMING UserProductCouponState = "CONFIRMING"
168 USERPRODUCTCOUPONSTATE_PENDING UserProductCouponState = "PENDING"
169 USERPRODUCTCOUPONSTATE_EFFECTIVE UserProductCouponState = "EFFECTIVE"
170 USERPRODUCTCOUPONSTATE_USED UserProductCouponState = "USED"
171 USERPRODUCTCOUPONSTATE_EXPIRED UserProductCouponState = "EXPIRED"
172 USERPRODUCTCOUPONSTATE_DELETED UserProductCouponState = "DELETED"
173 USERPRODUCTCOUPONSTATE_DEACTIVATED UserProductCouponState = "DEACTIVATED"
174)
175
176type UserProductCouponSendChannel string
177
178func (e UserProductCouponSendChannel) Ptr() *UserProductCouponSendChannel {
179 return &e
180}
181
182const (
183 USERPRODUCTCOUPONSENDCHANNEL_BRAND_MANAGE UserProductCouponSendChannel = "BRAND_MANAGE"
184 USERPRODUCTCOUPONSENDCHANNEL_API UserProductCouponSendChannel = "API"
185 USERPRODUCTCOUPONSENDCHANNEL_RECEIVE_COMPONENT UserProductCouponSendChannel = "RECEIVE_COMPONENT"
186)
187
188type CouponUsageDetail struct {
189 UseRequestNo *string `json:"use_request_no,omitempty"`
190 UseTime *time.Time `json:"use_time,omitempty"`
191 ReturnRequestNo *string `json:"return_request_no,omitempty"`
192 ReturnTime *time.Time `json:"return_time,omitempty"`
193 AssociatedOrderInfo *UserProductCouponAssociatedOrderInfo `json:"associated_order_info,omitempty"`
194 AssociatedPayScoreOrderInfo *UserProductCouponAssociatedPayScoreOrderInfo `json:"associated_pay_score_order_info,omitempty"`
195 SavedAmount *int64 `json:"saved_amount,omitempty"`
196}
197
198type UserProductCouponBundleInfo struct {
199 UserCouponBundleId *string `json:"user_coupon_bundle_id,omitempty"`
200 UserCouponBundleIndex *int64 `json:"user_coupon_bundle_index,omitempty"`
201 TotalCount *int64 `json:"total_count,omitempty"`
202 UsedCount *int64 `json:"used_count,omitempty"`
203}
204
205type ProductCouponEntity struct {
206 ProductCouponId *string `json:"product_coupon_id,omitempty"`
207 Scope *ProductCouponScope `json:"scope,omitempty"`
208 Type *ProductCouponType `json:"type,omitempty"`
209 UsageMode *UsageMode `json:"usage_mode,omitempty"`
210 SingleUsageInfo *SingleUsageInfo `json:"single_usage_info,omitempty"`
211 ProgressiveBundleUsageInfo *ProgressiveBundleUsageInfo `json:"progressive_bundle_usage_info,omitempty"`
212 DisplayInfo *ProductCouponDisplayInfo `json:"display_info,omitempty"`
213 OutProductNo *string `json:"out_product_no,omitempty"`
214 State *ProductCouponState `json:"state,omitempty"`
215 DeactivateRequestNo *string `json:"deactivate_request_no,omitempty"`
216 DeactivateTime *string `json:"deactivate_time,omitempty"`
217 DeactivateReason *string `json:"deactivate_reason,omitempty"`
218}
219
220type StockEntity struct {
221 ProductCouponId *string `json:"product_coupon_id,omitempty"`
222 StockId *string `json:"stock_id,omitempty"`
223 Remark *string `json:"remark,omitempty"`
224 CouponCodeMode *CouponCodeMode `json:"coupon_code_mode,omitempty"`
225 CouponCodeCountInfo *CouponCodeCountInfo `json:"coupon_code_count_info,omitempty"`
226 StockSendRule *StockSendRule `json:"stock_send_rule,omitempty"`
227 SingleUsageRule *SingleUsageRule `json:"single_usage_rule,omitempty"`
228 ProgressiveBundleUsageRule *StockUsageRule `json:"progressive_bundle_usage_rule,omitempty"`
229 StockBundleInfo *StockBundleInfo `json:"stock_bundle_info,omitempty"`
230 UsageRuleDisplayInfo *UsageRuleDisplayInfo `json:"usage_rule_display_info,omitempty"`
231 CouponDisplayInfo *CouponDisplayInfo `json:"coupon_display_info,omitempty"`
232 NotifyConfig *NotifyConfig `json:"notify_config,omitempty"`
233 StoreScope *StockStoreScope `json:"store_scope,omitempty"`
234 SentCountInfo *StockSentCountInfo `json:"sent_count_info,omitempty"`
235 State *StockState `json:"state,omitempty"`
236 DeactivateRequestNo *string `json:"deactivate_request_no,omitempty"`
237 DeactivateTime *time.Time `json:"deactivate_time,omitempty"`
238 DeactivateReason *string `json:"deactivate_reason,omitempty"`
239}
240
241type CouponTagInfo struct {
242 CouponTagList []UserProductCouponTag `json:"coupon_tag_list,omitempty"`
243 MemberTagInfo *MemberTagInfo `json:"member_tag_info,omitempty"`
244}
245
246type UserProductCouponAssociatedOrderInfo struct {
247 TransactionId *string `json:"transaction_id,omitempty"`
248 OutTradeNo *string `json:"out_trade_no,omitempty"`
249 Mchid *string `json:"mchid,omitempty"`
250 SubMchid *string `json:"sub_mchid,omitempty"`
251}
252
253type UserProductCouponAssociatedPayScoreOrderInfo struct {
254 OrderId *string `json:"order_id,omitempty"`
255 OutOrderNo *string `json:"out_order_no,omitempty"`
256 Mchid *string `json:"mchid,omitempty"`
257 SubMchid *string `json:"sub_mchid,omitempty"`
258}
259
260type ProductCouponScope string
261
262func (e ProductCouponScope) Ptr() *ProductCouponScope {
263 return &e
264}
265
266const (
267 PRODUCTCOUPONSCOPE_ALL ProductCouponScope = "ALL"
268 PRODUCTCOUPONSCOPE_SINGLE ProductCouponScope = "SINGLE"
269)
270
271type ProductCouponType string
272
273func (e ProductCouponType) Ptr() *ProductCouponType {
274 return &e
275}
276
277const (
278 PRODUCTCOUPONTYPE_NORMAL ProductCouponType = "NORMAL"
279 PRODUCTCOUPONTYPE_DISCOUNT ProductCouponType = "DISCOUNT"
280 PRODUCTCOUPONTYPE_EXCHANGE ProductCouponType = "EXCHANGE"
281)
282
283type UsageMode string
284
285func (e UsageMode) Ptr() *UsageMode {
286 return &e
287}
288
289const (
290 USAGEMODE_SINGLE UsageMode = "SINGLE"
291 USAGEMODE_PROGRESSIVE_BUNDLE UsageMode = "PROGRESSIVE_BUNDLE"
292)
293
294type SingleUsageInfo struct {
295 NormalCoupon *NormalCouponUsageRule `json:"normal_coupon,omitempty"`
296 DiscountCoupon *DiscountCouponUsageRule `json:"discount_coupon,omitempty"`
297}
298
299type ProgressiveBundleUsageInfo struct {
300 Count *int64 `json:"count,omitempty"`
301 IntervalDays *int64 `json:"interval_days,omitempty"`
302}
303
304type ProductCouponDisplayInfo struct {
305 Name *string `json:"name,omitempty"`
306 ImageUrl *string `json:"image_url,omitempty"`
307 BackgroundUrl *string `json:"background_url,omitempty"`
308 DetailImageUrlList []string `json:"detail_image_url_list,omitempty"`
309 OriginalPrice *int64 `json:"original_price,omitempty"`
310 ComboPackageList []ComboPackage `json:"combo_package_list,omitempty"`
311}
312
313type ProductCouponState string
314
315func (e ProductCouponState) Ptr() *ProductCouponState {
316 return &e
317}
318
319const (
320 PRODUCTCOUPONSTATE_AUDITING ProductCouponState = "AUDITING"
321 PRODUCTCOUPONSTATE_EFFECTIVE ProductCouponState = "EFFECTIVE"
322 PRODUCTCOUPONSTATE_DEACTIVATED ProductCouponState = "DEACTIVATED"
323)
324
325type CouponCodeMode string
326
327func (e CouponCodeMode) Ptr() *CouponCodeMode {
328 return &e
329}
330
331const (
332 COUPONCODEMODE_WECHATPAY CouponCodeMode = "WECHATPAY"
333 COUPONCODEMODE_UPLOAD CouponCodeMode = "UPLOAD"
334 COUPONCODEMODE_API_ASSIGN CouponCodeMode = "API_ASSIGN"
335)
336
337type CouponCodeCountInfo struct {
338 TotalCount *int64 `json:"total_count,omitempty"`
339 AvailableCount *int64 `json:"available_count,omitempty"`
340}
341
342type StockSendRule struct {
343 MaxCount *int64 `json:"max_count,omitempty"`
344 MaxCountPerDay *int64 `json:"max_count_per_day,omitempty"`
345 MaxCountPerUser *int64 `json:"max_count_per_user,omitempty"`
346}
347
348type SingleUsageRule struct {
349 CouponAvailablePeriod *CouponAvailablePeriod `json:"coupon_available_period,omitempty"`
350 NormalCoupon *NormalCouponUsageRule `json:"normal_coupon,omitempty"`
351 DiscountCoupon *DiscountCouponUsageRule `json:"discount_coupon,omitempty"`
352 ExchangeCoupon *ExchangeCouponUsageRule `json:"exchange_coupon,omitempty"`
353}
354
355type StockUsageRule struct {
356 CouponAvailablePeriod *CouponAvailablePeriod `json:"coupon_available_period,omitempty"`
357 NormalCoupon *NormalCouponUsageRule `json:"normal_coupon,omitempty"`
358 DiscountCoupon *DiscountCouponUsageRule `json:"discount_coupon,omitempty"`
359 ExchangeCoupon *ExchangeCouponUsageRule `json:"exchange_coupon,omitempty"`
360}
361
362type StockBundleInfo struct {
363 StockBundleId *string `json:"stock_bundle_id,omitempty"`
364 StockBundleIndex *int64 `json:"stock_bundle_index,omitempty"`
365}
366
367type UsageRuleDisplayInfo struct {
368 CouponUsageMethodList []CouponUsageMethod `json:"coupon_usage_method_list,omitempty"`
369 MiniProgramAppid *string `json:"mini_program_appid,omitempty"`
370 MiniProgramPath *string `json:"mini_program_path,omitempty"`
371 AppPath *string `json:"app_path,omitempty"`
372 UsageDescription *string `json:"usage_description,omitempty"`
373 CouponAvailableStoreInfo *CouponAvailableStoreInfo `json:"coupon_available_store_info,omitempty"`
374 AppJumpType *AppJumpType `json:"app_jump_type,omitempty"`
375 PasscodeLink *string `json:"passcode_link,omitempty"`
376}
377
378type CouponDisplayInfo struct {
379 CodeDisplayMode *CouponCodeDisplayMode `json:"code_display_mode,omitempty"`
380 BackgroundColor *string `json:"background_color,omitempty"`
381 EntranceMiniProgram *EntranceMiniProgram `json:"entrance_mini_program,omitempty"`
382 EntranceOfficialAccount *EntranceOfficialAccount `json:"entrance_official_account,omitempty"`
383 EntranceFinder *EntranceFinder `json:"entrance_finder,omitempty"`
384}
385
386type NotifyConfig struct {
387 NotifyAppid *string `json:"notify_appid,omitempty"`
388}
389
390type StockStoreScope string
391
392func (e StockStoreScope) Ptr() *StockStoreScope {
393 return &e
394}
395
396const (
397 STOCKSTORESCOPE_NONE StockStoreScope = "NONE"
398 STOCKSTORESCOPE_ALL StockStoreScope = "ALL"
399 STOCKSTORESCOPE_SPECIFIC StockStoreScope = "SPECIFIC"
400)
401
402type StockSentCountInfo struct {
403 TotalCount *int64 `json:"total_count,omitempty"`
404 TodayCount *int64 `json:"today_count,omitempty"`
405}
406
407type StockState string
408
409func (e StockState) Ptr() *StockState {
410 return &e
411}
412
413const (
414 STOCKSTATE_AUDITING StockState = "AUDITING"
415 STOCKSTATE_SENDING StockState = "SENDING"
416 STOCKSTATE_PAUSED StockState = "PAUSED"
417 STOCKSTATE_STOPPED StockState = "STOPPED"
418 STOCKSTATE_DEACTIVATED StockState = "DEACTIVATED"
419)
420
421type UserProductCouponTag string
422
423func (e UserProductCouponTag) Ptr() *UserProductCouponTag {
424 return &e
425}
426
427const (
428 USERPRODUCTCOUPONTAG_MEMBER UserProductCouponTag = "MEMBER"
429)
430
431type MemberTagInfo struct {
432 MemberCardId *string `json:"member_card_id,omitempty"`
433}
434
435type NormalCouponUsageRule struct {
436 Threshold *int64 `json:"threshold,omitempty"`
437 DiscountAmount *int64 `json:"discount_amount,omitempty"`
438}
439
440type DiscountCouponUsageRule struct {
441 Threshold *int64 `json:"threshold,omitempty"`
442 PercentOff *int64 `json:"percent_off,omitempty"`
443}
444
445type ComboPackage struct {
446 Name *string `json:"name,omitempty"`
447 PickCount *int64 `json:"pick_count,omitempty"`
448 ChoiceList []ComboPackageChoice `json:"choice_list,omitempty"`
449}
450
451type CouponAvailablePeriod struct {
452 AvailableBeginTime *string `json:"available_begin_time,omitempty"`
453 AvailableEndTime *string `json:"available_end_time,omitempty"`
454 AvailableDays *int64 `json:"available_days,omitempty"`
455 WaitDaysAfterReceive *int64 `json:"wait_days_after_receive,omitempty"`
456 WeeklyAvailablePeriod *FixedWeekPeriod `json:"weekly_available_period,omitempty"`
457 IrregularAvailablePeriodList []TimePeriod `json:"irregular_available_period_list,omitempty"`
458}
459
460type ExchangeCouponUsageRule struct {
461 Threshold *int64 `json:"threshold,omitempty"`
462 ExchangePrice *int64 `json:"exchange_price,omitempty"`
463}
464
465type CouponUsageMethod string
466
467func (e CouponUsageMethod) Ptr() *CouponUsageMethod {
468 return &e
469}
470
471const (
472 COUPONUSAGEMETHOD_OFFLINE CouponUsageMethod = "OFFLINE"
473 COUPONUSAGEMETHOD_MINI_PROGRAM CouponUsageMethod = "MINI_PROGRAM"
474 COUPONUSAGEMETHOD_APP CouponUsageMethod = "APP"
475 COUPONUSAGEMETHOD_PAYMENT_CODE CouponUsageMethod = "PAYMENT_CODE"
476)
477
478type CouponAvailableStoreInfo struct {
479 Description *string `json:"description,omitempty"`
480 MiniProgramAppid *string `json:"mini_program_appid,omitempty"`
481 MiniProgramPath *string `json:"mini_program_path,omitempty"`
482}
483
484type AppJumpType string
485
486func (e AppJumpType) Ptr() *AppJumpType {
487 return &e
488}
489
490const (
491 APPJUMPTYPE_H5 AppJumpType = "H5"
492 APPJUMPTYPE_PASSCODE_LINK AppJumpType = "PASSCODE_LINK"
493)
494
495type CouponCodeDisplayMode string
496
497func (e CouponCodeDisplayMode) Ptr() *CouponCodeDisplayMode {
498 return &e
499}
500
501const (
502 COUPONCODEDISPLAYMODE_INVISIBLE CouponCodeDisplayMode = "INVISIBLE"
503 COUPONCODEDISPLAYMODE_BARCODE CouponCodeDisplayMode = "BARCODE"
504 COUPONCODEDISPLAYMODE_QRCODE CouponCodeDisplayMode = "QRCODE"
505)
506
507type EntranceMiniProgram struct {
508 Appid *string `json:"appid,omitempty"`
509 Path *string `json:"path,omitempty"`
510 EntranceWording *string `json:"entrance_wording,omitempty"`
511 GuidanceWording *string `json:"guidance_wording,omitempty"`
512}
513
514type EntranceOfficialAccount struct {
515 Appid *string `json:"appid,omitempty"`
516}
517
518type EntranceFinder struct {
519 FinderId *string `json:"finder_id,omitempty"`
520 FinderVideoId *string `json:"finder_video_id,omitempty"`
521 FinderVideoCoverImageUrl *string `json:"finder_video_cover_image_url,omitempty"`
522}
523
524type ComboPackageChoice struct {
525 Name *string `json:"name,omitempty"`
526 Price *int64 `json:"price,omitempty"`
527 Count *int64 `json:"count,omitempty"`
528 ImageUrl *string `json:"image_url,omitempty"`
529 MiniProgramAppid *string `json:"mini_program_appid,omitempty"`
530 MiniProgramPath *string `json:"mini_program_path,omitempty"`
531}
532
533type FixedWeekPeriod struct {
534 DayList []WeekEnum `json:"day_list,omitempty"`
535 DayPeriodList []PeriodOfTheDay `json:"day_period_list,omitempty"`
536}
537
538type TimePeriod struct {
539 BeginTime *string `json:"begin_time,omitempty"`
540 EndTime *string `json:"end_time,omitempty"`
541}
542
543type WeekEnum string
544
545func (e WeekEnum) Ptr() *WeekEnum {
546 return &e
547}
548
549const (
550 WEEKENUM_MONDAY WeekEnum = "MONDAY"
551 WEEKENUM_TUESDAY WeekEnum = "TUESDAY"
552 WEEKENUM_WEDNESDAY WeekEnum = "WEDNESDAY"
553 WEEKENUM_THURSDAY WeekEnum = "THURSDAY"
554 WEEKENUM_FRIDAY WeekEnum = "FRIDAY"
555 WEEKENUM_SATURDAY WeekEnum = "SATURDAY"
556 WEEKENUM_SUNDAY WeekEnum = "SUNDAY"
557)
558
559type PeriodOfTheDay struct {
560 BeginTime *int64 `json:"begin_time,omitempty"`
561 EndTime *int64 `json:"end_time,omitempty"`
562}
563