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