123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889 |
- // Copyright 2021 Tencent Inc. All rights reserved.
- //
- // 营销加价购对外API
- //
- // 指定服务商可通过该接口报名加价购活动、查询某个区域内的加价购活动列表、锁定加价活动购资格以及解锁加价购活动资格。
- //
- // API version: 1.4.0
- // Code generated by WechatPay APIv3 Generator based on [OpenAPI Generator](https://openapi-generator.tech); DO NOT EDIT.
- package retailstore
- import (
- "encoding/json"
- "fmt"
- )
- // ActApplyInfo
- type ActApplyInfo struct {
- // 门店信息
- StoreInfo *StoreInfo `json:"store_info"`
- // 品牌加价购活动商品的原价,该价格会在加价购小程序插件中展示(单位:分)
- GoodsOriginalPrice *int64 `json:"goods_original_price"`
- }
- func (o ActApplyInfo) MarshalJSON() ([]byte, error) {
- toSerialize := map[string]interface{}{}
- if o.StoreInfo == nil {
- return nil, fmt.Errorf("field `StoreInfo` is required and must be specified in ActApplyInfo")
- }
- toSerialize["store_info"] = o.StoreInfo
- if o.GoodsOriginalPrice == nil {
- return nil, fmt.Errorf("field `GoodsOriginalPrice` is required and must be specified in ActApplyInfo")
- }
- toSerialize["goods_original_price"] = o.GoodsOriginalPrice
- return json.Marshal(toSerialize)
- }
- func (o ActApplyInfo) String() string {
- var ret string
- ret += fmt.Sprintf("StoreInfo:%v, ", o.StoreInfo)
- if o.GoodsOriginalPrice == nil {
- ret += "GoodsOriginalPrice:<nil>"
- } else {
- ret += fmt.Sprintf("GoodsOriginalPrice:%v", *o.GoodsOriginalPrice)
- }
- return fmt.Sprintf("ActApplyInfo{%s}", ret)
- }
- func (o ActApplyInfo) Clone() *ActApplyInfo {
- ret := ActApplyInfo{}
- if o.StoreInfo != nil {
- ret.StoreInfo = o.StoreInfo.Clone()
- }
- if o.GoodsOriginalPrice != nil {
- ret.GoodsOriginalPrice = new(int64)
- *ret.GoodsOriginalPrice = *o.GoodsOriginalPrice
- }
- return &ret
- }
- // ActArea
- type ActArea struct {
- // 省名称
- Province *string `json:"province,omitempty"`
- // 市名称
- City *string `json:"city,omitempty"`
- // 区名称
- District *string `json:"district,omitempty"`
- }
- func (o ActArea) MarshalJSON() ([]byte, error) {
- toSerialize := map[string]interface{}{}
- if o.Province != nil {
- toSerialize["province"] = o.Province
- }
- if o.City != nil {
- toSerialize["city"] = o.City
- }
- if o.District != nil {
- toSerialize["district"] = o.District
- }
- return json.Marshal(toSerialize)
- }
- func (o ActArea) String() string {
- var ret string
- if o.Province == nil {
- ret += "Province:<nil>, "
- } else {
- ret += fmt.Sprintf("Province:%v, ", *o.Province)
- }
- if o.City == nil {
- ret += "City:<nil>, "
- } else {
- ret += fmt.Sprintf("City:%v, ", *o.City)
- }
- if o.District == nil {
- ret += "District:<nil>"
- } else {
- ret += fmt.Sprintf("District:%v", *o.District)
- }
- return fmt.Sprintf("ActArea{%s}", ret)
- }
- func (o ActArea) Clone() *ActArea {
- ret := ActArea{}
- if o.Province != nil {
- ret.Province = new(string)
- *ret.Province = *o.Province
- }
- if o.City != nil {
- ret.City = new(string)
- *ret.City = *o.City
- }
- if o.District != nil {
- ret.District = new(string)
- *ret.District = *o.District
- }
- return &ret
- }
- // ActInfo
- type ActInfo struct {
- // 活动名称
- ActivityName *string `json:"activity_name,omitempty"`
- // 遵循rfc3339标准格式,格式为YYYY-MM-DDTHH:mm:ss+TIMEZONE,YYYY-MM-DD表示年月日,T出现在字符串中,表示time元素的开头,HH:mm:ss表示时分秒,TIMEZONE表示时区(+08:00表示东八区时间,领先UTC 8小时,即北京时间)
- ApplyStartTime *string `json:"apply_start_time,omitempty"`
- // 遵循rfc3339标准格式,格式为YYYY-MM-DDTHH:mm:ss+TIMEZONE,YYYY-MM-DD表示年月日,T出现在字符串中,表示time元素的开头,HH:mm:ss表示时分秒,TIMEZONE表示时区(+08:00表示东八区时间,领先UTC 8小时,即北京时间)
- ApplyEndTime *string `json:"apply_end_time,omitempty"`
- // 遵循rfc3339标准格式,格式为YYYY-MM-DDTHH:mm:ss+TIMEZONE,YYYY-MM-DD表示年月日,T出现在字符串中,表示time元素的开头,HH:mm:ss表示时分秒,TIMEZONE表示时区(+08:00表示东八区时间,领先UTC 8小时,即北京时间)
- ActivityStartTime *string `json:"activity_start_time,omitempty"`
- // 遵循rfc3339标准格式,格式为YYYY-MM-DDTHH:mm:ss+TIMEZONE,YYYY-MM-DD表示年月日,T出现在字符串中,表示time元素的开头,HH:mm:ss表示时分秒,TIMEZONE表示时区(+08:00表示东八区时间,领先UTC 8小时,即北京时间)
- ActivityEndTime *string `json:"activity_end_time,omitempty"`
- // 活动描述
- ActivityDescription *string `json:"activity_description,omitempty"`
- }
- func (o ActInfo) MarshalJSON() ([]byte, error) {
- toSerialize := map[string]interface{}{}
- if o.ActivityName != nil {
- toSerialize["activity_name"] = o.ActivityName
- }
- if o.ApplyStartTime != nil {
- toSerialize["apply_start_time"] = o.ApplyStartTime
- }
- if o.ApplyEndTime != nil {
- toSerialize["apply_end_time"] = o.ApplyEndTime
- }
- if o.ActivityStartTime != nil {
- toSerialize["activity_start_time"] = o.ActivityStartTime
- }
- if o.ActivityEndTime != nil {
- toSerialize["activity_end_time"] = o.ActivityEndTime
- }
- if o.ActivityDescription != nil {
- toSerialize["activity_description"] = o.ActivityDescription
- }
- return json.Marshal(toSerialize)
- }
- func (o ActInfo) String() string {
- var ret string
- if o.ActivityName == nil {
- ret += "ActivityName:<nil>, "
- } else {
- ret += fmt.Sprintf("ActivityName:%v, ", *o.ActivityName)
- }
- if o.ApplyStartTime == nil {
- ret += "ApplyStartTime:<nil>, "
- } else {
- ret += fmt.Sprintf("ApplyStartTime:%v, ", *o.ApplyStartTime)
- }
- if o.ApplyEndTime == nil {
- ret += "ApplyEndTime:<nil>, "
- } else {
- ret += fmt.Sprintf("ApplyEndTime:%v, ", *o.ApplyEndTime)
- }
- if o.ActivityStartTime == nil {
- ret += "ActivityStartTime:<nil>, "
- } else {
- ret += fmt.Sprintf("ActivityStartTime:%v, ", *o.ActivityStartTime)
- }
- if o.ActivityEndTime == nil {
- ret += "ActivityEndTime:<nil>, "
- } else {
- ret += fmt.Sprintf("ActivityEndTime:%v, ", *o.ActivityEndTime)
- }
- if o.ActivityDescription == nil {
- ret += "ActivityDescription:<nil>"
- } else {
- ret += fmt.Sprintf("ActivityDescription:%v", *o.ActivityDescription)
- }
- return fmt.Sprintf("ActInfo{%s}", ret)
- }
- func (o ActInfo) Clone() *ActInfo {
- ret := ActInfo{}
- if o.ActivityName != nil {
- ret.ActivityName = new(string)
- *ret.ActivityName = *o.ActivityName
- }
- if o.ApplyStartTime != nil {
- ret.ApplyStartTime = new(string)
- *ret.ApplyStartTime = *o.ApplyStartTime
- }
- if o.ApplyEndTime != nil {
- ret.ApplyEndTime = new(string)
- *ret.ApplyEndTime = *o.ApplyEndTime
- }
- if o.ActivityStartTime != nil {
- ret.ActivityStartTime = new(string)
- *ret.ActivityStartTime = *o.ActivityStartTime
- }
- if o.ActivityEndTime != nil {
- ret.ActivityEndTime = new(string)
- *ret.ActivityEndTime = *o.ActivityEndTime
- }
- if o.ActivityDescription != nil {
- ret.ActivityDescription = new(string)
- *ret.ActivityDescription = *o.ActivityDescription
- }
- return &ret
- }
- // ActRule
- type ActRule struct {
- // 购买单件商品,补贴给门店的金额(单位:分)
- StoreSubsidy *int64 `json:"store_subsidy,omitempty"`
- // 购买单件商品,补贴给服务商的佣金(单位:分)
- ServiceProviderSubsidy *int64 `json:"service_provider_subsidy,omitempty"`
- // 活动门店补贴商品数上限
- StoreSubsidyQuota *int64 `json:"store_subsidy_quota,omitempty"`
- // 单用户享受加价购优惠次数上限
- UserSubsidyQuota *int64 `json:"user_subsidy_quota,omitempty"`
- // 活动区域列表
- Areas []ActArea `json:"areas,omitempty"`
- }
- func (o ActRule) MarshalJSON() ([]byte, error) {
- toSerialize := map[string]interface{}{}
- if o.StoreSubsidy != nil {
- toSerialize["store_subsidy"] = o.StoreSubsidy
- }
- if o.ServiceProviderSubsidy != nil {
- toSerialize["service_provider_subsidy"] = o.ServiceProviderSubsidy
- }
- if o.StoreSubsidyQuota != nil {
- toSerialize["store_subsidy_quota"] = o.StoreSubsidyQuota
- }
- if o.UserSubsidyQuota != nil {
- toSerialize["user_subsidy_quota"] = o.UserSubsidyQuota
- }
- if o.Areas != nil {
- toSerialize["areas"] = o.Areas
- }
- return json.Marshal(toSerialize)
- }
- func (o ActRule) String() string {
- var ret string
- if o.StoreSubsidy == nil {
- ret += "StoreSubsidy:<nil>, "
- } else {
- ret += fmt.Sprintf("StoreSubsidy:%v, ", *o.StoreSubsidy)
- }
- if o.ServiceProviderSubsidy == nil {
- ret += "ServiceProviderSubsidy:<nil>, "
- } else {
- ret += fmt.Sprintf("ServiceProviderSubsidy:%v, ", *o.ServiceProviderSubsidy)
- }
- if o.StoreSubsidyQuota == nil {
- ret += "StoreSubsidyQuota:<nil>, "
- } else {
- ret += fmt.Sprintf("StoreSubsidyQuota:%v, ", *o.StoreSubsidyQuota)
- }
- if o.UserSubsidyQuota == nil {
- ret += "UserSubsidyQuota:<nil>, "
- } else {
- ret += fmt.Sprintf("UserSubsidyQuota:%v, ", *o.UserSubsidyQuota)
- }
- ret += fmt.Sprintf("Areas:%v", o.Areas)
- return fmt.Sprintf("ActRule{%s}", ret)
- }
- func (o ActRule) Clone() *ActRule {
- ret := ActRule{}
- if o.StoreSubsidy != nil {
- ret.StoreSubsidy = new(int64)
- *ret.StoreSubsidy = *o.StoreSubsidy
- }
- if o.ServiceProviderSubsidy != nil {
- ret.ServiceProviderSubsidy = new(int64)
- *ret.ServiceProviderSubsidy = *o.ServiceProviderSubsidy
- }
- if o.StoreSubsidyQuota != nil {
- ret.StoreSubsidyQuota = new(int64)
- *ret.StoreSubsidyQuota = *o.StoreSubsidyQuota
- }
- if o.UserSubsidyQuota != nil {
- ret.UserSubsidyQuota = new(int64)
- *ret.UserSubsidyQuota = *o.UserSubsidyQuota
- }
- if o.Areas != nil {
- ret.Areas = make([]ActArea, len(o.Areas))
- for i, item := range o.Areas {
- ret.Areas[i] = *item.Clone()
- }
- }
- return &ret
- }
- // AddRepresentativeRequest
- type AddRepresentativeRequest struct {
- // 零售小店活动ID
- ActivityId *string `json:"activity_id"`
- // 业务代理信息列表
- RepresentativeInfoList []RepresentativeInfo `json:"representative_info_list"`
- // 商户新增业务代理请求的唯一标识,商户需保证唯一。可包含英文字母,数字,\\|,\\_,\\*,\\-等内容,不允许出现其他不合法符号。
- OutRequestNo *string `json:"out_request_no"`
- // 添加时间
- AddTime *string `json:"add_time,omitempty"`
- }
- func (o AddRepresentativeRequest) MarshalJSON() ([]byte, error) {
- toSerialize := map[string]interface{}{}
- if o.ActivityId == nil {
- return nil, fmt.Errorf("field `ActivityId` is required and must be specified in AddRepresentativeRequest")
- }
- toSerialize["activity_id"] = o.ActivityId
- if o.RepresentativeInfoList == nil {
- return nil, fmt.Errorf("field `RepresentativeInfoList` is required and must be specified in AddRepresentativeRequest")
- }
- toSerialize["representative_info_list"] = o.RepresentativeInfoList
- if o.OutRequestNo == nil {
- return nil, fmt.Errorf("field `OutRequestNo` is required and must be specified in AddRepresentativeRequest")
- }
- toSerialize["out_request_no"] = o.OutRequestNo
- if o.AddTime != nil {
- toSerialize["add_time"] = o.AddTime
- }
- return json.Marshal(toSerialize)
- }
- func (o AddRepresentativeRequest) String() string {
- var ret string
- if o.ActivityId == nil {
- ret += "ActivityId:<nil>, "
- } else {
- ret += fmt.Sprintf("ActivityId:%v, ", *o.ActivityId)
- }
- ret += fmt.Sprintf("RepresentativeInfoList:%v, ", o.RepresentativeInfoList)
- if o.OutRequestNo == nil {
- ret += "OutRequestNo:<nil>, "
- } else {
- ret += fmt.Sprintf("OutRequestNo:%v, ", *o.OutRequestNo)
- }
- if o.AddTime == nil {
- ret += "AddTime:<nil>"
- } else {
- ret += fmt.Sprintf("AddTime:%v", *o.AddTime)
- }
- return fmt.Sprintf("AddRepresentativeRequest{%s}", ret)
- }
- func (o AddRepresentativeRequest) Clone() *AddRepresentativeRequest {
- ret := AddRepresentativeRequest{}
- if o.ActivityId != nil {
- ret.ActivityId = new(string)
- *ret.ActivityId = *o.ActivityId
- }
- if o.RepresentativeInfoList != nil {
- ret.RepresentativeInfoList = make([]RepresentativeInfo, len(o.RepresentativeInfoList))
- for i, item := range o.RepresentativeInfoList {
- ret.RepresentativeInfoList[i] = *item.Clone()
- }
- }
- if o.OutRequestNo != nil {
- ret.OutRequestNo = new(string)
- *ret.OutRequestNo = *o.OutRequestNo
- }
- if o.AddTime != nil {
- ret.AddTime = new(string)
- *ret.AddTime = *o.AddTime
- }
- return &ret
- }
- // AddRepresentativesRequest
- type AddRepresentativesRequest struct {
- // 业务代理信息列表
- RepresentativeInfoList []RepresentativeInfo `json:"representative_info_list"`
- // 商户新增业务代理请求的唯一标识,商户需保证唯一。可包含英文字母,数字,\\|,\\_,\\*,\\-等内容,不允许出现其他不合法符号。
- OutRequestNo *string `json:"out_request_no"`
- // 添加时间
- AddTime *string `json:"add_time,omitempty"`
- }
- func (o AddRepresentativesRequest) MarshalJSON() ([]byte, error) {
- toSerialize := map[string]interface{}{}
- if o.RepresentativeInfoList == nil {
- return nil, fmt.Errorf("field `RepresentativeInfoList` is required and must be specified in AddRepresentativesRequest")
- }
- toSerialize["representative_info_list"] = o.RepresentativeInfoList
- if o.OutRequestNo == nil {
- return nil, fmt.Errorf("field `OutRequestNo` is required and must be specified in AddRepresentativesRequest")
- }
- toSerialize["out_request_no"] = o.OutRequestNo
- if o.AddTime != nil {
- toSerialize["add_time"] = o.AddTime
- }
- return json.Marshal(toSerialize)
- }
- func (o AddRepresentativesRequest) String() string {
- var ret string
- ret += fmt.Sprintf("RepresentativeInfoList:%v, ", o.RepresentativeInfoList)
- if o.OutRequestNo == nil {
- ret += "OutRequestNo:<nil>, "
- } else {
- ret += fmt.Sprintf("OutRequestNo:%v, ", *o.OutRequestNo)
- }
- if o.AddTime == nil {
- ret += "AddTime:<nil>"
- } else {
- ret += fmt.Sprintf("AddTime:%v", *o.AddTime)
- }
- return fmt.Sprintf("AddRepresentativesRequest{%s}", ret)
- }
- func (o AddRepresentativesRequest) Clone() *AddRepresentativesRequest {
- ret := AddRepresentativesRequest{}
- if o.RepresentativeInfoList != nil {
- ret.RepresentativeInfoList = make([]RepresentativeInfo, len(o.RepresentativeInfoList))
- for i, item := range o.RepresentativeInfoList {
- ret.RepresentativeInfoList[i] = *item.Clone()
- }
- }
- if o.OutRequestNo != nil {
- ret.OutRequestNo = new(string)
- *ret.OutRequestNo = *o.OutRequestNo
- }
- if o.AddTime != nil {
- ret.AddTime = new(string)
- *ret.AddTime = *o.AddTime
- }
- return &ret
- }
- // AddRepresentativesResponse
- type AddRepresentativesResponse struct {
- // 零售小店活动ID
- ActivityId *string `json:"activity_id"`
- // 添加失败业务代理信息列表
- FailedRepresentativeInfoList []RepresentativeInfo `json:"failed_representative_info_list,omitempty"`
- // 添加时间
- AddTime *string `json:"add_time"`
- }
- func (o AddRepresentativesResponse) MarshalJSON() ([]byte, error) {
- toSerialize := map[string]interface{}{}
- if o.ActivityId == nil {
- return nil, fmt.Errorf("field `ActivityId` is required and must be specified in AddRepresentativesResponse")
- }
- toSerialize["activity_id"] = o.ActivityId
- if o.FailedRepresentativeInfoList != nil {
- toSerialize["failed_representative_info_list"] = o.FailedRepresentativeInfoList
- }
- if o.AddTime == nil {
- return nil, fmt.Errorf("field `AddTime` is required and must be specified in AddRepresentativesResponse")
- }
- toSerialize["add_time"] = o.AddTime
- return json.Marshal(toSerialize)
- }
- func (o AddRepresentativesResponse) String() string {
- var ret string
- if o.ActivityId == nil {
- ret += "ActivityId:<nil>, "
- } else {
- ret += fmt.Sprintf("ActivityId:%v, ", *o.ActivityId)
- }
- ret += fmt.Sprintf("FailedRepresentativeInfoList:%v, ", o.FailedRepresentativeInfoList)
- if o.AddTime == nil {
- ret += "AddTime:<nil>"
- } else {
- ret += fmt.Sprintf("AddTime:%v", *o.AddTime)
- }
- return fmt.Sprintf("AddRepresentativesResponse{%s}", ret)
- }
- func (o AddRepresentativesResponse) Clone() *AddRepresentativesResponse {
- ret := AddRepresentativesResponse{}
- if o.ActivityId != nil {
- ret.ActivityId = new(string)
- *ret.ActivityId = *o.ActivityId
- }
- if o.FailedRepresentativeInfoList != nil {
- ret.FailedRepresentativeInfoList = make([]RepresentativeInfo, len(o.FailedRepresentativeInfoList))
- for i, item := range o.FailedRepresentativeInfoList {
- ret.FailedRepresentativeInfoList[i] = *item.Clone()
- }
- }
- if o.AddTime != nil {
- ret.AddTime = new(string)
- *ret.AddTime = *o.AddTime
- }
- return &ret
- }
- // AddStoresBody
- type AddStoresBody struct {
- // 商户新增小店活动门店凭据号,商户侧需保持唯一性。可包含英文字母,数字,\\\\|,\\\\_,\\\\*,\\\\-等内容,不允许出现其他不合法符号。
- OutRequestNo *string `json:"out_request_no"`
- // 添加时间,遵循rfc3339标准格式,格式为yyyy-MM-DDTHH:mm:ss+TIMEZONE,yyyy-MM-DD表示年月日,T出现在字符串中,表示time元素的开头,HH:mm:ss表示时分秒,TIMEZONE表示时区(+08:00表示东八区时间,领先UTC8小时,即北京时间)。例如:2015-05-20T13:29:35+08:00表示,北京时间2015年5月20日 13点29分35秒。
- AddTime *string `json:"add_time"`
- // 待新增的小店活动门店列表
- Stores []RetailStoreInfo `json:"stores"`
- }
- func (o AddStoresBody) MarshalJSON() ([]byte, error) {
- toSerialize := map[string]interface{}{}
- if o.OutRequestNo == nil {
- return nil, fmt.Errorf("field `OutRequestNo` is required and must be specified in AddStoresBody")
- }
- toSerialize["out_request_no"] = o.OutRequestNo
- if o.AddTime == nil {
- return nil, fmt.Errorf("field `AddTime` is required and must be specified in AddStoresBody")
- }
- toSerialize["add_time"] = o.AddTime
- if o.Stores == nil {
- return nil, fmt.Errorf("field `Stores` is required and must be specified in AddStoresBody")
- }
- toSerialize["stores"] = o.Stores
- return json.Marshal(toSerialize)
- }
- func (o AddStoresBody) String() string {
- var ret string
- if o.OutRequestNo == nil {
- ret += "OutRequestNo:<nil>, "
- } else {
- ret += fmt.Sprintf("OutRequestNo:%v, ", *o.OutRequestNo)
- }
- if o.AddTime == nil {
- ret += "AddTime:<nil>, "
- } else {
- ret += fmt.Sprintf("AddTime:%v, ", *o.AddTime)
- }
- ret += fmt.Sprintf("Stores:%v", o.Stores)
- return fmt.Sprintf("AddStoresBody{%s}", ret)
- }
- func (o AddStoresBody) Clone() *AddStoresBody {
- ret := AddStoresBody{}
- if o.OutRequestNo != nil {
- ret.OutRequestNo = new(string)
- *ret.OutRequestNo = *o.OutRequestNo
- }
- if o.AddTime != nil {
- ret.AddTime = new(string)
- *ret.AddTime = *o.AddTime
- }
- if o.Stores != nil {
- ret.Stores = make([]RetailStoreInfo, len(o.Stores))
- for i, item := range o.Stores {
- ret.Stores[i] = *item.Clone()
- }
- }
- return &ret
- }
- // AddStoresRequest
- type AddStoresRequest struct {
- // 品牌ID
- BrandId *string `json:"brand_id"`
- // 商户新增小店活动门店凭据号,商户侧需保持唯一性。可包含英文字母,数字,\\\\|,\\\\_,\\\\*,\\\\-等内容,不允许出现其他不合法符号。
- OutRequestNo *string `json:"out_request_no"`
- // 添加时间,遵循rfc3339标准格式,格式为yyyy-MM-DDTHH:mm:ss+TIMEZONE,yyyy-MM-DD表示年月日,T出现在字符串中,表示time元素的开头,HH:mm:ss表示时分秒,TIMEZONE表示时区(+08:00表示东八区时间,领先UTC8小时,即北京时间)。例如:2015-05-20T13:29:35+08:00表示,北京时间2015年5月20日 13点29分35秒。
- AddTime *string `json:"add_time"`
- // 待新增的小店活动门店列表
- Stores []RetailStoreInfo `json:"stores"`
- }
- func (o AddStoresRequest) MarshalJSON() ([]byte, error) {
- toSerialize := map[string]interface{}{}
- if o.BrandId == nil {
- return nil, fmt.Errorf("field `BrandId` is required and must be specified in AddStoresRequest")
- }
- toSerialize["brand_id"] = o.BrandId
- if o.OutRequestNo == nil {
- return nil, fmt.Errorf("field `OutRequestNo` is required and must be specified in AddStoresRequest")
- }
- toSerialize["out_request_no"] = o.OutRequestNo
- if o.AddTime == nil {
- return nil, fmt.Errorf("field `AddTime` is required and must be specified in AddStoresRequest")
- }
- toSerialize["add_time"] = o.AddTime
- if o.Stores == nil {
- return nil, fmt.Errorf("field `Stores` is required and must be specified in AddStoresRequest")
- }
- toSerialize["stores"] = o.Stores
- return json.Marshal(toSerialize)
- }
- func (o AddStoresRequest) String() string {
- var ret string
- if o.BrandId == nil {
- ret += "BrandId:<nil>, "
- } else {
- ret += fmt.Sprintf("BrandId:%v, ", *o.BrandId)
- }
- if o.OutRequestNo == nil {
- ret += "OutRequestNo:<nil>, "
- } else {
- ret += fmt.Sprintf("OutRequestNo:%v, ", *o.OutRequestNo)
- }
- if o.AddTime == nil {
- ret += "AddTime:<nil>, "
- } else {
- ret += fmt.Sprintf("AddTime:%v, ", *o.AddTime)
- }
- ret += fmt.Sprintf("Stores:%v", o.Stores)
- return fmt.Sprintf("AddStoresRequest{%s}", ret)
- }
- func (o AddStoresRequest) Clone() *AddStoresRequest {
- ret := AddStoresRequest{}
- if o.BrandId != nil {
- ret.BrandId = new(string)
- *ret.BrandId = *o.BrandId
- }
- if o.OutRequestNo != nil {
- ret.OutRequestNo = new(string)
- *ret.OutRequestNo = *o.OutRequestNo
- }
- if o.AddTime != nil {
- ret.AddTime = new(string)
- *ret.AddTime = *o.AddTime
- }
- if o.Stores != nil {
- ret.Stores = make([]RetailStoreInfo, len(o.Stores))
- for i, item := range o.Stores {
- ret.Stores[i] = *item.Clone()
- }
- }
- return &ret
- }
- // AddStoresResponse
- type AddStoresResponse struct {
- // 添加时间,遵循rfc3339标准格式,格式为yyyy-MM-DDTHH:mm:ss+TIMEZONE,yyyy-MM-DD表示年月日,T出现在字符串中,表示time元素的开头,HH:mm:ss表示时分秒,TIMEZONE表示时区(+08:00表示东八区时间,领先UTC8小时,即北京时间)。例如:2015-05-20T13:29:35+08:00表示,北京时间2015年5月20日 13点29分35秒。
- AddTime *string `json:"add_time,omitempty"`
- // 添加失败的小店活动门店列表
- FailedStores []RetailStoreInfo `json:"failed_stores,omitempty"`
- }
- func (o AddStoresResponse) MarshalJSON() ([]byte, error) {
- toSerialize := map[string]interface{}{}
- if o.AddTime != nil {
- toSerialize["add_time"] = o.AddTime
- }
- if o.FailedStores != nil {
- toSerialize["failed_stores"] = o.FailedStores
- }
- return json.Marshal(toSerialize)
- }
- func (o AddStoresResponse) String() string {
- var ret string
- if o.AddTime == nil {
- ret += "AddTime:<nil>, "
- } else {
- ret += fmt.Sprintf("AddTime:%v, ", *o.AddTime)
- }
- ret += fmt.Sprintf("FailedStores:%v", o.FailedStores)
- return fmt.Sprintf("AddStoresResponse{%s}", ret)
- }
- func (o AddStoresResponse) Clone() *AddStoresResponse {
- ret := AddStoresResponse{}
- if o.AddTime != nil {
- ret.AddTime = new(string)
- *ret.AddTime = *o.AddTime
- }
- if o.FailedStores != nil {
- ret.FailedStores = make([]RetailStoreInfo, len(o.FailedStores))
- for i, item := range o.FailedStores {
- ret.FailedStores[i] = *item.Clone()
- }
- }
- return &ret
- }
- // ApplyActivityBody
- type ApplyActivityBody struct {
- // 调用报名活动API的商户的商户号
- CallerMerchantId *string `json:"caller_merchant_id"`
- // 门店报名信息
- ApplyInfos []ActApplyInfo `json:"apply_infos,omitempty"`
- }
- func (o ApplyActivityBody) MarshalJSON() ([]byte, error) {
- toSerialize := map[string]interface{}{}
- if o.CallerMerchantId == nil {
- return nil, fmt.Errorf("field `CallerMerchantId` is required and must be specified in ApplyActivityBody")
- }
- toSerialize["caller_merchant_id"] = o.CallerMerchantId
- if o.ApplyInfos != nil {
- toSerialize["apply_infos"] = o.ApplyInfos
- }
- return json.Marshal(toSerialize)
- }
- func (o ApplyActivityBody) String() string {
- var ret string
- if o.CallerMerchantId == nil {
- ret += "CallerMerchantId:<nil>, "
- } else {
- ret += fmt.Sprintf("CallerMerchantId:%v, ", *o.CallerMerchantId)
- }
- ret += fmt.Sprintf("ApplyInfos:%v", o.ApplyInfos)
- return fmt.Sprintf("ApplyActivityBody{%s}", ret)
- }
- func (o ApplyActivityBody) Clone() *ApplyActivityBody {
- ret := ApplyActivityBody{}
- if o.CallerMerchantId != nil {
- ret.CallerMerchantId = new(string)
- *ret.CallerMerchantId = *o.CallerMerchantId
- }
- if o.ApplyInfos != nil {
- ret.ApplyInfos = make([]ActApplyInfo, len(o.ApplyInfos))
- for i, item := range o.ApplyInfos {
- ret.ApplyInfos[i] = *item.Clone()
- }
- }
- return &ret
- }
- // ApplyActivityRequest
- type ApplyActivityRequest struct {
- // 活动ID
- ActivityId *string `json:"activity_id"`
- // 调用报名活动API的商户的商户号
- CallerMerchantId *string `json:"caller_merchant_id"`
- // 门店报名信息
- ApplyInfos []ActApplyInfo `json:"apply_infos,omitempty"`
- }
- func (o ApplyActivityRequest) MarshalJSON() ([]byte, error) {
- toSerialize := map[string]interface{}{}
- if o.ActivityId == nil {
- return nil, fmt.Errorf("field `ActivityId` is required and must be specified in ApplyActivityRequest")
- }
- toSerialize["activity_id"] = o.ActivityId
- if o.CallerMerchantId == nil {
- return nil, fmt.Errorf("field `CallerMerchantId` is required and must be specified in ApplyActivityRequest")
- }
- toSerialize["caller_merchant_id"] = o.CallerMerchantId
- if o.ApplyInfos != nil {
- toSerialize["apply_infos"] = o.ApplyInfos
- }
- return json.Marshal(toSerialize)
- }
- func (o ApplyActivityRequest) String() string {
- var ret string
- if o.ActivityId == nil {
- ret += "ActivityId:<nil>, "
- } else {
- ret += fmt.Sprintf("ActivityId:%v, ", *o.ActivityId)
- }
- if o.CallerMerchantId == nil {
- ret += "CallerMerchantId:<nil>, "
- } else {
- ret += fmt.Sprintf("CallerMerchantId:%v, ", *o.CallerMerchantId)
- }
- ret += fmt.Sprintf("ApplyInfos:%v", o.ApplyInfos)
- return fmt.Sprintf("ApplyActivityRequest{%s}", ret)
- }
- func (o ApplyActivityRequest) Clone() *ApplyActivityRequest {
- ret := ApplyActivityRequest{}
- if o.ActivityId != nil {
- ret.ActivityId = new(string)
- *ret.ActivityId = *o.ActivityId
- }
- if o.CallerMerchantId != nil {
- ret.CallerMerchantId = new(string)
- *ret.CallerMerchantId = *o.CallerMerchantId
- }
- if o.ApplyInfos != nil {
- ret.ApplyInfos = make([]ActApplyInfo, len(o.ApplyInfos))
- for i, item := range o.ApplyInfos {
- ret.ApplyInfos[i] = *item.Clone()
- }
- }
- return &ret
- }
- // ApplyActivityResponse
- type ApplyActivityResponse struct {
- // 返回结果文案
- ReturnMessage *string `json:"return_message,omitempty"`
- // 失败的报名记录
- FailedApplyInfos []ActApplyInfo `json:"failed_apply_infos,omitempty"`
- // 成功的报名记录
- SucceedApplyInfos []ActApplyInfo `json:"succeed_apply_infos,omitempty"`
- }
- func (o ApplyActivityResponse) MarshalJSON() ([]byte, error) {
- toSerialize := map[string]interface{}{}
- if o.ReturnMessage != nil {
- toSerialize["return_message"] = o.ReturnMessage
- }
- if o.FailedApplyInfos != nil {
- toSerialize["failed_apply_infos"] = o.FailedApplyInfos
- }
- if o.SucceedApplyInfos != nil {
- toSerialize["succeed_apply_infos"] = o.SucceedApplyInfos
- }
- return json.Marshal(toSerialize)
- }
- func (o ApplyActivityResponse) String() string {
- var ret string
- if o.ReturnMessage == nil {
- ret += "ReturnMessage:<nil>, "
- } else {
- ret += fmt.Sprintf("ReturnMessage:%v, ", *o.ReturnMessage)
- }
- ret += fmt.Sprintf("FailedApplyInfos:%v, ", o.FailedApplyInfos)
- ret += fmt.Sprintf("SucceedApplyInfos:%v", o.SucceedApplyInfos)
- return fmt.Sprintf("ApplyActivityResponse{%s}", ret)
- }
- func (o ApplyActivityResponse) Clone() *ApplyActivityResponse {
- ret := ApplyActivityResponse{}
- if o.ReturnMessage != nil {
- ret.ReturnMessage = new(string)
- *ret.ReturnMessage = *o.ReturnMessage
- }
- if o.FailedApplyInfos != nil {
- ret.FailedApplyInfos = make([]ActApplyInfo, len(o.FailedApplyInfos))
- for i, item := range o.FailedApplyInfos {
- ret.FailedApplyInfos[i] = *item.Clone()
- }
- }
- if o.SucceedApplyInfos != nil {
- ret.SucceedApplyInfos = make([]ActApplyInfo, len(o.SucceedApplyInfos))
- for i, item := range o.SucceedApplyInfos {
- ret.SucceedApplyInfos[i] = *item.Clone()
- }
- }
- return &ret
- }
- // CreateMaterialsBody
- type CreateMaterialsBody struct {
- // 商户添加业务代理信息凭据号,商户侧需保持唯一性。可包含英文字母,数字,\\\\|,\\\\_,\\\\*,\\\\-等内容,不允许出现其他不合法符号。
- OutRequestNo *string `json:"out_request_no"`
- // 生成物料码数量
- MaterialNum *int64 `json:"material_num"`
- }
- func (o CreateMaterialsBody) MarshalJSON() ([]byte, error) {
- toSerialize := map[string]interface{}{}
- if o.OutRequestNo == nil {
- return nil, fmt.Errorf("field `OutRequestNo` is required and must be specified in CreateMaterialsBody")
- }
- toSerialize["out_request_no"] = o.OutRequestNo
- if o.MaterialNum == nil {
- return nil, fmt.Errorf("field `MaterialNum` is required and must be specified in CreateMaterialsBody")
- }
- toSerialize["material_num"] = o.MaterialNum
- return json.Marshal(toSerialize)
- }
- func (o CreateMaterialsBody) String() string {
- var ret string
- if o.OutRequestNo == nil {
- ret += "OutRequestNo:<nil>, "
- } else {
- ret += fmt.Sprintf("OutRequestNo:%v, ", *o.OutRequestNo)
- }
- if o.MaterialNum == nil {
- ret += "MaterialNum:<nil>"
- } else {
- ret += fmt.Sprintf("MaterialNum:%v", *o.MaterialNum)
- }
- return fmt.Sprintf("CreateMaterialsBody{%s}", ret)
- }
- func (o CreateMaterialsBody) Clone() *CreateMaterialsBody {
- ret := CreateMaterialsBody{}
- if o.OutRequestNo != nil {
- ret.OutRequestNo = new(string)
- *ret.OutRequestNo = *o.OutRequestNo
- }
- if o.MaterialNum != nil {
- ret.MaterialNum = new(int64)
- *ret.MaterialNum = *o.MaterialNum
- }
- return &ret
- }
- // CreateMaterialsRequest
- type CreateMaterialsRequest struct {
- // 品牌ID
- BrandId *string `json:"brand_id"`
- // 商户添加业务代理信息凭据号,商户侧需保持唯一性。可包含英文字母,数字,\\\\|,\\\\_,\\\\*,\\\\-等内容,不允许出现其他不合法符号。
- OutRequestNo *string `json:"out_request_no"`
- // 生成物料码数量
- MaterialNum *int64 `json:"material_num"`
- }
- func (o CreateMaterialsRequest) MarshalJSON() ([]byte, error) {
- toSerialize := map[string]interface{}{}
- if o.BrandId == nil {
- return nil, fmt.Errorf("field `BrandId` is required and must be specified in CreateMaterialsRequest")
- }
- toSerialize["brand_id"] = o.BrandId
- if o.OutRequestNo == nil {
- return nil, fmt.Errorf("field `OutRequestNo` is required and must be specified in CreateMaterialsRequest")
- }
- toSerialize["out_request_no"] = o.OutRequestNo
- if o.MaterialNum == nil {
- return nil, fmt.Errorf("field `MaterialNum` is required and must be specified in CreateMaterialsRequest")
- }
- toSerialize["material_num"] = o.MaterialNum
- return json.Marshal(toSerialize)
- }
- func (o CreateMaterialsRequest) String() string {
- var ret string
- if o.BrandId == nil {
- ret += "BrandId:<nil>, "
- } else {
- ret += fmt.Sprintf("BrandId:%v, ", *o.BrandId)
- }
- if o.OutRequestNo == nil {
- ret += "OutRequestNo:<nil>, "
- } else {
- ret += fmt.Sprintf("OutRequestNo:%v, ", *o.OutRequestNo)
- }
- if o.MaterialNum == nil {
- ret += "MaterialNum:<nil>"
- } else {
- ret += fmt.Sprintf("MaterialNum:%v", *o.MaterialNum)
- }
- return fmt.Sprintf("CreateMaterialsRequest{%s}", ret)
- }
- func (o CreateMaterialsRequest) Clone() *CreateMaterialsRequest {
- ret := CreateMaterialsRequest{}
- if o.BrandId != nil {
- ret.BrandId = new(string)
- *ret.BrandId = *o.BrandId
- }
- if o.OutRequestNo != nil {
- ret.OutRequestNo = new(string)
- *ret.OutRequestNo = *o.OutRequestNo
- }
- if o.MaterialNum != nil {
- ret.MaterialNum = new(int64)
- *ret.MaterialNum = *o.MaterialNum
- }
- return &ret
- }
- // DeleteRepresentativeBody
- type DeleteRepresentativeBody struct {
- // 业务代理信息列表
- RepresentativeInfoList []RepresentativeInfo `json:"representative_info_list"`
- // 商户删除业务代理请求的唯一标识,商户需保证唯一。可包含英文字母,数字,\\|,\\_,\\*,\\-等内容,不允许出现其他不合法符号。
- OutRequestNo *string `json:"out_request_no"`
- // 删除时间
- DeleteTime *string `json:"delete_time"`
- }
- func (o DeleteRepresentativeBody) MarshalJSON() ([]byte, error) {
- toSerialize := map[string]interface{}{}
- if o.RepresentativeInfoList == nil {
- return nil, fmt.Errorf("field `RepresentativeInfoList` is required and must be specified in DeleteRepresentativeBody")
- }
- toSerialize["representative_info_list"] = o.RepresentativeInfoList
- if o.OutRequestNo == nil {
- return nil, fmt.Errorf("field `OutRequestNo` is required and must be specified in DeleteRepresentativeBody")
- }
- toSerialize["out_request_no"] = o.OutRequestNo
- if o.DeleteTime == nil {
- return nil, fmt.Errorf("field `DeleteTime` is required and must be specified in DeleteRepresentativeBody")
- }
- toSerialize["delete_time"] = o.DeleteTime
- return json.Marshal(toSerialize)
- }
- func (o DeleteRepresentativeBody) String() string {
- var ret string
- ret += fmt.Sprintf("RepresentativeInfoList:%v, ", o.RepresentativeInfoList)
- if o.OutRequestNo == nil {
- ret += "OutRequestNo:<nil>, "
- } else {
- ret += fmt.Sprintf("OutRequestNo:%v, ", *o.OutRequestNo)
- }
- if o.DeleteTime == nil {
- ret += "DeleteTime:<nil>"
- } else {
- ret += fmt.Sprintf("DeleteTime:%v", *o.DeleteTime)
- }
- return fmt.Sprintf("DeleteRepresentativeBody{%s}", ret)
- }
- func (o DeleteRepresentativeBody) Clone() *DeleteRepresentativeBody {
- ret := DeleteRepresentativeBody{}
- if o.RepresentativeInfoList != nil {
- ret.RepresentativeInfoList = make([]RepresentativeInfo, len(o.RepresentativeInfoList))
- for i, item := range o.RepresentativeInfoList {
- ret.RepresentativeInfoList[i] = *item.Clone()
- }
- }
- if o.OutRequestNo != nil {
- ret.OutRequestNo = new(string)
- *ret.OutRequestNo = *o.OutRequestNo
- }
- if o.DeleteTime != nil {
- ret.DeleteTime = new(string)
- *ret.DeleteTime = *o.DeleteTime
- }
- return &ret
- }
- // DeleteRepresentativeRequest
- type DeleteRepresentativeRequest struct {
- // 零售小店活动ID
- ActivityId *string `json:"activity_id"`
- // 业务代理信息列表
- RepresentativeInfoList []RepresentativeInfo `json:"representative_info_list"`
- // 商户删除业务代理请求的唯一标识,商户需保证唯一。可包含英文字母,数字,\\|,\\_,\\*,\\-等内容,不允许出现其他不合法符号。
- OutRequestNo *string `json:"out_request_no"`
- // 删除时间
- DeleteTime *string `json:"delete_time"`
- }
- func (o DeleteRepresentativeRequest) MarshalJSON() ([]byte, error) {
- toSerialize := map[string]interface{}{}
- if o.ActivityId == nil {
- return nil, fmt.Errorf("field `ActivityId` is required and must be specified in DeleteRepresentativeRequest")
- }
- toSerialize["activity_id"] = o.ActivityId
- if o.RepresentativeInfoList == nil {
- return nil, fmt.Errorf("field `RepresentativeInfoList` is required and must be specified in DeleteRepresentativeRequest")
- }
- toSerialize["representative_info_list"] = o.RepresentativeInfoList
- if o.OutRequestNo == nil {
- return nil, fmt.Errorf("field `OutRequestNo` is required and must be specified in DeleteRepresentativeRequest")
- }
- toSerialize["out_request_no"] = o.OutRequestNo
- if o.DeleteTime == nil {
- return nil, fmt.Errorf("field `DeleteTime` is required and must be specified in DeleteRepresentativeRequest")
- }
- toSerialize["delete_time"] = o.DeleteTime
- return json.Marshal(toSerialize)
- }
- func (o DeleteRepresentativeRequest) String() string {
- var ret string
- if o.ActivityId == nil {
- ret += "ActivityId:<nil>, "
- } else {
- ret += fmt.Sprintf("ActivityId:%v, ", *o.ActivityId)
- }
- ret += fmt.Sprintf("RepresentativeInfoList:%v, ", o.RepresentativeInfoList)
- if o.OutRequestNo == nil {
- ret += "OutRequestNo:<nil>, "
- } else {
- ret += fmt.Sprintf("OutRequestNo:%v, ", *o.OutRequestNo)
- }
- if o.DeleteTime == nil {
- ret += "DeleteTime:<nil>"
- } else {
- ret += fmt.Sprintf("DeleteTime:%v", *o.DeleteTime)
- }
- return fmt.Sprintf("DeleteRepresentativeRequest{%s}", ret)
- }
- func (o DeleteRepresentativeRequest) Clone() *DeleteRepresentativeRequest {
- ret := DeleteRepresentativeRequest{}
- if o.ActivityId != nil {
- ret.ActivityId = new(string)
- *ret.ActivityId = *o.ActivityId
- }
- if o.RepresentativeInfoList != nil {
- ret.RepresentativeInfoList = make([]RepresentativeInfo, len(o.RepresentativeInfoList))
- for i, item := range o.RepresentativeInfoList {
- ret.RepresentativeInfoList[i] = *item.Clone()
- }
- }
- if o.OutRequestNo != nil {
- ret.OutRequestNo = new(string)
- *ret.OutRequestNo = *o.OutRequestNo
- }
- if o.DeleteTime != nil {
- ret.DeleteTime = new(string)
- *ret.DeleteTime = *o.DeleteTime
- }
- return &ret
- }
- // DeleteRepresentativeResponse
- type DeleteRepresentativeResponse struct {
- // 零售小店活动ID
- ActivityId *string `json:"activity_id"`
- // 删除失败业务代理信息列表
- FailedRepresentativeInfoList []RepresentativeInfo `json:"failed_representative_info_list,omitempty"`
- // 删除时间
- DeleteTime *string `json:"delete_time"`
- }
- func (o DeleteRepresentativeResponse) MarshalJSON() ([]byte, error) {
- toSerialize := map[string]interface{}{}
- if o.ActivityId == nil {
- return nil, fmt.Errorf("field `ActivityId` is required and must be specified in DeleteRepresentativeResponse")
- }
- toSerialize["activity_id"] = o.ActivityId
- if o.FailedRepresentativeInfoList != nil {
- toSerialize["failed_representative_info_list"] = o.FailedRepresentativeInfoList
- }
- if o.DeleteTime == nil {
- return nil, fmt.Errorf("field `DeleteTime` is required and must be specified in DeleteRepresentativeResponse")
- }
- toSerialize["delete_time"] = o.DeleteTime
- return json.Marshal(toSerialize)
- }
- func (o DeleteRepresentativeResponse) String() string {
- var ret string
- if o.ActivityId == nil {
- ret += "ActivityId:<nil>, "
- } else {
- ret += fmt.Sprintf("ActivityId:%v, ", *o.ActivityId)
- }
- ret += fmt.Sprintf("FailedRepresentativeInfoList:%v, ", o.FailedRepresentativeInfoList)
- if o.DeleteTime == nil {
- ret += "DeleteTime:<nil>"
- } else {
- ret += fmt.Sprintf("DeleteTime:%v", *o.DeleteTime)
- }
- return fmt.Sprintf("DeleteRepresentativeResponse{%s}", ret)
- }
- func (o DeleteRepresentativeResponse) Clone() *DeleteRepresentativeResponse {
- ret := DeleteRepresentativeResponse{}
- if o.ActivityId != nil {
- ret.ActivityId = new(string)
- *ret.ActivityId = *o.ActivityId
- }
- if o.FailedRepresentativeInfoList != nil {
- ret.FailedRepresentativeInfoList = make([]RepresentativeInfo, len(o.FailedRepresentativeInfoList))
- for i, item := range o.FailedRepresentativeInfoList {
- ret.FailedRepresentativeInfoList[i] = *item.Clone()
- }
- }
- if o.DeleteTime != nil {
- ret.DeleteTime = new(string)
- *ret.DeleteTime = *o.DeleteTime
- }
- return &ret
- }
- // DeleteStoresBody
- type DeleteStoresBody struct {
- // 商户删除小店活动门店凭据号,商户侧需保持唯一性。可包含英文字母,数字,\\\\|,\\\\_,\\\\*,\\\\-等内容,不允许出现其他不合法符号。
- OutRequestNo *string `json:"out_request_no"`
- // 删除时间,遵循rfc3339标准格式,格式为yyyy-MM-DDTHH:mm:ss+TIMEZONE,yyyy-MM-DD表示年月日,T出现在字符串中,表示time元素的开头,HH:mm:ss表示时分秒,TIMEZONE表示时区(+08:00表示东八区时间,领先UTC8小时,即北京时间)。例如:2015-05-20T13:29:35+08:00表示,北京时间2015年5月20日 13点29分35秒。
- DeleteTime *string `json:"delete_time"`
- // 待删除的小店活动门店列表
- Stores []RetailStoreInfo `json:"stores"`
- }
- func (o DeleteStoresBody) MarshalJSON() ([]byte, error) {
- toSerialize := map[string]interface{}{}
- if o.OutRequestNo == nil {
- return nil, fmt.Errorf("field `OutRequestNo` is required and must be specified in DeleteStoresBody")
- }
- toSerialize["out_request_no"] = o.OutRequestNo
- if o.DeleteTime == nil {
- return nil, fmt.Errorf("field `DeleteTime` is required and must be specified in DeleteStoresBody")
- }
- toSerialize["delete_time"] = o.DeleteTime
- if o.Stores == nil {
- return nil, fmt.Errorf("field `Stores` is required and must be specified in DeleteStoresBody")
- }
- toSerialize["stores"] = o.Stores
- return json.Marshal(toSerialize)
- }
- func (o DeleteStoresBody) String() string {
- var ret string
- if o.OutRequestNo == nil {
- ret += "OutRequestNo:<nil>, "
- } else {
- ret += fmt.Sprintf("OutRequestNo:%v, ", *o.OutRequestNo)
- }
- if o.DeleteTime == nil {
- ret += "DeleteTime:<nil>, "
- } else {
- ret += fmt.Sprintf("DeleteTime:%v, ", *o.DeleteTime)
- }
- ret += fmt.Sprintf("Stores:%v", o.Stores)
- return fmt.Sprintf("DeleteStoresBody{%s}", ret)
- }
- func (o DeleteStoresBody) Clone() *DeleteStoresBody {
- ret := DeleteStoresBody{}
- if o.OutRequestNo != nil {
- ret.OutRequestNo = new(string)
- *ret.OutRequestNo = *o.OutRequestNo
- }
- if o.DeleteTime != nil {
- ret.DeleteTime = new(string)
- *ret.DeleteTime = *o.DeleteTime
- }
- if o.Stores != nil {
- ret.Stores = make([]RetailStoreInfo, len(o.Stores))
- for i, item := range o.Stores {
- ret.Stores[i] = *item.Clone()
- }
- }
- return &ret
- }
- // DeleteStoresRequest
- type DeleteStoresRequest struct {
- // 品牌ID
- BrandId *string `json:"brand_id"`
- // 商户删除小店活动门店凭据号,商户侧需保持唯一性。可包含英文字母,数字,\\\\|,\\\\_,\\\\*,\\\\-等内容,不允许出现其他不合法符号。
- OutRequestNo *string `json:"out_request_no"`
- // 删除时间,遵循rfc3339标准格式,格式为yyyy-MM-DDTHH:mm:ss+TIMEZONE,yyyy-MM-DD表示年月日,T出现在字符串中,表示time元素的开头,HH:mm:ss表示时分秒,TIMEZONE表示时区(+08:00表示东八区时间,领先UTC8小时,即北京时间)。例如:2015-05-20T13:29:35+08:00表示,北京时间2015年5月20日 13点29分35秒。
- DeleteTime *string `json:"delete_time"`
- // 待删除的小店活动门店列表
- Stores []RetailStoreInfo `json:"stores"`
- }
- func (o DeleteStoresRequest) MarshalJSON() ([]byte, error) {
- toSerialize := map[string]interface{}{}
- if o.BrandId == nil {
- return nil, fmt.Errorf("field `BrandId` is required and must be specified in DeleteStoresRequest")
- }
- toSerialize["brand_id"] = o.BrandId
- if o.OutRequestNo == nil {
- return nil, fmt.Errorf("field `OutRequestNo` is required and must be specified in DeleteStoresRequest")
- }
- toSerialize["out_request_no"] = o.OutRequestNo
- if o.DeleteTime == nil {
- return nil, fmt.Errorf("field `DeleteTime` is required and must be specified in DeleteStoresRequest")
- }
- toSerialize["delete_time"] = o.DeleteTime
- if o.Stores == nil {
- return nil, fmt.Errorf("field `Stores` is required and must be specified in DeleteStoresRequest")
- }
- toSerialize["stores"] = o.Stores
- return json.Marshal(toSerialize)
- }
- func (o DeleteStoresRequest) String() string {
- var ret string
- if o.BrandId == nil {
- ret += "BrandId:<nil>, "
- } else {
- ret += fmt.Sprintf("BrandId:%v, ", *o.BrandId)
- }
- if o.OutRequestNo == nil {
- ret += "OutRequestNo:<nil>, "
- } else {
- ret += fmt.Sprintf("OutRequestNo:%v, ", *o.OutRequestNo)
- }
- if o.DeleteTime == nil {
- ret += "DeleteTime:<nil>, "
- } else {
- ret += fmt.Sprintf("DeleteTime:%v, ", *o.DeleteTime)
- }
- ret += fmt.Sprintf("Stores:%v", o.Stores)
- return fmt.Sprintf("DeleteStoresRequest{%s}", ret)
- }
- func (o DeleteStoresRequest) Clone() *DeleteStoresRequest {
- ret := DeleteStoresRequest{}
- if o.BrandId != nil {
- ret.BrandId = new(string)
- *ret.BrandId = *o.BrandId
- }
- if o.OutRequestNo != nil {
- ret.OutRequestNo = new(string)
- *ret.OutRequestNo = *o.OutRequestNo
- }
- if o.DeleteTime != nil {
- ret.DeleteTime = new(string)
- *ret.DeleteTime = *o.DeleteTime
- }
- if o.Stores != nil {
- ret.Stores = make([]RetailStoreInfo, len(o.Stores))
- for i, item := range o.Stores {
- ret.Stores[i] = *item.Clone()
- }
- }
- return &ret
- }
- // DeleteStoresResponse
- type DeleteStoresResponse struct {
- // 删除时间,遵循rfc3339标准格式,格式为yyyy-MM-DDTHH:mm:ss+TIMEZONE,yyyy-MM-DD表示年月日,T出现在字符串中,表示time元素的开头,HH:mm:ss表示时分秒,TIMEZONE表示时区(+08:00表示东八区时间,领先UTC8小时,即北京时间)。例如:2015-05-20T13:29:35+08:00表示,北京时间2015年5月20日 13点29分35秒。
- DeleteTime *string `json:"delete_time,omitempty"`
- // 删除失败的小店活动门店列表
- FailedStores []RetailStoreInfo `json:"failed_stores,omitempty"`
- }
- func (o DeleteStoresResponse) MarshalJSON() ([]byte, error) {
- toSerialize := map[string]interface{}{}
- if o.DeleteTime != nil {
- toSerialize["delete_time"] = o.DeleteTime
- }
- if o.FailedStores != nil {
- toSerialize["failed_stores"] = o.FailedStores
- }
- return json.Marshal(toSerialize)
- }
- func (o DeleteStoresResponse) String() string {
- var ret string
- if o.DeleteTime == nil {
- ret += "DeleteTime:<nil>, "
- } else {
- ret += fmt.Sprintf("DeleteTime:%v, ", *o.DeleteTime)
- }
- ret += fmt.Sprintf("FailedStores:%v", o.FailedStores)
- return fmt.Sprintf("DeleteStoresResponse{%s}", ret)
- }
- func (o DeleteStoresResponse) Clone() *DeleteStoresResponse {
- ret := DeleteStoresResponse{}
- if o.DeleteTime != nil {
- ret.DeleteTime = new(string)
- *ret.DeleteTime = *o.DeleteTime
- }
- if o.FailedStores != nil {
- ret.FailedStores = make([]RetailStoreInfo, len(o.FailedStores))
- for i, item := range o.FailedStores {
- ret.FailedStores[i] = *item.Clone()
- }
- }
- return &ret
- }
- // FmcgAct
- type FmcgAct struct {
- // 活动ID
- ActivityId *string `json:"activity_id,omitempty"`
- // 品牌ID
- BrandId *string `json:"brand_id,omitempty"`
- // 活动创建方商户号
- CreatorMerchantId *string `json:"creator_merchant_id,omitempty"`
- // 活动信息
- ActivityInfo *ActInfo `json:"activity_info,omitempty"`
- // 活动商品列表
- GoodsInformation *GoodsInfo `json:"goods_information,omitempty"`
- // 活动规则
- RuleInformation *ActRule `json:"rule_information,omitempty"`
- }
- func (o FmcgAct) MarshalJSON() ([]byte, error) {
- toSerialize := map[string]interface{}{}
- if o.ActivityId != nil {
- toSerialize["activity_id"] = o.ActivityId
- }
- if o.BrandId != nil {
- toSerialize["brand_id"] = o.BrandId
- }
- if o.CreatorMerchantId != nil {
- toSerialize["creator_merchant_id"] = o.CreatorMerchantId
- }
- if o.ActivityInfo != nil {
- toSerialize["activity_info"] = o.ActivityInfo
- }
- if o.GoodsInformation != nil {
- toSerialize["goods_information"] = o.GoodsInformation
- }
- if o.RuleInformation != nil {
- toSerialize["rule_information"] = o.RuleInformation
- }
- return json.Marshal(toSerialize)
- }
- func (o FmcgAct) String() string {
- var ret string
- if o.ActivityId == nil {
- ret += "ActivityId:<nil>, "
- } else {
- ret += fmt.Sprintf("ActivityId:%v, ", *o.ActivityId)
- }
- if o.BrandId == nil {
- ret += "BrandId:<nil>, "
- } else {
- ret += fmt.Sprintf("BrandId:%v, ", *o.BrandId)
- }
- if o.CreatorMerchantId == nil {
- ret += "CreatorMerchantId:<nil>, "
- } else {
- ret += fmt.Sprintf("CreatorMerchantId:%v, ", *o.CreatorMerchantId)
- }
- ret += fmt.Sprintf("ActivityInfo:%v, ", o.ActivityInfo)
- ret += fmt.Sprintf("GoodsInformation:%v, ", o.GoodsInformation)
- ret += fmt.Sprintf("RuleInformation:%v", o.RuleInformation)
- return fmt.Sprintf("FmcgAct{%s}", ret)
- }
- func (o FmcgAct) Clone() *FmcgAct {
- ret := FmcgAct{}
- if o.ActivityId != nil {
- ret.ActivityId = new(string)
- *ret.ActivityId = *o.ActivityId
- }
- if o.BrandId != nil {
- ret.BrandId = new(string)
- *ret.BrandId = *o.BrandId
- }
- if o.CreatorMerchantId != nil {
- ret.CreatorMerchantId = new(string)
- *ret.CreatorMerchantId = *o.CreatorMerchantId
- }
- if o.ActivityInfo != nil {
- ret.ActivityInfo = o.ActivityInfo.Clone()
- }
- if o.GoodsInformation != nil {
- ret.GoodsInformation = o.GoodsInformation.Clone()
- }
- if o.RuleInformation != nil {
- ret.RuleInformation = o.RuleInformation.Clone()
- }
- return &ret
- }
- // GetStoreRequest
- type GetStoreRequest struct {
- // 品牌ID
- BrandId *string `json:"brand_id"`
- // 门店编码,可包含英文字母,数字,\\\\|,\\\\_,\\\\*,\\\\-等内容,不允许出现其他不合法符号。
- StoreCode *string `json:"store_code"`
- }
- func (o GetStoreRequest) MarshalJSON() ([]byte, error) {
- toSerialize := map[string]interface{}{}
- if o.BrandId == nil {
- return nil, fmt.Errorf("field `BrandId` is required and must be specified in GetStoreRequest")
- }
- toSerialize["brand_id"] = o.BrandId
- if o.StoreCode == nil {
- return nil, fmt.Errorf("field `StoreCode` is required and must be specified in GetStoreRequest")
- }
- toSerialize["store_code"] = o.StoreCode
- return json.Marshal(toSerialize)
- }
- func (o GetStoreRequest) String() string {
- var ret string
- if o.BrandId == nil {
- ret += "BrandId:<nil>, "
- } else {
- ret += fmt.Sprintf("BrandId:%v, ", *o.BrandId)
- }
- if o.StoreCode == nil {
- ret += "StoreCode:<nil>"
- } else {
- ret += fmt.Sprintf("StoreCode:%v", *o.StoreCode)
- }
- return fmt.Sprintf("GetStoreRequest{%s}", ret)
- }
- func (o GetStoreRequest) Clone() *GetStoreRequest {
- ret := GetStoreRequest{}
- if o.BrandId != nil {
- ret.BrandId = new(string)
- *ret.BrandId = *o.BrandId
- }
- if o.StoreCode != nil {
- ret.StoreCode = new(string)
- *ret.StoreCode = *o.StoreCode
- }
- return &ret
- }
- // GoodsInfo
- type GoodsInfo struct {
- // 商品ID
- GoodsId *string `json:"goods_id,omitempty"`
- // 商品名称
- GoodsName *string `json:"goods_name,omitempty"`
- // 商品图片URL
- GoodsPictureUrl *string `json:"goods_picture_url,omitempty"`
- }
- func (o GoodsInfo) MarshalJSON() ([]byte, error) {
- toSerialize := map[string]interface{}{}
- if o.GoodsId != nil {
- toSerialize["goods_id"] = o.GoodsId
- }
- if o.GoodsName != nil {
- toSerialize["goods_name"] = o.GoodsName
- }
- if o.GoodsPictureUrl != nil {
- toSerialize["goods_picture_url"] = o.GoodsPictureUrl
- }
- return json.Marshal(toSerialize)
- }
- func (o GoodsInfo) String() string {
- var ret string
- if o.GoodsId == nil {
- ret += "GoodsId:<nil>, "
- } else {
- ret += fmt.Sprintf("GoodsId:%v, ", *o.GoodsId)
- }
- if o.GoodsName == nil {
- ret += "GoodsName:<nil>, "
- } else {
- ret += fmt.Sprintf("GoodsName:%v, ", *o.GoodsName)
- }
- if o.GoodsPictureUrl == nil {
- ret += "GoodsPictureUrl:<nil>"
- } else {
- ret += fmt.Sprintf("GoodsPictureUrl:%v", *o.GoodsPictureUrl)
- }
- return fmt.Sprintf("GoodsInfo{%s}", ret)
- }
- func (o GoodsInfo) Clone() *GoodsInfo {
- ret := GoodsInfo{}
- if o.GoodsId != nil {
- ret.GoodsId = new(string)
- *ret.GoodsId = *o.GoodsId
- }
- if o.GoodsName != nil {
- ret.GoodsName = new(string)
- *ret.GoodsName = *o.GoodsName
- }
- if o.GoodsPictureUrl != nil {
- ret.GoodsPictureUrl = new(string)
- *ret.GoodsPictureUrl = *o.GoodsPictureUrl
- }
- return &ret
- }
- // ListActsByAreaRequest
- type ListActsByAreaRequest struct {
- // 活动所属城市的ID
- CityId *string `json:"city_id"`
- // 非负整数,该次请求资源的起始位置,从0开始计数
- Offset *int64 `json:"offset"`
- // 非0非负的整数
- Limit *int64 `json:"limit"`
- }
- func (o ListActsByAreaRequest) MarshalJSON() ([]byte, error) {
- toSerialize := map[string]interface{}{}
- if o.CityId == nil {
- return nil, fmt.Errorf("field `CityId` is required and must be specified in ListActsByAreaRequest")
- }
- toSerialize["city_id"] = o.CityId
- if o.Offset == nil {
- return nil, fmt.Errorf("field `Offset` is required and must be specified in ListActsByAreaRequest")
- }
- toSerialize["offset"] = o.Offset
- if o.Limit == nil {
- return nil, fmt.Errorf("field `Limit` is required and must be specified in ListActsByAreaRequest")
- }
- toSerialize["limit"] = o.Limit
- return json.Marshal(toSerialize)
- }
- func (o ListActsByAreaRequest) String() string {
- var ret string
- if o.CityId == nil {
- ret += "CityId:<nil>, "
- } else {
- ret += fmt.Sprintf("CityId:%v, ", *o.CityId)
- }
- 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("ListActsByAreaRequest{%s}", ret)
- }
- func (o ListActsByAreaRequest) Clone() *ListActsByAreaRequest {
- ret := ListActsByAreaRequest{}
- if o.CityId != nil {
- ret.CityId = new(string)
- *ret.CityId = *o.CityId
- }
- 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
- }
- // ListActsByAreaResponse
- type ListActsByAreaResponse struct {
- // 活动总数
- TotalCount *int64 `json:"total_count,omitempty"`
- // 活动集合
- Data []FmcgAct `json:"data,omitempty"`
- // 非负整数,该次请求资源的起始位置,从0开始计数
- Offset *int64 `json:"offset"`
- // 非0非负的整数
- Limit *int64 `json:"limit"`
- }
- func (o ListActsByAreaResponse) MarshalJSON() ([]byte, error) {
- toSerialize := map[string]interface{}{}
- if o.TotalCount != nil {
- toSerialize["total_count"] = o.TotalCount
- }
- if o.Data != nil {
- toSerialize["data"] = o.Data
- }
- if o.Offset == nil {
- return nil, fmt.Errorf("field `Offset` is required and must be specified in ListActsByAreaResponse")
- }
- toSerialize["offset"] = o.Offset
- if o.Limit == nil {
- return nil, fmt.Errorf("field `Limit` is required and must be specified in ListActsByAreaResponse")
- }
- toSerialize["limit"] = o.Limit
- return json.Marshal(toSerialize)
- }
- func (o ListActsByAreaResponse) String() string {
- var ret string
- if o.TotalCount == nil {
- ret += "TotalCount:<nil>, "
- } else {
- ret += fmt.Sprintf("TotalCount:%v, ", *o.TotalCount)
- }
- ret += fmt.Sprintf("Data:%v, ", o.Data)
- 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("ListActsByAreaResponse{%s}", ret)
- }
- func (o ListActsByAreaResponse) Clone() *ListActsByAreaResponse {
- ret := ListActsByAreaResponse{}
- if o.TotalCount != nil {
- ret.TotalCount = new(int64)
- *ret.TotalCount = *o.TotalCount
- }
- if o.Data != nil {
- ret.Data = make([]FmcgAct, len(o.Data))
- for i, item := range o.Data {
- ret.Data[i] = *item.Clone()
- }
- }
- 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
- }
- // ListRepresentativeRequest
- type ListRepresentativeRequest struct {
- // 零售小店活动ID
- ActivityId *string `json:"activity_id"`
- // 页码从0开始,默认第0页
- Offset *int64 `json:"offset"`
- // 分页大小,默认查询10个业代
- Limit *int64 `json:"limit"`
- }
- func (o ListRepresentativeRequest) MarshalJSON() ([]byte, error) {
- toSerialize := map[string]interface{}{}
- if o.ActivityId == nil {
- return nil, fmt.Errorf("field `ActivityId` is required and must be specified in ListRepresentativeRequest")
- }
- toSerialize["activity_id"] = o.ActivityId
- if o.Offset == nil {
- return nil, fmt.Errorf("field `Offset` is required and must be specified in ListRepresentativeRequest")
- }
- toSerialize["offset"] = o.Offset
- if o.Limit == nil {
- return nil, fmt.Errorf("field `Limit` is required and must be specified in ListRepresentativeRequest")
- }
- toSerialize["limit"] = o.Limit
- return json.Marshal(toSerialize)
- }
- func (o ListRepresentativeRequest) 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("ListRepresentativeRequest{%s}", ret)
- }
- func (o ListRepresentativeRequest) Clone() *ListRepresentativeRequest {
- ret := ListRepresentativeRequest{}
- 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
- }
- // ListRepresentativeResponse
- type ListRepresentativeResponse struct {
- // 小店活动业代总数
- TotalCount *int64 `json:"total_count,omitempty"`
- // 小店活动业代集合
- Data []RepresentativeInfo `json:"data,omitempty"`
- // 页码从0开始,默认第0页
- Offset *int64 `json:"offset"`
- // 分页大小
- Limit *int64 `json:"limit"`
- }
- func (o ListRepresentativeResponse) MarshalJSON() ([]byte, error) {
- toSerialize := map[string]interface{}{}
- if o.TotalCount != nil {
- toSerialize["total_count"] = o.TotalCount
- }
- if o.Data != nil {
- toSerialize["data"] = o.Data
- }
- if o.Offset == nil {
- return nil, fmt.Errorf("field `Offset` is required and must be specified in ListRepresentativeResponse")
- }
- toSerialize["offset"] = o.Offset
- if o.Limit == nil {
- return nil, fmt.Errorf("field `Limit` is required and must be specified in ListRepresentativeResponse")
- }
- toSerialize["limit"] = o.Limit
- return json.Marshal(toSerialize)
- }
- func (o ListRepresentativeResponse) String() string {
- var ret string
- if o.TotalCount == nil {
- ret += "TotalCount:<nil>, "
- } else {
- ret += fmt.Sprintf("TotalCount:%v, ", *o.TotalCount)
- }
- ret += fmt.Sprintf("Data:%v, ", o.Data)
- 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("ListRepresentativeResponse{%s}", ret)
- }
- func (o ListRepresentativeResponse) Clone() *ListRepresentativeResponse {
- ret := ListRepresentativeResponse{}
- if o.TotalCount != nil {
- ret.TotalCount = new(int64)
- *ret.TotalCount = *o.TotalCount
- }
- if o.Data != nil {
- ret.Data = make([]RepresentativeInfo, len(o.Data))
- for i, item := range o.Data {
- ret.Data[i] = *item.Clone()
- }
- }
- 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
- }
- // ListStoreRequest
- type ListStoreRequest struct {
- // 品牌ID
- BrandId *string `json:"brand_id"`
- // 页码从0开始,默认第0页
- Offset *int64 `json:"offset"`
- // 分页大小,默认查询10家门店
- Limit *int64 `json:"limit"`
- }
- func (o ListStoreRequest) MarshalJSON() ([]byte, error) {
- toSerialize := map[string]interface{}{}
- if o.BrandId == nil {
- return nil, fmt.Errorf("field `BrandId` is required and must be specified in ListStoreRequest")
- }
- toSerialize["brand_id"] = o.BrandId
- if o.Offset == nil {
- return nil, fmt.Errorf("field `Offset` is required and must be specified in ListStoreRequest")
- }
- toSerialize["offset"] = o.Offset
- if o.Limit == nil {
- return nil, fmt.Errorf("field `Limit` is required and must be specified in ListStoreRequest")
- }
- toSerialize["limit"] = o.Limit
- return json.Marshal(toSerialize)
- }
- func (o ListStoreRequest) String() string {
- var ret string
- if o.BrandId == nil {
- ret += "BrandId:<nil>, "
- } else {
- ret += fmt.Sprintf("BrandId:%v, ", *o.BrandId)
- }
- 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("ListStoreRequest{%s}", ret)
- }
- func (o ListStoreRequest) Clone() *ListStoreRequest {
- ret := ListStoreRequest{}
- if o.BrandId != nil {
- ret.BrandId = new(string)
- *ret.BrandId = *o.BrandId
- }
- 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
- }
- // ListStoreResponse
- type ListStoreResponse struct {
- // 小店活动门店总数
- TotalCount *int64 `json:"total_count,omitempty"`
- // 小店活动门店集合
- Data []RetailStoreInfo `json:"data,omitempty"`
- // 页码从0开始,默认第0页
- Offset *int64 `json:"offset,omitempty"`
- // 分页大小
- Limit *int64 `json:"limit,omitempty"`
- }
- func (o ListStoreResponse) MarshalJSON() ([]byte, error) {
- toSerialize := map[string]interface{}{}
- if o.TotalCount != nil {
- toSerialize["total_count"] = o.TotalCount
- }
- if o.Data != nil {
- toSerialize["data"] = o.Data
- }
- if o.Offset != nil {
- toSerialize["offset"] = o.Offset
- }
- if o.Limit != nil {
- toSerialize["limit"] = o.Limit
- }
- return json.Marshal(toSerialize)
- }
- func (o ListStoreResponse) String() string {
- var ret string
- if o.TotalCount == nil {
- ret += "TotalCount:<nil>, "
- } else {
- ret += fmt.Sprintf("TotalCount:%v, ", *o.TotalCount)
- }
- ret += fmt.Sprintf("Data:%v, ", o.Data)
- 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("ListStoreResponse{%s}", ret)
- }
- func (o ListStoreResponse) Clone() *ListStoreResponse {
- ret := ListStoreResponse{}
- if o.TotalCount != nil {
- ret.TotalCount = new(int64)
- *ret.TotalCount = *o.TotalCount
- }
- if o.Data != nil {
- ret.Data = make([]RetailStoreInfo, len(o.Data))
- for i, item := range o.Data {
- ret.Data[i] = *item.Clone()
- }
- }
- 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
- }
- // LockQualificationRequest
- type LockQualificationRequest struct {
- // 订单信息
- OrderInformation *OrderInfo `json:"order_information"`
- // 待锁定的加价购资格ID列表
- QualificationIds []string `json:"qualification_ids,omitempty"`
- }
- func (o LockQualificationRequest) MarshalJSON() ([]byte, error) {
- toSerialize := map[string]interface{}{}
- if o.OrderInformation == nil {
- return nil, fmt.Errorf("field `OrderInformation` is required and must be specified in LockQualificationRequest")
- }
- toSerialize["order_information"] = o.OrderInformation
- if o.QualificationIds != nil {
- toSerialize["qualification_ids"] = o.QualificationIds
- }
- return json.Marshal(toSerialize)
- }
- func (o LockQualificationRequest) String() string {
- var ret string
- ret += fmt.Sprintf("OrderInformation:%v, ", o.OrderInformation)
- ret += fmt.Sprintf("QualificationIds:%v", o.QualificationIds)
- return fmt.Sprintf("LockQualificationRequest{%s}", ret)
- }
- func (o LockQualificationRequest) Clone() *LockQualificationRequest {
- ret := LockQualificationRequest{}
- if o.OrderInformation != nil {
- ret.OrderInformation = o.OrderInformation.Clone()
- }
- if o.QualificationIds != nil {
- ret.QualificationIds = make([]string, len(o.QualificationIds))
- for i, item := range o.QualificationIds {
- ret.QualificationIds[i] = item
- }
- }
- return &ret
- }
- // LockQualificationResponse
- type LockQualificationResponse struct {
- // 返回结果文案
- ReturnMessage *string `json:"return_message,omitempty"`
- // 锁定成功的资格ID列表
- SucceedQualificationIds []string `json:"succeed_qualification_ids,omitempty"`
- // 锁定失败的资格ID列表
- FailedQualificationIds []string `json:"failed_qualification_ids,omitempty"`
- }
- func (o LockQualificationResponse) MarshalJSON() ([]byte, error) {
- toSerialize := map[string]interface{}{}
- if o.ReturnMessage != nil {
- toSerialize["return_message"] = o.ReturnMessage
- }
- if o.SucceedQualificationIds != nil {
- toSerialize["succeed_qualification_ids"] = o.SucceedQualificationIds
- }
- if o.FailedQualificationIds != nil {
- toSerialize["failed_qualification_ids"] = o.FailedQualificationIds
- }
- return json.Marshal(toSerialize)
- }
- func (o LockQualificationResponse) String() string {
- var ret string
- if o.ReturnMessage == nil {
- ret += "ReturnMessage:<nil>, "
- } else {
- ret += fmt.Sprintf("ReturnMessage:%v, ", *o.ReturnMessage)
- }
- ret += fmt.Sprintf("SucceedQualificationIds:%v, ", o.SucceedQualificationIds)
- ret += fmt.Sprintf("FailedQualificationIds:%v", o.FailedQualificationIds)
- return fmt.Sprintf("LockQualificationResponse{%s}", ret)
- }
- func (o LockQualificationResponse) Clone() *LockQualificationResponse {
- ret := LockQualificationResponse{}
- if o.ReturnMessage != nil {
- ret.ReturnMessage = new(string)
- *ret.ReturnMessage = *o.ReturnMessage
- }
- if o.SucceedQualificationIds != nil {
- ret.SucceedQualificationIds = make([]string, len(o.SucceedQualificationIds))
- for i, item := range o.SucceedQualificationIds {
- ret.SucceedQualificationIds[i] = item
- }
- }
- if o.FailedQualificationIds != nil {
- ret.FailedQualificationIds = make([]string, len(o.FailedQualificationIds))
- for i, item := range o.FailedQualificationIds {
- ret.FailedQualificationIds[i] = item
- }
- }
- return &ret
- }
- // MaterialInfo
- type MaterialInfo struct {
- // 物料码ID
- MaterialId *string `json:"material_id,omitempty"`
- // 物料码链接, 用于生成活动物料二维码
- MaterialUrl *string `json:"material_url,omitempty"`
- }
- func (o MaterialInfo) MarshalJSON() ([]byte, error) {
- toSerialize := map[string]interface{}{}
- if o.MaterialId != nil {
- toSerialize["material_id"] = o.MaterialId
- }
- if o.MaterialUrl != nil {
- toSerialize["material_url"] = o.MaterialUrl
- }
- return json.Marshal(toSerialize)
- }
- func (o MaterialInfo) String() string {
- var ret string
- if o.MaterialId == nil {
- ret += "MaterialId:<nil>, "
- } else {
- ret += fmt.Sprintf("MaterialId:%v, ", *o.MaterialId)
- }
- if o.MaterialUrl == nil {
- ret += "MaterialUrl:<nil>"
- } else {
- ret += fmt.Sprintf("MaterialUrl:%v", *o.MaterialUrl)
- }
- return fmt.Sprintf("MaterialInfo{%s}", ret)
- }
- func (o MaterialInfo) Clone() *MaterialInfo {
- ret := MaterialInfo{}
- if o.MaterialId != nil {
- ret.MaterialId = new(string)
- *ret.MaterialId = *o.MaterialId
- }
- if o.MaterialUrl != nil {
- ret.MaterialUrl = new(string)
- *ret.MaterialUrl = *o.MaterialUrl
- }
- return &ret
- }
- // Materials
- type Materials struct {
- // 成功的物料码列表
- MaterialList []MaterialInfo `json:"material_list,omitempty"`
- }
- func (o Materials) MarshalJSON() ([]byte, error) {
- toSerialize := map[string]interface{}{}
- if o.MaterialList != nil {
- toSerialize["material_list"] = o.MaterialList
- }
- return json.Marshal(toSerialize)
- }
- func (o Materials) String() string {
- var ret string
- ret += fmt.Sprintf("MaterialList:%v", o.MaterialList)
- return fmt.Sprintf("Materials{%s}", ret)
- }
- func (o Materials) Clone() *Materials {
- ret := Materials{}
- if o.MaterialList != nil {
- ret.MaterialList = make([]MaterialInfo, len(o.MaterialList))
- for i, item := range o.MaterialList {
- ret.MaterialList[i] = *item.Clone()
- }
- }
- return &ret
- }
- // OrderInfo
- type OrderInfo struct {
- // 支付订单的微信用户OpenID
- PayerOpenid *string `json:"payer_openid"`
- // 商户订单号
- OutTradeNo *string `json:"out_trade_no"`
- // 订单总金额(单位:分)
- TotalFee *int64 `json:"total_fee"`
- // 门店ID
- StoreId *string `json:"store_id"`
- // 门店商户号
- StoreMerchantId *string `json:"store_merchant_id"`
- }
- func (o OrderInfo) MarshalJSON() ([]byte, error) {
- toSerialize := map[string]interface{}{}
- if o.PayerOpenid == nil {
- return nil, fmt.Errorf("field `PayerOpenid` is required and must be specified in OrderInfo")
- }
- toSerialize["payer_openid"] = o.PayerOpenid
- if o.OutTradeNo == nil {
- return nil, fmt.Errorf("field `OutTradeNo` is required and must be specified in OrderInfo")
- }
- toSerialize["out_trade_no"] = o.OutTradeNo
- if o.TotalFee == nil {
- return nil, fmt.Errorf("field `TotalFee` is required and must be specified in OrderInfo")
- }
- toSerialize["total_fee"] = o.TotalFee
- if o.StoreId == nil {
- return nil, fmt.Errorf("field `StoreId` is required and must be specified in OrderInfo")
- }
- toSerialize["store_id"] = o.StoreId
- if o.StoreMerchantId == nil {
- return nil, fmt.Errorf("field `StoreMerchantId` is required and must be specified in OrderInfo")
- }
- toSerialize["store_merchant_id"] = o.StoreMerchantId
- return json.Marshal(toSerialize)
- }
- func (o OrderInfo) String() string {
- var ret string
- if o.PayerOpenid == nil {
- ret += "PayerOpenid:<nil>, "
- } else {
- ret += fmt.Sprintf("PayerOpenid:%v, ", *o.PayerOpenid)
- }
- if o.OutTradeNo == nil {
- ret += "OutTradeNo:<nil>, "
- } else {
- ret += fmt.Sprintf("OutTradeNo:%v, ", *o.OutTradeNo)
- }
- if o.TotalFee == nil {
- ret += "TotalFee:<nil>, "
- } else {
- ret += fmt.Sprintf("TotalFee:%v, ", *o.TotalFee)
- }
- if o.StoreId == nil {
- ret += "StoreId:<nil>, "
- } else {
- ret += fmt.Sprintf("StoreId:%v, ", *o.StoreId)
- }
- if o.StoreMerchantId == nil {
- ret += "StoreMerchantId:<nil>"
- } else {
- ret += fmt.Sprintf("StoreMerchantId:%v", *o.StoreMerchantId)
- }
- return fmt.Sprintf("OrderInfo{%s}", ret)
- }
- func (o OrderInfo) Clone() *OrderInfo {
- ret := OrderInfo{}
- if o.PayerOpenid != nil {
- ret.PayerOpenid = new(string)
- *ret.PayerOpenid = *o.PayerOpenid
- }
- if o.OutTradeNo != nil {
- ret.OutTradeNo = new(string)
- *ret.OutTradeNo = *o.OutTradeNo
- }
- if o.TotalFee != nil {
- ret.TotalFee = new(int64)
- *ret.TotalFee = *o.TotalFee
- }
- if o.StoreId != nil {
- ret.StoreId = new(string)
- *ret.StoreId = *o.StoreId
- }
- if o.StoreMerchantId != nil {
- ret.StoreMerchantId = new(string)
- *ret.StoreMerchantId = *o.StoreMerchantId
- }
- return &ret
- }
- // RepresentativeInfo
- type RepresentativeInfo struct {
- // [获取openid请查看文档](https://pay.weixin.qq.com/wiki/doc/apiv3_partner/terms_definition/chapter1_1_3.shtml)
- Openid *string `json:"openid"`
- }
- func (o RepresentativeInfo) MarshalJSON() ([]byte, error) {
- toSerialize := map[string]interface{}{}
- if o.Openid == nil {
- return nil, fmt.Errorf("field `Openid` is required and must be specified in RepresentativeInfo")
- }
- toSerialize["openid"] = o.Openid
- return json.Marshal(toSerialize)
- }
- func (o RepresentativeInfo) String() string {
- var ret string
- if o.Openid == nil {
- ret += "Openid:<nil>"
- } else {
- ret += fmt.Sprintf("Openid:%v", *o.Openid)
- }
- return fmt.Sprintf("RepresentativeInfo{%s}", ret)
- }
- func (o RepresentativeInfo) Clone() *RepresentativeInfo {
- ret := RepresentativeInfo{}
- if o.Openid != nil {
- ret.Openid = new(string)
- *ret.Openid = *o.Openid
- }
- return &ret
- }
- // RetailStoreInfo
- type RetailStoreInfo struct {
- // 门店编码,可包含英文字母,数字,\\\\|,\\\\_,\\\\*,\\\\-等内容,不允许出现其他不合法符号。
- StoreCode *string `json:"store_code,omitempty"`
- // 门店名称
- StoreName *string `json:"store_name,omitempty"`
- }
- func (o RetailStoreInfo) MarshalJSON() ([]byte, error) {
- toSerialize := map[string]interface{}{}
- if o.StoreCode != nil {
- toSerialize["store_code"] = o.StoreCode
- }
- if o.StoreName != nil {
- toSerialize["store_name"] = o.StoreName
- }
- return json.Marshal(toSerialize)
- }
- func (o RetailStoreInfo) String() string {
- var ret string
- if o.StoreCode == nil {
- ret += "StoreCode:<nil>, "
- } else {
- ret += fmt.Sprintf("StoreCode:%v, ", *o.StoreCode)
- }
- if o.StoreName == nil {
- ret += "StoreName:<nil>"
- } else {
- ret += fmt.Sprintf("StoreName:%v", *o.StoreName)
- }
- return fmt.Sprintf("RetailStoreInfo{%s}", ret)
- }
- func (o RetailStoreInfo) Clone() *RetailStoreInfo {
- ret := RetailStoreInfo{}
- if o.StoreCode != nil {
- ret.StoreCode = new(string)
- *ret.StoreCode = *o.StoreCode
- }
- if o.StoreName != nil {
- ret.StoreName = new(string)
- *ret.StoreName = *o.StoreName
- }
- return &ret
- }
- // StoreInfo
- type StoreInfo struct {
- // 门店ID
- StoreId *string `json:"store_id"`
- // 门店指定的品牌补贴收款商户号
- AccountingMerchantId *string `json:"accounting_merchant_id"`
- // 报名门店的商户号,即门店收款商户号
- MerchantId *string `json:"merchant_id"`
- }
- func (o StoreInfo) MarshalJSON() ([]byte, error) {
- toSerialize := map[string]interface{}{}
- if o.StoreId == nil {
- return nil, fmt.Errorf("field `StoreId` is required and must be specified in StoreInfo")
- }
- toSerialize["store_id"] = o.StoreId
- if o.AccountingMerchantId == nil {
- return nil, fmt.Errorf("field `AccountingMerchantId` is required and must be specified in StoreInfo")
- }
- toSerialize["accounting_merchant_id"] = o.AccountingMerchantId
- if o.MerchantId == nil {
- return nil, fmt.Errorf("field `MerchantId` is required and must be specified in StoreInfo")
- }
- toSerialize["merchant_id"] = o.MerchantId
- return json.Marshal(toSerialize)
- }
- func (o StoreInfo) String() string {
- var ret string
- if o.StoreId == nil {
- ret += "StoreId:<nil>, "
- } else {
- ret += fmt.Sprintf("StoreId:%v, ", *o.StoreId)
- }
- if o.AccountingMerchantId == nil {
- ret += "AccountingMerchantId:<nil>, "
- } else {
- ret += fmt.Sprintf("AccountingMerchantId:%v, ", *o.AccountingMerchantId)
- }
- if o.MerchantId == nil {
- ret += "MerchantId:<nil>"
- } else {
- ret += fmt.Sprintf("MerchantId:%v", *o.MerchantId)
- }
- return fmt.Sprintf("StoreInfo{%s}", ret)
- }
- func (o StoreInfo) Clone() *StoreInfo {
- ret := StoreInfo{}
- if o.StoreId != nil {
- ret.StoreId = new(string)
- *ret.StoreId = *o.StoreId
- }
- if o.AccountingMerchantId != nil {
- ret.AccountingMerchantId = new(string)
- *ret.AccountingMerchantId = *o.AccountingMerchantId
- }
- if o.MerchantId != nil {
- ret.MerchantId = new(string)
- *ret.MerchantId = *o.MerchantId
- }
- return &ret
- }
- // UnlockQualificationRequest
- type UnlockQualificationRequest struct {
- // 订单信息
- OrderInformation *OrderInfo `json:"order_information"`
- // 待锁定的加价购资格ID列表
- QualificationIds []string `json:"qualification_ids,omitempty"`
- }
- func (o UnlockQualificationRequest) MarshalJSON() ([]byte, error) {
- toSerialize := map[string]interface{}{}
- if o.OrderInformation == nil {
- return nil, fmt.Errorf("field `OrderInformation` is required and must be specified in UnlockQualificationRequest")
- }
- toSerialize["order_information"] = o.OrderInformation
- if o.QualificationIds != nil {
- toSerialize["qualification_ids"] = o.QualificationIds
- }
- return json.Marshal(toSerialize)
- }
- func (o UnlockQualificationRequest) String() string {
- var ret string
- ret += fmt.Sprintf("OrderInformation:%v, ", o.OrderInformation)
- ret += fmt.Sprintf("QualificationIds:%v", o.QualificationIds)
- return fmt.Sprintf("UnlockQualificationRequest{%s}", ret)
- }
- func (o UnlockQualificationRequest) Clone() *UnlockQualificationRequest {
- ret := UnlockQualificationRequest{}
- if o.OrderInformation != nil {
- ret.OrderInformation = o.OrderInformation.Clone()
- }
- if o.QualificationIds != nil {
- ret.QualificationIds = make([]string, len(o.QualificationIds))
- for i, item := range o.QualificationIds {
- ret.QualificationIds[i] = item
- }
- }
- return &ret
- }
- // UnlockQualificationResponse
- type UnlockQualificationResponse struct {
- // 返回结果文案
- ReturnMessage *string `json:"return_message,omitempty"`
- // 解锁成功的资格列表
- SucceedQualificationIds []string `json:"succeed_qualification_ids,omitempty"`
- // 解锁失败的资格ID列表
- FailedQualificationIds []string `json:"failed_qualification_ids,omitempty"`
- }
- func (o UnlockQualificationResponse) MarshalJSON() ([]byte, error) {
- toSerialize := map[string]interface{}{}
- if o.ReturnMessage != nil {
- toSerialize["return_message"] = o.ReturnMessage
- }
- if o.SucceedQualificationIds != nil {
- toSerialize["succeed_qualification_ids"] = o.SucceedQualificationIds
- }
- if o.FailedQualificationIds != nil {
- toSerialize["failed_qualification_ids"] = o.FailedQualificationIds
- }
- return json.Marshal(toSerialize)
- }
- func (o UnlockQualificationResponse) String() string {
- var ret string
- if o.ReturnMessage == nil {
- ret += "ReturnMessage:<nil>, "
- } else {
- ret += fmt.Sprintf("ReturnMessage:%v, ", *o.ReturnMessage)
- }
- ret += fmt.Sprintf("SucceedQualificationIds:%v, ", o.SucceedQualificationIds)
- ret += fmt.Sprintf("FailedQualificationIds:%v", o.FailedQualificationIds)
- return fmt.Sprintf("UnlockQualificationResponse{%s}", ret)
- }
- func (o UnlockQualificationResponse) Clone() *UnlockQualificationResponse {
- ret := UnlockQualificationResponse{}
- if o.ReturnMessage != nil {
- ret.ReturnMessage = new(string)
- *ret.ReturnMessage = *o.ReturnMessage
- }
- if o.SucceedQualificationIds != nil {
- ret.SucceedQualificationIds = make([]string, len(o.SucceedQualificationIds))
- for i, item := range o.SucceedQualificationIds {
- ret.SucceedQualificationIds[i] = item
- }
- }
- if o.FailedQualificationIds != nil {
- ret.FailedQualificationIds = make([]string, len(o.FailedQualificationIds))
- for i, item := range o.FailedQualificationIds {
- ret.FailedQualificationIds[i] = item
- }
- }
- return &ret
- }
|