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