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