models.go 74 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889
  1. // Copyright 2021 Tencent Inc. All rights reserved.
  2. //
  3. // 营销加价购对外API
  4. //
  5. // 指定服务商可通过该接口报名加价购活动、查询某个区域内的加价购活动列表、锁定加价活动购资格以及解锁加价购活动资格。
  6. //
  7. // API version: 1.4.0
  8. // Code generated by WechatPay APIv3 Generator based on [OpenAPI Generator](https://openapi-generator.tech); DO NOT EDIT.
  9. package retailstore
  10. import (
  11. "encoding/json"
  12. "fmt"
  13. )
  14. // ActApplyInfo
  15. type ActApplyInfo struct {
  16. // 门店信息
  17. StoreInfo *StoreInfo `json:"store_info"`
  18. // 品牌加价购活动商品的原价,该价格会在加价购小程序插件中展示(单位:分)
  19. GoodsOriginalPrice *int64 `json:"goods_original_price"`
  20. }
  21. func (o ActApplyInfo) MarshalJSON() ([]byte, error) {
  22. toSerialize := map[string]interface{}{}
  23. if o.StoreInfo == nil {
  24. return nil, fmt.Errorf("field `StoreInfo` is required and must be specified in ActApplyInfo")
  25. }
  26. toSerialize["store_info"] = o.StoreInfo
  27. if o.GoodsOriginalPrice == nil {
  28. return nil, fmt.Errorf("field `GoodsOriginalPrice` is required and must be specified in ActApplyInfo")
  29. }
  30. toSerialize["goods_original_price"] = o.GoodsOriginalPrice
  31. return json.Marshal(toSerialize)
  32. }
  33. func (o ActApplyInfo) String() string {
  34. var ret string
  35. ret += fmt.Sprintf("StoreInfo:%v, ", o.StoreInfo)
  36. if o.GoodsOriginalPrice == nil {
  37. ret += "GoodsOriginalPrice:<nil>"
  38. } else {
  39. ret += fmt.Sprintf("GoodsOriginalPrice:%v", *o.GoodsOriginalPrice)
  40. }
  41. return fmt.Sprintf("ActApplyInfo{%s}", ret)
  42. }
  43. func (o ActApplyInfo) Clone() *ActApplyInfo {
  44. ret := ActApplyInfo{}
  45. if o.StoreInfo != nil {
  46. ret.StoreInfo = o.StoreInfo.Clone()
  47. }
  48. if o.GoodsOriginalPrice != nil {
  49. ret.GoodsOriginalPrice = new(int64)
  50. *ret.GoodsOriginalPrice = *o.GoodsOriginalPrice
  51. }
  52. return &ret
  53. }
  54. // ActArea
  55. type ActArea struct {
  56. // 省名称
  57. Province *string `json:"province,omitempty"`
  58. // 市名称
  59. City *string `json:"city,omitempty"`
  60. // 区名称
  61. District *string `json:"district,omitempty"`
  62. }
  63. func (o ActArea) MarshalJSON() ([]byte, error) {
  64. toSerialize := map[string]interface{}{}
  65. if o.Province != nil {
  66. toSerialize["province"] = o.Province
  67. }
  68. if o.City != nil {
  69. toSerialize["city"] = o.City
  70. }
  71. if o.District != nil {
  72. toSerialize["district"] = o.District
  73. }
  74. return json.Marshal(toSerialize)
  75. }
  76. func (o ActArea) String() string {
  77. var ret string
  78. if o.Province == nil {
  79. ret += "Province:<nil>, "
  80. } else {
  81. ret += fmt.Sprintf("Province:%v, ", *o.Province)
  82. }
  83. if o.City == nil {
  84. ret += "City:<nil>, "
  85. } else {
  86. ret += fmt.Sprintf("City:%v, ", *o.City)
  87. }
  88. if o.District == nil {
  89. ret += "District:<nil>"
  90. } else {
  91. ret += fmt.Sprintf("District:%v", *o.District)
  92. }
  93. return fmt.Sprintf("ActArea{%s}", ret)
  94. }
  95. func (o ActArea) Clone() *ActArea {
  96. ret := ActArea{}
  97. if o.Province != nil {
  98. ret.Province = new(string)
  99. *ret.Province = *o.Province
  100. }
  101. if o.City != nil {
  102. ret.City = new(string)
  103. *ret.City = *o.City
  104. }
  105. if o.District != nil {
  106. ret.District = new(string)
  107. *ret.District = *o.District
  108. }
  109. return &ret
  110. }
  111. // ActInfo
  112. type ActInfo struct {
  113. // 活动名称
  114. ActivityName *string `json:"activity_name,omitempty"`
  115. // 遵循rfc3339标准格式,格式为YYYY-MM-DDTHH:mm:ss+TIMEZONE,YYYY-MM-DD表示年月日,T出现在字符串中,表示time元素的开头,HH:mm:ss表示时分秒,TIMEZONE表示时区(+08:00表示东八区时间,领先UTC 8小时,即北京时间)
  116. ApplyStartTime *string `json:"apply_start_time,omitempty"`
  117. // 遵循rfc3339标准格式,格式为YYYY-MM-DDTHH:mm:ss+TIMEZONE,YYYY-MM-DD表示年月日,T出现在字符串中,表示time元素的开头,HH:mm:ss表示时分秒,TIMEZONE表示时区(+08:00表示东八区时间,领先UTC 8小时,即北京时间)
  118. ApplyEndTime *string `json:"apply_end_time,omitempty"`
  119. // 遵循rfc3339标准格式,格式为YYYY-MM-DDTHH:mm:ss+TIMEZONE,YYYY-MM-DD表示年月日,T出现在字符串中,表示time元素的开头,HH:mm:ss表示时分秒,TIMEZONE表示时区(+08:00表示东八区时间,领先UTC 8小时,即北京时间)
  120. ActivityStartTime *string `json:"activity_start_time,omitempty"`
  121. // 遵循rfc3339标准格式,格式为YYYY-MM-DDTHH:mm:ss+TIMEZONE,YYYY-MM-DD表示年月日,T出现在字符串中,表示time元素的开头,HH:mm:ss表示时分秒,TIMEZONE表示时区(+08:00表示东八区时间,领先UTC 8小时,即北京时间)
  122. ActivityEndTime *string `json:"activity_end_time,omitempty"`
  123. // 活动描述
  124. ActivityDescription *string `json:"activity_description,omitempty"`
  125. }
  126. func (o ActInfo) MarshalJSON() ([]byte, error) {
  127. toSerialize := map[string]interface{}{}
  128. if o.ActivityName != nil {
  129. toSerialize["activity_name"] = o.ActivityName
  130. }
  131. if o.ApplyStartTime != nil {
  132. toSerialize["apply_start_time"] = o.ApplyStartTime
  133. }
  134. if o.ApplyEndTime != nil {
  135. toSerialize["apply_end_time"] = o.ApplyEndTime
  136. }
  137. if o.ActivityStartTime != nil {
  138. toSerialize["activity_start_time"] = o.ActivityStartTime
  139. }
  140. if o.ActivityEndTime != nil {
  141. toSerialize["activity_end_time"] = o.ActivityEndTime
  142. }
  143. if o.ActivityDescription != nil {
  144. toSerialize["activity_description"] = o.ActivityDescription
  145. }
  146. return json.Marshal(toSerialize)
  147. }
  148. func (o ActInfo) String() string {
  149. var ret string
  150. if o.ActivityName == nil {
  151. ret += "ActivityName:<nil>, "
  152. } else {
  153. ret += fmt.Sprintf("ActivityName:%v, ", *o.ActivityName)
  154. }
  155. if o.ApplyStartTime == nil {
  156. ret += "ApplyStartTime:<nil>, "
  157. } else {
  158. ret += fmt.Sprintf("ApplyStartTime:%v, ", *o.ApplyStartTime)
  159. }
  160. if o.ApplyEndTime == nil {
  161. ret += "ApplyEndTime:<nil>, "
  162. } else {
  163. ret += fmt.Sprintf("ApplyEndTime:%v, ", *o.ApplyEndTime)
  164. }
  165. if o.ActivityStartTime == nil {
  166. ret += "ActivityStartTime:<nil>, "
  167. } else {
  168. ret += fmt.Sprintf("ActivityStartTime:%v, ", *o.ActivityStartTime)
  169. }
  170. if o.ActivityEndTime == nil {
  171. ret += "ActivityEndTime:<nil>, "
  172. } else {
  173. ret += fmt.Sprintf("ActivityEndTime:%v, ", *o.ActivityEndTime)
  174. }
  175. if o.ActivityDescription == nil {
  176. ret += "ActivityDescription:<nil>"
  177. } else {
  178. ret += fmt.Sprintf("ActivityDescription:%v", *o.ActivityDescription)
  179. }
  180. return fmt.Sprintf("ActInfo{%s}", ret)
  181. }
  182. func (o ActInfo) Clone() *ActInfo {
  183. ret := ActInfo{}
  184. if o.ActivityName != nil {
  185. ret.ActivityName = new(string)
  186. *ret.ActivityName = *o.ActivityName
  187. }
  188. if o.ApplyStartTime != nil {
  189. ret.ApplyStartTime = new(string)
  190. *ret.ApplyStartTime = *o.ApplyStartTime
  191. }
  192. if o.ApplyEndTime != nil {
  193. ret.ApplyEndTime = new(string)
  194. *ret.ApplyEndTime = *o.ApplyEndTime
  195. }
  196. if o.ActivityStartTime != nil {
  197. ret.ActivityStartTime = new(string)
  198. *ret.ActivityStartTime = *o.ActivityStartTime
  199. }
  200. if o.ActivityEndTime != nil {
  201. ret.ActivityEndTime = new(string)
  202. *ret.ActivityEndTime = *o.ActivityEndTime
  203. }
  204. if o.ActivityDescription != nil {
  205. ret.ActivityDescription = new(string)
  206. *ret.ActivityDescription = *o.ActivityDescription
  207. }
  208. return &ret
  209. }
  210. // ActRule
  211. type ActRule struct {
  212. // 购买单件商品,补贴给门店的金额(单位:分)
  213. StoreSubsidy *int64 `json:"store_subsidy,omitempty"`
  214. // 购买单件商品,补贴给服务商的佣金(单位:分)
  215. ServiceProviderSubsidy *int64 `json:"service_provider_subsidy,omitempty"`
  216. // 活动门店补贴商品数上限
  217. StoreSubsidyQuota *int64 `json:"store_subsidy_quota,omitempty"`
  218. // 单用户享受加价购优惠次数上限
  219. UserSubsidyQuota *int64 `json:"user_subsidy_quota,omitempty"`
  220. // 活动区域列表
  221. Areas []ActArea `json:"areas,omitempty"`
  222. }
  223. func (o ActRule) MarshalJSON() ([]byte, error) {
  224. toSerialize := map[string]interface{}{}
  225. if o.StoreSubsidy != nil {
  226. toSerialize["store_subsidy"] = o.StoreSubsidy
  227. }
  228. if o.ServiceProviderSubsidy != nil {
  229. toSerialize["service_provider_subsidy"] = o.ServiceProviderSubsidy
  230. }
  231. if o.StoreSubsidyQuota != nil {
  232. toSerialize["store_subsidy_quota"] = o.StoreSubsidyQuota
  233. }
  234. if o.UserSubsidyQuota != nil {
  235. toSerialize["user_subsidy_quota"] = o.UserSubsidyQuota
  236. }
  237. if o.Areas != nil {
  238. toSerialize["areas"] = o.Areas
  239. }
  240. return json.Marshal(toSerialize)
  241. }
  242. func (o ActRule) String() string {
  243. var ret string
  244. if o.StoreSubsidy == nil {
  245. ret += "StoreSubsidy:<nil>, "
  246. } else {
  247. ret += fmt.Sprintf("StoreSubsidy:%v, ", *o.StoreSubsidy)
  248. }
  249. if o.ServiceProviderSubsidy == nil {
  250. ret += "ServiceProviderSubsidy:<nil>, "
  251. } else {
  252. ret += fmt.Sprintf("ServiceProviderSubsidy:%v, ", *o.ServiceProviderSubsidy)
  253. }
  254. if o.StoreSubsidyQuota == nil {
  255. ret += "StoreSubsidyQuota:<nil>, "
  256. } else {
  257. ret += fmt.Sprintf("StoreSubsidyQuota:%v, ", *o.StoreSubsidyQuota)
  258. }
  259. if o.UserSubsidyQuota == nil {
  260. ret += "UserSubsidyQuota:<nil>, "
  261. } else {
  262. ret += fmt.Sprintf("UserSubsidyQuota:%v, ", *o.UserSubsidyQuota)
  263. }
  264. ret += fmt.Sprintf("Areas:%v", o.Areas)
  265. return fmt.Sprintf("ActRule{%s}", ret)
  266. }
  267. func (o ActRule) Clone() *ActRule {
  268. ret := ActRule{}
  269. if o.StoreSubsidy != nil {
  270. ret.StoreSubsidy = new(int64)
  271. *ret.StoreSubsidy = *o.StoreSubsidy
  272. }
  273. if o.ServiceProviderSubsidy != nil {
  274. ret.ServiceProviderSubsidy = new(int64)
  275. *ret.ServiceProviderSubsidy = *o.ServiceProviderSubsidy
  276. }
  277. if o.StoreSubsidyQuota != nil {
  278. ret.StoreSubsidyQuota = new(int64)
  279. *ret.StoreSubsidyQuota = *o.StoreSubsidyQuota
  280. }
  281. if o.UserSubsidyQuota != nil {
  282. ret.UserSubsidyQuota = new(int64)
  283. *ret.UserSubsidyQuota = *o.UserSubsidyQuota
  284. }
  285. if o.Areas != nil {
  286. ret.Areas = make([]ActArea, len(o.Areas))
  287. for i, item := range o.Areas {
  288. ret.Areas[i] = *item.Clone()
  289. }
  290. }
  291. return &ret
  292. }
  293. // AddRepresentativeRequest
  294. type AddRepresentativeRequest struct {
  295. // 零售小店活动ID
  296. ActivityId *string `json:"activity_id"`
  297. // 业务代理信息列表
  298. RepresentativeInfoList []RepresentativeInfo `json:"representative_info_list"`
  299. // 商户新增业务代理请求的唯一标识,商户需保证唯一。可包含英文字母,数字,\\|,\\_,\\*,\\-等内容,不允许出现其他不合法符号。
  300. OutRequestNo *string `json:"out_request_no"`
  301. // 添加时间
  302. AddTime *string `json:"add_time,omitempty"`
  303. }
  304. func (o AddRepresentativeRequest) MarshalJSON() ([]byte, error) {
  305. toSerialize := map[string]interface{}{}
  306. if o.ActivityId == nil {
  307. return nil, fmt.Errorf("field `ActivityId` is required and must be specified in AddRepresentativeRequest")
  308. }
  309. toSerialize["activity_id"] = o.ActivityId
  310. if o.RepresentativeInfoList == nil {
  311. return nil, fmt.Errorf("field `RepresentativeInfoList` is required and must be specified in AddRepresentativeRequest")
  312. }
  313. toSerialize["representative_info_list"] = o.RepresentativeInfoList
  314. if o.OutRequestNo == nil {
  315. return nil, fmt.Errorf("field `OutRequestNo` is required and must be specified in AddRepresentativeRequest")
  316. }
  317. toSerialize["out_request_no"] = o.OutRequestNo
  318. if o.AddTime != nil {
  319. toSerialize["add_time"] = o.AddTime
  320. }
  321. return json.Marshal(toSerialize)
  322. }
  323. func (o AddRepresentativeRequest) String() string {
  324. var ret string
  325. if o.ActivityId == nil {
  326. ret += "ActivityId:<nil>, "
  327. } else {
  328. ret += fmt.Sprintf("ActivityId:%v, ", *o.ActivityId)
  329. }
  330. ret += fmt.Sprintf("RepresentativeInfoList:%v, ", o.RepresentativeInfoList)
  331. if o.OutRequestNo == nil {
  332. ret += "OutRequestNo:<nil>, "
  333. } else {
  334. ret += fmt.Sprintf("OutRequestNo:%v, ", *o.OutRequestNo)
  335. }
  336. if o.AddTime == nil {
  337. ret += "AddTime:<nil>"
  338. } else {
  339. ret += fmt.Sprintf("AddTime:%v", *o.AddTime)
  340. }
  341. return fmt.Sprintf("AddRepresentativeRequest{%s}", ret)
  342. }
  343. func (o AddRepresentativeRequest) Clone() *AddRepresentativeRequest {
  344. ret := AddRepresentativeRequest{}
  345. if o.ActivityId != nil {
  346. ret.ActivityId = new(string)
  347. *ret.ActivityId = *o.ActivityId
  348. }
  349. if o.RepresentativeInfoList != nil {
  350. ret.RepresentativeInfoList = make([]RepresentativeInfo, len(o.RepresentativeInfoList))
  351. for i, item := range o.RepresentativeInfoList {
  352. ret.RepresentativeInfoList[i] = *item.Clone()
  353. }
  354. }
  355. if o.OutRequestNo != nil {
  356. ret.OutRequestNo = new(string)
  357. *ret.OutRequestNo = *o.OutRequestNo
  358. }
  359. if o.AddTime != nil {
  360. ret.AddTime = new(string)
  361. *ret.AddTime = *o.AddTime
  362. }
  363. return &ret
  364. }
  365. // AddRepresentativesRequest
  366. type AddRepresentativesRequest struct {
  367. // 业务代理信息列表
  368. RepresentativeInfoList []RepresentativeInfo `json:"representative_info_list"`
  369. // 商户新增业务代理请求的唯一标识,商户需保证唯一。可包含英文字母,数字,\\|,\\_,\\*,\\-等内容,不允许出现其他不合法符号。
  370. OutRequestNo *string `json:"out_request_no"`
  371. // 添加时间
  372. AddTime *string `json:"add_time,omitempty"`
  373. }
  374. func (o AddRepresentativesRequest) MarshalJSON() ([]byte, error) {
  375. toSerialize := map[string]interface{}{}
  376. if o.RepresentativeInfoList == nil {
  377. return nil, fmt.Errorf("field `RepresentativeInfoList` is required and must be specified in AddRepresentativesRequest")
  378. }
  379. toSerialize["representative_info_list"] = o.RepresentativeInfoList
  380. if o.OutRequestNo == nil {
  381. return nil, fmt.Errorf("field `OutRequestNo` is required and must be specified in AddRepresentativesRequest")
  382. }
  383. toSerialize["out_request_no"] = o.OutRequestNo
  384. if o.AddTime != nil {
  385. toSerialize["add_time"] = o.AddTime
  386. }
  387. return json.Marshal(toSerialize)
  388. }
  389. func (o AddRepresentativesRequest) String() string {
  390. var ret string
  391. ret += fmt.Sprintf("RepresentativeInfoList:%v, ", o.RepresentativeInfoList)
  392. if o.OutRequestNo == nil {
  393. ret += "OutRequestNo:<nil>, "
  394. } else {
  395. ret += fmt.Sprintf("OutRequestNo:%v, ", *o.OutRequestNo)
  396. }
  397. if o.AddTime == nil {
  398. ret += "AddTime:<nil>"
  399. } else {
  400. ret += fmt.Sprintf("AddTime:%v", *o.AddTime)
  401. }
  402. return fmt.Sprintf("AddRepresentativesRequest{%s}", ret)
  403. }
  404. func (o AddRepresentativesRequest) Clone() *AddRepresentativesRequest {
  405. ret := AddRepresentativesRequest{}
  406. if o.RepresentativeInfoList != nil {
  407. ret.RepresentativeInfoList = make([]RepresentativeInfo, len(o.RepresentativeInfoList))
  408. for i, item := range o.RepresentativeInfoList {
  409. ret.RepresentativeInfoList[i] = *item.Clone()
  410. }
  411. }
  412. if o.OutRequestNo != nil {
  413. ret.OutRequestNo = new(string)
  414. *ret.OutRequestNo = *o.OutRequestNo
  415. }
  416. if o.AddTime != nil {
  417. ret.AddTime = new(string)
  418. *ret.AddTime = *o.AddTime
  419. }
  420. return &ret
  421. }
  422. // AddRepresentativesResponse
  423. type AddRepresentativesResponse struct {
  424. // 零售小店活动ID
  425. ActivityId *string `json:"activity_id"`
  426. // 添加失败业务代理信息列表
  427. FailedRepresentativeInfoList []RepresentativeInfo `json:"failed_representative_info_list,omitempty"`
  428. // 添加时间
  429. AddTime *string `json:"add_time"`
  430. }
  431. func (o AddRepresentativesResponse) MarshalJSON() ([]byte, error) {
  432. toSerialize := map[string]interface{}{}
  433. if o.ActivityId == nil {
  434. return nil, fmt.Errorf("field `ActivityId` is required and must be specified in AddRepresentativesResponse")
  435. }
  436. toSerialize["activity_id"] = o.ActivityId
  437. if o.FailedRepresentativeInfoList != nil {
  438. toSerialize["failed_representative_info_list"] = o.FailedRepresentativeInfoList
  439. }
  440. if o.AddTime == nil {
  441. return nil, fmt.Errorf("field `AddTime` is required and must be specified in AddRepresentativesResponse")
  442. }
  443. toSerialize["add_time"] = o.AddTime
  444. return json.Marshal(toSerialize)
  445. }
  446. func (o AddRepresentativesResponse) String() string {
  447. var ret string
  448. if o.ActivityId == nil {
  449. ret += "ActivityId:<nil>, "
  450. } else {
  451. ret += fmt.Sprintf("ActivityId:%v, ", *o.ActivityId)
  452. }
  453. ret += fmt.Sprintf("FailedRepresentativeInfoList:%v, ", o.FailedRepresentativeInfoList)
  454. if o.AddTime == nil {
  455. ret += "AddTime:<nil>"
  456. } else {
  457. ret += fmt.Sprintf("AddTime:%v", *o.AddTime)
  458. }
  459. return fmt.Sprintf("AddRepresentativesResponse{%s}", ret)
  460. }
  461. func (o AddRepresentativesResponse) Clone() *AddRepresentativesResponse {
  462. ret := AddRepresentativesResponse{}
  463. if o.ActivityId != nil {
  464. ret.ActivityId = new(string)
  465. *ret.ActivityId = *o.ActivityId
  466. }
  467. if o.FailedRepresentativeInfoList != nil {
  468. ret.FailedRepresentativeInfoList = make([]RepresentativeInfo, len(o.FailedRepresentativeInfoList))
  469. for i, item := range o.FailedRepresentativeInfoList {
  470. ret.FailedRepresentativeInfoList[i] = *item.Clone()
  471. }
  472. }
  473. if o.AddTime != nil {
  474. ret.AddTime = new(string)
  475. *ret.AddTime = *o.AddTime
  476. }
  477. return &ret
  478. }
  479. // AddStoresBody
  480. type AddStoresBody struct {
  481. // 商户新增小店活动门店凭据号,商户侧需保持唯一性。可包含英文字母,数字,\\\\|,\\\\_,\\\\*,\\\\-等内容,不允许出现其他不合法符号。
  482. OutRequestNo *string `json:"out_request_no"`
  483. // 添加时间,遵循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秒。
  484. AddTime *string `json:"add_time"`
  485. // 待新增的小店活动门店列表
  486. Stores []RetailStoreInfo `json:"stores"`
  487. }
  488. func (o AddStoresBody) MarshalJSON() ([]byte, error) {
  489. toSerialize := map[string]interface{}{}
  490. if o.OutRequestNo == nil {
  491. return nil, fmt.Errorf("field `OutRequestNo` is required and must be specified in AddStoresBody")
  492. }
  493. toSerialize["out_request_no"] = o.OutRequestNo
  494. if o.AddTime == nil {
  495. return nil, fmt.Errorf("field `AddTime` is required and must be specified in AddStoresBody")
  496. }
  497. toSerialize["add_time"] = o.AddTime
  498. if o.Stores == nil {
  499. return nil, fmt.Errorf("field `Stores` is required and must be specified in AddStoresBody")
  500. }
  501. toSerialize["stores"] = o.Stores
  502. return json.Marshal(toSerialize)
  503. }
  504. func (o AddStoresBody) String() string {
  505. var ret string
  506. if o.OutRequestNo == nil {
  507. ret += "OutRequestNo:<nil>, "
  508. } else {
  509. ret += fmt.Sprintf("OutRequestNo:%v, ", *o.OutRequestNo)
  510. }
  511. if o.AddTime == nil {
  512. ret += "AddTime:<nil>, "
  513. } else {
  514. ret += fmt.Sprintf("AddTime:%v, ", *o.AddTime)
  515. }
  516. ret += fmt.Sprintf("Stores:%v", o.Stores)
  517. return fmt.Sprintf("AddStoresBody{%s}", ret)
  518. }
  519. func (o AddStoresBody) Clone() *AddStoresBody {
  520. ret := AddStoresBody{}
  521. if o.OutRequestNo != nil {
  522. ret.OutRequestNo = new(string)
  523. *ret.OutRequestNo = *o.OutRequestNo
  524. }
  525. if o.AddTime != nil {
  526. ret.AddTime = new(string)
  527. *ret.AddTime = *o.AddTime
  528. }
  529. if o.Stores != nil {
  530. ret.Stores = make([]RetailStoreInfo, len(o.Stores))
  531. for i, item := range o.Stores {
  532. ret.Stores[i] = *item.Clone()
  533. }
  534. }
  535. return &ret
  536. }
  537. // AddStoresRequest
  538. type AddStoresRequest struct {
  539. // 品牌ID
  540. BrandId *string `json:"brand_id"`
  541. // 商户新增小店活动门店凭据号,商户侧需保持唯一性。可包含英文字母,数字,\\\\|,\\\\_,\\\\*,\\\\-等内容,不允许出现其他不合法符号。
  542. OutRequestNo *string `json:"out_request_no"`
  543. // 添加时间,遵循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秒。
  544. AddTime *string `json:"add_time"`
  545. // 待新增的小店活动门店列表
  546. Stores []RetailStoreInfo `json:"stores"`
  547. }
  548. func (o AddStoresRequest) MarshalJSON() ([]byte, error) {
  549. toSerialize := map[string]interface{}{}
  550. if o.BrandId == nil {
  551. return nil, fmt.Errorf("field `BrandId` is required and must be specified in AddStoresRequest")
  552. }
  553. toSerialize["brand_id"] = o.BrandId
  554. if o.OutRequestNo == nil {
  555. return nil, fmt.Errorf("field `OutRequestNo` is required and must be specified in AddStoresRequest")
  556. }
  557. toSerialize["out_request_no"] = o.OutRequestNo
  558. if o.AddTime == nil {
  559. return nil, fmt.Errorf("field `AddTime` is required and must be specified in AddStoresRequest")
  560. }
  561. toSerialize["add_time"] = o.AddTime
  562. if o.Stores == nil {
  563. return nil, fmt.Errorf("field `Stores` is required and must be specified in AddStoresRequest")
  564. }
  565. toSerialize["stores"] = o.Stores
  566. return json.Marshal(toSerialize)
  567. }
  568. func (o AddStoresRequest) String() string {
  569. var ret string
  570. if o.BrandId == nil {
  571. ret += "BrandId:<nil>, "
  572. } else {
  573. ret += fmt.Sprintf("BrandId:%v, ", *o.BrandId)
  574. }
  575. if o.OutRequestNo == nil {
  576. ret += "OutRequestNo:<nil>, "
  577. } else {
  578. ret += fmt.Sprintf("OutRequestNo:%v, ", *o.OutRequestNo)
  579. }
  580. if o.AddTime == nil {
  581. ret += "AddTime:<nil>, "
  582. } else {
  583. ret += fmt.Sprintf("AddTime:%v, ", *o.AddTime)
  584. }
  585. ret += fmt.Sprintf("Stores:%v", o.Stores)
  586. return fmt.Sprintf("AddStoresRequest{%s}", ret)
  587. }
  588. func (o AddStoresRequest) Clone() *AddStoresRequest {
  589. ret := AddStoresRequest{}
  590. if o.BrandId != nil {
  591. ret.BrandId = new(string)
  592. *ret.BrandId = *o.BrandId
  593. }
  594. if o.OutRequestNo != nil {
  595. ret.OutRequestNo = new(string)
  596. *ret.OutRequestNo = *o.OutRequestNo
  597. }
  598. if o.AddTime != nil {
  599. ret.AddTime = new(string)
  600. *ret.AddTime = *o.AddTime
  601. }
  602. if o.Stores != nil {
  603. ret.Stores = make([]RetailStoreInfo, len(o.Stores))
  604. for i, item := range o.Stores {
  605. ret.Stores[i] = *item.Clone()
  606. }
  607. }
  608. return &ret
  609. }
  610. // AddStoresResponse
  611. type AddStoresResponse struct {
  612. // 添加时间,遵循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秒。
  613. AddTime *string `json:"add_time,omitempty"`
  614. // 添加失败的小店活动门店列表
  615. FailedStores []RetailStoreInfo `json:"failed_stores,omitempty"`
  616. }
  617. func (o AddStoresResponse) MarshalJSON() ([]byte, error) {
  618. toSerialize := map[string]interface{}{}
  619. if o.AddTime != nil {
  620. toSerialize["add_time"] = o.AddTime
  621. }
  622. if o.FailedStores != nil {
  623. toSerialize["failed_stores"] = o.FailedStores
  624. }
  625. return json.Marshal(toSerialize)
  626. }
  627. func (o AddStoresResponse) String() string {
  628. var ret string
  629. if o.AddTime == nil {
  630. ret += "AddTime:<nil>, "
  631. } else {
  632. ret += fmt.Sprintf("AddTime:%v, ", *o.AddTime)
  633. }
  634. ret += fmt.Sprintf("FailedStores:%v", o.FailedStores)
  635. return fmt.Sprintf("AddStoresResponse{%s}", ret)
  636. }
  637. func (o AddStoresResponse) Clone() *AddStoresResponse {
  638. ret := AddStoresResponse{}
  639. if o.AddTime != nil {
  640. ret.AddTime = new(string)
  641. *ret.AddTime = *o.AddTime
  642. }
  643. if o.FailedStores != nil {
  644. ret.FailedStores = make([]RetailStoreInfo, len(o.FailedStores))
  645. for i, item := range o.FailedStores {
  646. ret.FailedStores[i] = *item.Clone()
  647. }
  648. }
  649. return &ret
  650. }
  651. // ApplyActivityBody
  652. type ApplyActivityBody struct {
  653. // 调用报名活动API的商户的商户号
  654. CallerMerchantId *string `json:"caller_merchant_id"`
  655. // 门店报名信息
  656. ApplyInfos []ActApplyInfo `json:"apply_infos,omitempty"`
  657. }
  658. func (o ApplyActivityBody) MarshalJSON() ([]byte, error) {
  659. toSerialize := map[string]interface{}{}
  660. if o.CallerMerchantId == nil {
  661. return nil, fmt.Errorf("field `CallerMerchantId` is required and must be specified in ApplyActivityBody")
  662. }
  663. toSerialize["caller_merchant_id"] = o.CallerMerchantId
  664. if o.ApplyInfos != nil {
  665. toSerialize["apply_infos"] = o.ApplyInfos
  666. }
  667. return json.Marshal(toSerialize)
  668. }
  669. func (o ApplyActivityBody) String() string {
  670. var ret string
  671. if o.CallerMerchantId == nil {
  672. ret += "CallerMerchantId:<nil>, "
  673. } else {
  674. ret += fmt.Sprintf("CallerMerchantId:%v, ", *o.CallerMerchantId)
  675. }
  676. ret += fmt.Sprintf("ApplyInfos:%v", o.ApplyInfos)
  677. return fmt.Sprintf("ApplyActivityBody{%s}", ret)
  678. }
  679. func (o ApplyActivityBody) Clone() *ApplyActivityBody {
  680. ret := ApplyActivityBody{}
  681. if o.CallerMerchantId != nil {
  682. ret.CallerMerchantId = new(string)
  683. *ret.CallerMerchantId = *o.CallerMerchantId
  684. }
  685. if o.ApplyInfos != nil {
  686. ret.ApplyInfos = make([]ActApplyInfo, len(o.ApplyInfos))
  687. for i, item := range o.ApplyInfos {
  688. ret.ApplyInfos[i] = *item.Clone()
  689. }
  690. }
  691. return &ret
  692. }
  693. // ApplyActivityRequest
  694. type ApplyActivityRequest struct {
  695. // 活动ID
  696. ActivityId *string `json:"activity_id"`
  697. // 调用报名活动API的商户的商户号
  698. CallerMerchantId *string `json:"caller_merchant_id"`
  699. // 门店报名信息
  700. ApplyInfos []ActApplyInfo `json:"apply_infos,omitempty"`
  701. }
  702. func (o ApplyActivityRequest) MarshalJSON() ([]byte, error) {
  703. toSerialize := map[string]interface{}{}
  704. if o.ActivityId == nil {
  705. return nil, fmt.Errorf("field `ActivityId` is required and must be specified in ApplyActivityRequest")
  706. }
  707. toSerialize["activity_id"] = o.ActivityId
  708. if o.CallerMerchantId == nil {
  709. return nil, fmt.Errorf("field `CallerMerchantId` is required and must be specified in ApplyActivityRequest")
  710. }
  711. toSerialize["caller_merchant_id"] = o.CallerMerchantId
  712. if o.ApplyInfos != nil {
  713. toSerialize["apply_infos"] = o.ApplyInfos
  714. }
  715. return json.Marshal(toSerialize)
  716. }
  717. func (o ApplyActivityRequest) String() string {
  718. var ret string
  719. if o.ActivityId == nil {
  720. ret += "ActivityId:<nil>, "
  721. } else {
  722. ret += fmt.Sprintf("ActivityId:%v, ", *o.ActivityId)
  723. }
  724. if o.CallerMerchantId == nil {
  725. ret += "CallerMerchantId:<nil>, "
  726. } else {
  727. ret += fmt.Sprintf("CallerMerchantId:%v, ", *o.CallerMerchantId)
  728. }
  729. ret += fmt.Sprintf("ApplyInfos:%v", o.ApplyInfos)
  730. return fmt.Sprintf("ApplyActivityRequest{%s}", ret)
  731. }
  732. func (o ApplyActivityRequest) Clone() *ApplyActivityRequest {
  733. ret := ApplyActivityRequest{}
  734. if o.ActivityId != nil {
  735. ret.ActivityId = new(string)
  736. *ret.ActivityId = *o.ActivityId
  737. }
  738. if o.CallerMerchantId != nil {
  739. ret.CallerMerchantId = new(string)
  740. *ret.CallerMerchantId = *o.CallerMerchantId
  741. }
  742. if o.ApplyInfos != nil {
  743. ret.ApplyInfos = make([]ActApplyInfo, len(o.ApplyInfos))
  744. for i, item := range o.ApplyInfos {
  745. ret.ApplyInfos[i] = *item.Clone()
  746. }
  747. }
  748. return &ret
  749. }
  750. // ApplyActivityResponse
  751. type ApplyActivityResponse struct {
  752. // 返回结果文案
  753. ReturnMessage *string `json:"return_message,omitempty"`
  754. // 失败的报名记录
  755. FailedApplyInfos []ActApplyInfo `json:"failed_apply_infos,omitempty"`
  756. // 成功的报名记录
  757. SucceedApplyInfos []ActApplyInfo `json:"succeed_apply_infos,omitempty"`
  758. }
  759. func (o ApplyActivityResponse) MarshalJSON() ([]byte, error) {
  760. toSerialize := map[string]interface{}{}
  761. if o.ReturnMessage != nil {
  762. toSerialize["return_message"] = o.ReturnMessage
  763. }
  764. if o.FailedApplyInfos != nil {
  765. toSerialize["failed_apply_infos"] = o.FailedApplyInfos
  766. }
  767. if o.SucceedApplyInfos != nil {
  768. toSerialize["succeed_apply_infos"] = o.SucceedApplyInfos
  769. }
  770. return json.Marshal(toSerialize)
  771. }
  772. func (o ApplyActivityResponse) String() string {
  773. var ret string
  774. if o.ReturnMessage == nil {
  775. ret += "ReturnMessage:<nil>, "
  776. } else {
  777. ret += fmt.Sprintf("ReturnMessage:%v, ", *o.ReturnMessage)
  778. }
  779. ret += fmt.Sprintf("FailedApplyInfos:%v, ", o.FailedApplyInfos)
  780. ret += fmt.Sprintf("SucceedApplyInfos:%v", o.SucceedApplyInfos)
  781. return fmt.Sprintf("ApplyActivityResponse{%s}", ret)
  782. }
  783. func (o ApplyActivityResponse) Clone() *ApplyActivityResponse {
  784. ret := ApplyActivityResponse{}
  785. if o.ReturnMessage != nil {
  786. ret.ReturnMessage = new(string)
  787. *ret.ReturnMessage = *o.ReturnMessage
  788. }
  789. if o.FailedApplyInfos != nil {
  790. ret.FailedApplyInfos = make([]ActApplyInfo, len(o.FailedApplyInfos))
  791. for i, item := range o.FailedApplyInfos {
  792. ret.FailedApplyInfos[i] = *item.Clone()
  793. }
  794. }
  795. if o.SucceedApplyInfos != nil {
  796. ret.SucceedApplyInfos = make([]ActApplyInfo, len(o.SucceedApplyInfos))
  797. for i, item := range o.SucceedApplyInfos {
  798. ret.SucceedApplyInfos[i] = *item.Clone()
  799. }
  800. }
  801. return &ret
  802. }
  803. // CreateMaterialsBody
  804. type CreateMaterialsBody struct {
  805. // 商户添加业务代理信息凭据号,商户侧需保持唯一性。可包含英文字母,数字,\\\\|,\\\\_,\\\\*,\\\\-等内容,不允许出现其他不合法符号。
  806. OutRequestNo *string `json:"out_request_no"`
  807. // 生成物料码数量
  808. MaterialNum *int64 `json:"material_num"`
  809. }
  810. func (o CreateMaterialsBody) MarshalJSON() ([]byte, error) {
  811. toSerialize := map[string]interface{}{}
  812. if o.OutRequestNo == nil {
  813. return nil, fmt.Errorf("field `OutRequestNo` is required and must be specified in CreateMaterialsBody")
  814. }
  815. toSerialize["out_request_no"] = o.OutRequestNo
  816. if o.MaterialNum == nil {
  817. return nil, fmt.Errorf("field `MaterialNum` is required and must be specified in CreateMaterialsBody")
  818. }
  819. toSerialize["material_num"] = o.MaterialNum
  820. return json.Marshal(toSerialize)
  821. }
  822. func (o CreateMaterialsBody) String() string {
  823. var ret string
  824. if o.OutRequestNo == nil {
  825. ret += "OutRequestNo:<nil>, "
  826. } else {
  827. ret += fmt.Sprintf("OutRequestNo:%v, ", *o.OutRequestNo)
  828. }
  829. if o.MaterialNum == nil {
  830. ret += "MaterialNum:<nil>"
  831. } else {
  832. ret += fmt.Sprintf("MaterialNum:%v", *o.MaterialNum)
  833. }
  834. return fmt.Sprintf("CreateMaterialsBody{%s}", ret)
  835. }
  836. func (o CreateMaterialsBody) Clone() *CreateMaterialsBody {
  837. ret := CreateMaterialsBody{}
  838. if o.OutRequestNo != nil {
  839. ret.OutRequestNo = new(string)
  840. *ret.OutRequestNo = *o.OutRequestNo
  841. }
  842. if o.MaterialNum != nil {
  843. ret.MaterialNum = new(int64)
  844. *ret.MaterialNum = *o.MaterialNum
  845. }
  846. return &ret
  847. }
  848. // CreateMaterialsRequest
  849. type CreateMaterialsRequest struct {
  850. // 品牌ID
  851. BrandId *string `json:"brand_id"`
  852. // 商户添加业务代理信息凭据号,商户侧需保持唯一性。可包含英文字母,数字,\\\\|,\\\\_,\\\\*,\\\\-等内容,不允许出现其他不合法符号。
  853. OutRequestNo *string `json:"out_request_no"`
  854. // 生成物料码数量
  855. MaterialNum *int64 `json:"material_num"`
  856. }
  857. func (o CreateMaterialsRequest) MarshalJSON() ([]byte, error) {
  858. toSerialize := map[string]interface{}{}
  859. if o.BrandId == nil {
  860. return nil, fmt.Errorf("field `BrandId` is required and must be specified in CreateMaterialsRequest")
  861. }
  862. toSerialize["brand_id"] = o.BrandId
  863. if o.OutRequestNo == nil {
  864. return nil, fmt.Errorf("field `OutRequestNo` is required and must be specified in CreateMaterialsRequest")
  865. }
  866. toSerialize["out_request_no"] = o.OutRequestNo
  867. if o.MaterialNum == nil {
  868. return nil, fmt.Errorf("field `MaterialNum` is required and must be specified in CreateMaterialsRequest")
  869. }
  870. toSerialize["material_num"] = o.MaterialNum
  871. return json.Marshal(toSerialize)
  872. }
  873. func (o CreateMaterialsRequest) String() string {
  874. var ret string
  875. if o.BrandId == nil {
  876. ret += "BrandId:<nil>, "
  877. } else {
  878. ret += fmt.Sprintf("BrandId:%v, ", *o.BrandId)
  879. }
  880. if o.OutRequestNo == nil {
  881. ret += "OutRequestNo:<nil>, "
  882. } else {
  883. ret += fmt.Sprintf("OutRequestNo:%v, ", *o.OutRequestNo)
  884. }
  885. if o.MaterialNum == nil {
  886. ret += "MaterialNum:<nil>"
  887. } else {
  888. ret += fmt.Sprintf("MaterialNum:%v", *o.MaterialNum)
  889. }
  890. return fmt.Sprintf("CreateMaterialsRequest{%s}", ret)
  891. }
  892. func (o CreateMaterialsRequest) Clone() *CreateMaterialsRequest {
  893. ret := CreateMaterialsRequest{}
  894. if o.BrandId != nil {
  895. ret.BrandId = new(string)
  896. *ret.BrandId = *o.BrandId
  897. }
  898. if o.OutRequestNo != nil {
  899. ret.OutRequestNo = new(string)
  900. *ret.OutRequestNo = *o.OutRequestNo
  901. }
  902. if o.MaterialNum != nil {
  903. ret.MaterialNum = new(int64)
  904. *ret.MaterialNum = *o.MaterialNum
  905. }
  906. return &ret
  907. }
  908. // DeleteRepresentativeBody
  909. type DeleteRepresentativeBody struct {
  910. // 业务代理信息列表
  911. RepresentativeInfoList []RepresentativeInfo `json:"representative_info_list"`
  912. // 商户删除业务代理请求的唯一标识,商户需保证唯一。可包含英文字母,数字,\\|,\\_,\\*,\\-等内容,不允许出现其他不合法符号。
  913. OutRequestNo *string `json:"out_request_no"`
  914. // 删除时间
  915. DeleteTime *string `json:"delete_time"`
  916. }
  917. func (o DeleteRepresentativeBody) MarshalJSON() ([]byte, error) {
  918. toSerialize := map[string]interface{}{}
  919. if o.RepresentativeInfoList == nil {
  920. return nil, fmt.Errorf("field `RepresentativeInfoList` is required and must be specified in DeleteRepresentativeBody")
  921. }
  922. toSerialize["representative_info_list"] = o.RepresentativeInfoList
  923. if o.OutRequestNo == nil {
  924. return nil, fmt.Errorf("field `OutRequestNo` is required and must be specified in DeleteRepresentativeBody")
  925. }
  926. toSerialize["out_request_no"] = o.OutRequestNo
  927. if o.DeleteTime == nil {
  928. return nil, fmt.Errorf("field `DeleteTime` is required and must be specified in DeleteRepresentativeBody")
  929. }
  930. toSerialize["delete_time"] = o.DeleteTime
  931. return json.Marshal(toSerialize)
  932. }
  933. func (o DeleteRepresentativeBody) String() string {
  934. var ret string
  935. ret += fmt.Sprintf("RepresentativeInfoList:%v, ", o.RepresentativeInfoList)
  936. if o.OutRequestNo == nil {
  937. ret += "OutRequestNo:<nil>, "
  938. } else {
  939. ret += fmt.Sprintf("OutRequestNo:%v, ", *o.OutRequestNo)
  940. }
  941. if o.DeleteTime == nil {
  942. ret += "DeleteTime:<nil>"
  943. } else {
  944. ret += fmt.Sprintf("DeleteTime:%v", *o.DeleteTime)
  945. }
  946. return fmt.Sprintf("DeleteRepresentativeBody{%s}", ret)
  947. }
  948. func (o DeleteRepresentativeBody) Clone() *DeleteRepresentativeBody {
  949. ret := DeleteRepresentativeBody{}
  950. if o.RepresentativeInfoList != nil {
  951. ret.RepresentativeInfoList = make([]RepresentativeInfo, len(o.RepresentativeInfoList))
  952. for i, item := range o.RepresentativeInfoList {
  953. ret.RepresentativeInfoList[i] = *item.Clone()
  954. }
  955. }
  956. if o.OutRequestNo != nil {
  957. ret.OutRequestNo = new(string)
  958. *ret.OutRequestNo = *o.OutRequestNo
  959. }
  960. if o.DeleteTime != nil {
  961. ret.DeleteTime = new(string)
  962. *ret.DeleteTime = *o.DeleteTime
  963. }
  964. return &ret
  965. }
  966. // DeleteRepresentativeRequest
  967. type DeleteRepresentativeRequest struct {
  968. // 零售小店活动ID
  969. ActivityId *string `json:"activity_id"`
  970. // 业务代理信息列表
  971. RepresentativeInfoList []RepresentativeInfo `json:"representative_info_list"`
  972. // 商户删除业务代理请求的唯一标识,商户需保证唯一。可包含英文字母,数字,\\|,\\_,\\*,\\-等内容,不允许出现其他不合法符号。
  973. OutRequestNo *string `json:"out_request_no"`
  974. // 删除时间
  975. DeleteTime *string `json:"delete_time"`
  976. }
  977. func (o DeleteRepresentativeRequest) MarshalJSON() ([]byte, error) {
  978. toSerialize := map[string]interface{}{}
  979. if o.ActivityId == nil {
  980. return nil, fmt.Errorf("field `ActivityId` is required and must be specified in DeleteRepresentativeRequest")
  981. }
  982. toSerialize["activity_id"] = o.ActivityId
  983. if o.RepresentativeInfoList == nil {
  984. return nil, fmt.Errorf("field `RepresentativeInfoList` is required and must be specified in DeleteRepresentativeRequest")
  985. }
  986. toSerialize["representative_info_list"] = o.RepresentativeInfoList
  987. if o.OutRequestNo == nil {
  988. return nil, fmt.Errorf("field `OutRequestNo` is required and must be specified in DeleteRepresentativeRequest")
  989. }
  990. toSerialize["out_request_no"] = o.OutRequestNo
  991. if o.DeleteTime == nil {
  992. return nil, fmt.Errorf("field `DeleteTime` is required and must be specified in DeleteRepresentativeRequest")
  993. }
  994. toSerialize["delete_time"] = o.DeleteTime
  995. return json.Marshal(toSerialize)
  996. }
  997. func (o DeleteRepresentativeRequest) String() string {
  998. var ret string
  999. if o.ActivityId == nil {
  1000. ret += "ActivityId:<nil>, "
  1001. } else {
  1002. ret += fmt.Sprintf("ActivityId:%v, ", *o.ActivityId)
  1003. }
  1004. ret += fmt.Sprintf("RepresentativeInfoList:%v, ", o.RepresentativeInfoList)
  1005. if o.OutRequestNo == nil {
  1006. ret += "OutRequestNo:<nil>, "
  1007. } else {
  1008. ret += fmt.Sprintf("OutRequestNo:%v, ", *o.OutRequestNo)
  1009. }
  1010. if o.DeleteTime == nil {
  1011. ret += "DeleteTime:<nil>"
  1012. } else {
  1013. ret += fmt.Sprintf("DeleteTime:%v", *o.DeleteTime)
  1014. }
  1015. return fmt.Sprintf("DeleteRepresentativeRequest{%s}", ret)
  1016. }
  1017. func (o DeleteRepresentativeRequest) Clone() *DeleteRepresentativeRequest {
  1018. ret := DeleteRepresentativeRequest{}
  1019. if o.ActivityId != nil {
  1020. ret.ActivityId = new(string)
  1021. *ret.ActivityId = *o.ActivityId
  1022. }
  1023. if o.RepresentativeInfoList != nil {
  1024. ret.RepresentativeInfoList = make([]RepresentativeInfo, len(o.RepresentativeInfoList))
  1025. for i, item := range o.RepresentativeInfoList {
  1026. ret.RepresentativeInfoList[i] = *item.Clone()
  1027. }
  1028. }
  1029. if o.OutRequestNo != nil {
  1030. ret.OutRequestNo = new(string)
  1031. *ret.OutRequestNo = *o.OutRequestNo
  1032. }
  1033. if o.DeleteTime != nil {
  1034. ret.DeleteTime = new(string)
  1035. *ret.DeleteTime = *o.DeleteTime
  1036. }
  1037. return &ret
  1038. }
  1039. // DeleteRepresentativeResponse
  1040. type DeleteRepresentativeResponse struct {
  1041. // 零售小店活动ID
  1042. ActivityId *string `json:"activity_id"`
  1043. // 删除失败业务代理信息列表
  1044. FailedRepresentativeInfoList []RepresentativeInfo `json:"failed_representative_info_list,omitempty"`
  1045. // 删除时间
  1046. DeleteTime *string `json:"delete_time"`
  1047. }
  1048. func (o DeleteRepresentativeResponse) MarshalJSON() ([]byte, error) {
  1049. toSerialize := map[string]interface{}{}
  1050. if o.ActivityId == nil {
  1051. return nil, fmt.Errorf("field `ActivityId` is required and must be specified in DeleteRepresentativeResponse")
  1052. }
  1053. toSerialize["activity_id"] = o.ActivityId
  1054. if o.FailedRepresentativeInfoList != nil {
  1055. toSerialize["failed_representative_info_list"] = o.FailedRepresentativeInfoList
  1056. }
  1057. if o.DeleteTime == nil {
  1058. return nil, fmt.Errorf("field `DeleteTime` is required and must be specified in DeleteRepresentativeResponse")
  1059. }
  1060. toSerialize["delete_time"] = o.DeleteTime
  1061. return json.Marshal(toSerialize)
  1062. }
  1063. func (o DeleteRepresentativeResponse) String() string {
  1064. var ret string
  1065. if o.ActivityId == nil {
  1066. ret += "ActivityId:<nil>, "
  1067. } else {
  1068. ret += fmt.Sprintf("ActivityId:%v, ", *o.ActivityId)
  1069. }
  1070. ret += fmt.Sprintf("FailedRepresentativeInfoList:%v, ", o.FailedRepresentativeInfoList)
  1071. if o.DeleteTime == nil {
  1072. ret += "DeleteTime:<nil>"
  1073. } else {
  1074. ret += fmt.Sprintf("DeleteTime:%v", *o.DeleteTime)
  1075. }
  1076. return fmt.Sprintf("DeleteRepresentativeResponse{%s}", ret)
  1077. }
  1078. func (o DeleteRepresentativeResponse) Clone() *DeleteRepresentativeResponse {
  1079. ret := DeleteRepresentativeResponse{}
  1080. if o.ActivityId != nil {
  1081. ret.ActivityId = new(string)
  1082. *ret.ActivityId = *o.ActivityId
  1083. }
  1084. if o.FailedRepresentativeInfoList != nil {
  1085. ret.FailedRepresentativeInfoList = make([]RepresentativeInfo, len(o.FailedRepresentativeInfoList))
  1086. for i, item := range o.FailedRepresentativeInfoList {
  1087. ret.FailedRepresentativeInfoList[i] = *item.Clone()
  1088. }
  1089. }
  1090. if o.DeleteTime != nil {
  1091. ret.DeleteTime = new(string)
  1092. *ret.DeleteTime = *o.DeleteTime
  1093. }
  1094. return &ret
  1095. }
  1096. // DeleteStoresBody
  1097. type DeleteStoresBody struct {
  1098. // 商户删除小店活动门店凭据号,商户侧需保持唯一性。可包含英文字母,数字,\\\\|,\\\\_,\\\\*,\\\\-等内容,不允许出现其他不合法符号。
  1099. OutRequestNo *string `json:"out_request_no"`
  1100. // 删除时间,遵循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秒。
  1101. DeleteTime *string `json:"delete_time"`
  1102. // 待删除的小店活动门店列表
  1103. Stores []RetailStoreInfo `json:"stores"`
  1104. }
  1105. func (o DeleteStoresBody) MarshalJSON() ([]byte, error) {
  1106. toSerialize := map[string]interface{}{}
  1107. if o.OutRequestNo == nil {
  1108. return nil, fmt.Errorf("field `OutRequestNo` is required and must be specified in DeleteStoresBody")
  1109. }
  1110. toSerialize["out_request_no"] = o.OutRequestNo
  1111. if o.DeleteTime == nil {
  1112. return nil, fmt.Errorf("field `DeleteTime` is required and must be specified in DeleteStoresBody")
  1113. }
  1114. toSerialize["delete_time"] = o.DeleteTime
  1115. if o.Stores == nil {
  1116. return nil, fmt.Errorf("field `Stores` is required and must be specified in DeleteStoresBody")
  1117. }
  1118. toSerialize["stores"] = o.Stores
  1119. return json.Marshal(toSerialize)
  1120. }
  1121. func (o DeleteStoresBody) String() string {
  1122. var ret string
  1123. if o.OutRequestNo == nil {
  1124. ret += "OutRequestNo:<nil>, "
  1125. } else {
  1126. ret += fmt.Sprintf("OutRequestNo:%v, ", *o.OutRequestNo)
  1127. }
  1128. if o.DeleteTime == nil {
  1129. ret += "DeleteTime:<nil>, "
  1130. } else {
  1131. ret += fmt.Sprintf("DeleteTime:%v, ", *o.DeleteTime)
  1132. }
  1133. ret += fmt.Sprintf("Stores:%v", o.Stores)
  1134. return fmt.Sprintf("DeleteStoresBody{%s}", ret)
  1135. }
  1136. func (o DeleteStoresBody) Clone() *DeleteStoresBody {
  1137. ret := DeleteStoresBody{}
  1138. if o.OutRequestNo != nil {
  1139. ret.OutRequestNo = new(string)
  1140. *ret.OutRequestNo = *o.OutRequestNo
  1141. }
  1142. if o.DeleteTime != nil {
  1143. ret.DeleteTime = new(string)
  1144. *ret.DeleteTime = *o.DeleteTime
  1145. }
  1146. if o.Stores != nil {
  1147. ret.Stores = make([]RetailStoreInfo, len(o.Stores))
  1148. for i, item := range o.Stores {
  1149. ret.Stores[i] = *item.Clone()
  1150. }
  1151. }
  1152. return &ret
  1153. }
  1154. // DeleteStoresRequest
  1155. type DeleteStoresRequest struct {
  1156. // 品牌ID
  1157. BrandId *string `json:"brand_id"`
  1158. // 商户删除小店活动门店凭据号,商户侧需保持唯一性。可包含英文字母,数字,\\\\|,\\\\_,\\\\*,\\\\-等内容,不允许出现其他不合法符号。
  1159. OutRequestNo *string `json:"out_request_no"`
  1160. // 删除时间,遵循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秒。
  1161. DeleteTime *string `json:"delete_time"`
  1162. // 待删除的小店活动门店列表
  1163. Stores []RetailStoreInfo `json:"stores"`
  1164. }
  1165. func (o DeleteStoresRequest) MarshalJSON() ([]byte, error) {
  1166. toSerialize := map[string]interface{}{}
  1167. if o.BrandId == nil {
  1168. return nil, fmt.Errorf("field `BrandId` is required and must be specified in DeleteStoresRequest")
  1169. }
  1170. toSerialize["brand_id"] = o.BrandId
  1171. if o.OutRequestNo == nil {
  1172. return nil, fmt.Errorf("field `OutRequestNo` is required and must be specified in DeleteStoresRequest")
  1173. }
  1174. toSerialize["out_request_no"] = o.OutRequestNo
  1175. if o.DeleteTime == nil {
  1176. return nil, fmt.Errorf("field `DeleteTime` is required and must be specified in DeleteStoresRequest")
  1177. }
  1178. toSerialize["delete_time"] = o.DeleteTime
  1179. if o.Stores == nil {
  1180. return nil, fmt.Errorf("field `Stores` is required and must be specified in DeleteStoresRequest")
  1181. }
  1182. toSerialize["stores"] = o.Stores
  1183. return json.Marshal(toSerialize)
  1184. }
  1185. func (o DeleteStoresRequest) String() string {
  1186. var ret string
  1187. if o.BrandId == nil {
  1188. ret += "BrandId:<nil>, "
  1189. } else {
  1190. ret += fmt.Sprintf("BrandId:%v, ", *o.BrandId)
  1191. }
  1192. if o.OutRequestNo == nil {
  1193. ret += "OutRequestNo:<nil>, "
  1194. } else {
  1195. ret += fmt.Sprintf("OutRequestNo:%v, ", *o.OutRequestNo)
  1196. }
  1197. if o.DeleteTime == nil {
  1198. ret += "DeleteTime:<nil>, "
  1199. } else {
  1200. ret += fmt.Sprintf("DeleteTime:%v, ", *o.DeleteTime)
  1201. }
  1202. ret += fmt.Sprintf("Stores:%v", o.Stores)
  1203. return fmt.Sprintf("DeleteStoresRequest{%s}", ret)
  1204. }
  1205. func (o DeleteStoresRequest) Clone() *DeleteStoresRequest {
  1206. ret := DeleteStoresRequest{}
  1207. if o.BrandId != nil {
  1208. ret.BrandId = new(string)
  1209. *ret.BrandId = *o.BrandId
  1210. }
  1211. if o.OutRequestNo != nil {
  1212. ret.OutRequestNo = new(string)
  1213. *ret.OutRequestNo = *o.OutRequestNo
  1214. }
  1215. if o.DeleteTime != nil {
  1216. ret.DeleteTime = new(string)
  1217. *ret.DeleteTime = *o.DeleteTime
  1218. }
  1219. if o.Stores != nil {
  1220. ret.Stores = make([]RetailStoreInfo, len(o.Stores))
  1221. for i, item := range o.Stores {
  1222. ret.Stores[i] = *item.Clone()
  1223. }
  1224. }
  1225. return &ret
  1226. }
  1227. // DeleteStoresResponse
  1228. type DeleteStoresResponse struct {
  1229. // 删除时间,遵循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秒。
  1230. DeleteTime *string `json:"delete_time,omitempty"`
  1231. // 删除失败的小店活动门店列表
  1232. FailedStores []RetailStoreInfo `json:"failed_stores,omitempty"`
  1233. }
  1234. func (o DeleteStoresResponse) MarshalJSON() ([]byte, error) {
  1235. toSerialize := map[string]interface{}{}
  1236. if o.DeleteTime != nil {
  1237. toSerialize["delete_time"] = o.DeleteTime
  1238. }
  1239. if o.FailedStores != nil {
  1240. toSerialize["failed_stores"] = o.FailedStores
  1241. }
  1242. return json.Marshal(toSerialize)
  1243. }
  1244. func (o DeleteStoresResponse) String() string {
  1245. var ret string
  1246. if o.DeleteTime == nil {
  1247. ret += "DeleteTime:<nil>, "
  1248. } else {
  1249. ret += fmt.Sprintf("DeleteTime:%v, ", *o.DeleteTime)
  1250. }
  1251. ret += fmt.Sprintf("FailedStores:%v", o.FailedStores)
  1252. return fmt.Sprintf("DeleteStoresResponse{%s}", ret)
  1253. }
  1254. func (o DeleteStoresResponse) Clone() *DeleteStoresResponse {
  1255. ret := DeleteStoresResponse{}
  1256. if o.DeleteTime != nil {
  1257. ret.DeleteTime = new(string)
  1258. *ret.DeleteTime = *o.DeleteTime
  1259. }
  1260. if o.FailedStores != nil {
  1261. ret.FailedStores = make([]RetailStoreInfo, len(o.FailedStores))
  1262. for i, item := range o.FailedStores {
  1263. ret.FailedStores[i] = *item.Clone()
  1264. }
  1265. }
  1266. return &ret
  1267. }
  1268. // FmcgAct
  1269. type FmcgAct struct {
  1270. // 活动ID
  1271. ActivityId *string `json:"activity_id,omitempty"`
  1272. // 品牌ID
  1273. BrandId *string `json:"brand_id,omitempty"`
  1274. // 活动创建方商户号
  1275. CreatorMerchantId *string `json:"creator_merchant_id,omitempty"`
  1276. // 活动信息
  1277. ActivityInfo *ActInfo `json:"activity_info,omitempty"`
  1278. // 活动商品列表
  1279. GoodsInformation *GoodsInfo `json:"goods_information,omitempty"`
  1280. // 活动规则
  1281. RuleInformation *ActRule `json:"rule_information,omitempty"`
  1282. }
  1283. func (o FmcgAct) MarshalJSON() ([]byte, error) {
  1284. toSerialize := map[string]interface{}{}
  1285. if o.ActivityId != nil {
  1286. toSerialize["activity_id"] = o.ActivityId
  1287. }
  1288. if o.BrandId != nil {
  1289. toSerialize["brand_id"] = o.BrandId
  1290. }
  1291. if o.CreatorMerchantId != nil {
  1292. toSerialize["creator_merchant_id"] = o.CreatorMerchantId
  1293. }
  1294. if o.ActivityInfo != nil {
  1295. toSerialize["activity_info"] = o.ActivityInfo
  1296. }
  1297. if o.GoodsInformation != nil {
  1298. toSerialize["goods_information"] = o.GoodsInformation
  1299. }
  1300. if o.RuleInformation != nil {
  1301. toSerialize["rule_information"] = o.RuleInformation
  1302. }
  1303. return json.Marshal(toSerialize)
  1304. }
  1305. func (o FmcgAct) String() string {
  1306. var ret string
  1307. if o.ActivityId == nil {
  1308. ret += "ActivityId:<nil>, "
  1309. } else {
  1310. ret += fmt.Sprintf("ActivityId:%v, ", *o.ActivityId)
  1311. }
  1312. if o.BrandId == nil {
  1313. ret += "BrandId:<nil>, "
  1314. } else {
  1315. ret += fmt.Sprintf("BrandId:%v, ", *o.BrandId)
  1316. }
  1317. if o.CreatorMerchantId == nil {
  1318. ret += "CreatorMerchantId:<nil>, "
  1319. } else {
  1320. ret += fmt.Sprintf("CreatorMerchantId:%v, ", *o.CreatorMerchantId)
  1321. }
  1322. ret += fmt.Sprintf("ActivityInfo:%v, ", o.ActivityInfo)
  1323. ret += fmt.Sprintf("GoodsInformation:%v, ", o.GoodsInformation)
  1324. ret += fmt.Sprintf("RuleInformation:%v", o.RuleInformation)
  1325. return fmt.Sprintf("FmcgAct{%s}", ret)
  1326. }
  1327. func (o FmcgAct) Clone() *FmcgAct {
  1328. ret := FmcgAct{}
  1329. if o.ActivityId != nil {
  1330. ret.ActivityId = new(string)
  1331. *ret.ActivityId = *o.ActivityId
  1332. }
  1333. if o.BrandId != nil {
  1334. ret.BrandId = new(string)
  1335. *ret.BrandId = *o.BrandId
  1336. }
  1337. if o.CreatorMerchantId != nil {
  1338. ret.CreatorMerchantId = new(string)
  1339. *ret.CreatorMerchantId = *o.CreatorMerchantId
  1340. }
  1341. if o.ActivityInfo != nil {
  1342. ret.ActivityInfo = o.ActivityInfo.Clone()
  1343. }
  1344. if o.GoodsInformation != nil {
  1345. ret.GoodsInformation = o.GoodsInformation.Clone()
  1346. }
  1347. if o.RuleInformation != nil {
  1348. ret.RuleInformation = o.RuleInformation.Clone()
  1349. }
  1350. return &ret
  1351. }
  1352. // GetStoreRequest
  1353. type GetStoreRequest struct {
  1354. // 品牌ID
  1355. BrandId *string `json:"brand_id"`
  1356. // 门店编码,可包含英文字母,数字,\\\\|,\\\\_,\\\\*,\\\\-等内容,不允许出现其他不合法符号。
  1357. StoreCode *string `json:"store_code"`
  1358. }
  1359. func (o GetStoreRequest) MarshalJSON() ([]byte, error) {
  1360. toSerialize := map[string]interface{}{}
  1361. if o.BrandId == nil {
  1362. return nil, fmt.Errorf("field `BrandId` is required and must be specified in GetStoreRequest")
  1363. }
  1364. toSerialize["brand_id"] = o.BrandId
  1365. if o.StoreCode == nil {
  1366. return nil, fmt.Errorf("field `StoreCode` is required and must be specified in GetStoreRequest")
  1367. }
  1368. toSerialize["store_code"] = o.StoreCode
  1369. return json.Marshal(toSerialize)
  1370. }
  1371. func (o GetStoreRequest) String() string {
  1372. var ret string
  1373. if o.BrandId == nil {
  1374. ret += "BrandId:<nil>, "
  1375. } else {
  1376. ret += fmt.Sprintf("BrandId:%v, ", *o.BrandId)
  1377. }
  1378. if o.StoreCode == nil {
  1379. ret += "StoreCode:<nil>"
  1380. } else {
  1381. ret += fmt.Sprintf("StoreCode:%v", *o.StoreCode)
  1382. }
  1383. return fmt.Sprintf("GetStoreRequest{%s}", ret)
  1384. }
  1385. func (o GetStoreRequest) Clone() *GetStoreRequest {
  1386. ret := GetStoreRequest{}
  1387. if o.BrandId != nil {
  1388. ret.BrandId = new(string)
  1389. *ret.BrandId = *o.BrandId
  1390. }
  1391. if o.StoreCode != nil {
  1392. ret.StoreCode = new(string)
  1393. *ret.StoreCode = *o.StoreCode
  1394. }
  1395. return &ret
  1396. }
  1397. // GoodsInfo
  1398. type GoodsInfo struct {
  1399. // 商品ID
  1400. GoodsId *string `json:"goods_id,omitempty"`
  1401. // 商品名称
  1402. GoodsName *string `json:"goods_name,omitempty"`
  1403. // 商品图片URL
  1404. GoodsPictureUrl *string `json:"goods_picture_url,omitempty"`
  1405. }
  1406. func (o GoodsInfo) MarshalJSON() ([]byte, error) {
  1407. toSerialize := map[string]interface{}{}
  1408. if o.GoodsId != nil {
  1409. toSerialize["goods_id"] = o.GoodsId
  1410. }
  1411. if o.GoodsName != nil {
  1412. toSerialize["goods_name"] = o.GoodsName
  1413. }
  1414. if o.GoodsPictureUrl != nil {
  1415. toSerialize["goods_picture_url"] = o.GoodsPictureUrl
  1416. }
  1417. return json.Marshal(toSerialize)
  1418. }
  1419. func (o GoodsInfo) String() string {
  1420. var ret string
  1421. if o.GoodsId == nil {
  1422. ret += "GoodsId:<nil>, "
  1423. } else {
  1424. ret += fmt.Sprintf("GoodsId:%v, ", *o.GoodsId)
  1425. }
  1426. if o.GoodsName == nil {
  1427. ret += "GoodsName:<nil>, "
  1428. } else {
  1429. ret += fmt.Sprintf("GoodsName:%v, ", *o.GoodsName)
  1430. }
  1431. if o.GoodsPictureUrl == nil {
  1432. ret += "GoodsPictureUrl:<nil>"
  1433. } else {
  1434. ret += fmt.Sprintf("GoodsPictureUrl:%v", *o.GoodsPictureUrl)
  1435. }
  1436. return fmt.Sprintf("GoodsInfo{%s}", ret)
  1437. }
  1438. func (o GoodsInfo) Clone() *GoodsInfo {
  1439. ret := GoodsInfo{}
  1440. if o.GoodsId != nil {
  1441. ret.GoodsId = new(string)
  1442. *ret.GoodsId = *o.GoodsId
  1443. }
  1444. if o.GoodsName != nil {
  1445. ret.GoodsName = new(string)
  1446. *ret.GoodsName = *o.GoodsName
  1447. }
  1448. if o.GoodsPictureUrl != nil {
  1449. ret.GoodsPictureUrl = new(string)
  1450. *ret.GoodsPictureUrl = *o.GoodsPictureUrl
  1451. }
  1452. return &ret
  1453. }
  1454. // ListActsByAreaRequest
  1455. type ListActsByAreaRequest struct {
  1456. // 活动所属城市的ID
  1457. CityId *string `json:"city_id"`
  1458. // 非负整数,该次请求资源的起始位置,从0开始计数
  1459. Offset *int64 `json:"offset"`
  1460. // 非0非负的整数
  1461. Limit *int64 `json:"limit"`
  1462. }
  1463. func (o ListActsByAreaRequest) MarshalJSON() ([]byte, error) {
  1464. toSerialize := map[string]interface{}{}
  1465. if o.CityId == nil {
  1466. return nil, fmt.Errorf("field `CityId` is required and must be specified in ListActsByAreaRequest")
  1467. }
  1468. toSerialize["city_id"] = o.CityId
  1469. if o.Offset == nil {
  1470. return nil, fmt.Errorf("field `Offset` is required and must be specified in ListActsByAreaRequest")
  1471. }
  1472. toSerialize["offset"] = o.Offset
  1473. if o.Limit == nil {
  1474. return nil, fmt.Errorf("field `Limit` is required and must be specified in ListActsByAreaRequest")
  1475. }
  1476. toSerialize["limit"] = o.Limit
  1477. return json.Marshal(toSerialize)
  1478. }
  1479. func (o ListActsByAreaRequest) String() string {
  1480. var ret string
  1481. if o.CityId == nil {
  1482. ret += "CityId:<nil>, "
  1483. } else {
  1484. ret += fmt.Sprintf("CityId:%v, ", *o.CityId)
  1485. }
  1486. if o.Offset == nil {
  1487. ret += "Offset:<nil>, "
  1488. } else {
  1489. ret += fmt.Sprintf("Offset:%v, ", *o.Offset)
  1490. }
  1491. if o.Limit == nil {
  1492. ret += "Limit:<nil>"
  1493. } else {
  1494. ret += fmt.Sprintf("Limit:%v", *o.Limit)
  1495. }
  1496. return fmt.Sprintf("ListActsByAreaRequest{%s}", ret)
  1497. }
  1498. func (o ListActsByAreaRequest) Clone() *ListActsByAreaRequest {
  1499. ret := ListActsByAreaRequest{}
  1500. if o.CityId != nil {
  1501. ret.CityId = new(string)
  1502. *ret.CityId = *o.CityId
  1503. }
  1504. if o.Offset != nil {
  1505. ret.Offset = new(int64)
  1506. *ret.Offset = *o.Offset
  1507. }
  1508. if o.Limit != nil {
  1509. ret.Limit = new(int64)
  1510. *ret.Limit = *o.Limit
  1511. }
  1512. return &ret
  1513. }
  1514. // ListActsByAreaResponse
  1515. type ListActsByAreaResponse struct {
  1516. // 活动总数
  1517. TotalCount *int64 `json:"total_count,omitempty"`
  1518. // 活动集合
  1519. Data []FmcgAct `json:"data,omitempty"`
  1520. // 非负整数,该次请求资源的起始位置,从0开始计数
  1521. Offset *int64 `json:"offset"`
  1522. // 非0非负的整数
  1523. Limit *int64 `json:"limit"`
  1524. }
  1525. func (o ListActsByAreaResponse) MarshalJSON() ([]byte, error) {
  1526. toSerialize := map[string]interface{}{}
  1527. if o.TotalCount != nil {
  1528. toSerialize["total_count"] = o.TotalCount
  1529. }
  1530. if o.Data != nil {
  1531. toSerialize["data"] = o.Data
  1532. }
  1533. if o.Offset == nil {
  1534. return nil, fmt.Errorf("field `Offset` is required and must be specified in ListActsByAreaResponse")
  1535. }
  1536. toSerialize["offset"] = o.Offset
  1537. if o.Limit == nil {
  1538. return nil, fmt.Errorf("field `Limit` is required and must be specified in ListActsByAreaResponse")
  1539. }
  1540. toSerialize["limit"] = o.Limit
  1541. return json.Marshal(toSerialize)
  1542. }
  1543. func (o ListActsByAreaResponse) String() string {
  1544. var ret string
  1545. if o.TotalCount == nil {
  1546. ret += "TotalCount:<nil>, "
  1547. } else {
  1548. ret += fmt.Sprintf("TotalCount:%v, ", *o.TotalCount)
  1549. }
  1550. ret += fmt.Sprintf("Data:%v, ", o.Data)
  1551. if o.Offset == nil {
  1552. ret += "Offset:<nil>, "
  1553. } else {
  1554. ret += fmt.Sprintf("Offset:%v, ", *o.Offset)
  1555. }
  1556. if o.Limit == nil {
  1557. ret += "Limit:<nil>"
  1558. } else {
  1559. ret += fmt.Sprintf("Limit:%v", *o.Limit)
  1560. }
  1561. return fmt.Sprintf("ListActsByAreaResponse{%s}", ret)
  1562. }
  1563. func (o ListActsByAreaResponse) Clone() *ListActsByAreaResponse {
  1564. ret := ListActsByAreaResponse{}
  1565. if o.TotalCount != nil {
  1566. ret.TotalCount = new(int64)
  1567. *ret.TotalCount = *o.TotalCount
  1568. }
  1569. if o.Data != nil {
  1570. ret.Data = make([]FmcgAct, len(o.Data))
  1571. for i, item := range o.Data {
  1572. ret.Data[i] = *item.Clone()
  1573. }
  1574. }
  1575. if o.Offset != nil {
  1576. ret.Offset = new(int64)
  1577. *ret.Offset = *o.Offset
  1578. }
  1579. if o.Limit != nil {
  1580. ret.Limit = new(int64)
  1581. *ret.Limit = *o.Limit
  1582. }
  1583. return &ret
  1584. }
  1585. // ListRepresentativeRequest
  1586. type ListRepresentativeRequest struct {
  1587. // 零售小店活动ID
  1588. ActivityId *string `json:"activity_id"`
  1589. // 页码从0开始,默认第0页
  1590. Offset *int64 `json:"offset"`
  1591. // 分页大小,默认查询10个业代
  1592. Limit *int64 `json:"limit"`
  1593. }
  1594. func (o ListRepresentativeRequest) MarshalJSON() ([]byte, error) {
  1595. toSerialize := map[string]interface{}{}
  1596. if o.ActivityId == nil {
  1597. return nil, fmt.Errorf("field `ActivityId` is required and must be specified in ListRepresentativeRequest")
  1598. }
  1599. toSerialize["activity_id"] = o.ActivityId
  1600. if o.Offset == nil {
  1601. return nil, fmt.Errorf("field `Offset` is required and must be specified in ListRepresentativeRequest")
  1602. }
  1603. toSerialize["offset"] = o.Offset
  1604. if o.Limit == nil {
  1605. return nil, fmt.Errorf("field `Limit` is required and must be specified in ListRepresentativeRequest")
  1606. }
  1607. toSerialize["limit"] = o.Limit
  1608. return json.Marshal(toSerialize)
  1609. }
  1610. func (o ListRepresentativeRequest) String() string {
  1611. var ret string
  1612. if o.ActivityId == nil {
  1613. ret += "ActivityId:<nil>, "
  1614. } else {
  1615. ret += fmt.Sprintf("ActivityId:%v, ", *o.ActivityId)
  1616. }
  1617. if o.Offset == nil {
  1618. ret += "Offset:<nil>, "
  1619. } else {
  1620. ret += fmt.Sprintf("Offset:%v, ", *o.Offset)
  1621. }
  1622. if o.Limit == nil {
  1623. ret += "Limit:<nil>"
  1624. } else {
  1625. ret += fmt.Sprintf("Limit:%v", *o.Limit)
  1626. }
  1627. return fmt.Sprintf("ListRepresentativeRequest{%s}", ret)
  1628. }
  1629. func (o ListRepresentativeRequest) Clone() *ListRepresentativeRequest {
  1630. ret := ListRepresentativeRequest{}
  1631. if o.ActivityId != nil {
  1632. ret.ActivityId = new(string)
  1633. *ret.ActivityId = *o.ActivityId
  1634. }
  1635. if o.Offset != nil {
  1636. ret.Offset = new(int64)
  1637. *ret.Offset = *o.Offset
  1638. }
  1639. if o.Limit != nil {
  1640. ret.Limit = new(int64)
  1641. *ret.Limit = *o.Limit
  1642. }
  1643. return &ret
  1644. }
  1645. // ListRepresentativeResponse
  1646. type ListRepresentativeResponse struct {
  1647. // 小店活动业代总数
  1648. TotalCount *int64 `json:"total_count,omitempty"`
  1649. // 小店活动业代集合
  1650. Data []RepresentativeInfo `json:"data,omitempty"`
  1651. // 页码从0开始,默认第0页
  1652. Offset *int64 `json:"offset"`
  1653. // 分页大小
  1654. Limit *int64 `json:"limit"`
  1655. }
  1656. func (o ListRepresentativeResponse) MarshalJSON() ([]byte, error) {
  1657. toSerialize := map[string]interface{}{}
  1658. if o.TotalCount != nil {
  1659. toSerialize["total_count"] = o.TotalCount
  1660. }
  1661. if o.Data != nil {
  1662. toSerialize["data"] = o.Data
  1663. }
  1664. if o.Offset == nil {
  1665. return nil, fmt.Errorf("field `Offset` is required and must be specified in ListRepresentativeResponse")
  1666. }
  1667. toSerialize["offset"] = o.Offset
  1668. if o.Limit == nil {
  1669. return nil, fmt.Errorf("field `Limit` is required and must be specified in ListRepresentativeResponse")
  1670. }
  1671. toSerialize["limit"] = o.Limit
  1672. return json.Marshal(toSerialize)
  1673. }
  1674. func (o ListRepresentativeResponse) String() string {
  1675. var ret string
  1676. if o.TotalCount == nil {
  1677. ret += "TotalCount:<nil>, "
  1678. } else {
  1679. ret += fmt.Sprintf("TotalCount:%v, ", *o.TotalCount)
  1680. }
  1681. ret += fmt.Sprintf("Data:%v, ", o.Data)
  1682. if o.Offset == nil {
  1683. ret += "Offset:<nil>, "
  1684. } else {
  1685. ret += fmt.Sprintf("Offset:%v, ", *o.Offset)
  1686. }
  1687. if o.Limit == nil {
  1688. ret += "Limit:<nil>"
  1689. } else {
  1690. ret += fmt.Sprintf("Limit:%v", *o.Limit)
  1691. }
  1692. return fmt.Sprintf("ListRepresentativeResponse{%s}", ret)
  1693. }
  1694. func (o ListRepresentativeResponse) Clone() *ListRepresentativeResponse {
  1695. ret := ListRepresentativeResponse{}
  1696. if o.TotalCount != nil {
  1697. ret.TotalCount = new(int64)
  1698. *ret.TotalCount = *o.TotalCount
  1699. }
  1700. if o.Data != nil {
  1701. ret.Data = make([]RepresentativeInfo, len(o.Data))
  1702. for i, item := range o.Data {
  1703. ret.Data[i] = *item.Clone()
  1704. }
  1705. }
  1706. if o.Offset != nil {
  1707. ret.Offset = new(int64)
  1708. *ret.Offset = *o.Offset
  1709. }
  1710. if o.Limit != nil {
  1711. ret.Limit = new(int64)
  1712. *ret.Limit = *o.Limit
  1713. }
  1714. return &ret
  1715. }
  1716. // ListStoreRequest
  1717. type ListStoreRequest struct {
  1718. // 品牌ID
  1719. BrandId *string `json:"brand_id"`
  1720. // 页码从0开始,默认第0页
  1721. Offset *int64 `json:"offset"`
  1722. // 分页大小,默认查询10家门店
  1723. Limit *int64 `json:"limit"`
  1724. }
  1725. func (o ListStoreRequest) MarshalJSON() ([]byte, error) {
  1726. toSerialize := map[string]interface{}{}
  1727. if o.BrandId == nil {
  1728. return nil, fmt.Errorf("field `BrandId` is required and must be specified in ListStoreRequest")
  1729. }
  1730. toSerialize["brand_id"] = o.BrandId
  1731. if o.Offset == nil {
  1732. return nil, fmt.Errorf("field `Offset` is required and must be specified in ListStoreRequest")
  1733. }
  1734. toSerialize["offset"] = o.Offset
  1735. if o.Limit == nil {
  1736. return nil, fmt.Errorf("field `Limit` is required and must be specified in ListStoreRequest")
  1737. }
  1738. toSerialize["limit"] = o.Limit
  1739. return json.Marshal(toSerialize)
  1740. }
  1741. func (o ListStoreRequest) String() string {
  1742. var ret string
  1743. if o.BrandId == nil {
  1744. ret += "BrandId:<nil>, "
  1745. } else {
  1746. ret += fmt.Sprintf("BrandId:%v, ", *o.BrandId)
  1747. }
  1748. if o.Offset == nil {
  1749. ret += "Offset:<nil>, "
  1750. } else {
  1751. ret += fmt.Sprintf("Offset:%v, ", *o.Offset)
  1752. }
  1753. if o.Limit == nil {
  1754. ret += "Limit:<nil>"
  1755. } else {
  1756. ret += fmt.Sprintf("Limit:%v", *o.Limit)
  1757. }
  1758. return fmt.Sprintf("ListStoreRequest{%s}", ret)
  1759. }
  1760. func (o ListStoreRequest) Clone() *ListStoreRequest {
  1761. ret := ListStoreRequest{}
  1762. if o.BrandId != nil {
  1763. ret.BrandId = new(string)
  1764. *ret.BrandId = *o.BrandId
  1765. }
  1766. if o.Offset != nil {
  1767. ret.Offset = new(int64)
  1768. *ret.Offset = *o.Offset
  1769. }
  1770. if o.Limit != nil {
  1771. ret.Limit = new(int64)
  1772. *ret.Limit = *o.Limit
  1773. }
  1774. return &ret
  1775. }
  1776. // ListStoreResponse
  1777. type ListStoreResponse struct {
  1778. // 小店活动门店总数
  1779. TotalCount *int64 `json:"total_count,omitempty"`
  1780. // 小店活动门店集合
  1781. Data []RetailStoreInfo `json:"data,omitempty"`
  1782. // 页码从0开始,默认第0页
  1783. Offset *int64 `json:"offset,omitempty"`
  1784. // 分页大小
  1785. Limit *int64 `json:"limit,omitempty"`
  1786. }
  1787. func (o ListStoreResponse) MarshalJSON() ([]byte, error) {
  1788. toSerialize := map[string]interface{}{}
  1789. if o.TotalCount != nil {
  1790. toSerialize["total_count"] = o.TotalCount
  1791. }
  1792. if o.Data != nil {
  1793. toSerialize["data"] = o.Data
  1794. }
  1795. if o.Offset != nil {
  1796. toSerialize["offset"] = o.Offset
  1797. }
  1798. if o.Limit != nil {
  1799. toSerialize["limit"] = o.Limit
  1800. }
  1801. return json.Marshal(toSerialize)
  1802. }
  1803. func (o ListStoreResponse) String() string {
  1804. var ret string
  1805. if o.TotalCount == nil {
  1806. ret += "TotalCount:<nil>, "
  1807. } else {
  1808. ret += fmt.Sprintf("TotalCount:%v, ", *o.TotalCount)
  1809. }
  1810. ret += fmt.Sprintf("Data:%v, ", o.Data)
  1811. if o.Offset == nil {
  1812. ret += "Offset:<nil>, "
  1813. } else {
  1814. ret += fmt.Sprintf("Offset:%v, ", *o.Offset)
  1815. }
  1816. if o.Limit == nil {
  1817. ret += "Limit:<nil>"
  1818. } else {
  1819. ret += fmt.Sprintf("Limit:%v", *o.Limit)
  1820. }
  1821. return fmt.Sprintf("ListStoreResponse{%s}", ret)
  1822. }
  1823. func (o ListStoreResponse) Clone() *ListStoreResponse {
  1824. ret := ListStoreResponse{}
  1825. if o.TotalCount != nil {
  1826. ret.TotalCount = new(int64)
  1827. *ret.TotalCount = *o.TotalCount
  1828. }
  1829. if o.Data != nil {
  1830. ret.Data = make([]RetailStoreInfo, len(o.Data))
  1831. for i, item := range o.Data {
  1832. ret.Data[i] = *item.Clone()
  1833. }
  1834. }
  1835. if o.Offset != nil {
  1836. ret.Offset = new(int64)
  1837. *ret.Offset = *o.Offset
  1838. }
  1839. if o.Limit != nil {
  1840. ret.Limit = new(int64)
  1841. *ret.Limit = *o.Limit
  1842. }
  1843. return &ret
  1844. }
  1845. // LockQualificationRequest
  1846. type LockQualificationRequest struct {
  1847. // 订单信息
  1848. OrderInformation *OrderInfo `json:"order_information"`
  1849. // 待锁定的加价购资格ID列表
  1850. QualificationIds []string `json:"qualification_ids,omitempty"`
  1851. }
  1852. func (o LockQualificationRequest) MarshalJSON() ([]byte, error) {
  1853. toSerialize := map[string]interface{}{}
  1854. if o.OrderInformation == nil {
  1855. return nil, fmt.Errorf("field `OrderInformation` is required and must be specified in LockQualificationRequest")
  1856. }
  1857. toSerialize["order_information"] = o.OrderInformation
  1858. if o.QualificationIds != nil {
  1859. toSerialize["qualification_ids"] = o.QualificationIds
  1860. }
  1861. return json.Marshal(toSerialize)
  1862. }
  1863. func (o LockQualificationRequest) String() string {
  1864. var ret string
  1865. ret += fmt.Sprintf("OrderInformation:%v, ", o.OrderInformation)
  1866. ret += fmt.Sprintf("QualificationIds:%v", o.QualificationIds)
  1867. return fmt.Sprintf("LockQualificationRequest{%s}", ret)
  1868. }
  1869. func (o LockQualificationRequest) Clone() *LockQualificationRequest {
  1870. ret := LockQualificationRequest{}
  1871. if o.OrderInformation != nil {
  1872. ret.OrderInformation = o.OrderInformation.Clone()
  1873. }
  1874. if o.QualificationIds != nil {
  1875. ret.QualificationIds = make([]string, len(o.QualificationIds))
  1876. for i, item := range o.QualificationIds {
  1877. ret.QualificationIds[i] = item
  1878. }
  1879. }
  1880. return &ret
  1881. }
  1882. // LockQualificationResponse
  1883. type LockQualificationResponse struct {
  1884. // 返回结果文案
  1885. ReturnMessage *string `json:"return_message,omitempty"`
  1886. // 锁定成功的资格ID列表
  1887. SucceedQualificationIds []string `json:"succeed_qualification_ids,omitempty"`
  1888. // 锁定失败的资格ID列表
  1889. FailedQualificationIds []string `json:"failed_qualification_ids,omitempty"`
  1890. }
  1891. func (o LockQualificationResponse) MarshalJSON() ([]byte, error) {
  1892. toSerialize := map[string]interface{}{}
  1893. if o.ReturnMessage != nil {
  1894. toSerialize["return_message"] = o.ReturnMessage
  1895. }
  1896. if o.SucceedQualificationIds != nil {
  1897. toSerialize["succeed_qualification_ids"] = o.SucceedQualificationIds
  1898. }
  1899. if o.FailedQualificationIds != nil {
  1900. toSerialize["failed_qualification_ids"] = o.FailedQualificationIds
  1901. }
  1902. return json.Marshal(toSerialize)
  1903. }
  1904. func (o LockQualificationResponse) String() string {
  1905. var ret string
  1906. if o.ReturnMessage == nil {
  1907. ret += "ReturnMessage:<nil>, "
  1908. } else {
  1909. ret += fmt.Sprintf("ReturnMessage:%v, ", *o.ReturnMessage)
  1910. }
  1911. ret += fmt.Sprintf("SucceedQualificationIds:%v, ", o.SucceedQualificationIds)
  1912. ret += fmt.Sprintf("FailedQualificationIds:%v", o.FailedQualificationIds)
  1913. return fmt.Sprintf("LockQualificationResponse{%s}", ret)
  1914. }
  1915. func (o LockQualificationResponse) Clone() *LockQualificationResponse {
  1916. ret := LockQualificationResponse{}
  1917. if o.ReturnMessage != nil {
  1918. ret.ReturnMessage = new(string)
  1919. *ret.ReturnMessage = *o.ReturnMessage
  1920. }
  1921. if o.SucceedQualificationIds != nil {
  1922. ret.SucceedQualificationIds = make([]string, len(o.SucceedQualificationIds))
  1923. for i, item := range o.SucceedQualificationIds {
  1924. ret.SucceedQualificationIds[i] = item
  1925. }
  1926. }
  1927. if o.FailedQualificationIds != nil {
  1928. ret.FailedQualificationIds = make([]string, len(o.FailedQualificationIds))
  1929. for i, item := range o.FailedQualificationIds {
  1930. ret.FailedQualificationIds[i] = item
  1931. }
  1932. }
  1933. return &ret
  1934. }
  1935. // MaterialInfo
  1936. type MaterialInfo struct {
  1937. // 物料码ID
  1938. MaterialId *string `json:"material_id,omitempty"`
  1939. // 物料码链接, 用于生成活动物料二维码
  1940. MaterialUrl *string `json:"material_url,omitempty"`
  1941. }
  1942. func (o MaterialInfo) MarshalJSON() ([]byte, error) {
  1943. toSerialize := map[string]interface{}{}
  1944. if o.MaterialId != nil {
  1945. toSerialize["material_id"] = o.MaterialId
  1946. }
  1947. if o.MaterialUrl != nil {
  1948. toSerialize["material_url"] = o.MaterialUrl
  1949. }
  1950. return json.Marshal(toSerialize)
  1951. }
  1952. func (o MaterialInfo) String() string {
  1953. var ret string
  1954. if o.MaterialId == nil {
  1955. ret += "MaterialId:<nil>, "
  1956. } else {
  1957. ret += fmt.Sprintf("MaterialId:%v, ", *o.MaterialId)
  1958. }
  1959. if o.MaterialUrl == nil {
  1960. ret += "MaterialUrl:<nil>"
  1961. } else {
  1962. ret += fmt.Sprintf("MaterialUrl:%v", *o.MaterialUrl)
  1963. }
  1964. return fmt.Sprintf("MaterialInfo{%s}", ret)
  1965. }
  1966. func (o MaterialInfo) Clone() *MaterialInfo {
  1967. ret := MaterialInfo{}
  1968. if o.MaterialId != nil {
  1969. ret.MaterialId = new(string)
  1970. *ret.MaterialId = *o.MaterialId
  1971. }
  1972. if o.MaterialUrl != nil {
  1973. ret.MaterialUrl = new(string)
  1974. *ret.MaterialUrl = *o.MaterialUrl
  1975. }
  1976. return &ret
  1977. }
  1978. // Materials
  1979. type Materials struct {
  1980. // 成功的物料码列表
  1981. MaterialList []MaterialInfo `json:"material_list,omitempty"`
  1982. }
  1983. func (o Materials) MarshalJSON() ([]byte, error) {
  1984. toSerialize := map[string]interface{}{}
  1985. if o.MaterialList != nil {
  1986. toSerialize["material_list"] = o.MaterialList
  1987. }
  1988. return json.Marshal(toSerialize)
  1989. }
  1990. func (o Materials) String() string {
  1991. var ret string
  1992. ret += fmt.Sprintf("MaterialList:%v", o.MaterialList)
  1993. return fmt.Sprintf("Materials{%s}", ret)
  1994. }
  1995. func (o Materials) Clone() *Materials {
  1996. ret := Materials{}
  1997. if o.MaterialList != nil {
  1998. ret.MaterialList = make([]MaterialInfo, len(o.MaterialList))
  1999. for i, item := range o.MaterialList {
  2000. ret.MaterialList[i] = *item.Clone()
  2001. }
  2002. }
  2003. return &ret
  2004. }
  2005. // OrderInfo
  2006. type OrderInfo struct {
  2007. // 支付订单的微信用户OpenID
  2008. PayerOpenid *string `json:"payer_openid"`
  2009. // 商户订单号
  2010. OutTradeNo *string `json:"out_trade_no"`
  2011. // 订单总金额(单位:分)
  2012. TotalFee *int64 `json:"total_fee"`
  2013. // 门店ID
  2014. StoreId *string `json:"store_id"`
  2015. // 门店商户号
  2016. StoreMerchantId *string `json:"store_merchant_id"`
  2017. }
  2018. func (o OrderInfo) MarshalJSON() ([]byte, error) {
  2019. toSerialize := map[string]interface{}{}
  2020. if o.PayerOpenid == nil {
  2021. return nil, fmt.Errorf("field `PayerOpenid` is required and must be specified in OrderInfo")
  2022. }
  2023. toSerialize["payer_openid"] = o.PayerOpenid
  2024. if o.OutTradeNo == nil {
  2025. return nil, fmt.Errorf("field `OutTradeNo` is required and must be specified in OrderInfo")
  2026. }
  2027. toSerialize["out_trade_no"] = o.OutTradeNo
  2028. if o.TotalFee == nil {
  2029. return nil, fmt.Errorf("field `TotalFee` is required and must be specified in OrderInfo")
  2030. }
  2031. toSerialize["total_fee"] = o.TotalFee
  2032. if o.StoreId == nil {
  2033. return nil, fmt.Errorf("field `StoreId` is required and must be specified in OrderInfo")
  2034. }
  2035. toSerialize["store_id"] = o.StoreId
  2036. if o.StoreMerchantId == nil {
  2037. return nil, fmt.Errorf("field `StoreMerchantId` is required and must be specified in OrderInfo")
  2038. }
  2039. toSerialize["store_merchant_id"] = o.StoreMerchantId
  2040. return json.Marshal(toSerialize)
  2041. }
  2042. func (o OrderInfo) String() string {
  2043. var ret string
  2044. if o.PayerOpenid == nil {
  2045. ret += "PayerOpenid:<nil>, "
  2046. } else {
  2047. ret += fmt.Sprintf("PayerOpenid:%v, ", *o.PayerOpenid)
  2048. }
  2049. if o.OutTradeNo == nil {
  2050. ret += "OutTradeNo:<nil>, "
  2051. } else {
  2052. ret += fmt.Sprintf("OutTradeNo:%v, ", *o.OutTradeNo)
  2053. }
  2054. if o.TotalFee == nil {
  2055. ret += "TotalFee:<nil>, "
  2056. } else {
  2057. ret += fmt.Sprintf("TotalFee:%v, ", *o.TotalFee)
  2058. }
  2059. if o.StoreId == nil {
  2060. ret += "StoreId:<nil>, "
  2061. } else {
  2062. ret += fmt.Sprintf("StoreId:%v, ", *o.StoreId)
  2063. }
  2064. if o.StoreMerchantId == nil {
  2065. ret += "StoreMerchantId:<nil>"
  2066. } else {
  2067. ret += fmt.Sprintf("StoreMerchantId:%v", *o.StoreMerchantId)
  2068. }
  2069. return fmt.Sprintf("OrderInfo{%s}", ret)
  2070. }
  2071. func (o OrderInfo) Clone() *OrderInfo {
  2072. ret := OrderInfo{}
  2073. if o.PayerOpenid != nil {
  2074. ret.PayerOpenid = new(string)
  2075. *ret.PayerOpenid = *o.PayerOpenid
  2076. }
  2077. if o.OutTradeNo != nil {
  2078. ret.OutTradeNo = new(string)
  2079. *ret.OutTradeNo = *o.OutTradeNo
  2080. }
  2081. if o.TotalFee != nil {
  2082. ret.TotalFee = new(int64)
  2083. *ret.TotalFee = *o.TotalFee
  2084. }
  2085. if o.StoreId != nil {
  2086. ret.StoreId = new(string)
  2087. *ret.StoreId = *o.StoreId
  2088. }
  2089. if o.StoreMerchantId != nil {
  2090. ret.StoreMerchantId = new(string)
  2091. *ret.StoreMerchantId = *o.StoreMerchantId
  2092. }
  2093. return &ret
  2094. }
  2095. // RepresentativeInfo
  2096. type RepresentativeInfo struct {
  2097. // [获取openid请查看文档](https://pay.weixin.qq.com/wiki/doc/apiv3_partner/terms_definition/chapter1_1_3.shtml)
  2098. Openid *string `json:"openid"`
  2099. }
  2100. func (o RepresentativeInfo) MarshalJSON() ([]byte, error) {
  2101. toSerialize := map[string]interface{}{}
  2102. if o.Openid == nil {
  2103. return nil, fmt.Errorf("field `Openid` is required and must be specified in RepresentativeInfo")
  2104. }
  2105. toSerialize["openid"] = o.Openid
  2106. return json.Marshal(toSerialize)
  2107. }
  2108. func (o RepresentativeInfo) String() string {
  2109. var ret string
  2110. if o.Openid == nil {
  2111. ret += "Openid:<nil>"
  2112. } else {
  2113. ret += fmt.Sprintf("Openid:%v", *o.Openid)
  2114. }
  2115. return fmt.Sprintf("RepresentativeInfo{%s}", ret)
  2116. }
  2117. func (o RepresentativeInfo) Clone() *RepresentativeInfo {
  2118. ret := RepresentativeInfo{}
  2119. if o.Openid != nil {
  2120. ret.Openid = new(string)
  2121. *ret.Openid = *o.Openid
  2122. }
  2123. return &ret
  2124. }
  2125. // RetailStoreInfo
  2126. type RetailStoreInfo struct {
  2127. // 门店编码,可包含英文字母,数字,\\\\|,\\\\_,\\\\*,\\\\-等内容,不允许出现其他不合法符号。
  2128. StoreCode *string `json:"store_code,omitempty"`
  2129. // 门店名称
  2130. StoreName *string `json:"store_name,omitempty"`
  2131. }
  2132. func (o RetailStoreInfo) MarshalJSON() ([]byte, error) {
  2133. toSerialize := map[string]interface{}{}
  2134. if o.StoreCode != nil {
  2135. toSerialize["store_code"] = o.StoreCode
  2136. }
  2137. if o.StoreName != nil {
  2138. toSerialize["store_name"] = o.StoreName
  2139. }
  2140. return json.Marshal(toSerialize)
  2141. }
  2142. func (o RetailStoreInfo) String() string {
  2143. var ret string
  2144. if o.StoreCode == nil {
  2145. ret += "StoreCode:<nil>, "
  2146. } else {
  2147. ret += fmt.Sprintf("StoreCode:%v, ", *o.StoreCode)
  2148. }
  2149. if o.StoreName == nil {
  2150. ret += "StoreName:<nil>"
  2151. } else {
  2152. ret += fmt.Sprintf("StoreName:%v", *o.StoreName)
  2153. }
  2154. return fmt.Sprintf("RetailStoreInfo{%s}", ret)
  2155. }
  2156. func (o RetailStoreInfo) Clone() *RetailStoreInfo {
  2157. ret := RetailStoreInfo{}
  2158. if o.StoreCode != nil {
  2159. ret.StoreCode = new(string)
  2160. *ret.StoreCode = *o.StoreCode
  2161. }
  2162. if o.StoreName != nil {
  2163. ret.StoreName = new(string)
  2164. *ret.StoreName = *o.StoreName
  2165. }
  2166. return &ret
  2167. }
  2168. // StoreInfo
  2169. type StoreInfo struct {
  2170. // 门店ID
  2171. StoreId *string `json:"store_id"`
  2172. // 门店指定的品牌补贴收款商户号
  2173. AccountingMerchantId *string `json:"accounting_merchant_id"`
  2174. // 报名门店的商户号,即门店收款商户号
  2175. MerchantId *string `json:"merchant_id"`
  2176. }
  2177. func (o StoreInfo) MarshalJSON() ([]byte, error) {
  2178. toSerialize := map[string]interface{}{}
  2179. if o.StoreId == nil {
  2180. return nil, fmt.Errorf("field `StoreId` is required and must be specified in StoreInfo")
  2181. }
  2182. toSerialize["store_id"] = o.StoreId
  2183. if o.AccountingMerchantId == nil {
  2184. return nil, fmt.Errorf("field `AccountingMerchantId` is required and must be specified in StoreInfo")
  2185. }
  2186. toSerialize["accounting_merchant_id"] = o.AccountingMerchantId
  2187. if o.MerchantId == nil {
  2188. return nil, fmt.Errorf("field `MerchantId` is required and must be specified in StoreInfo")
  2189. }
  2190. toSerialize["merchant_id"] = o.MerchantId
  2191. return json.Marshal(toSerialize)
  2192. }
  2193. func (o StoreInfo) String() string {
  2194. var ret string
  2195. if o.StoreId == nil {
  2196. ret += "StoreId:<nil>, "
  2197. } else {
  2198. ret += fmt.Sprintf("StoreId:%v, ", *o.StoreId)
  2199. }
  2200. if o.AccountingMerchantId == nil {
  2201. ret += "AccountingMerchantId:<nil>, "
  2202. } else {
  2203. ret += fmt.Sprintf("AccountingMerchantId:%v, ", *o.AccountingMerchantId)
  2204. }
  2205. if o.MerchantId == nil {
  2206. ret += "MerchantId:<nil>"
  2207. } else {
  2208. ret += fmt.Sprintf("MerchantId:%v", *o.MerchantId)
  2209. }
  2210. return fmt.Sprintf("StoreInfo{%s}", ret)
  2211. }
  2212. func (o StoreInfo) Clone() *StoreInfo {
  2213. ret := StoreInfo{}
  2214. if o.StoreId != nil {
  2215. ret.StoreId = new(string)
  2216. *ret.StoreId = *o.StoreId
  2217. }
  2218. if o.AccountingMerchantId != nil {
  2219. ret.AccountingMerchantId = new(string)
  2220. *ret.AccountingMerchantId = *o.AccountingMerchantId
  2221. }
  2222. if o.MerchantId != nil {
  2223. ret.MerchantId = new(string)
  2224. *ret.MerchantId = *o.MerchantId
  2225. }
  2226. return &ret
  2227. }
  2228. // UnlockQualificationRequest
  2229. type UnlockQualificationRequest struct {
  2230. // 订单信息
  2231. OrderInformation *OrderInfo `json:"order_information"`
  2232. // 待锁定的加价购资格ID列表
  2233. QualificationIds []string `json:"qualification_ids,omitempty"`
  2234. }
  2235. func (o UnlockQualificationRequest) MarshalJSON() ([]byte, error) {
  2236. toSerialize := map[string]interface{}{}
  2237. if o.OrderInformation == nil {
  2238. return nil, fmt.Errorf("field `OrderInformation` is required and must be specified in UnlockQualificationRequest")
  2239. }
  2240. toSerialize["order_information"] = o.OrderInformation
  2241. if o.QualificationIds != nil {
  2242. toSerialize["qualification_ids"] = o.QualificationIds
  2243. }
  2244. return json.Marshal(toSerialize)
  2245. }
  2246. func (o UnlockQualificationRequest) String() string {
  2247. var ret string
  2248. ret += fmt.Sprintf("OrderInformation:%v, ", o.OrderInformation)
  2249. ret += fmt.Sprintf("QualificationIds:%v", o.QualificationIds)
  2250. return fmt.Sprintf("UnlockQualificationRequest{%s}", ret)
  2251. }
  2252. func (o UnlockQualificationRequest) Clone() *UnlockQualificationRequest {
  2253. ret := UnlockQualificationRequest{}
  2254. if o.OrderInformation != nil {
  2255. ret.OrderInformation = o.OrderInformation.Clone()
  2256. }
  2257. if o.QualificationIds != nil {
  2258. ret.QualificationIds = make([]string, len(o.QualificationIds))
  2259. for i, item := range o.QualificationIds {
  2260. ret.QualificationIds[i] = item
  2261. }
  2262. }
  2263. return &ret
  2264. }
  2265. // UnlockQualificationResponse
  2266. type UnlockQualificationResponse struct {
  2267. // 返回结果文案
  2268. ReturnMessage *string `json:"return_message,omitempty"`
  2269. // 解锁成功的资格列表
  2270. SucceedQualificationIds []string `json:"succeed_qualification_ids,omitempty"`
  2271. // 解锁失败的资格ID列表
  2272. FailedQualificationIds []string `json:"failed_qualification_ids,omitempty"`
  2273. }
  2274. func (o UnlockQualificationResponse) MarshalJSON() ([]byte, error) {
  2275. toSerialize := map[string]interface{}{}
  2276. if o.ReturnMessage != nil {
  2277. toSerialize["return_message"] = o.ReturnMessage
  2278. }
  2279. if o.SucceedQualificationIds != nil {
  2280. toSerialize["succeed_qualification_ids"] = o.SucceedQualificationIds
  2281. }
  2282. if o.FailedQualificationIds != nil {
  2283. toSerialize["failed_qualification_ids"] = o.FailedQualificationIds
  2284. }
  2285. return json.Marshal(toSerialize)
  2286. }
  2287. func (o UnlockQualificationResponse) String() string {
  2288. var ret string
  2289. if o.ReturnMessage == nil {
  2290. ret += "ReturnMessage:<nil>, "
  2291. } else {
  2292. ret += fmt.Sprintf("ReturnMessage:%v, ", *o.ReturnMessage)
  2293. }
  2294. ret += fmt.Sprintf("SucceedQualificationIds:%v, ", o.SucceedQualificationIds)
  2295. ret += fmt.Sprintf("FailedQualificationIds:%v", o.FailedQualificationIds)
  2296. return fmt.Sprintf("UnlockQualificationResponse{%s}", ret)
  2297. }
  2298. func (o UnlockQualificationResponse) Clone() *UnlockQualificationResponse {
  2299. ret := UnlockQualificationResponse{}
  2300. if o.ReturnMessage != nil {
  2301. ret.ReturnMessage = new(string)
  2302. *ret.ReturnMessage = *o.ReturnMessage
  2303. }
  2304. if o.SucceedQualificationIds != nil {
  2305. ret.SucceedQualificationIds = make([]string, len(o.SucceedQualificationIds))
  2306. for i, item := range o.SucceedQualificationIds {
  2307. ret.SucceedQualificationIds[i] = item
  2308. }
  2309. }
  2310. if o.FailedQualificationIds != nil {
  2311. ret.FailedQualificationIds = make([]string, len(o.FailedQualificationIds))
  2312. for i, item := range o.FailedQualificationIds {
  2313. ret.FailedQualificationIds[i] = item
  2314. }
  2315. }
  2316. return &ret
  2317. }