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