
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 PRODUCTCOUPONSCOPE_CATEGORY ProductCouponScope = "CATEGORY"
279)
280
281type ProductCouponType string
282
283func (e ProductCouponType) Ptr() *ProductCouponType {
284 return &e
285}
286
287const (
288 PRODUCTCOUPONTYPE_NORMAL ProductCouponType = "NORMAL"
289 PRODUCTCOUPONTYPE_DISCOUNT ProductCouponType = "DISCOUNT"
290 PRODUCTCOUPONTYPE_EXCHANGE ProductCouponType = "EXCHANGE"
291)
292
293type UsageMode string
294
295func (e UsageMode) Ptr() *UsageMode {
296 return &e
297}
298
299const (
300 USAGEMODE_SINGLE UsageMode = "SINGLE"
301 USAGEMODE_PROGRESSIVE_BUNDLE UsageMode = "PROGRESSIVE_BUNDLE"
302)
303
304type SingleUsageInfo struct {
305 NormalCoupon *NormalCouponUsageRule `json:"normal_coupon,omitempty"`
306 DiscountCoupon *DiscountCouponUsageRule `json:"discount_coupon,omitempty"`
307}
308
309type ProgressiveBundleUsageInfo struct {
310 Count *int64 `json:"count,omitempty"`
311 IntervalDays *int64 `json:"interval_days,omitempty"`
312}
313
314type ProductCouponDisplayInfo struct {
315 Name *string `json:"name,omitempty"`
316 ImageUrl *string `json:"image_url,omitempty"`
317 BackgroundUrl *string `json:"background_url,omitempty"`
318 DetailImageUrlList []string `json:"detail_image_url_list,omitempty"`
319 OriginalPrice *int64 `json:"original_price,omitempty"`
320 ComboPackageList []ComboPackage `json:"combo_package_list,omitempty"`
321}
322
323type ProductCouponState string
324
325func (e ProductCouponState) Ptr() *ProductCouponState {
326 return &e
327}
328
329const (
330 PRODUCTCOUPONSTATE_AUDITING ProductCouponState = "AUDITING"
331 PRODUCTCOUPONSTATE_EFFECTIVE ProductCouponState = "EFFECTIVE"
332 PRODUCTCOUPONSTATE_DEACTIVATED ProductCouponState = "DEACTIVATED"
333)
334
335type CouponCodeMode string
336
337func (e CouponCodeMode) Ptr() *CouponCodeMode {
338 return &e
339}
340
341const (
342 COUPONCODEMODE_WECHATPAY CouponCodeMode = "WECHATPAY"
343 COUPONCODEMODE_UPLOAD CouponCodeMode = "UPLOAD"
344 COUPONCODEMODE_API_ASSIGN CouponCodeMode = "API_ASSIGN"
345)
346
347type CouponCodeCountInfo struct {
348 TotalCount *int64 `json:"total_count,omitempty"`
349 AvailableCount *int64 `json:"available_count,omitempty"`
350}
351
352type StockSendRule struct {
353 MaxCount *int64 `json:"max_count,omitempty"`
354 MaxCountPerDay *int64 `json:"max_count_per_day,omitempty"`
355 MaxCountPerUser *int64 `json:"max_count_per_user,omitempty"`
356}
357
358type SingleUsageRule struct {
359 CouponAvailablePeriod *CouponAvailablePeriod `json:"coupon_available_period,omitempty"`
360 NormalCoupon *NormalCouponUsageRule `json:"normal_coupon,omitempty"`
361 DiscountCoupon *DiscountCouponUsageRule `json:"discount_coupon,omitempty"`
362 ExchangeCoupon *ExchangeCouponUsageRule `json:"exchange_coupon,omitempty"`
363}
364
365type StockUsageRule struct {
366 CouponAvailablePeriod *CouponAvailablePeriod `json:"coupon_available_period,omitempty"`
367 NormalCoupon *NormalCouponUsageRule `json:"normal_coupon,omitempty"`
368 DiscountCoupon *DiscountCouponUsageRule `json:"discount_coupon,omitempty"`
369 ExchangeCoupon *ExchangeCouponUsageRule `json:"exchange_coupon,omitempty"`
370}
371
372type StockBundleInfo struct {
373 StockBundleId *string `json:"stock_bundle_id,omitempty"`
374 StockBundleIndex *int64 `json:"stock_bundle_index,omitempty"`
375}
376
377type UsageRuleDisplayInfo struct {
378 CouponUsageMethodList []CouponUsageMethod `json:"coupon_usage_method_list,omitempty"`
379 MiniProgramAppid *string `json:"mini_program_appid,omitempty"`
380 MiniProgramPath *string `json:"mini_program_path,omitempty"`
381 AppPath *string `json:"app_path,omitempty"`
382 UsageDescription *string `json:"usage_description,omitempty"`
383 CouponAvailableStoreInfo *CouponAvailableStoreInfo `json:"coupon_available_store_info,omitempty"`
384 AppJumpType *AppJumpType `json:"app_jump_type,omitempty"`
385 PasscodeLink *string `json:"passcode_link,omitempty"`
386}
387
388type CouponDisplayInfo struct {
389 CodeDisplayMode *CouponCodeDisplayMode `json:"code_display_mode,omitempty"`
390 BackgroundColor *string `json:"background_color,omitempty"`
391 EntranceMiniProgram *EntranceMiniProgram `json:"entrance_mini_program,omitempty"`
392 EntranceOfficialAccount *EntranceOfficialAccount `json:"entrance_official_account,omitempty"`
393 EntranceFinder *EntranceFinder `json:"entrance_finder,omitempty"`
394}
395
396type NotifyConfig struct {
397 NotifyAppid *string `json:"notify_appid,omitempty"`
398}
399
400type StockStoreScope string
401
402func (e StockStoreScope) Ptr() *StockStoreScope {
403 return &e
404}
405
406const (
407 STOCKSTORESCOPE_NONE StockStoreScope = "NONE"
408 STOCKSTORESCOPE_ALL StockStoreScope = "ALL"
409 STOCKSTORESCOPE_SPECIFIC StockStoreScope = "SPECIFIC"
410)
411
412type StockSentCountInfo struct {
413 TotalCount *int64 `json:"total_count,omitempty"`
414 TodayCount *int64 `json:"today_count,omitempty"`
415}
416
417type StockState string
418
419func (e StockState) Ptr() *StockState {
420 return &e
421}
422
423const (
424 STOCKSTATE_AUDITING StockState = "AUDITING"
425 STOCKSTATE_SENDING StockState = "SENDING"
426 STOCKSTATE_PAUSED StockState = "PAUSED"
427 STOCKSTATE_STOPPED StockState = "STOPPED"
428 STOCKSTATE_DEACTIVATED StockState = "DEACTIVATED"
429)
430
431type UserProductCouponTag string
432
433func (e UserProductCouponTag) Ptr() *UserProductCouponTag {
434 return &e
435}
436
437const (
438 USERPRODUCTCOUPONTAG_MEMBER UserProductCouponTag = "MEMBER"
439)
440
441type MemberTagInfo struct {
442 MemberCardId *string `json:"member_card_id,omitempty"`
443}
444
445type NormalCouponUsageRule struct {
446 Threshold *int64 `json:"threshold,omitempty"`
447 DiscountAmount *int64 `json:"discount_amount,omitempty"`
448}
449
450type DiscountCouponUsageRule struct {
451 Threshold *int64 `json:"threshold,omitempty"`
452 PercentOff *int64 `json:"percent_off,omitempty"`
453}
454
455type ComboPackage struct {
456 Name *string `json:"name,omitempty"`
457 PickCount *int64 `json:"pick_count,omitempty"`
458 ChoiceList []ComboPackageChoice `json:"choice_list,omitempty"`
459}
460
461type CouponAvailablePeriod struct {
462 AvailableBeginTime *string `json:"available_begin_time,omitempty"`
463 AvailableEndTime *string `json:"available_end_time,omitempty"`
464 AvailableDays *int64 `json:"available_days,omitempty"`
465 WaitDaysAfterReceive *int64 `json:"wait_days_after_receive,omitempty"`
466 WeeklyAvailablePeriod *FixedWeekPeriod `json:"weekly_available_period,omitempty"`
467 IrregularAvailablePeriodList []TimePeriod `json:"irregular_available_period_list,omitempty"`
468 AvailableSeconds *int64 `json:"available_seconds,omitempty"`
469}
470
471type ExchangeCouponUsageRule struct {
472 Threshold *int64 `json:"threshold,omitempty"`
473 ExchangePrice *int64 `json:"exchange_price,omitempty"`
474}
475
476type CouponUsageMethod string
477
478func (e CouponUsageMethod) Ptr() *CouponUsageMethod {
479 return &e
480}
481
482const (
483 COUPONUSAGEMETHOD_OFFLINE CouponUsageMethod = "OFFLINE"
484 COUPONUSAGEMETHOD_MINI_PROGRAM CouponUsageMethod = "MINI_PROGRAM"
485 COUPONUSAGEMETHOD_APP CouponUsageMethod = "APP"
486 COUPONUSAGEMETHOD_PAYMENT_CODE CouponUsageMethod = "PAYMENT_CODE"
487)
488
489type CouponAvailableStoreInfo struct {
490 Description *string `json:"description,omitempty"`
491 MiniProgramAppid *string `json:"mini_program_appid,omitempty"`
492 MiniProgramPath *string `json:"mini_program_path,omitempty"`
493}
494
495type AppJumpType string
496
497func (e AppJumpType) Ptr() *AppJumpType {
498 return &e
499}
500
501const (
502 APPJUMPTYPE_H5 AppJumpType = "H5"
503 APPJUMPTYPE_PASSCODE_LINK AppJumpType = "PASSCODE_LINK"
504 APPJUMPTYPE_USAGE_GUIDE AppJumpType = "USAGE_GUIDE"
505)
506
507type CouponCodeDisplayMode string
508
509func (e CouponCodeDisplayMode) Ptr() *CouponCodeDisplayMode {
510 return &e
511}
512
513const (
514 COUPONCODEDISPLAYMODE_INVISIBLE CouponCodeDisplayMode = "INVISIBLE"
515 COUPONCODEDISPLAYMODE_BARCODE CouponCodeDisplayMode = "BARCODE"
516 COUPONCODEDISPLAYMODE_QRCODE CouponCodeDisplayMode = "QRCODE"
517)
518
519type EntranceMiniProgram struct {
520 Appid *string `json:"appid,omitempty"`
521 Path *string `json:"path,omitempty"`
522 EntranceWording *string `json:"entrance_wording,omitempty"`
523 GuidanceWording *string `json:"guidance_wording,omitempty"`
524}
525
526type EntranceOfficialAccount struct {
527 Appid *string `json:"appid,omitempty"`
528}
529
530type EntranceFinder struct {
531 FinderId *string `json:"finder_id,omitempty"`
532 FinderVideoId *string `json:"finder_video_id,omitempty"`
533 FinderVideoCoverImageUrl *string `json:"finder_video_cover_image_url,omitempty"`
534}
535
536type ComboPackageChoice struct {
537 Name *string `json:"name,omitempty"`
538 Price *int64 `json:"price,omitempty"`
539 Count *int64 `json:"count,omitempty"`
540 ImageUrl *string `json:"image_url,omitempty"`
541 MiniProgramAppid *string `json:"mini_program_appid,omitempty"`
542 MiniProgramPath *string `json:"mini_program_path,omitempty"`
543}
544
545type FixedWeekPeriod struct {
546 DayList []WeekEnum `json:"day_list,omitempty"`
547 DayPeriodList []PeriodOfTheDay `json:"day_period_list,omitempty"`
548}
549
550type TimePeriod struct {
551 BeginTime *string `json:"begin_time,omitempty"`
552 EndTime *string `json:"end_time,omitempty"`
553}
554
555type WeekEnum string
556
557func (e WeekEnum) Ptr() *WeekEnum {
558 return &e
559}
560
561const (
562 WEEKENUM_MONDAY WeekEnum = "MONDAY"
563 WEEKENUM_TUESDAY WeekEnum = "TUESDAY"
564 WEEKENUM_WEDNESDAY WeekEnum = "WEDNESDAY"
565 WEEKENUM_THURSDAY WeekEnum = "THURSDAY"
566 WEEKENUM_FRIDAY WeekEnum = "FRIDAY"
567 WEEKENUM_SATURDAY WeekEnum = "SATURDAY"
568 WEEKENUM_SUNDAY WeekEnum = "SUNDAY"
569)
570
571type PeriodOfTheDay struct {
572 BeginTime *int64 `json:"begin_time,omitempty"`
573 EndTime *int64 `json:"end_time,omitempty"`
574}
575