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