
1package main
2
3import (
4 "bytes"
5 "demo/wxpay_brand_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_brand_utility.CreateBrandConfig(
17 "xxxxxxxx",
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 := &UseUserProductCouponRequest{
29 ProductCouponId: wxpay_brand_utility.String("1000000013"),
30 StockId: wxpay_brand_utility.String("1000000013001"),
31 CouponCode: wxpay_brand_utility.String("Code_123456"),
32 Appid: wxpay_brand_utility.String("wx233544546545989"),
33 Openid: wxpay_brand_utility.String("oh-394z-6CGkNoJrsDLTTUKiAnp4"),
34 UseTime: wxpay_brand_utility.Time(time.Now()),
35 OutRequestNo: wxpay_brand_utility.String("MCHUSE202003101234"),
36 AssociatedOrderInfo: &UserProductCouponAssociatedOrderInfo{
37 TransactionId: wxpay_brand_utility.String("4200000000123456789123456789"),
38 },
39 }
40
41 response, err := UseUserProductCoupon(config, request)
42 if err != nil {
43 fmt.Printf("请求失败: %+v\n", err)
44
45 return
46 }
47
48
49 fmt.Printf("请求成功: %+v\n", response)
50}
51
52func UseUserProductCoupon(config *wxpay_brand_utility.BrandConfig, request *UseUserProductCouponRequest) (response *UserProductCouponEntity, err error) {
53 const (
54 host = "https://api.mch.weixin.qq.com"
55 method = "POST"
56 path = "/brand/marketing/product-coupon/users/{openid}/coupons/{coupon_code}/use"
57 )
58
59 reqUrl, err := url.Parse(fmt.Sprintf("%s%s", host, path))
60 if err != nil {
61 return nil, err
62 }
63 reqUrl.Path = strings.Replace(reqUrl.Path, "{coupon_code}", url.PathEscape(*request.CouponCode), -1)
64 reqUrl.Path = strings.Replace(reqUrl.Path, "{openid}", url.PathEscape(*request.Openid), -1)
65 reqBody, err := json.Marshal(request)
66 if err != nil {
67 return nil, err
68 }
69 httpRequest, err := http.NewRequest(method, reqUrl.String(), bytes.NewReader(reqBody))
70 if err != nil {
71 return nil, err
72 }
73 httpRequest.Header.Set("Accept", "application/json")
74 httpRequest.Header.Set("Wechatpay-Serial", config.WechatPayPublicKeyId())
75 httpRequest.Header.Set("Content-Type", "application/json")
76 authorization, err := wxpay_brand_utility.BuildAuthorization(config.BrandId(), config.CertificateSerialNo(), config.PrivateKey(), method, reqUrl.RequestURI(), reqBody)
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 UseUserProductCouponRequest 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 UseTime *time.Time `json:"use_time,omitempty"`
124 OutRequestNo *string `json:"out_request_no,omitempty"`
125 StoreId *string `json:"store_id,omitempty"`
126 AssociatedOrderInfo *UserProductCouponAssociatedOrderInfo `json:"associated_order_info,omitempty"`
127 AssociatedPayScoreOrderInfo *UserProductCouponAssociatedPayScoreOrderInfo `json:"associated_pay_score_order_info,omitempty"`
128 SavedAmount *int64 `json:"saved_amount,omitempty"`
129}
130
131func (o *UseUserProductCouponRequest) MarshalJSON() ([]byte, error) {
132 type Alias UseUserProductCouponRequest
133 a := &struct {
134 CouponCode *string `json:"coupon_code,omitempty"`
135 Openid *string `json:"openid,omitempty"`
136 *Alias
137 }{
138
139 CouponCode: 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 UserProductCouponAssociatedOrderInfo struct {
170 TransactionId *string `json:"transaction_id,omitempty"`
171 OutTradeNo *string `json:"out_trade_no,omitempty"`
172 Mchid *string `json:"mchid,omitempty"`
173 SubMchid *string `json:"sub_mchid,omitempty"`
174}
175
176type UserProductCouponAssociatedPayScoreOrderInfo struct {
177 OrderId *string `json:"order_id,omitempty"`
178 OutOrderNo *string `json:"out_order_no,omitempty"`
179 Mchid *string `json:"mchid,omitempty"`
180 SubMchid *string `json:"sub_mchid,omitempty"`
181}
182
183type UserProductCouponState string
184
185func (e UserProductCouponState) Ptr() *UserProductCouponState {
186 return &e
187}
188
189const (
190 USERPRODUCTCOUPONSTATE_CONFIRMING UserProductCouponState = "CONFIRMING"
191 USERPRODUCTCOUPONSTATE_PENDING UserProductCouponState = "PENDING"
192 USERPRODUCTCOUPONSTATE_EFFECTIVE UserProductCouponState = "EFFECTIVE"
193 USERPRODUCTCOUPONSTATE_USED UserProductCouponState = "USED"
194 USERPRODUCTCOUPONSTATE_EXPIRED UserProductCouponState = "EXPIRED"
195 USERPRODUCTCOUPONSTATE_DELETED UserProductCouponState = "DELETED"
196 USERPRODUCTCOUPONSTATE_DEACTIVATED UserProductCouponState = "DEACTIVATED"
197)
198
199type UserProductCouponSendChannel string
200
201func (e UserProductCouponSendChannel) Ptr() *UserProductCouponSendChannel {
202 return &e
203}
204
205const (
206 USERPRODUCTCOUPONSENDCHANNEL_BRAND_MANAGE UserProductCouponSendChannel = "BRAND_MANAGE"
207 USERPRODUCTCOUPONSENDCHANNEL_API UserProductCouponSendChannel = "API"
208 USERPRODUCTCOUPONSENDCHANNEL_RECEIVE_COMPONENT UserProductCouponSendChannel = "RECEIVE_COMPONENT"
209)
210
211type CouponUsageDetail struct {
212 UseRequestNo *string `json:"use_request_no,omitempty"`
213 UseTime *time.Time `json:"use_time,omitempty"`
214 ReturnRequestNo *string `json:"return_request_no,omitempty"`
215 ReturnTime *time.Time `json:"return_time,omitempty"`
216 AssociatedOrderInfo *UserProductCouponAssociatedOrderInfo `json:"associated_order_info,omitempty"`
217 AssociatedPayScoreOrderInfo *UserProductCouponAssociatedPayScoreOrderInfo `json:"associated_pay_score_order_info,omitempty"`
218 SavedAmount *int64 `json:"saved_amount,omitempty"`
219}
220
221type UserProductCouponBundleInfo struct {
222 UserCouponBundleId *string `json:"user_coupon_bundle_id,omitempty"`
223 UserCouponBundleIndex *int64 `json:"user_coupon_bundle_index,omitempty"`
224 TotalCount *int64 `json:"total_count,omitempty"`
225 UsedCount *int64 `json:"used_count,omitempty"`
226}
227
228type ProductCouponEntity struct {
229 ProductCouponId *string `json:"product_coupon_id,omitempty"`
230 Scope *ProductCouponScope `json:"scope,omitempty"`
231 Type *ProductCouponType `json:"type,omitempty"`
232 UsageMode *UsageMode `json:"usage_mode,omitempty"`
233 SingleUsageInfo *SingleUsageInfo `json:"single_usage_info,omitempty"`
234 ProgressiveBundleUsageInfo *ProgressiveBundleUsageInfo `json:"progressive_bundle_usage_info,omitempty"`
235 DisplayInfo *ProductCouponDisplayInfo `json:"display_info,omitempty"`
236 OutProductNo *string `json:"out_product_no,omitempty"`
237 State *ProductCouponState `json:"state,omitempty"`
238 DeactivateRequestNo *string `json:"deactivate_request_no,omitempty"`
239 DeactivateTime *string `json:"deactivate_time,omitempty"`
240 DeactivateReason *string `json:"deactivate_reason,omitempty"`
241}
242
243type StockEntity struct {
244 ProductCouponId *string `json:"product_coupon_id,omitempty"`
245 StockId *string `json:"stock_id,omitempty"`
246 Remark *string `json:"remark,omitempty"`
247 CouponCodeMode *CouponCodeMode `json:"coupon_code_mode,omitempty"`
248 CouponCodeCountInfo *CouponCodeCountInfo `json:"coupon_code_count_info,omitempty"`
249 StockSendRule *StockSendRule `json:"stock_send_rule,omitempty"`
250 SingleUsageRule *SingleUsageRule `json:"single_usage_rule,omitempty"`
251 ProgressiveBundleUsageRule *StockUsageRule `json:"progressive_bundle_usage_rule,omitempty"`
252 StockBundleInfo *StockBundleInfo `json:"stock_bundle_info,omitempty"`
253 UsageRuleDisplayInfo *UsageRuleDisplayInfo `json:"usage_rule_display_info,omitempty"`
254 CouponDisplayInfo *CouponDisplayInfo `json:"coupon_display_info,omitempty"`
255 NotifyConfig *NotifyConfig `json:"notify_config,omitempty"`
256 StoreScope *StockStoreScope `json:"store_scope,omitempty"`
257 SentCountInfo *StockSentCountInfo `json:"sent_count_info,omitempty"`
258 State *StockState `json:"state,omitempty"`
259 DeactivateRequestNo *string `json:"deactivate_request_no,omitempty"`
260 DeactivateTime *time.Time `json:"deactivate_time,omitempty"`
261 DeactivateReason *string `json:"deactivate_reason,omitempty"`
262}
263
264type CouponTagInfo struct {
265 CouponTagList []UserProductCouponTag `json:"coupon_tag_list,omitempty"`
266 MemberTagInfo *MemberTagInfo `json:"member_tag_info,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)
279
280type ProductCouponType string
281
282func (e ProductCouponType) Ptr() *ProductCouponType {
283 return &e
284}
285
286const (
287 PRODUCTCOUPONTYPE_NORMAL ProductCouponType = "NORMAL"
288 PRODUCTCOUPONTYPE_DISCOUNT ProductCouponType = "DISCOUNT"
289 PRODUCTCOUPONTYPE_EXCHANGE ProductCouponType = "EXCHANGE"
290)
291
292type UsageMode string
293
294func (e UsageMode) Ptr() *UsageMode {
295 return &e
296}
297
298const (
299 USAGEMODE_SINGLE UsageMode = "SINGLE"
300 USAGEMODE_PROGRESSIVE_BUNDLE UsageMode = "PROGRESSIVE_BUNDLE"
301)
302
303type SingleUsageInfo struct {
304 NormalCoupon *NormalCouponUsageRule `json:"normal_coupon,omitempty"`
305 DiscountCoupon *DiscountCouponUsageRule `json:"discount_coupon,omitempty"`
306}
307
308type ProgressiveBundleUsageInfo struct {
309 Count *int64 `json:"count,omitempty"`
310 IntervalDays *int64 `json:"interval_days,omitempty"`
311}
312
313type ProductCouponDisplayInfo struct {
314 Name *string `json:"name,omitempty"`
315 ImageUrl *string `json:"image_url,omitempty"`
316 BackgroundUrl *string `json:"background_url,omitempty"`
317 DetailImageUrlList []string `json:"detail_image_url_list,omitempty"`
318 OriginalPrice *int64 `json:"original_price,omitempty"`
319 ComboPackageList []ComboPackage `json:"combo_package_list,omitempty"`
320}
321
322type ProductCouponState string
323
324func (e ProductCouponState) Ptr() *ProductCouponState {
325 return &e
326}
327
328const (
329 PRODUCTCOUPONSTATE_AUDITING ProductCouponState = "AUDITING"
330 PRODUCTCOUPONSTATE_EFFECTIVE ProductCouponState = "EFFECTIVE"
331 PRODUCTCOUPONSTATE_DEACTIVATED ProductCouponState = "DEACTIVATED"
332)
333
334type CouponCodeMode string
335
336func (e CouponCodeMode) Ptr() *CouponCodeMode {
337 return &e
338}
339
340const (
341 COUPONCODEMODE_WECHATPAY CouponCodeMode = "WECHATPAY"
342 COUPONCODEMODE_UPLOAD CouponCodeMode = "UPLOAD"
343 COUPONCODEMODE_API_ASSIGN CouponCodeMode = "API_ASSIGN"
344)
345
346type CouponCodeCountInfo struct {
347 TotalCount *int64 `json:"total_count,omitempty"`
348 AvailableCount *int64 `json:"available_count,omitempty"`
349}
350
351type StockSendRule struct {
352 MaxCount *int64 `json:"max_count,omitempty"`
353 MaxCountPerDay *int64 `json:"max_count_per_day,omitempty"`
354 MaxCountPerUser *int64 `json:"max_count_per_user,omitempty"`
355}
356
357type SingleUsageRule struct {
358 CouponAvailablePeriod *CouponAvailablePeriod `json:"coupon_available_period,omitempty"`
359 NormalCoupon *NormalCouponUsageRule `json:"normal_coupon,omitempty"`
360 DiscountCoupon *DiscountCouponUsageRule `json:"discount_coupon,omitempty"`
361 ExchangeCoupon *ExchangeCouponUsageRule `json:"exchange_coupon,omitempty"`
362}
363
364type StockUsageRule struct {
365 CouponAvailablePeriod *CouponAvailablePeriod `json:"coupon_available_period,omitempty"`
366 NormalCoupon *NormalCouponUsageRule `json:"normal_coupon,omitempty"`
367 DiscountCoupon *DiscountCouponUsageRule `json:"discount_coupon,omitempty"`
368 ExchangeCoupon *ExchangeCouponUsageRule `json:"exchange_coupon,omitempty"`
369}
370
371type StockBundleInfo struct {
372 StockBundleId *string `json:"stock_bundle_id,omitempty"`
373 StockBundleIndex *int64 `json:"stock_bundle_index,omitempty"`
374}
375
376type UsageRuleDisplayInfo struct {
377 CouponUsageMethodList []CouponUsageMethod `json:"coupon_usage_method_list,omitempty"`
378 MiniProgramAppid *string `json:"mini_program_appid,omitempty"`
379 MiniProgramPath *string `json:"mini_program_path,omitempty"`
380 AppPath *string `json:"app_path,omitempty"`
381 UsageDescription *string `json:"usage_description,omitempty"`
382 CouponAvailableStoreInfo *CouponAvailableStoreInfo `json:"coupon_available_store_info,omitempty"`
383}
384
385type CouponDisplayInfo struct {
386 CodeDisplayMode *CouponCodeDisplayMode `json:"code_display_mode,omitempty"`
387 BackgroundColor *string `json:"background_color,omitempty"`
388 EntranceMiniProgram *EntranceMiniProgram `json:"entrance_mini_program,omitempty"`
389 EntranceOfficialAccount *EntranceOfficialAccount `json:"entrance_official_account,omitempty"`
390 EntranceFinder *EntranceFinder `json:"entrance_finder,omitempty"`
391}
392
393type NotifyConfig struct {
394 NotifyAppid *string `json:"notify_appid,omitempty"`
395}
396
397type StockStoreScope string
398
399func (e StockStoreScope) Ptr() *StockStoreScope {
400 return &e
401}
402
403const (
404 STOCKSTORESCOPE_NONE StockStoreScope = "NONE"
405 STOCKSTORESCOPE_ALL StockStoreScope = "ALL"
406 STOCKSTORESCOPE_SPECIFIC StockStoreScope = "SPECIFIC"
407)
408
409type StockSentCountInfo struct {
410 TotalCount *int64 `json:"total_count,omitempty"`
411 TodayCount *int64 `json:"today_count,omitempty"`
412}
413
414type StockState string
415
416func (e StockState) Ptr() *StockState {
417 return &e
418}
419
420const (
421 STOCKSTATE_AUDITING StockState = "AUDITING"
422 STOCKSTATE_SENDING StockState = "SENDING"
423 STOCKSTATE_PAUSED StockState = "PAUSED"
424 STOCKSTATE_STOPPED StockState = "STOPPED"
425 STOCKSTATE_DEACTIVATED StockState = "DEACTIVATED"
426)
427
428type UserProductCouponTag string
429
430func (e UserProductCouponTag) Ptr() *UserProductCouponTag {
431 return &e
432}
433
434const (
435 USERPRODUCTCOUPONTAG_MEMBER UserProductCouponTag = "MEMBER"
436)
437
438type MemberTagInfo struct {
439 MemberCardId *string `json:"member_card_id,omitempty"`
440}
441
442type NormalCouponUsageRule struct {
443 Threshold *int64 `json:"threshold,omitempty"`
444 DiscountAmount *int64 `json:"discount_amount,omitempty"`
445}
446
447type DiscountCouponUsageRule struct {
448 Threshold *int64 `json:"threshold,omitempty"`
449 PercentOff *int64 `json:"percent_off,omitempty"`
450}
451
452type ComboPackage struct {
453 Name *string `json:"name,omitempty"`
454 PickCount *int64 `json:"pick_count,omitempty"`
455 ChoiceList []ComboPackageChoice `json:"choice_list,omitempty"`
456}
457
458type CouponAvailablePeriod struct {
459 AvailableBeginTime *string `json:"available_begin_time,omitempty"`
460 AvailableEndTime *string `json:"available_end_time,omitempty"`
461 AvailableDays *int64 `json:"available_days,omitempty"`
462 WaitDaysAfterReceive *int64 `json:"wait_days_after_receive,omitempty"`
463 WeeklyAvailablePeriod *FixedWeekPeriod `json:"weekly_available_period,omitempty"`
464 IrregularAvailablePeriodList []TimePeriod `json:"irregular_available_period_list,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 CouponCodeDisplayMode string
492
493func (e CouponCodeDisplayMode) Ptr() *CouponCodeDisplayMode {
494 return &e
495}
496
497const (
498 COUPONCODEDISPLAYMODE_INVISIBLE CouponCodeDisplayMode = "INVISIBLE"
499 COUPONCODEDISPLAYMODE_BARCODE CouponCodeDisplayMode = "BARCODE"
500 COUPONCODEDISPLAYMODE_QRCODE CouponCodeDisplayMode = "QRCODE"
501)
502
503type EntranceMiniProgram struct {
504 Appid *string `json:"appid,omitempty"`
505 Path *string `json:"path,omitempty"`
506 EntranceWording *string `json:"entrance_wording,omitempty"`
507 GuidanceWording *string `json:"guidance_wording,omitempty"`
508}
509
510type EntranceOfficialAccount struct {
511 Appid *string `json:"appid,omitempty"`
512}
513
514type EntranceFinder struct {
515 FinderId *string `json:"finder_id,omitempty"`
516 FinderVideoId *string `json:"finder_video_id,omitempty"`
517 FinderVideoCoverImageUrl *string `json:"finder_video_cover_image_url,omitempty"`
518}
519
520type ComboPackageChoice struct {
521 Name *string `json:"name,omitempty"`
522 Price *int64 `json:"price,omitempty"`
523 Count *int64 `json:"count,omitempty"`
524 ImageUrl *string `json:"image_url,omitempty"`
525 MiniProgramAppid *string `json:"mini_program_appid,omitempty"`
526 MiniProgramPath *string `json:"mini_program_path,omitempty"`
527}
528
529type FixedWeekPeriod struct {
530 DayList []WeekEnum `json:"day_list,omitempty"`
531 DayPeriodList []PeriodOfTheDay `json:"day_period_list,omitempty"`
532}
533
534type TimePeriod struct {
535 BeginTime *string `json:"begin_time,omitempty"`
536 EndTime *string `json:"end_time,omitempty"`
537}
538
539type WeekEnum string
540
541func (e WeekEnum) Ptr() *WeekEnum {
542 return &e
543}
544
545const (
546 WEEKENUM_MONDAY WeekEnum = "MONDAY"
547 WEEKENUM_TUESDAY WeekEnum = "TUESDAY"
548 WEEKENUM_WEDNESDAY WeekEnum = "WEDNESDAY"
549 WEEKENUM_THURSDAY WeekEnum = "THURSDAY"
550 WEEKENUM_FRIDAY WeekEnum = "FRIDAY"
551 WEEKENUM_SATURDAY WeekEnum = "SATURDAY"
552 WEEKENUM_SUNDAY WeekEnum = "SUNDAY"
553)
554
555type PeriodOfTheDay struct {
556 BeginTime *int64 `json:"begin_time,omitempty"`
557 EndTime *int64 `json:"end_time,omitempty"`
558}
559