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