12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771 |
- // Copyright 2021 Tencent Inc. All rights reserved.
- //
- // 支付有礼活动对外API
- //
- // No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
- //
- // API version: 0.1.2
- // Code generated by WechatPay APIv3 Generator based on [OpenAPI Generator](https://openapi-generator.tech); DO NOT EDIT.
- package giftactivity
- import (
- "encoding/json"
- "fmt"
- )
- // ActAdvancedSetting
- type ActAdvancedSetting struct {
- // DELIVERY_ALL_PERSON:所有用户;DELIVERY_MEMBER_PERSON:会员用户
- DeliveryUserCategory *DeliveryUserCategory `json:"delivery_user_category,omitempty"`
- // 当投放用户类别为会员用户时必填
- MerchantMemberAppid *string `json:"merchant_member_appid,omitempty"`
- // 主要用于指定可用的支付场景,不限制支付模式不填,限制选填(商家券暂不开放)
- PaymentMode *PaymentMode `json:"payment_mode,omitempty"`
- // 支付方式信息,不填为不限制(商家券暂不开放)
- PaymentMethodInformation *PaymentMethodInfo `json:"payment_method_information,omitempty"`
- // 商户下单时需要传入相同的标记(goods_tag),用户同时符合其他规则才能享受优惠
- GoodsTags []string `json:"goods_tags,omitempty"`
- }
- func (o ActAdvancedSetting) MarshalJSON() ([]byte, error) {
- toSerialize := map[string]interface{}{}
- if o.DeliveryUserCategory != nil {
- toSerialize["delivery_user_category"] = o.DeliveryUserCategory
- }
- if o.MerchantMemberAppid != nil {
- toSerialize["merchant_member_appid"] = o.MerchantMemberAppid
- }
- if o.PaymentMode != nil {
- toSerialize["payment_mode"] = o.PaymentMode
- }
- if o.PaymentMethodInformation != nil {
- toSerialize["payment_method_information"] = o.PaymentMethodInformation
- }
- if o.GoodsTags != nil {
- toSerialize["goods_tags"] = o.GoodsTags
- }
- return json.Marshal(toSerialize)
- }
- func (o ActAdvancedSetting) String() string {
- var ret string
- if o.DeliveryUserCategory == nil {
- ret += "DeliveryUserCategory:<nil>, "
- } else {
- ret += fmt.Sprintf("DeliveryUserCategory:%v, ", *o.DeliveryUserCategory)
- }
- if o.MerchantMemberAppid == nil {
- ret += "MerchantMemberAppid:<nil>, "
- } else {
- ret += fmt.Sprintf("MerchantMemberAppid:%v, ", *o.MerchantMemberAppid)
- }
- ret += fmt.Sprintf("PaymentMode:%v, ", o.PaymentMode)
- ret += fmt.Sprintf("PaymentMethodInformation:%v, ", o.PaymentMethodInformation)
- ret += fmt.Sprintf("GoodsTags:%v", o.GoodsTags)
- return fmt.Sprintf("ActAdvancedSetting{%s}", ret)
- }
- func (o ActAdvancedSetting) Clone() *ActAdvancedSetting {
- ret := ActAdvancedSetting{}
- if o.DeliveryUserCategory != nil {
- ret.DeliveryUserCategory = new(DeliveryUserCategory)
- *ret.DeliveryUserCategory = *o.DeliveryUserCategory
- }
- if o.MerchantMemberAppid != nil {
- ret.MerchantMemberAppid = new(string)
- *ret.MerchantMemberAppid = *o.MerchantMemberAppid
- }
- if o.PaymentMode != nil {
- ret.PaymentMode = o.PaymentMode.Clone()
- }
- if o.PaymentMethodInformation != nil {
- ret.PaymentMethodInformation = o.PaymentMethodInformation.Clone()
- }
- if o.GoodsTags != nil {
- ret.GoodsTags = make([]string, len(o.GoodsTags))
- for i, item := range o.GoodsTags {
- ret.GoodsTags[i] = item
- }
- }
- return &ret
- }
- // ActBaseInfo
- type ActBaseInfo struct {
- // 活动名称
- ActivityName *string `json:"activity_name"`
- // 活动副标题
- ActivitySecondTitle *string `json:"activity_second_title"`
- // 商户logo,送出优惠券时展示
- MerchantLogoUrl *string `json:"merchant_logo_url"`
- // 代金券的背景颜色,可设置10种颜色,颜色取值可参考[开发指引](../../../products/gift-activity/development.html) 3.2.1 background_color取值,默认为微信支付绿色, 颜色取值为颜色图中的颜色名称。
- BackgroundColor *string `json:"background_color,omitempty"`
- // 活动开始时间,最长可以配置1年内的活动,活动有效期最长90天
- BeginTime *string `json:"begin_time"`
- // 活动结束时间,最长可以配置1年内的活动,活动有效期最长90天
- EndTime *string `json:"end_time"`
- // 可自定义活动有效时间内可用的多个时间段以及天内时间点
- AvailablePeriods *AvailablePeriod `json:"available_periods,omitempty"`
- // 商户创建批次凭据号(格式:商户id+日期+流水号),商户侧需保持唯一性,可包含英文字母,数字,|,_,*,-等内容,不允许出现其他不合法符号
- OutRequestNo *string `json:"out_request_no"`
- // OFF_LINE_PAY:拉用户回店消费;JUMP_MINI_APP:引导用户前往小程序消费
- DeliveryPurpose *DeliveryPurposeCategory `json:"delivery_purpose"`
- // 投放目的为跳转小程序时必填
- MiniProgramsAppid *string `json:"mini_programs_appid,omitempty"`
- // 投放目的为跳转小程序必填
- MiniProgramsPath *string `json:"mini_programs_path,omitempty"`
- }
- func (o ActBaseInfo) MarshalJSON() ([]byte, error) {
- toSerialize := map[string]interface{}{}
- if o.ActivityName == nil {
- return nil, fmt.Errorf("field `ActivityName` is required and must be specified in ActBaseInfo")
- }
- toSerialize["activity_name"] = o.ActivityName
- if o.ActivitySecondTitle == nil {
- return nil, fmt.Errorf("field `ActivitySecondTitle` is required and must be specified in ActBaseInfo")
- }
- toSerialize["activity_second_title"] = o.ActivitySecondTitle
- if o.MerchantLogoUrl == nil {
- return nil, fmt.Errorf("field `MerchantLogoUrl` is required and must be specified in ActBaseInfo")
- }
- toSerialize["merchant_logo_url"] = o.MerchantLogoUrl
- if o.BackgroundColor != nil {
- toSerialize["background_color"] = o.BackgroundColor
- }
- if o.BeginTime == nil {
- return nil, fmt.Errorf("field `BeginTime` is required and must be specified in ActBaseInfo")
- }
- toSerialize["begin_time"] = o.BeginTime
- if o.EndTime == nil {
- return nil, fmt.Errorf("field `EndTime` is required and must be specified in ActBaseInfo")
- }
- toSerialize["end_time"] = o.EndTime
- if o.AvailablePeriods != nil {
- toSerialize["available_periods"] = o.AvailablePeriods
- }
- if o.OutRequestNo == nil {
- return nil, fmt.Errorf("field `OutRequestNo` is required and must be specified in ActBaseInfo")
- }
- toSerialize["out_request_no"] = o.OutRequestNo
- if o.DeliveryPurpose == nil {
- return nil, fmt.Errorf("field `DeliveryPurpose` is required and must be specified in ActBaseInfo")
- }
- toSerialize["delivery_purpose"] = o.DeliveryPurpose
- if o.MiniProgramsAppid != nil {
- toSerialize["mini_programs_appid"] = o.MiniProgramsAppid
- }
- if o.MiniProgramsPath != nil {
- toSerialize["mini_programs_path"] = o.MiniProgramsPath
- }
- return json.Marshal(toSerialize)
- }
- func (o ActBaseInfo) String() string {
- var ret string
- if o.ActivityName == nil {
- ret += "ActivityName:<nil>, "
- } else {
- ret += fmt.Sprintf("ActivityName:%v, ", *o.ActivityName)
- }
- if o.ActivitySecondTitle == nil {
- ret += "ActivitySecondTitle:<nil>, "
- } else {
- ret += fmt.Sprintf("ActivitySecondTitle:%v, ", *o.ActivitySecondTitle)
- }
- if o.MerchantLogoUrl == nil {
- ret += "MerchantLogoUrl:<nil>, "
- } else {
- ret += fmt.Sprintf("MerchantLogoUrl:%v, ", *o.MerchantLogoUrl)
- }
- if o.BackgroundColor == nil {
- ret += "BackgroundColor:<nil>, "
- } else {
- ret += fmt.Sprintf("BackgroundColor:%v, ", *o.BackgroundColor)
- }
- if o.BeginTime == nil {
- ret += "BeginTime:<nil>, "
- } else {
- ret += fmt.Sprintf("BeginTime:%v, ", *o.BeginTime)
- }
- if o.EndTime == nil {
- ret += "EndTime:<nil>, "
- } else {
- ret += fmt.Sprintf("EndTime:%v, ", *o.EndTime)
- }
- ret += fmt.Sprintf("AvailablePeriods:%v, ", o.AvailablePeriods)
- if o.OutRequestNo == nil {
- ret += "OutRequestNo:<nil>, "
- } else {
- ret += fmt.Sprintf("OutRequestNo:%v, ", *o.OutRequestNo)
- }
- if o.DeliveryPurpose == nil {
- ret += "DeliveryPurpose:<nil>, "
- } else {
- ret += fmt.Sprintf("DeliveryPurpose:%v, ", *o.DeliveryPurpose)
- }
- if o.MiniProgramsAppid == nil {
- ret += "MiniProgramsAppid:<nil>, "
- } else {
- ret += fmt.Sprintf("MiniProgramsAppid:%v, ", *o.MiniProgramsAppid)
- }
- if o.MiniProgramsPath == nil {
- ret += "MiniProgramsPath:<nil>"
- } else {
- ret += fmt.Sprintf("MiniProgramsPath:%v", *o.MiniProgramsPath)
- }
- return fmt.Sprintf("ActBaseInfo{%s}", ret)
- }
- func (o ActBaseInfo) Clone() *ActBaseInfo {
- ret := ActBaseInfo{}
- if o.ActivityName != nil {
- ret.ActivityName = new(string)
- *ret.ActivityName = *o.ActivityName
- }
- if o.ActivitySecondTitle != nil {
- ret.ActivitySecondTitle = new(string)
- *ret.ActivitySecondTitle = *o.ActivitySecondTitle
- }
- if o.MerchantLogoUrl != nil {
- ret.MerchantLogoUrl = new(string)
- *ret.MerchantLogoUrl = *o.MerchantLogoUrl
- }
- if o.BackgroundColor != nil {
- ret.BackgroundColor = new(string)
- *ret.BackgroundColor = *o.BackgroundColor
- }
- if o.BeginTime != nil {
- ret.BeginTime = new(string)
- *ret.BeginTime = *o.BeginTime
- }
- if o.EndTime != nil {
- ret.EndTime = new(string)
- *ret.EndTime = *o.EndTime
- }
- if o.AvailablePeriods != nil {
- ret.AvailablePeriods = o.AvailablePeriods.Clone()
- }
- if o.OutRequestNo != nil {
- ret.OutRequestNo = new(string)
- *ret.OutRequestNo = *o.OutRequestNo
- }
- if o.DeliveryPurpose != nil {
- ret.DeliveryPurpose = new(DeliveryPurposeCategory)
- *ret.DeliveryPurpose = *o.DeliveryPurpose
- }
- if o.MiniProgramsAppid != nil {
- ret.MiniProgramsAppid = new(string)
- *ret.MiniProgramsAppid = *o.MiniProgramsAppid
- }
- if o.MiniProgramsPath != nil {
- ret.MiniProgramsPath = new(string)
- *ret.MiniProgramsPath = *o.MiniProgramsPath
- }
- return &ret
- }
- // ActParticipateMchInfo
- type ActParticipateMchInfo struct {
- // 商户Id
- Mchid *string `json:"mchid"`
- // 商户名称
- MerchantName *string `json:"merchant_name,omitempty"`
- // 创建时间
- CreateTime *string `json:"create_time,omitempty"`
- // 更新时间
- UpdateTime *string `json:"update_time,omitempty"`
- }
- func (o ActParticipateMchInfo) MarshalJSON() ([]byte, error) {
- toSerialize := map[string]interface{}{}
- if o.Mchid == nil {
- return nil, fmt.Errorf("field `Mchid` is required and must be specified in ActParticipateMchInfo")
- }
- toSerialize["mchid"] = o.Mchid
- if o.MerchantName != nil {
- toSerialize["merchant_name"] = o.MerchantName
- }
- if o.CreateTime != nil {
- toSerialize["create_time"] = o.CreateTime
- }
- if o.UpdateTime != nil {
- toSerialize["update_time"] = o.UpdateTime
- }
- return json.Marshal(toSerialize)
- }
- func (o ActParticipateMchInfo) String() string {
- var ret string
- if o.Mchid == nil {
- ret += "Mchid:<nil>, "
- } else {
- ret += fmt.Sprintf("Mchid:%v, ", *o.Mchid)
- }
- if o.MerchantName == nil {
- ret += "MerchantName:<nil>, "
- } else {
- ret += fmt.Sprintf("MerchantName:%v, ", *o.MerchantName)
- }
- if o.CreateTime == nil {
- ret += "CreateTime:<nil>, "
- } else {
- ret += fmt.Sprintf("CreateTime:%v, ", *o.CreateTime)
- }
- if o.UpdateTime == nil {
- ret += "UpdateTime:<nil>"
- } else {
- ret += fmt.Sprintf("UpdateTime:%v", *o.UpdateTime)
- }
- return fmt.Sprintf("ActParticipateMchInfo{%s}", ret)
- }
- func (o ActParticipateMchInfo) Clone() *ActParticipateMchInfo {
- ret := ActParticipateMchInfo{}
- if o.Mchid != nil {
- ret.Mchid = new(string)
- *ret.Mchid = *o.Mchid
- }
- if o.MerchantName != nil {
- ret.MerchantName = new(string)
- *ret.MerchantName = *o.MerchantName
- }
- if o.CreateTime != nil {
- ret.CreateTime = new(string)
- *ret.CreateTime = *o.CreateTime
- }
- if o.UpdateTime != nil {
- ret.UpdateTime = new(string)
- *ret.UpdateTime = *o.UpdateTime
- }
- return &ret
- }
- // ActStatus
- type ActStatus string
- func (e ActStatus) Ptr() *ActStatus {
- return &e
- }
- // Enums of ActStatus
- const (
- ACTSTATUS_ACT_STATUS_UNKNOWN ActStatus = "ACT_STATUS_UNKNOWN"
- ACTSTATUS_CREATE_ACT_STATUS ActStatus = "CREATE_ACT_STATUS"
- ACTSTATUS_ONGOING_ACT_STATUS ActStatus = "ONGOING_ACT_STATUS"
- ACTSTATUS_TERMINATE_ACT_STATUS ActStatus = "TERMINATE_ACT_STATUS"
- ACTSTATUS_STOP_ACT_STATUS ActStatus = "STOP_ACT_STATUS"
- ACTSTATUS_OVER_TIME_ACT_STATUS ActStatus = "OVER_TIME_ACT_STATUS"
- ACTSTATUS_CREATE_ACT_FAILED ActStatus = "CREATE_ACT_FAILED"
- )
- // ActType 活动类型
- type ActType string
- func (e ActType) Ptr() *ActType {
- return &e
- }
- // Enums of ActType
- const (
- ACTTYPE_FULL_SEND_ACT_TYPE ActType = "FULL_SEND_ACT_TYPE"
- ACTTYPE_STEP_SEND_ACT_TYPE ActType = "STEP_SEND_ACT_TYPE"
- ACTTYPE_SPECIFIC_SEND_ACT_TYPE ActType = "SPECIFIC_SEND_ACT_TYPE"
- )
- // ActivityInformation
- type ActivityInformation struct {
- // 活动Id
- ActivityId *string `json:"activity_id,omitempty"`
- // 活动类型
- ActivityType *ActType `json:"activity_type,omitempty"`
- // 创建活动时录入的基本信息
- ActivityBaseInfo *ActBaseInfo `json:"activity_base_info,omitempty"`
- // 奖品派送规则,分别对应满送、阶梯送、满A送B中的一种
- AwardSendRule *AwardSendRule `json:"award_send_rule,omitempty"`
- // 创建时传入的高级设置信息
- AdvancedSetting *ActAdvancedSetting `json:"advanced_setting,omitempty"`
- // 活动当前状态枚举值
- ActivityStatus *ActStatus `json:"activity_status,omitempty"`
- // 创建商户号
- CreatorMerchantId *string `json:"creator_merchant_id,omitempty"`
- // 所属商户号
- BelongMerchantId *string `json:"belong_merchant_id,omitempty"`
- // 活动创建时间
- CreateTime *string `json:"create_time,omitempty"`
- // 活动更新时间
- UpdateTime *string `json:"update_time,omitempty"`
- }
- func (o ActivityInformation) MarshalJSON() ([]byte, error) {
- toSerialize := map[string]interface{}{}
- if o.ActivityId != nil {
- toSerialize["activity_id"] = o.ActivityId
- }
- if o.ActivityType != nil {
- toSerialize["activity_type"] = o.ActivityType
- }
- if o.ActivityBaseInfo != nil {
- toSerialize["activity_base_info"] = o.ActivityBaseInfo
- }
- if o.AwardSendRule != nil {
- toSerialize["award_send_rule"] = o.AwardSendRule
- }
- if o.AdvancedSetting != nil {
- toSerialize["advanced_setting"] = o.AdvancedSetting
- }
- if o.ActivityStatus != nil {
- toSerialize["activity_status"] = o.ActivityStatus
- }
- if o.CreatorMerchantId != nil {
- toSerialize["creator_merchant_id"] = o.CreatorMerchantId
- }
- if o.BelongMerchantId != nil {
- toSerialize["belong_merchant_id"] = o.BelongMerchantId
- }
- if o.CreateTime != nil {
- toSerialize["create_time"] = o.CreateTime
- }
- if o.UpdateTime != nil {
- toSerialize["update_time"] = o.UpdateTime
- }
- return json.Marshal(toSerialize)
- }
- func (o ActivityInformation) String() string {
- var ret string
- if o.ActivityId == nil {
- ret += "ActivityId:<nil>, "
- } else {
- ret += fmt.Sprintf("ActivityId:%v, ", *o.ActivityId)
- }
- if o.ActivityType == nil {
- ret += "ActivityType:<nil>, "
- } else {
- ret += fmt.Sprintf("ActivityType:%v, ", *o.ActivityType)
- }
- ret += fmt.Sprintf("ActivityBaseInfo:%v, ", o.ActivityBaseInfo)
- ret += fmt.Sprintf("AwardSendRule:%v, ", o.AwardSendRule)
- ret += fmt.Sprintf("AdvancedSetting:%v, ", o.AdvancedSetting)
- if o.ActivityStatus == nil {
- ret += "ActivityStatus:<nil>, "
- } else {
- ret += fmt.Sprintf("ActivityStatus:%v, ", *o.ActivityStatus)
- }
- if o.CreatorMerchantId == nil {
- ret += "CreatorMerchantId:<nil>, "
- } else {
- ret += fmt.Sprintf("CreatorMerchantId:%v, ", *o.CreatorMerchantId)
- }
- if o.BelongMerchantId == nil {
- ret += "BelongMerchantId:<nil>, "
- } else {
- ret += fmt.Sprintf("BelongMerchantId:%v, ", *o.BelongMerchantId)
- }
- if o.CreateTime == nil {
- ret += "CreateTime:<nil>, "
- } else {
- ret += fmt.Sprintf("CreateTime:%v, ", *o.CreateTime)
- }
- if o.UpdateTime == nil {
- ret += "UpdateTime:<nil>"
- } else {
- ret += fmt.Sprintf("UpdateTime:%v", *o.UpdateTime)
- }
- return fmt.Sprintf("ActivityInformation{%s}", ret)
- }
- func (o ActivityInformation) Clone() *ActivityInformation {
- ret := ActivityInformation{}
- if o.ActivityId != nil {
- ret.ActivityId = new(string)
- *ret.ActivityId = *o.ActivityId
- }
- if o.ActivityType != nil {
- ret.ActivityType = new(ActType)
- *ret.ActivityType = *o.ActivityType
- }
- if o.ActivityBaseInfo != nil {
- ret.ActivityBaseInfo = o.ActivityBaseInfo.Clone()
- }
- if o.AwardSendRule != nil {
- ret.AwardSendRule = o.AwardSendRule.Clone()
- }
- if o.AdvancedSetting != nil {
- ret.AdvancedSetting = o.AdvancedSetting.Clone()
- }
- if o.ActivityStatus != nil {
- ret.ActivityStatus = new(ActStatus)
- *ret.ActivityStatus = *o.ActivityStatus
- }
- if o.CreatorMerchantId != nil {
- ret.CreatorMerchantId = new(string)
- *ret.CreatorMerchantId = *o.CreatorMerchantId
- }
- if o.BelongMerchantId != nil {
- ret.BelongMerchantId = new(string)
- *ret.BelongMerchantId = *o.BelongMerchantId
- }
- if o.CreateTime != nil {
- ret.CreateTime = new(string)
- *ret.CreateTime = *o.CreateTime
- }
- if o.UpdateTime != nil {
- ret.UpdateTime = new(string)
- *ret.UpdateTime = *o.UpdateTime
- }
- return &ret
- }
- // AddActivityMerchantBody
- type AddActivityMerchantBody struct {
- // 新增到活动中的发券商户号列表
- MerchantIdList []string `json:"merchant_id_list"`
- // 商户添加发券商户号的凭据号,商户侧需保持唯一性
- AddRequestNo *string `json:"add_request_no"`
- }
- func (o AddActivityMerchantBody) MarshalJSON() ([]byte, error) {
- toSerialize := map[string]interface{}{}
- if o.MerchantIdList == nil {
- return nil, fmt.Errorf("field `MerchantIdList` is required and must be specified in AddActivityMerchantBody")
- }
- toSerialize["merchant_id_list"] = o.MerchantIdList
- if o.AddRequestNo == nil {
- return nil, fmt.Errorf("field `AddRequestNo` is required and must be specified in AddActivityMerchantBody")
- }
- toSerialize["add_request_no"] = o.AddRequestNo
- return json.Marshal(toSerialize)
- }
- func (o AddActivityMerchantBody) String() string {
- var ret string
- ret += fmt.Sprintf("MerchantIdList:%v, ", o.MerchantIdList)
- if o.AddRequestNo == nil {
- ret += "AddRequestNo:<nil>"
- } else {
- ret += fmt.Sprintf("AddRequestNo:%v", *o.AddRequestNo)
- }
- return fmt.Sprintf("AddActivityMerchantBody{%s}", ret)
- }
- func (o AddActivityMerchantBody) Clone() *AddActivityMerchantBody {
- ret := AddActivityMerchantBody{}
- if o.MerchantIdList != nil {
- ret.MerchantIdList = make([]string, len(o.MerchantIdList))
- for i, item := range o.MerchantIdList {
- ret.MerchantIdList[i] = item
- }
- }
- if o.AddRequestNo != nil {
- ret.AddRequestNo = new(string)
- *ret.AddRequestNo = *o.AddRequestNo
- }
- return &ret
- }
- // AddActivityMerchantRequest
- type AddActivityMerchantRequest struct {
- // 活动Id
- ActivityId *string `json:"activity_id"`
- // 新增到活动中的发券商户号列表
- MerchantIdList []string `json:"merchant_id_list"`
- // 商户添加发券商户号的凭据号,商户侧需保持唯一性
- AddRequestNo *string `json:"add_request_no"`
- }
- func (o AddActivityMerchantRequest) MarshalJSON() ([]byte, error) {
- toSerialize := map[string]interface{}{}
- if o.ActivityId == nil {
- return nil, fmt.Errorf("field `ActivityId` is required and must be specified in AddActivityMerchantRequest")
- }
- toSerialize["activity_id"] = o.ActivityId
- if o.MerchantIdList == nil {
- return nil, fmt.Errorf("field `MerchantIdList` is required and must be specified in AddActivityMerchantRequest")
- }
- toSerialize["merchant_id_list"] = o.MerchantIdList
- if o.AddRequestNo == nil {
- return nil, fmt.Errorf("field `AddRequestNo` is required and must be specified in AddActivityMerchantRequest")
- }
- toSerialize["add_request_no"] = o.AddRequestNo
- return json.Marshal(toSerialize)
- }
- func (o AddActivityMerchantRequest) String() string {
- var ret string
- if o.ActivityId == nil {
- ret += "ActivityId:<nil>, "
- } else {
- ret += fmt.Sprintf("ActivityId:%v, ", *o.ActivityId)
- }
- ret += fmt.Sprintf("MerchantIdList:%v, ", o.MerchantIdList)
- if o.AddRequestNo == nil {
- ret += "AddRequestNo:<nil>"
- } else {
- ret += fmt.Sprintf("AddRequestNo:%v", *o.AddRequestNo)
- }
- return fmt.Sprintf("AddActivityMerchantRequest{%s}", ret)
- }
- func (o AddActivityMerchantRequest) Clone() *AddActivityMerchantRequest {
- ret := AddActivityMerchantRequest{}
- if o.ActivityId != nil {
- ret.ActivityId = new(string)
- *ret.ActivityId = *o.ActivityId
- }
- if o.MerchantIdList != nil {
- ret.MerchantIdList = make([]string, len(o.MerchantIdList))
- for i, item := range o.MerchantIdList {
- ret.MerchantIdList[i] = item
- }
- }
- if o.AddRequestNo != nil {
- ret.AddRequestNo = new(string)
- *ret.AddRequestNo = *o.AddRequestNo
- }
- return &ret
- }
- // AddActivityMerchantResponse
- type AddActivityMerchantResponse struct {
- // 活动Id
- ActivityId *string `json:"activity_id,omitempty"`
- // 未通过规则校验的发券商户号列表
- InvalidMerchantIdList []InvalidParticipateMerchant `json:"invalid_merchant_id_list,omitempty"`
- // 成功添加发券商户号的时间
- AddTime *string `json:"add_time,omitempty"`
- }
- func (o AddActivityMerchantResponse) MarshalJSON() ([]byte, error) {
- toSerialize := map[string]interface{}{}
- if o.ActivityId != nil {
- toSerialize["activity_id"] = o.ActivityId
- }
- if o.InvalidMerchantIdList != nil {
- toSerialize["invalid_merchant_id_list"] = o.InvalidMerchantIdList
- }
- if o.AddTime != nil {
- toSerialize["add_time"] = o.AddTime
- }
- return json.Marshal(toSerialize)
- }
- func (o AddActivityMerchantResponse) String() string {
- var ret string
- if o.ActivityId == nil {
- ret += "ActivityId:<nil>, "
- } else {
- ret += fmt.Sprintf("ActivityId:%v, ", *o.ActivityId)
- }
- ret += fmt.Sprintf("InvalidMerchantIdList:%v, ", o.InvalidMerchantIdList)
- if o.AddTime == nil {
- ret += "AddTime:<nil>"
- } else {
- ret += fmt.Sprintf("AddTime:%v", *o.AddTime)
- }
- return fmt.Sprintf("AddActivityMerchantResponse{%s}", ret)
- }
- func (o AddActivityMerchantResponse) Clone() *AddActivityMerchantResponse {
- ret := AddActivityMerchantResponse{}
- if o.ActivityId != nil {
- ret.ActivityId = new(string)
- *ret.ActivityId = *o.ActivityId
- }
- if o.InvalidMerchantIdList != nil {
- ret.InvalidMerchantIdList = make([]InvalidParticipateMerchant, len(o.InvalidMerchantIdList))
- for i, item := range o.InvalidMerchantIdList {
- ret.InvalidMerchantIdList[i] = *item.Clone()
- }
- }
- if o.AddTime != nil {
- ret.AddTime = new(string)
- *ret.AddTime = *o.AddTime
- }
- return &ret
- }
- // AvailableDayTime
- type AvailableDayTime struct {
- // 每日可用开始时间(格式:110000,表示11:00:00)
- BeginDayTime *string `json:"begin_day_time"`
- // 每日可用结束时间 (格式:135959,表示13:59:59)
- EndDayTime *string `json:"end_day_time"`
- }
- func (o AvailableDayTime) MarshalJSON() ([]byte, error) {
- toSerialize := map[string]interface{}{}
- if o.BeginDayTime == nil {
- return nil, fmt.Errorf("field `BeginDayTime` is required and must be specified in AvailableDayTime")
- }
- toSerialize["begin_day_time"] = o.BeginDayTime
- if o.EndDayTime == nil {
- return nil, fmt.Errorf("field `EndDayTime` is required and must be specified in AvailableDayTime")
- }
- toSerialize["end_day_time"] = o.EndDayTime
- return json.Marshal(toSerialize)
- }
- func (o AvailableDayTime) String() string {
- var ret string
- if o.BeginDayTime == nil {
- ret += "BeginDayTime:<nil>, "
- } else {
- ret += fmt.Sprintf("BeginDayTime:%v, ", *o.BeginDayTime)
- }
- if o.EndDayTime == nil {
- ret += "EndDayTime:<nil>"
- } else {
- ret += fmt.Sprintf("EndDayTime:%v", *o.EndDayTime)
- }
- return fmt.Sprintf("AvailableDayTime{%s}", ret)
- }
- func (o AvailableDayTime) Clone() *AvailableDayTime {
- ret := AvailableDayTime{}
- if o.BeginDayTime != nil {
- ret.BeginDayTime = new(string)
- *ret.BeginDayTime = *o.BeginDayTime
- }
- if o.EndDayTime != nil {
- ret.EndDayTime = new(string)
- *ret.EndDayTime = *o.EndDayTime
- }
- return &ret
- }
- // AvailablePeriod
- type AvailablePeriod struct {
- // 可用时间
- AvailableTime []AvailableTime `json:"available_time,omitempty"`
- // 每日可用时间
- AvailableDayTime []AvailableDayTime `json:"available_day_time,omitempty"`
- }
- func (o AvailablePeriod) MarshalJSON() ([]byte, error) {
- toSerialize := map[string]interface{}{}
- if o.AvailableTime != nil {
- toSerialize["available_time"] = o.AvailableTime
- }
- if o.AvailableDayTime != nil {
- toSerialize["available_day_time"] = o.AvailableDayTime
- }
- return json.Marshal(toSerialize)
- }
- func (o AvailablePeriod) String() string {
- var ret string
- ret += fmt.Sprintf("AvailableTime:%v, ", o.AvailableTime)
- ret += fmt.Sprintf("AvailableDayTime:%v", o.AvailableDayTime)
- return fmt.Sprintf("AvailablePeriod{%s}", ret)
- }
- func (o AvailablePeriod) Clone() *AvailablePeriod {
- ret := AvailablePeriod{}
- if o.AvailableTime != nil {
- ret.AvailableTime = make([]AvailableTime, len(o.AvailableTime))
- for i, item := range o.AvailableTime {
- ret.AvailableTime[i] = *item.Clone()
- }
- }
- if o.AvailableDayTime != nil {
- ret.AvailableDayTime = make([]AvailableDayTime, len(o.AvailableDayTime))
- for i, item := range o.AvailableDayTime {
- ret.AvailableDayTime[i] = *item.Clone()
- }
- }
- return &ret
- }
- // AvailableTime
- type AvailableTime struct {
- // 可用开始时间
- BeginTime *string `json:"begin_time"`
- // 可用结束时间
- EndTime *string `json:"end_time"`
- }
- func (o AvailableTime) MarshalJSON() ([]byte, error) {
- toSerialize := map[string]interface{}{}
- if o.BeginTime == nil {
- return nil, fmt.Errorf("field `BeginTime` is required and must be specified in AvailableTime")
- }
- toSerialize["begin_time"] = o.BeginTime
- if o.EndTime == nil {
- return nil, fmt.Errorf("field `EndTime` is required and must be specified in AvailableTime")
- }
- toSerialize["end_time"] = o.EndTime
- return json.Marshal(toSerialize)
- }
- func (o AvailableTime) String() string {
- var ret string
- if o.BeginTime == nil {
- ret += "BeginTime:<nil>, "
- } else {
- ret += fmt.Sprintf("BeginTime:%v, ", *o.BeginTime)
- }
- if o.EndTime == nil {
- ret += "EndTime:<nil>"
- } else {
- ret += fmt.Sprintf("EndTime:%v", *o.EndTime)
- }
- return fmt.Sprintf("AvailableTime{%s}", ret)
- }
- func (o AvailableTime) Clone() *AvailableTime {
- ret := AvailableTime{}
- if o.BeginTime != nil {
- ret.BeginTime = new(string)
- *ret.BeginTime = *o.BeginTime
- }
- if o.EndTime != nil {
- ret.EndTime = new(string)
- *ret.EndTime = *o.EndTime
- }
- return &ret
- }
- // AwardBaseInfo
- type AwardBaseInfo struct {
- // 代金券批次Id
- StockId *string `json:"stock_id"`
- // 奖品大图,必填
- OriginalImageUrl *string `json:"original_image_url"`
- // 奖品小图,当选多张券时必填
- ThumbnailUrl *string `json:"thumbnail_url,omitempty"`
- }
- func (o AwardBaseInfo) MarshalJSON() ([]byte, error) {
- toSerialize := map[string]interface{}{}
- if o.StockId == nil {
- return nil, fmt.Errorf("field `StockId` is required and must be specified in AwardBaseInfo")
- }
- toSerialize["stock_id"] = o.StockId
- if o.OriginalImageUrl == nil {
- return nil, fmt.Errorf("field `OriginalImageUrl` is required and must be specified in AwardBaseInfo")
- }
- toSerialize["original_image_url"] = o.OriginalImageUrl
- if o.ThumbnailUrl != nil {
- toSerialize["thumbnail_url"] = o.ThumbnailUrl
- }
- return json.Marshal(toSerialize)
- }
- func (o AwardBaseInfo) String() string {
- var ret string
- if o.StockId == nil {
- ret += "StockId:<nil>, "
- } else {
- ret += fmt.Sprintf("StockId:%v, ", *o.StockId)
- }
- if o.OriginalImageUrl == nil {
- ret += "OriginalImageUrl:<nil>, "
- } else {
- ret += fmt.Sprintf("OriginalImageUrl:%v, ", *o.OriginalImageUrl)
- }
- if o.ThumbnailUrl == nil {
- ret += "ThumbnailUrl:<nil>"
- } else {
- ret += fmt.Sprintf("ThumbnailUrl:%v", *o.ThumbnailUrl)
- }
- return fmt.Sprintf("AwardBaseInfo{%s}", ret)
- }
- func (o AwardBaseInfo) Clone() *AwardBaseInfo {
- ret := AwardBaseInfo{}
- if o.StockId != nil {
- ret.StockId = new(string)
- *ret.StockId = *o.StockId
- }
- if o.OriginalImageUrl != nil {
- ret.OriginalImageUrl = new(string)
- *ret.OriginalImageUrl = *o.OriginalImageUrl
- }
- if o.ThumbnailUrl != nil {
- ret.ThumbnailUrl = new(string)
- *ret.ThumbnailUrl = *o.ThumbnailUrl
- }
- return &ret
- }
- // AwardSendRule
- type AwardSendRule struct {
- //
- FullSendRule *FullSendRule `json:"full_send_rule,omitempty"`
- }
- func (o AwardSendRule) MarshalJSON() ([]byte, error) {
- toSerialize := map[string]interface{}{}
- if o.FullSendRule != nil {
- toSerialize["full_send_rule"] = o.FullSendRule
- }
- return json.Marshal(toSerialize)
- }
- func (o AwardSendRule) String() string {
- var ret string
- ret += fmt.Sprintf("FullSendRule:%v", o.FullSendRule)
- return fmt.Sprintf("AwardSendRule{%s}", ret)
- }
- func (o AwardSendRule) Clone() *AwardSendRule {
- ret := AwardSendRule{}
- if o.FullSendRule != nil {
- ret.FullSendRule = o.FullSendRule.Clone()
- }
- return &ret
- }
- // AwardType
- type AwardType string
- func (e AwardType) Ptr() *AwardType {
- return &e
- }
- // Enums of AwardType
- const (
- AWARDTYPE_BUSIFAVOR AwardType = "BUSIFAVOR"
- )
- // BankCardCategory
- type BankCardCategory string
- func (e BankCardCategory) Ptr() *BankCardCategory {
- return &e
- }
- // Enums of BankCardCategory
- const (
- BANKCARDCATEGORY_DEBIT_CARD BankCardCategory = "DEBIT_CARD"
- BANKCARDCATEGORY_CREDIT_CARD BankCardCategory = "CREDIT_CARD"
- )
- // CreateFullSendActRequest
- type CreateFullSendActRequest struct {
- // 用于创建活动的基本信息
- ActivityBaseInfo *ActBaseInfo `json:"activity_base_info"`
- // 满送活动规则
- AwardSendRule *FullSendRule `json:"award_send_rule"`
- // 其他高级配置项
- AdvancedSetting *ActAdvancedSetting `json:"advanced_setting,omitempty"`
- }
- func (o CreateFullSendActRequest) MarshalJSON() ([]byte, error) {
- toSerialize := map[string]interface{}{}
- if o.ActivityBaseInfo == nil {
- return nil, fmt.Errorf("field `ActivityBaseInfo` is required and must be specified in CreateFullSendActRequest")
- }
- toSerialize["activity_base_info"] = o.ActivityBaseInfo
- if o.AwardSendRule == nil {
- return nil, fmt.Errorf("field `AwardSendRule` is required and must be specified in CreateFullSendActRequest")
- }
- toSerialize["award_send_rule"] = o.AwardSendRule
- if o.AdvancedSetting != nil {
- toSerialize["advanced_setting"] = o.AdvancedSetting
- }
- return json.Marshal(toSerialize)
- }
- func (o CreateFullSendActRequest) String() string {
- var ret string
- ret += fmt.Sprintf("ActivityBaseInfo:%v, ", o.ActivityBaseInfo)
- ret += fmt.Sprintf("AwardSendRule:%v, ", o.AwardSendRule)
- ret += fmt.Sprintf("AdvancedSetting:%v", o.AdvancedSetting)
- return fmt.Sprintf("CreateFullSendActRequest{%s}", ret)
- }
- func (o CreateFullSendActRequest) Clone() *CreateFullSendActRequest {
- ret := CreateFullSendActRequest{}
- if o.ActivityBaseInfo != nil {
- ret.ActivityBaseInfo = o.ActivityBaseInfo.Clone()
- }
- if o.AwardSendRule != nil {
- ret.AwardSendRule = o.AwardSendRule.Clone()
- }
- if o.AdvancedSetting != nil {
- ret.AdvancedSetting = o.AdvancedSetting.Clone()
- }
- return &ret
- }
- // CreateFullSendActResponse
- type CreateFullSendActResponse struct {
- // 活动id
- ActivityId *string `json:"activity_id"`
- // 创建时间
- CreateTime *string `json:"create_time"`
- }
- func (o CreateFullSendActResponse) MarshalJSON() ([]byte, error) {
- toSerialize := map[string]interface{}{}
- if o.ActivityId == nil {
- return nil, fmt.Errorf("field `ActivityId` is required and must be specified in CreateFullSendActResponse")
- }
- toSerialize["activity_id"] = o.ActivityId
- if o.CreateTime == nil {
- return nil, fmt.Errorf("field `CreateTime` is required and must be specified in CreateFullSendActResponse")
- }
- toSerialize["create_time"] = o.CreateTime
- return json.Marshal(toSerialize)
- }
- func (o CreateFullSendActResponse) String() string {
- var ret string
- if o.ActivityId == nil {
- ret += "ActivityId:<nil>, "
- } else {
- ret += fmt.Sprintf("ActivityId:%v, ", *o.ActivityId)
- }
- if o.CreateTime == nil {
- ret += "CreateTime:<nil>"
- } else {
- ret += fmt.Sprintf("CreateTime:%v", *o.CreateTime)
- }
- return fmt.Sprintf("CreateFullSendActResponse{%s}", ret)
- }
- func (o CreateFullSendActResponse) Clone() *CreateFullSendActResponse {
- ret := CreateFullSendActResponse{}
- if o.ActivityId != nil {
- ret.ActivityId = new(string)
- *ret.ActivityId = *o.ActivityId
- }
- if o.CreateTime != nil {
- ret.CreateTime = new(string)
- *ret.CreateTime = *o.CreateTime
- }
- return &ret
- }
- // DeleteActivityMerchantBody
- type DeleteActivityMerchantBody struct {
- // 从活动已有的发券商户号中移除的商户号列表
- MerchantIdList []string `json:"merchant_id_list"`
- // 商户添加发券商户号的凭据号,商户侧需保持唯一性
- DeleteRequestNo *string `json:"delete_request_no"`
- }
- func (o DeleteActivityMerchantBody) MarshalJSON() ([]byte, error) {
- toSerialize := map[string]interface{}{}
- if o.MerchantIdList == nil {
- return nil, fmt.Errorf("field `MerchantIdList` is required and must be specified in DeleteActivityMerchantBody")
- }
- toSerialize["merchant_id_list"] = o.MerchantIdList
- if o.DeleteRequestNo == nil {
- return nil, fmt.Errorf("field `DeleteRequestNo` is required and must be specified in DeleteActivityMerchantBody")
- }
- toSerialize["delete_request_no"] = o.DeleteRequestNo
- return json.Marshal(toSerialize)
- }
- func (o DeleteActivityMerchantBody) String() string {
- var ret string
- ret += fmt.Sprintf("MerchantIdList:%v, ", o.MerchantIdList)
- if o.DeleteRequestNo == nil {
- ret += "DeleteRequestNo:<nil>"
- } else {
- ret += fmt.Sprintf("DeleteRequestNo:%v", *o.DeleteRequestNo)
- }
- return fmt.Sprintf("DeleteActivityMerchantBody{%s}", ret)
- }
- func (o DeleteActivityMerchantBody) Clone() *DeleteActivityMerchantBody {
- ret := DeleteActivityMerchantBody{}
- if o.MerchantIdList != nil {
- ret.MerchantIdList = make([]string, len(o.MerchantIdList))
- for i, item := range o.MerchantIdList {
- ret.MerchantIdList[i] = item
- }
- }
- if o.DeleteRequestNo != nil {
- ret.DeleteRequestNo = new(string)
- *ret.DeleteRequestNo = *o.DeleteRequestNo
- }
- return &ret
- }
- // DeleteActivityMerchantRequest
- type DeleteActivityMerchantRequest struct {
- // 活动Id
- ActivityId *string `json:"activity_id"`
- // 从活动已有的发券商户号中移除的商户号列表
- MerchantIdList []string `json:"merchant_id_list"`
- // 商户添加发券商户号的凭据号,商户侧需保持唯一性
- DeleteRequestNo *string `json:"delete_request_no"`
- }
- func (o DeleteActivityMerchantRequest) MarshalJSON() ([]byte, error) {
- toSerialize := map[string]interface{}{}
- if o.ActivityId == nil {
- return nil, fmt.Errorf("field `ActivityId` is required and must be specified in DeleteActivityMerchantRequest")
- }
- toSerialize["activity_id"] = o.ActivityId
- if o.MerchantIdList == nil {
- return nil, fmt.Errorf("field `MerchantIdList` is required and must be specified in DeleteActivityMerchantRequest")
- }
- toSerialize["merchant_id_list"] = o.MerchantIdList
- if o.DeleteRequestNo == nil {
- return nil, fmt.Errorf("field `DeleteRequestNo` is required and must be specified in DeleteActivityMerchantRequest")
- }
- toSerialize["delete_request_no"] = o.DeleteRequestNo
- return json.Marshal(toSerialize)
- }
- func (o DeleteActivityMerchantRequest) String() string {
- var ret string
- if o.ActivityId == nil {
- ret += "ActivityId:<nil>, "
- } else {
- ret += fmt.Sprintf("ActivityId:%v, ", *o.ActivityId)
- }
- ret += fmt.Sprintf("MerchantIdList:%v, ", o.MerchantIdList)
- if o.DeleteRequestNo == nil {
- ret += "DeleteRequestNo:<nil>"
- } else {
- ret += fmt.Sprintf("DeleteRequestNo:%v", *o.DeleteRequestNo)
- }
- return fmt.Sprintf("DeleteActivityMerchantRequest{%s}", ret)
- }
- func (o DeleteActivityMerchantRequest) Clone() *DeleteActivityMerchantRequest {
- ret := DeleteActivityMerchantRequest{}
- if o.ActivityId != nil {
- ret.ActivityId = new(string)
- *ret.ActivityId = *o.ActivityId
- }
- if o.MerchantIdList != nil {
- ret.MerchantIdList = make([]string, len(o.MerchantIdList))
- for i, item := range o.MerchantIdList {
- ret.MerchantIdList[i] = item
- }
- }
- if o.DeleteRequestNo != nil {
- ret.DeleteRequestNo = new(string)
- *ret.DeleteRequestNo = *o.DeleteRequestNo
- }
- return &ret
- }
- // DeleteActivityMerchantResponse
- type DeleteActivityMerchantResponse struct {
- // 活动Id
- ActivityId *string `json:"activity_id"`
- // 成功删除发券商户号的时间
- DeleteTime *string `json:"delete_time,omitempty"`
- }
- func (o DeleteActivityMerchantResponse) MarshalJSON() ([]byte, error) {
- toSerialize := map[string]interface{}{}
- if o.ActivityId == nil {
- return nil, fmt.Errorf("field `ActivityId` is required and must be specified in DeleteActivityMerchantResponse")
- }
- toSerialize["activity_id"] = o.ActivityId
- if o.DeleteTime != nil {
- toSerialize["delete_time"] = o.DeleteTime
- }
- return json.Marshal(toSerialize)
- }
- func (o DeleteActivityMerchantResponse) String() string {
- var ret string
- if o.ActivityId == nil {
- ret += "ActivityId:<nil>, "
- } else {
- ret += fmt.Sprintf("ActivityId:%v, ", *o.ActivityId)
- }
- if o.DeleteTime == nil {
- ret += "DeleteTime:<nil>"
- } else {
- ret += fmt.Sprintf("DeleteTime:%v", *o.DeleteTime)
- }
- return fmt.Sprintf("DeleteActivityMerchantResponse{%s}", ret)
- }
- func (o DeleteActivityMerchantResponse) Clone() *DeleteActivityMerchantResponse {
- ret := DeleteActivityMerchantResponse{}
- if o.ActivityId != nil {
- ret.ActivityId = new(string)
- *ret.ActivityId = *o.ActivityId
- }
- if o.DeleteTime != nil {
- ret.DeleteTime = new(string)
- *ret.DeleteTime = *o.DeleteTime
- }
- return &ret
- }
- // DeliveryPurposeCategory 投放目的枚举值
- type DeliveryPurposeCategory string
- func (e DeliveryPurposeCategory) Ptr() *DeliveryPurposeCategory {
- return &e
- }
- // Enums of DeliveryPurposeCategory
- const (
- DELIVERYPURPOSECATEGORY_OFF_LINE_PAY DeliveryPurposeCategory = "OFF_LINE_PAY"
- DELIVERYPURPOSECATEGORY_JUMP_MINI_APP DeliveryPurposeCategory = "JUMP_MINI_APP"
- )
- // DeliveryUserCategory
- type DeliveryUserCategory string
- func (e DeliveryUserCategory) Ptr() *DeliveryUserCategory {
- return &e
- }
- // Enums of DeliveryUserCategory
- const (
- DELIVERYUSERCATEGORY_DELIVERY_ALL_PERSON DeliveryUserCategory = "DELIVERY_ALL_PERSON"
- DELIVERYUSERCATEGORY_DELIVERY_MEMBER_PERSON DeliveryUserCategory = "DELIVERY_MEMBER_PERSON"
- )
- // FullSendRule
- type FullSendRule struct {
- // 消费金额门槛 单位分
- TransactionAmountMinimum *int64 `json:"transaction_amount_minimum"`
- // 发放内容,可选单张券或礼包,选礼包时奖品限定3-5个
- SendContent *SendContentCategory `json:"send_content"`
- // 奖品类型,暂时只支持商家券
- AwardType *AwardType `json:"award_type"`
- // 奖品基本信息列表
- AwardList []AwardBaseInfo `json:"award_list"`
- // 发券商户号选取规则,支持选择在用券商户或手动输入商户号两种,选择手动时,发券商户号必填(商家券只支持手动输入)
- MerchantOption *SendMerchantOption `json:"merchant_option"`
- // 发券商户号,列表
- MerchantIdList []string `json:"merchant_id_list,omitempty"`
- }
- func (o FullSendRule) MarshalJSON() ([]byte, error) {
- toSerialize := map[string]interface{}{}
- if o.TransactionAmountMinimum == nil {
- return nil, fmt.Errorf("field `TransactionAmountMinimum` is required and must be specified in FullSendRule")
- }
- toSerialize["transaction_amount_minimum"] = o.TransactionAmountMinimum
- if o.SendContent == nil {
- return nil, fmt.Errorf("field `SendContent` is required and must be specified in FullSendRule")
- }
- toSerialize["send_content"] = o.SendContent
- if o.AwardType == nil {
- return nil, fmt.Errorf("field `AwardType` is required and must be specified in FullSendRule")
- }
- toSerialize["award_type"] = o.AwardType
- if o.AwardList == nil {
- return nil, fmt.Errorf("field `AwardList` is required and must be specified in FullSendRule")
- }
- toSerialize["award_list"] = o.AwardList
- if o.MerchantOption == nil {
- return nil, fmt.Errorf("field `MerchantOption` is required and must be specified in FullSendRule")
- }
- toSerialize["merchant_option"] = o.MerchantOption
- if o.MerchantIdList != nil {
- toSerialize["merchant_id_list"] = o.MerchantIdList
- }
- return json.Marshal(toSerialize)
- }
- func (o FullSendRule) String() string {
- var ret string
- if o.TransactionAmountMinimum == nil {
- ret += "TransactionAmountMinimum:<nil>, "
- } else {
- ret += fmt.Sprintf("TransactionAmountMinimum:%v, ", *o.TransactionAmountMinimum)
- }
- if o.SendContent == nil {
- ret += "SendContent:<nil>, "
- } else {
- ret += fmt.Sprintf("SendContent:%v, ", *o.SendContent)
- }
- if o.AwardType == nil {
- ret += "AwardType:<nil>, "
- } else {
- ret += fmt.Sprintf("AwardType:%v, ", *o.AwardType)
- }
- ret += fmt.Sprintf("AwardList:%v, ", o.AwardList)
- if o.MerchantOption == nil {
- ret += "MerchantOption:<nil>, "
- } else {
- ret += fmt.Sprintf("MerchantOption:%v, ", *o.MerchantOption)
- }
- ret += fmt.Sprintf("MerchantIdList:%v", o.MerchantIdList)
- return fmt.Sprintf("FullSendRule{%s}", ret)
- }
- func (o FullSendRule) Clone() *FullSendRule {
- ret := FullSendRule{}
- if o.TransactionAmountMinimum != nil {
- ret.TransactionAmountMinimum = new(int64)
- *ret.TransactionAmountMinimum = *o.TransactionAmountMinimum
- }
- if o.SendContent != nil {
- ret.SendContent = new(SendContentCategory)
- *ret.SendContent = *o.SendContent
- }
- if o.AwardType != nil {
- ret.AwardType = new(AwardType)
- *ret.AwardType = *o.AwardType
- }
- if o.AwardList != nil {
- ret.AwardList = make([]AwardBaseInfo, len(o.AwardList))
- for i, item := range o.AwardList {
- ret.AwardList[i] = *item.Clone()
- }
- }
- if o.MerchantOption != nil {
- ret.MerchantOption = new(SendMerchantOption)
- *ret.MerchantOption = *o.MerchantOption
- }
- if o.MerchantIdList != nil {
- ret.MerchantIdList = make([]string, len(o.MerchantIdList))
- for i, item := range o.MerchantIdList {
- ret.MerchantIdList[i] = item
- }
- }
- return &ret
- }
- // GetActDetailRequest
- type GetActDetailRequest struct {
- // 活动Id
- ActivityId *string `json:"activity_id"`
- }
- func (o GetActDetailRequest) MarshalJSON() ([]byte, error) {
- toSerialize := map[string]interface{}{}
- if o.ActivityId == nil {
- return nil, fmt.Errorf("field `ActivityId` is required and must be specified in GetActDetailRequest")
- }
- toSerialize["activity_id"] = o.ActivityId
- return json.Marshal(toSerialize)
- }
- func (o GetActDetailRequest) String() string {
- var ret string
- if o.ActivityId == nil {
- ret += "ActivityId:<nil>"
- } else {
- ret += fmt.Sprintf("ActivityId:%v", *o.ActivityId)
- }
- return fmt.Sprintf("GetActDetailRequest{%s}", ret)
- }
- func (o GetActDetailRequest) Clone() *GetActDetailRequest {
- ret := GetActDetailRequest{}
- if o.ActivityId != nil {
- ret.ActivityId = new(string)
- *ret.ActivityId = *o.ActivityId
- }
- return &ret
- }
- // GetActDetailResponse
- type GetActDetailResponse struct {
- // 活动Id
- ActivityId *string `json:"activity_id"`
- // 活动类型
- ActivityType *ActType `json:"activity_type,omitempty"`
- // 创建活动时录入的基本信息
- ActivityBaseInfo *ActBaseInfo `json:"activity_base_info"`
- // 奖品派送规则,分别对应满送、阶梯送、满A送B中的一种
- AwardSendRule *AwardSendRule `json:"award_send_rule"`
- // 创建时传入的高级设置信息
- AdvancedSetting *ActAdvancedSetting `json:"advanced_setting,omitempty"`
- // 活动当前状态枚举值
- ActivityStatus *ActStatus `json:"activity_status"`
- // 创建商户号
- CreatorMerchantId *string `json:"creator_merchant_id"`
- // 所属商户号
- BelongMerchantId *string `json:"belong_merchant_id"`
- // 活动暂停时间
- PauseTime *string `json:"pause_time,omitempty"`
- // 活动恢复时间
- RecoveryTime *string `json:"recovery_time,omitempty"`
- // 活动创建时间
- CreateTime *string `json:"create_time,omitempty"`
- // 活动更新时间
- UpdateTime *string `json:"update_time,omitempty"`
- }
- func (o GetActDetailResponse) MarshalJSON() ([]byte, error) {
- toSerialize := map[string]interface{}{}
- if o.ActivityId == nil {
- return nil, fmt.Errorf("field `ActivityId` is required and must be specified in GetActDetailResponse")
- }
- toSerialize["activity_id"] = o.ActivityId
- if o.ActivityType != nil {
- toSerialize["activity_type"] = o.ActivityType
- }
- if o.ActivityBaseInfo == nil {
- return nil, fmt.Errorf("field `ActivityBaseInfo` is required and must be specified in GetActDetailResponse")
- }
- toSerialize["activity_base_info"] = o.ActivityBaseInfo
- if o.AwardSendRule == nil {
- return nil, fmt.Errorf("field `AwardSendRule` is required and must be specified in GetActDetailResponse")
- }
- toSerialize["award_send_rule"] = o.AwardSendRule
- if o.AdvancedSetting != nil {
- toSerialize["advanced_setting"] = o.AdvancedSetting
- }
- if o.ActivityStatus == nil {
- return nil, fmt.Errorf("field `ActivityStatus` is required and must be specified in GetActDetailResponse")
- }
- toSerialize["activity_status"] = o.ActivityStatus
- if o.CreatorMerchantId == nil {
- return nil, fmt.Errorf("field `CreatorMerchantId` is required and must be specified in GetActDetailResponse")
- }
- toSerialize["creator_merchant_id"] = o.CreatorMerchantId
- if o.BelongMerchantId == nil {
- return nil, fmt.Errorf("field `BelongMerchantId` is required and must be specified in GetActDetailResponse")
- }
- toSerialize["belong_merchant_id"] = o.BelongMerchantId
- if o.PauseTime != nil {
- toSerialize["pause_time"] = o.PauseTime
- }
- if o.RecoveryTime != nil {
- toSerialize["recovery_time"] = o.RecoveryTime
- }
- if o.CreateTime != nil {
- toSerialize["create_time"] = o.CreateTime
- }
- if o.UpdateTime != nil {
- toSerialize["update_time"] = o.UpdateTime
- }
- return json.Marshal(toSerialize)
- }
- func (o GetActDetailResponse) String() string {
- var ret string
- if o.ActivityId == nil {
- ret += "ActivityId:<nil>, "
- } else {
- ret += fmt.Sprintf("ActivityId:%v, ", *o.ActivityId)
- }
- if o.ActivityType == nil {
- ret += "ActivityType:<nil>, "
- } else {
- ret += fmt.Sprintf("ActivityType:%v, ", *o.ActivityType)
- }
- ret += fmt.Sprintf("ActivityBaseInfo:%v, ", o.ActivityBaseInfo)
- ret += fmt.Sprintf("AwardSendRule:%v, ", o.AwardSendRule)
- ret += fmt.Sprintf("AdvancedSetting:%v, ", o.AdvancedSetting)
- if o.ActivityStatus == nil {
- ret += "ActivityStatus:<nil>, "
- } else {
- ret += fmt.Sprintf("ActivityStatus:%v, ", *o.ActivityStatus)
- }
- if o.CreatorMerchantId == nil {
- ret += "CreatorMerchantId:<nil>, "
- } else {
- ret += fmt.Sprintf("CreatorMerchantId:%v, ", *o.CreatorMerchantId)
- }
- if o.BelongMerchantId == nil {
- ret += "BelongMerchantId:<nil>, "
- } else {
- ret += fmt.Sprintf("BelongMerchantId:%v, ", *o.BelongMerchantId)
- }
- if o.PauseTime == nil {
- ret += "PauseTime:<nil>, "
- } else {
- ret += fmt.Sprintf("PauseTime:%v, ", *o.PauseTime)
- }
- if o.RecoveryTime == nil {
- ret += "RecoveryTime:<nil>, "
- } else {
- ret += fmt.Sprintf("RecoveryTime:%v, ", *o.RecoveryTime)
- }
- if o.CreateTime == nil {
- ret += "CreateTime:<nil>, "
- } else {
- ret += fmt.Sprintf("CreateTime:%v, ", *o.CreateTime)
- }
- if o.UpdateTime == nil {
- ret += "UpdateTime:<nil>"
- } else {
- ret += fmt.Sprintf("UpdateTime:%v", *o.UpdateTime)
- }
- return fmt.Sprintf("GetActDetailResponse{%s}", ret)
- }
- func (o GetActDetailResponse) Clone() *GetActDetailResponse {
- ret := GetActDetailResponse{}
- if o.ActivityId != nil {
- ret.ActivityId = new(string)
- *ret.ActivityId = *o.ActivityId
- }
- if o.ActivityType != nil {
- ret.ActivityType = new(ActType)
- *ret.ActivityType = *o.ActivityType
- }
- if o.ActivityBaseInfo != nil {
- ret.ActivityBaseInfo = o.ActivityBaseInfo.Clone()
- }
- if o.AwardSendRule != nil {
- ret.AwardSendRule = o.AwardSendRule.Clone()
- }
- if o.AdvancedSetting != nil {
- ret.AdvancedSetting = o.AdvancedSetting.Clone()
- }
- if o.ActivityStatus != nil {
- ret.ActivityStatus = new(ActStatus)
- *ret.ActivityStatus = *o.ActivityStatus
- }
- if o.CreatorMerchantId != nil {
- ret.CreatorMerchantId = new(string)
- *ret.CreatorMerchantId = *o.CreatorMerchantId
- }
- if o.BelongMerchantId != nil {
- ret.BelongMerchantId = new(string)
- *ret.BelongMerchantId = *o.BelongMerchantId
- }
- if o.PauseTime != nil {
- ret.PauseTime = new(string)
- *ret.PauseTime = *o.PauseTime
- }
- if o.RecoveryTime != nil {
- ret.RecoveryTime = new(string)
- *ret.RecoveryTime = *o.RecoveryTime
- }
- if o.CreateTime != nil {
- ret.CreateTime = new(string)
- *ret.CreateTime = *o.CreateTime
- }
- if o.UpdateTime != nil {
- ret.UpdateTime = new(string)
- *ret.UpdateTime = *o.UpdateTime
- }
- return &ret
- }
- // InvalidParticipateMerchant
- type InvalidParticipateMerchant struct {
- // 商户Id
- Mchid *string `json:"mchid,omitempty"`
- // 活动参与商户校验失败的原因
- InvalidReason *string `json:"invalid_reason,omitempty"`
- }
- func (o InvalidParticipateMerchant) MarshalJSON() ([]byte, error) {
- toSerialize := map[string]interface{}{}
- if o.Mchid != nil {
- toSerialize["mchid"] = o.Mchid
- }
- if o.InvalidReason != nil {
- toSerialize["invalid_reason"] = o.InvalidReason
- }
- return json.Marshal(toSerialize)
- }
- func (o InvalidParticipateMerchant) String() string {
- var ret string
- if o.Mchid == nil {
- ret += "Mchid:<nil>, "
- } else {
- ret += fmt.Sprintf("Mchid:%v, ", *o.Mchid)
- }
- if o.InvalidReason == nil {
- ret += "InvalidReason:<nil>"
- } else {
- ret += fmt.Sprintf("InvalidReason:%v", *o.InvalidReason)
- }
- return fmt.Sprintf("InvalidParticipateMerchant{%s}", ret)
- }
- func (o InvalidParticipateMerchant) Clone() *InvalidParticipateMerchant {
- ret := InvalidParticipateMerchant{}
- if o.Mchid != nil {
- ret.Mchid = new(string)
- *ret.Mchid = *o.Mchid
- }
- if o.InvalidReason != nil {
- ret.InvalidReason = new(string)
- *ret.InvalidReason = *o.InvalidReason
- }
- return &ret
- }
- // ListActMchResponse
- type ListActMchResponse struct {
- // 商户信息列表
- Data []ActParticipateMchInfo `json:"data,omitempty"`
- // 商户数量
- TotalCount *int64 `json:"total_count"`
- // 分页页码
- Offset *int64 `json:"offset"`
- // 分页大小
- Limit *int64 `json:"limit"`
- // 活动Id
- ActivityId *string `json:"activity_id"`
- }
- func (o ListActMchResponse) MarshalJSON() ([]byte, error) {
- toSerialize := map[string]interface{}{}
- if o.Data != nil {
- toSerialize["data"] = o.Data
- }
- if o.TotalCount == nil {
- return nil, fmt.Errorf("field `TotalCount` is required and must be specified in ListActMchResponse")
- }
- toSerialize["total_count"] = o.TotalCount
- if o.Offset == nil {
- return nil, fmt.Errorf("field `Offset` is required and must be specified in ListActMchResponse")
- }
- toSerialize["offset"] = o.Offset
- if o.Limit == nil {
- return nil, fmt.Errorf("field `Limit` is required and must be specified in ListActMchResponse")
- }
- toSerialize["limit"] = o.Limit
- if o.ActivityId == nil {
- return nil, fmt.Errorf("field `ActivityId` is required and must be specified in ListActMchResponse")
- }
- toSerialize["activity_id"] = o.ActivityId
- return json.Marshal(toSerialize)
- }
- func (o ListActMchResponse) String() string {
- var ret string
- ret += fmt.Sprintf("Data:%v, ", o.Data)
- if o.TotalCount == nil {
- ret += "TotalCount:<nil>, "
- } else {
- ret += fmt.Sprintf("TotalCount:%v, ", *o.TotalCount)
- }
- if o.Offset == nil {
- ret += "Offset:<nil>, "
- } else {
- ret += fmt.Sprintf("Offset:%v, ", *o.Offset)
- }
- if o.Limit == nil {
- ret += "Limit:<nil>, "
- } else {
- ret += fmt.Sprintf("Limit:%v, ", *o.Limit)
- }
- if o.ActivityId == nil {
- ret += "ActivityId:<nil>"
- } else {
- ret += fmt.Sprintf("ActivityId:%v", *o.ActivityId)
- }
- return fmt.Sprintf("ListActMchResponse{%s}", ret)
- }
- func (o ListActMchResponse) Clone() *ListActMchResponse {
- ret := ListActMchResponse{}
- if o.Data != nil {
- ret.Data = make([]ActParticipateMchInfo, len(o.Data))
- for i, item := range o.Data {
- ret.Data[i] = *item.Clone()
- }
- }
- if o.TotalCount != nil {
- ret.TotalCount = new(int64)
- *ret.TotalCount = *o.TotalCount
- }
- if o.Offset != nil {
- ret.Offset = new(int64)
- *ret.Offset = *o.Offset
- }
- if o.Limit != nil {
- ret.Limit = new(int64)
- *ret.Limit = *o.Limit
- }
- if o.ActivityId != nil {
- ret.ActivityId = new(string)
- *ret.ActivityId = *o.ActivityId
- }
- return &ret
- }
- // ListActSkuResponse
- type ListActSkuResponse struct {
- // 商品信息列表(sku信息列表)
- Data []SkuInfo `json:"data,omitempty"`
- TotalCount *int64 `json:"total_count"`
- // 分页页码
- Offset *int64 `json:"offset"`
- // 分页大小
- Limit *int64 `json:"limit"`
- // 活动ID
- ActivityId *string `json:"activity_id"`
- }
- func (o ListActSkuResponse) MarshalJSON() ([]byte, error) {
- toSerialize := map[string]interface{}{}
- if o.Data != nil {
- toSerialize["data"] = o.Data
- }
- if o.TotalCount == nil {
- return nil, fmt.Errorf("field `TotalCount` is required and must be specified in ListActSkuResponse")
- }
- toSerialize["total_count"] = o.TotalCount
- if o.Offset == nil {
- return nil, fmt.Errorf("field `Offset` is required and must be specified in ListActSkuResponse")
- }
- toSerialize["offset"] = o.Offset
- if o.Limit == nil {
- return nil, fmt.Errorf("field `Limit` is required and must be specified in ListActSkuResponse")
- }
- toSerialize["limit"] = o.Limit
- if o.ActivityId == nil {
- return nil, fmt.Errorf("field `ActivityId` is required and must be specified in ListActSkuResponse")
- }
- toSerialize["activity_id"] = o.ActivityId
- return json.Marshal(toSerialize)
- }
- func (o ListActSkuResponse) String() string {
- var ret string
- ret += fmt.Sprintf("Data:%v, ", o.Data)
- if o.TotalCount == nil {
- ret += "TotalCount:<nil>, "
- } else {
- ret += fmt.Sprintf("TotalCount:%v, ", *o.TotalCount)
- }
- if o.Offset == nil {
- ret += "Offset:<nil>, "
- } else {
- ret += fmt.Sprintf("Offset:%v, ", *o.Offset)
- }
- if o.Limit == nil {
- ret += "Limit:<nil>, "
- } else {
- ret += fmt.Sprintf("Limit:%v, ", *o.Limit)
- }
- if o.ActivityId == nil {
- ret += "ActivityId:<nil>"
- } else {
- ret += fmt.Sprintf("ActivityId:%v", *o.ActivityId)
- }
- return fmt.Sprintf("ListActSkuResponse{%s}", ret)
- }
- func (o ListActSkuResponse) Clone() *ListActSkuResponse {
- ret := ListActSkuResponse{}
- if o.Data != nil {
- ret.Data = make([]SkuInfo, len(o.Data))
- for i, item := range o.Data {
- ret.Data[i] = *item.Clone()
- }
- }
- if o.TotalCount != nil {
- ret.TotalCount = new(int64)
- *ret.TotalCount = *o.TotalCount
- }
- if o.Offset != nil {
- ret.Offset = new(int64)
- *ret.Offset = *o.Offset
- }
- if o.Limit != nil {
- ret.Limit = new(int64)
- *ret.Limit = *o.Limit
- }
- if o.ActivityId != nil {
- ret.ActivityId = new(string)
- *ret.ActivityId = *o.ActivityId
- }
- return &ret
- }
- // ListActivitiesRequest
- type ListActivitiesRequest struct {
- // 分页页码
- Offset *int64 `json:"offset"`
- // 分页大小
- Limit *int64 `json:"limit"`
- // 活动名称,支持模糊搜索
- ActivityName *string `json:"activity_name,omitempty"`
- // 活动状态
- ActivityStatus *ActStatus `json:"activity_status,omitempty"`
- // 奖品类型,暂时只支持商家券
- AwardType *AwardType `json:"award_type,omitempty"`
- }
- func (o ListActivitiesRequest) MarshalJSON() ([]byte, error) {
- toSerialize := map[string]interface{}{}
- if o.Offset == nil {
- return nil, fmt.Errorf("field `Offset` is required and must be specified in ListActivitiesRequest")
- }
- toSerialize["offset"] = o.Offset
- if o.Limit == nil {
- return nil, fmt.Errorf("field `Limit` is required and must be specified in ListActivitiesRequest")
- }
- toSerialize["limit"] = o.Limit
- if o.ActivityName != nil {
- toSerialize["activity_name"] = o.ActivityName
- }
- if o.ActivityStatus != nil {
- toSerialize["activity_status"] = o.ActivityStatus
- }
- if o.AwardType != nil {
- toSerialize["award_type"] = o.AwardType
- }
- return json.Marshal(toSerialize)
- }
- func (o ListActivitiesRequest) String() string {
- var ret string
- if o.Offset == nil {
- ret += "Offset:<nil>, "
- } else {
- ret += fmt.Sprintf("Offset:%v, ", *o.Offset)
- }
- if o.Limit == nil {
- ret += "Limit:<nil>, "
- } else {
- ret += fmt.Sprintf("Limit:%v, ", *o.Limit)
- }
- if o.ActivityName == nil {
- ret += "ActivityName:<nil>, "
- } else {
- ret += fmt.Sprintf("ActivityName:%v, ", *o.ActivityName)
- }
- if o.ActivityStatus == nil {
- ret += "ActivityStatus:<nil>, "
- } else {
- ret += fmt.Sprintf("ActivityStatus:%v, ", *o.ActivityStatus)
- }
- if o.AwardType == nil {
- ret += "AwardType:<nil>"
- } else {
- ret += fmt.Sprintf("AwardType:%v", *o.AwardType)
- }
- return fmt.Sprintf("ListActivitiesRequest{%s}", ret)
- }
- func (o ListActivitiesRequest) Clone() *ListActivitiesRequest {
- ret := ListActivitiesRequest{}
- if o.Offset != nil {
- ret.Offset = new(int64)
- *ret.Offset = *o.Offset
- }
- if o.Limit != nil {
- ret.Limit = new(int64)
- *ret.Limit = *o.Limit
- }
- if o.ActivityName != nil {
- ret.ActivityName = new(string)
- *ret.ActivityName = *o.ActivityName
- }
- if o.ActivityStatus != nil {
- ret.ActivityStatus = new(ActStatus)
- *ret.ActivityStatus = *o.ActivityStatus
- }
- if o.AwardType != nil {
- ret.AwardType = new(AwardType)
- *ret.AwardType = *o.AwardType
- }
- return &ret
- }
- // ListActivitiesResponse
- type ListActivitiesResponse struct {
- // 支付有礼活动列表
- Data []ActivityInformation `json:"data,omitempty"`
- // 总数
- TotalCount *int64 `json:"total_count,omitempty"`
- // 分页页码
- Offset *int64 `json:"offset,omitempty"`
- // 分页大小
- Limit *int64 `json:"limit,omitempty"`
- }
- func (o ListActivitiesResponse) MarshalJSON() ([]byte, error) {
- toSerialize := map[string]interface{}{}
- if o.Data != nil {
- toSerialize["data"] = o.Data
- }
- if o.TotalCount != nil {
- toSerialize["total_count"] = o.TotalCount
- }
- if o.Offset != nil {
- toSerialize["offset"] = o.Offset
- }
- if o.Limit != nil {
- toSerialize["limit"] = o.Limit
- }
- return json.Marshal(toSerialize)
- }
- func (o ListActivitiesResponse) String() string {
- var ret string
- ret += fmt.Sprintf("Data:%v, ", o.Data)
- if o.TotalCount == nil {
- ret += "TotalCount:<nil>, "
- } else {
- ret += fmt.Sprintf("TotalCount:%v, ", *o.TotalCount)
- }
- if o.Offset == nil {
- ret += "Offset:<nil>, "
- } else {
- ret += fmt.Sprintf("Offset:%v, ", *o.Offset)
- }
- if o.Limit == nil {
- ret += "Limit:<nil>"
- } else {
- ret += fmt.Sprintf("Limit:%v", *o.Limit)
- }
- return fmt.Sprintf("ListActivitiesResponse{%s}", ret)
- }
- func (o ListActivitiesResponse) Clone() *ListActivitiesResponse {
- ret := ListActivitiesResponse{}
- if o.Data != nil {
- ret.Data = make([]ActivityInformation, len(o.Data))
- for i, item := range o.Data {
- ret.Data[i] = *item.Clone()
- }
- }
- if o.TotalCount != nil {
- ret.TotalCount = new(int64)
- *ret.TotalCount = *o.TotalCount
- }
- if o.Offset != nil {
- ret.Offset = new(int64)
- *ret.Offset = *o.Offset
- }
- if o.Limit != nil {
- ret.Limit = new(int64)
- *ret.Limit = *o.Limit
- }
- return &ret
- }
- // ListActivityMerchantRequest
- type ListActivityMerchantRequest struct {
- // 活动Id
- ActivityId *string `json:"activity_id"`
- // 分页页码
- Offset *int64 `json:"offset,omitempty"`
- // 限制分页最大数据条目
- Limit *int64 `json:"limit,omitempty"`
- }
- func (o ListActivityMerchantRequest) MarshalJSON() ([]byte, error) {
- toSerialize := map[string]interface{}{}
- if o.ActivityId == nil {
- return nil, fmt.Errorf("field `ActivityId` is required and must be specified in ListActivityMerchantRequest")
- }
- toSerialize["activity_id"] = o.ActivityId
- if o.Offset != nil {
- toSerialize["offset"] = o.Offset
- }
- if o.Limit != nil {
- toSerialize["limit"] = o.Limit
- }
- return json.Marshal(toSerialize)
- }
- func (o ListActivityMerchantRequest) String() string {
- var ret string
- if o.ActivityId == nil {
- ret += "ActivityId:<nil>, "
- } else {
- ret += fmt.Sprintf("ActivityId:%v, ", *o.ActivityId)
- }
- if o.Offset == nil {
- ret += "Offset:<nil>, "
- } else {
- ret += fmt.Sprintf("Offset:%v, ", *o.Offset)
- }
- if o.Limit == nil {
- ret += "Limit:<nil>"
- } else {
- ret += fmt.Sprintf("Limit:%v", *o.Limit)
- }
- return fmt.Sprintf("ListActivityMerchantRequest{%s}", ret)
- }
- func (o ListActivityMerchantRequest) Clone() *ListActivityMerchantRequest {
- ret := ListActivityMerchantRequest{}
- if o.ActivityId != nil {
- ret.ActivityId = new(string)
- *ret.ActivityId = *o.ActivityId
- }
- if o.Offset != nil {
- ret.Offset = new(int64)
- *ret.Offset = *o.Offset
- }
- if o.Limit != nil {
- ret.Limit = new(int64)
- *ret.Limit = *o.Limit
- }
- return &ret
- }
- // ListActivitySkuRequest
- type ListActivitySkuRequest struct {
- // 活动Id
- ActivityId *string `json:"activity_id"`
- // 分页页码
- Offset *int64 `json:"offset,omitempty"`
- // 分页大小
- Limit *int64 `json:"limit,omitempty"`
- }
- func (o ListActivitySkuRequest) MarshalJSON() ([]byte, error) {
- toSerialize := map[string]interface{}{}
- if o.ActivityId == nil {
- return nil, fmt.Errorf("field `ActivityId` is required and must be specified in ListActivitySkuRequest")
- }
- toSerialize["activity_id"] = o.ActivityId
- if o.Offset != nil {
- toSerialize["offset"] = o.Offset
- }
- if o.Limit != nil {
- toSerialize["limit"] = o.Limit
- }
- return json.Marshal(toSerialize)
- }
- func (o ListActivitySkuRequest) String() string {
- var ret string
- if o.ActivityId == nil {
- ret += "ActivityId:<nil>, "
- } else {
- ret += fmt.Sprintf("ActivityId:%v, ", *o.ActivityId)
- }
- if o.Offset == nil {
- ret += "Offset:<nil>, "
- } else {
- ret += fmt.Sprintf("Offset:%v, ", *o.Offset)
- }
- if o.Limit == nil {
- ret += "Limit:<nil>"
- } else {
- ret += fmt.Sprintf("Limit:%v", *o.Limit)
- }
- return fmt.Sprintf("ListActivitySkuRequest{%s}", ret)
- }
- func (o ListActivitySkuRequest) Clone() *ListActivitySkuRequest {
- ret := ListActivitySkuRequest{}
- if o.ActivityId != nil {
- ret.ActivityId = new(string)
- *ret.ActivityId = *o.ActivityId
- }
- if o.Offset != nil {
- ret.Offset = new(int64)
- *ret.Offset = *o.Offset
- }
- if o.Limit != nil {
- ret.Limit = new(int64)
- *ret.Limit = *o.Limit
- }
- return &ret
- }
- // OpActScene
- type OpActScene string
- func (e OpActScene) Ptr() *OpActScene {
- return &e
- }
- // Enums of OpActScene
- const (
- OPACTSCENE_OP_ACT_SCENE_JONIT_PLAN_CREATOR OpActScene = "OP_ACT_SCENE_JONIT_PLAN_CREATOR"
- OPACTSCENE_OP_ACT_SCENE_JONIT_PLAN_AUTHORIZED_MCH OpActScene = "OP_ACT_SCENE_JONIT_PLAN_AUTHORIZED_MCH"
- )
- // ParticipateMchStatus
- type ParticipateMchStatus string
- func (e ParticipateMchStatus) Ptr() *ParticipateMchStatus {
- return &e
- }
- // Enums of ParticipateMchStatus
- const (
- PARTICIPATEMCHSTATUS_PARTIC_MCH_STATUS_INVALID ParticipateMchStatus = "PARTIC_MCH_STATUS_INVALID"
- PARTICIPATEMCHSTATUS_PARTIC_MCH_STATUS_VALID ParticipateMchStatus = "PARTIC_MCH_STATUS_VALID"
- PARTICIPATEMCHSTATUS_PARTIC_MCH_STATUS_EXPIRE ParticipateMchStatus = "PARTIC_MCH_STATUS_EXPIRE"
- )
- // PaymentMethodCategory
- type PaymentMethodCategory string
- func (e PaymentMethodCategory) Ptr() *PaymentMethodCategory {
- return &e
- }
- // Enums of PaymentMethodCategory
- const (
- PAYMENTMETHODCATEGORY_CFT PaymentMethodCategory = "CFT"
- PAYMENTMETHODCATEGORY_SPECIFIC_BANK_CARD PaymentMethodCategory = "SPECIFIC_BANK_CARD"
- )
- // PaymentMethodInfo
- type PaymentMethodInfo struct {
- // 支付方式,可以指定银行卡或零钱
- PaymentMethod *PaymentMethodCategory `json:"payment_method"`
- // 银行简称,指定支付方式为银行卡必填,详询附录
- BankAbbreviation *string `json:"bank_abbreviation,omitempty"`
- }
- func (o PaymentMethodInfo) MarshalJSON() ([]byte, error) {
- toSerialize := map[string]interface{}{}
- if o.PaymentMethod == nil {
- return nil, fmt.Errorf("field `PaymentMethod` is required and must be specified in PaymentMethodInfo")
- }
- toSerialize["payment_method"] = o.PaymentMethod
- if o.BankAbbreviation != nil {
- toSerialize["bank_abbreviation"] = o.BankAbbreviation
- }
- return json.Marshal(toSerialize)
- }
- func (o PaymentMethodInfo) String() string {
- var ret string
- if o.PaymentMethod == nil {
- ret += "PaymentMethod:<nil>, "
- } else {
- ret += fmt.Sprintf("PaymentMethod:%v, ", *o.PaymentMethod)
- }
- if o.BankAbbreviation == nil {
- ret += "BankAbbreviation:<nil>"
- } else {
- ret += fmt.Sprintf("BankAbbreviation:%v", *o.BankAbbreviation)
- }
- return fmt.Sprintf("PaymentMethodInfo{%s}", ret)
- }
- func (o PaymentMethodInfo) Clone() *PaymentMethodInfo {
- ret := PaymentMethodInfo{}
- if o.PaymentMethod != nil {
- ret.PaymentMethod = new(PaymentMethodCategory)
- *ret.PaymentMethod = *o.PaymentMethod
- }
- if o.BankAbbreviation != nil {
- ret.BankAbbreviation = new(string)
- *ret.BankAbbreviation = *o.BankAbbreviation
- }
- return &ret
- }
- // PaymentMode
- type PaymentMode struct {
- // APP_SCENE:App场景;SWING_CARD:刷卡;NO_SECRET_SCENE:免密支付;MINIAPP_SCENE:小程序;FACE_PAY_SCENE:人脸支付; OTHER_SCENE:其他支付场景
- PaymentSceneList []PaymentScene `json:"payment_scene_list,omitempty"`
- }
- func (o PaymentMode) MarshalJSON() ([]byte, error) {
- toSerialize := map[string]interface{}{}
- if o.PaymentSceneList != nil {
- toSerialize["payment_scene_list"] = o.PaymentSceneList
- }
- return json.Marshal(toSerialize)
- }
- func (o PaymentMode) String() string {
- var ret string
- ret += fmt.Sprintf("PaymentSceneList:%v", o.PaymentSceneList)
- return fmt.Sprintf("PaymentMode{%s}", ret)
- }
- func (o PaymentMode) Clone() *PaymentMode {
- ret := PaymentMode{}
- if o.PaymentSceneList != nil {
- ret.PaymentSceneList = make([]PaymentScene, len(o.PaymentSceneList))
- for i, item := range o.PaymentSceneList {
- ret.PaymentSceneList[i] = item
- }
- }
- return &ret
- }
- // PaymentScene
- type PaymentScene string
- func (e PaymentScene) Ptr() *PaymentScene {
- return &e
- }
- // Enums of PaymentScene
- const (
- PAYMENTSCENE_APP_SCENE PaymentScene = "APP_SCENE"
- PAYMENTSCENE_SWING_CARD_SCENE PaymentScene = "SWING_CARD_SCENE"
- PAYMENTSCENE_NO_SECRET_SCENE PaymentScene = "NO_SECRET_SCENE"
- PAYMENTSCENE_MINIAPP_SCENE PaymentScene = "MINIAPP_SCENE"
- PAYMENTSCENE_FACE_PAY_SCENE PaymentScene = "FACE_PAY_SCENE"
- PAYMENTSCENE_OTHER_SCENE PaymentScene = "OTHER_SCENE"
- )
- // SendContentCategory
- type SendContentCategory string
- func (e SendContentCategory) Ptr() *SendContentCategory {
- return &e
- }
- // Enums of SendContentCategory
- const (
- SENDCONTENTCATEGORY_SINGLE_COUPON SendContentCategory = "SINGLE_COUPON"
- SENDCONTENTCATEGORY_GIFT_PACKAGE SendContentCategory = "GIFT_PACKAGE"
- )
- // SendMerchantOption
- type SendMerchantOption string
- func (e SendMerchantOption) Ptr() *SendMerchantOption {
- return &e
- }
- // Enums of SendMerchantOption
- const (
- SENDMERCHANTOPTION_IN_SEVICE_COUPON_MERCHANT SendMerchantOption = "IN_SEVICE_COUPON_MERCHANT"
- SENDMERCHANTOPTION_MANUAL_INPUT_MERCHANT SendMerchantOption = "MANUAL_INPUT_MERCHANT"
- )
- // SkuInfo
- type SkuInfo struct {
- // 指定商品(商品sku)
- GoodsId *string `json:"goods_id"`
- // 创建时间
- CreateTime *string `json:"create_time"`
- // 更新时间
- UpdateTime *string `json:"update_time"`
- }
- func (o SkuInfo) MarshalJSON() ([]byte, error) {
- toSerialize := map[string]interface{}{}
- if o.GoodsId == nil {
- return nil, fmt.Errorf("field `GoodsId` is required and must be specified in SkuInfo")
- }
- toSerialize["goods_id"] = o.GoodsId
- if o.CreateTime == nil {
- return nil, fmt.Errorf("field `CreateTime` is required and must be specified in SkuInfo")
- }
- toSerialize["create_time"] = o.CreateTime
- if o.UpdateTime == nil {
- return nil, fmt.Errorf("field `UpdateTime` is required and must be specified in SkuInfo")
- }
- toSerialize["update_time"] = o.UpdateTime
- return json.Marshal(toSerialize)
- }
- func (o SkuInfo) String() string {
- var ret string
- if o.GoodsId == nil {
- ret += "GoodsId:<nil>, "
- } else {
- ret += fmt.Sprintf("GoodsId:%v, ", *o.GoodsId)
- }
- if o.CreateTime == nil {
- ret += "CreateTime:<nil>, "
- } else {
- ret += fmt.Sprintf("CreateTime:%v, ", *o.CreateTime)
- }
- if o.UpdateTime == nil {
- ret += "UpdateTime:<nil>"
- } else {
- ret += fmt.Sprintf("UpdateTime:%v", *o.UpdateTime)
- }
- return fmt.Sprintf("SkuInfo{%s}", ret)
- }
- func (o SkuInfo) Clone() *SkuInfo {
- ret := SkuInfo{}
- if o.GoodsId != nil {
- ret.GoodsId = new(string)
- *ret.GoodsId = *o.GoodsId
- }
- if o.CreateTime != nil {
- ret.CreateTime = new(string)
- *ret.CreateTime = *o.CreateTime
- }
- if o.UpdateTime != nil {
- ret.UpdateTime = new(string)
- *ret.UpdateTime = *o.UpdateTime
- }
- return &ret
- }
- // SkuStatus
- type SkuStatus string
- func (e SkuStatus) Ptr() *SkuStatus {
- return &e
- }
- // Enums of SkuStatus
- const (
- SKUSTATUS_SKU_STATUS_INVALID SkuStatus = "SKU_STATUS_INVALID"
- SKUSTATUS_SKU_STATUS_VAILD SkuStatus = "SKU_STATUS_VAILD"
- SKUSTATUS_SKU_STATUS_EXPIRE SkuStatus = "SKU_STATUS_EXPIRE"
- SKUSTATUS_SKU_STATUS_UNKNOWN SkuStatus = "SKU_STATUS_UNKNOWN"
- )
- // TerminateActResponse
- type TerminateActResponse struct {
- // 生效时间
- TerminateTime *string `json:"terminate_time"`
- // 活动Id
- ActivityId *string `json:"activity_id"`
- }
- func (o TerminateActResponse) MarshalJSON() ([]byte, error) {
- toSerialize := map[string]interface{}{}
- if o.TerminateTime == nil {
- return nil, fmt.Errorf("field `TerminateTime` is required and must be specified in TerminateActResponse")
- }
- toSerialize["terminate_time"] = o.TerminateTime
- if o.ActivityId == nil {
- return nil, fmt.Errorf("field `ActivityId` is required and must be specified in TerminateActResponse")
- }
- toSerialize["activity_id"] = o.ActivityId
- return json.Marshal(toSerialize)
- }
- func (o TerminateActResponse) String() string {
- var ret string
- if o.TerminateTime == nil {
- ret += "TerminateTime:<nil>, "
- } else {
- ret += fmt.Sprintf("TerminateTime:%v, ", *o.TerminateTime)
- }
- if o.ActivityId == nil {
- ret += "ActivityId:<nil>"
- } else {
- ret += fmt.Sprintf("ActivityId:%v", *o.ActivityId)
- }
- return fmt.Sprintf("TerminateActResponse{%s}", ret)
- }
- func (o TerminateActResponse) Clone() *TerminateActResponse {
- ret := TerminateActResponse{}
- if o.TerminateTime != nil {
- ret.TerminateTime = new(string)
- *ret.TerminateTime = *o.TerminateTime
- }
- if o.ActivityId != nil {
- ret.ActivityId = new(string)
- *ret.ActivityId = *o.ActivityId
- }
- return &ret
- }
- // TerminateActivityRequest
- type TerminateActivityRequest struct {
- // 活动Id
- ActivityId *string `json:"activity_id"`
- }
- func (o TerminateActivityRequest) MarshalJSON() ([]byte, error) {
- toSerialize := map[string]interface{}{}
- if o.ActivityId == nil {
- return nil, fmt.Errorf("field `ActivityId` is required and must be specified in TerminateActivityRequest")
- }
- toSerialize["activity_id"] = o.ActivityId
- return json.Marshal(toSerialize)
- }
- func (o TerminateActivityRequest) String() string {
- var ret string
- if o.ActivityId == nil {
- ret += "ActivityId:<nil>"
- } else {
- ret += fmt.Sprintf("ActivityId:%v", *o.ActivityId)
- }
- return fmt.Sprintf("TerminateActivityRequest{%s}", ret)
- }
- func (o TerminateActivityRequest) Clone() *TerminateActivityRequest {
- ret := TerminateActivityRequest{}
- if o.ActivityId != nil {
- ret.ActivityId = new(string)
- *ret.ActivityId = *o.ActivityId
- }
- return &ret
- }
- // ThresholdCategory
- type ThresholdCategory string
- func (e ThresholdCategory) Ptr() *ThresholdCategory {
- return &e
- }
- // Enums of ThresholdCategory
- const (
- THRESHOLDCATEGORY_AMOUNT_THRESHOLD ThresholdCategory = "AMOUNT_THRESHOLD"
- THRESHOLDCATEGORY_NUMBER_THRESHOLD ThresholdCategory = "NUMBER_THRESHOLD"
- )
|