models.go 68 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771
  1. // Copyright 2021 Tencent Inc. All rights reserved.
  2. //
  3. // 支付有礼活动对外API
  4. //
  5. // No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
  6. //
  7. // API version: 0.1.2
  8. // Code generated by WechatPay APIv3 Generator based on [OpenAPI Generator](https://openapi-generator.tech); DO NOT EDIT.
  9. package giftactivity
  10. import (
  11. "encoding/json"
  12. "fmt"
  13. )
  14. // ActAdvancedSetting
  15. type ActAdvancedSetting struct {
  16. // DELIVERY_ALL_PERSON:所有用户;DELIVERY_MEMBER_PERSON:会员用户
  17. DeliveryUserCategory *DeliveryUserCategory `json:"delivery_user_category,omitempty"`
  18. // 当投放用户类别为会员用户时必填
  19. MerchantMemberAppid *string `json:"merchant_member_appid,omitempty"`
  20. // 主要用于指定可用的支付场景,不限制支付模式不填,限制选填(商家券暂不开放)
  21. PaymentMode *PaymentMode `json:"payment_mode,omitempty"`
  22. // 支付方式信息,不填为不限制(商家券暂不开放)
  23. PaymentMethodInformation *PaymentMethodInfo `json:"payment_method_information,omitempty"`
  24. // 商户下单时需要传入相同的标记(goods_tag),用户同时符合其他规则才能享受优惠
  25. GoodsTags []string `json:"goods_tags,omitempty"`
  26. }
  27. func (o ActAdvancedSetting) MarshalJSON() ([]byte, error) {
  28. toSerialize := map[string]interface{}{}
  29. if o.DeliveryUserCategory != nil {
  30. toSerialize["delivery_user_category"] = o.DeliveryUserCategory
  31. }
  32. if o.MerchantMemberAppid != nil {
  33. toSerialize["merchant_member_appid"] = o.MerchantMemberAppid
  34. }
  35. if o.PaymentMode != nil {
  36. toSerialize["payment_mode"] = o.PaymentMode
  37. }
  38. if o.PaymentMethodInformation != nil {
  39. toSerialize["payment_method_information"] = o.PaymentMethodInformation
  40. }
  41. if o.GoodsTags != nil {
  42. toSerialize["goods_tags"] = o.GoodsTags
  43. }
  44. return json.Marshal(toSerialize)
  45. }
  46. func (o ActAdvancedSetting) String() string {
  47. var ret string
  48. if o.DeliveryUserCategory == nil {
  49. ret += "DeliveryUserCategory:<nil>, "
  50. } else {
  51. ret += fmt.Sprintf("DeliveryUserCategory:%v, ", *o.DeliveryUserCategory)
  52. }
  53. if o.MerchantMemberAppid == nil {
  54. ret += "MerchantMemberAppid:<nil>, "
  55. } else {
  56. ret += fmt.Sprintf("MerchantMemberAppid:%v, ", *o.MerchantMemberAppid)
  57. }
  58. ret += fmt.Sprintf("PaymentMode:%v, ", o.PaymentMode)
  59. ret += fmt.Sprintf("PaymentMethodInformation:%v, ", o.PaymentMethodInformation)
  60. ret += fmt.Sprintf("GoodsTags:%v", o.GoodsTags)
  61. return fmt.Sprintf("ActAdvancedSetting{%s}", ret)
  62. }
  63. func (o ActAdvancedSetting) Clone() *ActAdvancedSetting {
  64. ret := ActAdvancedSetting{}
  65. if o.DeliveryUserCategory != nil {
  66. ret.DeliveryUserCategory = new(DeliveryUserCategory)
  67. *ret.DeliveryUserCategory = *o.DeliveryUserCategory
  68. }
  69. if o.MerchantMemberAppid != nil {
  70. ret.MerchantMemberAppid = new(string)
  71. *ret.MerchantMemberAppid = *o.MerchantMemberAppid
  72. }
  73. if o.PaymentMode != nil {
  74. ret.PaymentMode = o.PaymentMode.Clone()
  75. }
  76. if o.PaymentMethodInformation != nil {
  77. ret.PaymentMethodInformation = o.PaymentMethodInformation.Clone()
  78. }
  79. if o.GoodsTags != nil {
  80. ret.GoodsTags = make([]string, len(o.GoodsTags))
  81. for i, item := range o.GoodsTags {
  82. ret.GoodsTags[i] = item
  83. }
  84. }
  85. return &ret
  86. }
  87. // ActBaseInfo
  88. type ActBaseInfo struct {
  89. // 活动名称
  90. ActivityName *string `json:"activity_name"`
  91. // 活动副标题
  92. ActivitySecondTitle *string `json:"activity_second_title"`
  93. // 商户logo,送出优惠券时展示
  94. MerchantLogoUrl *string `json:"merchant_logo_url"`
  95. // 代金券的背景颜色,可设置10种颜色,颜色取值可参考[开发指引](../../../products/gift-activity/development.html) 3.2.1 background_color取值,默认为微信支付绿色, 颜色取值为颜色图中的颜色名称。
  96. BackgroundColor *string `json:"background_color,omitempty"`
  97. // 活动开始时间,最长可以配置1年内的活动,活动有效期最长90天
  98. BeginTime *string `json:"begin_time"`
  99. // 活动结束时间,最长可以配置1年内的活动,活动有效期最长90天
  100. EndTime *string `json:"end_time"`
  101. // 可自定义活动有效时间内可用的多个时间段以及天内时间点
  102. AvailablePeriods *AvailablePeriod `json:"available_periods,omitempty"`
  103. // 商户创建批次凭据号(格式:商户id+日期+流水号),商户侧需保持唯一性,可包含英文字母,数字,|,_,*,-等内容,不允许出现其他不合法符号
  104. OutRequestNo *string `json:"out_request_no"`
  105. // OFF_LINE_PAY:拉用户回店消费;JUMP_MINI_APP:引导用户前往小程序消费
  106. DeliveryPurpose *DeliveryPurposeCategory `json:"delivery_purpose"`
  107. // 投放目的为跳转小程序时必填
  108. MiniProgramsAppid *string `json:"mini_programs_appid,omitempty"`
  109. // 投放目的为跳转小程序必填
  110. MiniProgramsPath *string `json:"mini_programs_path,omitempty"`
  111. }
  112. func (o ActBaseInfo) MarshalJSON() ([]byte, error) {
  113. toSerialize := map[string]interface{}{}
  114. if o.ActivityName == nil {
  115. return nil, fmt.Errorf("field `ActivityName` is required and must be specified in ActBaseInfo")
  116. }
  117. toSerialize["activity_name"] = o.ActivityName
  118. if o.ActivitySecondTitle == nil {
  119. return nil, fmt.Errorf("field `ActivitySecondTitle` is required and must be specified in ActBaseInfo")
  120. }
  121. toSerialize["activity_second_title"] = o.ActivitySecondTitle
  122. if o.MerchantLogoUrl == nil {
  123. return nil, fmt.Errorf("field `MerchantLogoUrl` is required and must be specified in ActBaseInfo")
  124. }
  125. toSerialize["merchant_logo_url"] = o.MerchantLogoUrl
  126. if o.BackgroundColor != nil {
  127. toSerialize["background_color"] = o.BackgroundColor
  128. }
  129. if o.BeginTime == nil {
  130. return nil, fmt.Errorf("field `BeginTime` is required and must be specified in ActBaseInfo")
  131. }
  132. toSerialize["begin_time"] = o.BeginTime
  133. if o.EndTime == nil {
  134. return nil, fmt.Errorf("field `EndTime` is required and must be specified in ActBaseInfo")
  135. }
  136. toSerialize["end_time"] = o.EndTime
  137. if o.AvailablePeriods != nil {
  138. toSerialize["available_periods"] = o.AvailablePeriods
  139. }
  140. if o.OutRequestNo == nil {
  141. return nil, fmt.Errorf("field `OutRequestNo` is required and must be specified in ActBaseInfo")
  142. }
  143. toSerialize["out_request_no"] = o.OutRequestNo
  144. if o.DeliveryPurpose == nil {
  145. return nil, fmt.Errorf("field `DeliveryPurpose` is required and must be specified in ActBaseInfo")
  146. }
  147. toSerialize["delivery_purpose"] = o.DeliveryPurpose
  148. if o.MiniProgramsAppid != nil {
  149. toSerialize["mini_programs_appid"] = o.MiniProgramsAppid
  150. }
  151. if o.MiniProgramsPath != nil {
  152. toSerialize["mini_programs_path"] = o.MiniProgramsPath
  153. }
  154. return json.Marshal(toSerialize)
  155. }
  156. func (o ActBaseInfo) String() string {
  157. var ret string
  158. if o.ActivityName == nil {
  159. ret += "ActivityName:<nil>, "
  160. } else {
  161. ret += fmt.Sprintf("ActivityName:%v, ", *o.ActivityName)
  162. }
  163. if o.ActivitySecondTitle == nil {
  164. ret += "ActivitySecondTitle:<nil>, "
  165. } else {
  166. ret += fmt.Sprintf("ActivitySecondTitle:%v, ", *o.ActivitySecondTitle)
  167. }
  168. if o.MerchantLogoUrl == nil {
  169. ret += "MerchantLogoUrl:<nil>, "
  170. } else {
  171. ret += fmt.Sprintf("MerchantLogoUrl:%v, ", *o.MerchantLogoUrl)
  172. }
  173. if o.BackgroundColor == nil {
  174. ret += "BackgroundColor:<nil>, "
  175. } else {
  176. ret += fmt.Sprintf("BackgroundColor:%v, ", *o.BackgroundColor)
  177. }
  178. if o.BeginTime == nil {
  179. ret += "BeginTime:<nil>, "
  180. } else {
  181. ret += fmt.Sprintf("BeginTime:%v, ", *o.BeginTime)
  182. }
  183. if o.EndTime == nil {
  184. ret += "EndTime:<nil>, "
  185. } else {
  186. ret += fmt.Sprintf("EndTime:%v, ", *o.EndTime)
  187. }
  188. ret += fmt.Sprintf("AvailablePeriods:%v, ", o.AvailablePeriods)
  189. if o.OutRequestNo == nil {
  190. ret += "OutRequestNo:<nil>, "
  191. } else {
  192. ret += fmt.Sprintf("OutRequestNo:%v, ", *o.OutRequestNo)
  193. }
  194. if o.DeliveryPurpose == nil {
  195. ret += "DeliveryPurpose:<nil>, "
  196. } else {
  197. ret += fmt.Sprintf("DeliveryPurpose:%v, ", *o.DeliveryPurpose)
  198. }
  199. if o.MiniProgramsAppid == nil {
  200. ret += "MiniProgramsAppid:<nil>, "
  201. } else {
  202. ret += fmt.Sprintf("MiniProgramsAppid:%v, ", *o.MiniProgramsAppid)
  203. }
  204. if o.MiniProgramsPath == nil {
  205. ret += "MiniProgramsPath:<nil>"
  206. } else {
  207. ret += fmt.Sprintf("MiniProgramsPath:%v", *o.MiniProgramsPath)
  208. }
  209. return fmt.Sprintf("ActBaseInfo{%s}", ret)
  210. }
  211. func (o ActBaseInfo) Clone() *ActBaseInfo {
  212. ret := ActBaseInfo{}
  213. if o.ActivityName != nil {
  214. ret.ActivityName = new(string)
  215. *ret.ActivityName = *o.ActivityName
  216. }
  217. if o.ActivitySecondTitle != nil {
  218. ret.ActivitySecondTitle = new(string)
  219. *ret.ActivitySecondTitle = *o.ActivitySecondTitle
  220. }
  221. if o.MerchantLogoUrl != nil {
  222. ret.MerchantLogoUrl = new(string)
  223. *ret.MerchantLogoUrl = *o.MerchantLogoUrl
  224. }
  225. if o.BackgroundColor != nil {
  226. ret.BackgroundColor = new(string)
  227. *ret.BackgroundColor = *o.BackgroundColor
  228. }
  229. if o.BeginTime != nil {
  230. ret.BeginTime = new(string)
  231. *ret.BeginTime = *o.BeginTime
  232. }
  233. if o.EndTime != nil {
  234. ret.EndTime = new(string)
  235. *ret.EndTime = *o.EndTime
  236. }
  237. if o.AvailablePeriods != nil {
  238. ret.AvailablePeriods = o.AvailablePeriods.Clone()
  239. }
  240. if o.OutRequestNo != nil {
  241. ret.OutRequestNo = new(string)
  242. *ret.OutRequestNo = *o.OutRequestNo
  243. }
  244. if o.DeliveryPurpose != nil {
  245. ret.DeliveryPurpose = new(DeliveryPurposeCategory)
  246. *ret.DeliveryPurpose = *o.DeliveryPurpose
  247. }
  248. if o.MiniProgramsAppid != nil {
  249. ret.MiniProgramsAppid = new(string)
  250. *ret.MiniProgramsAppid = *o.MiniProgramsAppid
  251. }
  252. if o.MiniProgramsPath != nil {
  253. ret.MiniProgramsPath = new(string)
  254. *ret.MiniProgramsPath = *o.MiniProgramsPath
  255. }
  256. return &ret
  257. }
  258. // ActParticipateMchInfo
  259. type ActParticipateMchInfo struct {
  260. // 商户Id
  261. Mchid *string `json:"mchid"`
  262. // 商户名称
  263. MerchantName *string `json:"merchant_name,omitempty"`
  264. // 创建时间
  265. CreateTime *string `json:"create_time,omitempty"`
  266. // 更新时间
  267. UpdateTime *string `json:"update_time,omitempty"`
  268. }
  269. func (o ActParticipateMchInfo) MarshalJSON() ([]byte, error) {
  270. toSerialize := map[string]interface{}{}
  271. if o.Mchid == nil {
  272. return nil, fmt.Errorf("field `Mchid` is required and must be specified in ActParticipateMchInfo")
  273. }
  274. toSerialize["mchid"] = o.Mchid
  275. if o.MerchantName != nil {
  276. toSerialize["merchant_name"] = o.MerchantName
  277. }
  278. if o.CreateTime != nil {
  279. toSerialize["create_time"] = o.CreateTime
  280. }
  281. if o.UpdateTime != nil {
  282. toSerialize["update_time"] = o.UpdateTime
  283. }
  284. return json.Marshal(toSerialize)
  285. }
  286. func (o ActParticipateMchInfo) String() string {
  287. var ret string
  288. if o.Mchid == nil {
  289. ret += "Mchid:<nil>, "
  290. } else {
  291. ret += fmt.Sprintf("Mchid:%v, ", *o.Mchid)
  292. }
  293. if o.MerchantName == nil {
  294. ret += "MerchantName:<nil>, "
  295. } else {
  296. ret += fmt.Sprintf("MerchantName:%v, ", *o.MerchantName)
  297. }
  298. if o.CreateTime == nil {
  299. ret += "CreateTime:<nil>, "
  300. } else {
  301. ret += fmt.Sprintf("CreateTime:%v, ", *o.CreateTime)
  302. }
  303. if o.UpdateTime == nil {
  304. ret += "UpdateTime:<nil>"
  305. } else {
  306. ret += fmt.Sprintf("UpdateTime:%v", *o.UpdateTime)
  307. }
  308. return fmt.Sprintf("ActParticipateMchInfo{%s}", ret)
  309. }
  310. func (o ActParticipateMchInfo) Clone() *ActParticipateMchInfo {
  311. ret := ActParticipateMchInfo{}
  312. if o.Mchid != nil {
  313. ret.Mchid = new(string)
  314. *ret.Mchid = *o.Mchid
  315. }
  316. if o.MerchantName != nil {
  317. ret.MerchantName = new(string)
  318. *ret.MerchantName = *o.MerchantName
  319. }
  320. if o.CreateTime != nil {
  321. ret.CreateTime = new(string)
  322. *ret.CreateTime = *o.CreateTime
  323. }
  324. if o.UpdateTime != nil {
  325. ret.UpdateTime = new(string)
  326. *ret.UpdateTime = *o.UpdateTime
  327. }
  328. return &ret
  329. }
  330. // ActStatus
  331. type ActStatus string
  332. func (e ActStatus) Ptr() *ActStatus {
  333. return &e
  334. }
  335. // Enums of ActStatus
  336. const (
  337. ACTSTATUS_ACT_STATUS_UNKNOWN ActStatus = "ACT_STATUS_UNKNOWN"
  338. ACTSTATUS_CREATE_ACT_STATUS ActStatus = "CREATE_ACT_STATUS"
  339. ACTSTATUS_ONGOING_ACT_STATUS ActStatus = "ONGOING_ACT_STATUS"
  340. ACTSTATUS_TERMINATE_ACT_STATUS ActStatus = "TERMINATE_ACT_STATUS"
  341. ACTSTATUS_STOP_ACT_STATUS ActStatus = "STOP_ACT_STATUS"
  342. ACTSTATUS_OVER_TIME_ACT_STATUS ActStatus = "OVER_TIME_ACT_STATUS"
  343. ACTSTATUS_CREATE_ACT_FAILED ActStatus = "CREATE_ACT_FAILED"
  344. )
  345. // ActType 活动类型
  346. type ActType string
  347. func (e ActType) Ptr() *ActType {
  348. return &e
  349. }
  350. // Enums of ActType
  351. const (
  352. ACTTYPE_FULL_SEND_ACT_TYPE ActType = "FULL_SEND_ACT_TYPE"
  353. ACTTYPE_STEP_SEND_ACT_TYPE ActType = "STEP_SEND_ACT_TYPE"
  354. ACTTYPE_SPECIFIC_SEND_ACT_TYPE ActType = "SPECIFIC_SEND_ACT_TYPE"
  355. )
  356. // ActivityInformation
  357. type ActivityInformation struct {
  358. // 活动Id
  359. ActivityId *string `json:"activity_id,omitempty"`
  360. // 活动类型
  361. ActivityType *ActType `json:"activity_type,omitempty"`
  362. // 创建活动时录入的基本信息
  363. ActivityBaseInfo *ActBaseInfo `json:"activity_base_info,omitempty"`
  364. // 奖品派送规则,分别对应满送、阶梯送、满A送B中的一种
  365. AwardSendRule *AwardSendRule `json:"award_send_rule,omitempty"`
  366. // 创建时传入的高级设置信息
  367. AdvancedSetting *ActAdvancedSetting `json:"advanced_setting,omitempty"`
  368. // 活动当前状态枚举值
  369. ActivityStatus *ActStatus `json:"activity_status,omitempty"`
  370. // 创建商户号
  371. CreatorMerchantId *string `json:"creator_merchant_id,omitempty"`
  372. // 所属商户号
  373. BelongMerchantId *string `json:"belong_merchant_id,omitempty"`
  374. // 活动创建时间
  375. CreateTime *string `json:"create_time,omitempty"`
  376. // 活动更新时间
  377. UpdateTime *string `json:"update_time,omitempty"`
  378. }
  379. func (o ActivityInformation) MarshalJSON() ([]byte, error) {
  380. toSerialize := map[string]interface{}{}
  381. if o.ActivityId != nil {
  382. toSerialize["activity_id"] = o.ActivityId
  383. }
  384. if o.ActivityType != nil {
  385. toSerialize["activity_type"] = o.ActivityType
  386. }
  387. if o.ActivityBaseInfo != nil {
  388. toSerialize["activity_base_info"] = o.ActivityBaseInfo
  389. }
  390. if o.AwardSendRule != nil {
  391. toSerialize["award_send_rule"] = o.AwardSendRule
  392. }
  393. if o.AdvancedSetting != nil {
  394. toSerialize["advanced_setting"] = o.AdvancedSetting
  395. }
  396. if o.ActivityStatus != nil {
  397. toSerialize["activity_status"] = o.ActivityStatus
  398. }
  399. if o.CreatorMerchantId != nil {
  400. toSerialize["creator_merchant_id"] = o.CreatorMerchantId
  401. }
  402. if o.BelongMerchantId != nil {
  403. toSerialize["belong_merchant_id"] = o.BelongMerchantId
  404. }
  405. if o.CreateTime != nil {
  406. toSerialize["create_time"] = o.CreateTime
  407. }
  408. if o.UpdateTime != nil {
  409. toSerialize["update_time"] = o.UpdateTime
  410. }
  411. return json.Marshal(toSerialize)
  412. }
  413. func (o ActivityInformation) String() string {
  414. var ret string
  415. if o.ActivityId == nil {
  416. ret += "ActivityId:<nil>, "
  417. } else {
  418. ret += fmt.Sprintf("ActivityId:%v, ", *o.ActivityId)
  419. }
  420. if o.ActivityType == nil {
  421. ret += "ActivityType:<nil>, "
  422. } else {
  423. ret += fmt.Sprintf("ActivityType:%v, ", *o.ActivityType)
  424. }
  425. ret += fmt.Sprintf("ActivityBaseInfo:%v, ", o.ActivityBaseInfo)
  426. ret += fmt.Sprintf("AwardSendRule:%v, ", o.AwardSendRule)
  427. ret += fmt.Sprintf("AdvancedSetting:%v, ", o.AdvancedSetting)
  428. if o.ActivityStatus == nil {
  429. ret += "ActivityStatus:<nil>, "
  430. } else {
  431. ret += fmt.Sprintf("ActivityStatus:%v, ", *o.ActivityStatus)
  432. }
  433. if o.CreatorMerchantId == nil {
  434. ret += "CreatorMerchantId:<nil>, "
  435. } else {
  436. ret += fmt.Sprintf("CreatorMerchantId:%v, ", *o.CreatorMerchantId)
  437. }
  438. if o.BelongMerchantId == nil {
  439. ret += "BelongMerchantId:<nil>, "
  440. } else {
  441. ret += fmt.Sprintf("BelongMerchantId:%v, ", *o.BelongMerchantId)
  442. }
  443. if o.CreateTime == nil {
  444. ret += "CreateTime:<nil>, "
  445. } else {
  446. ret += fmt.Sprintf("CreateTime:%v, ", *o.CreateTime)
  447. }
  448. if o.UpdateTime == nil {
  449. ret += "UpdateTime:<nil>"
  450. } else {
  451. ret += fmt.Sprintf("UpdateTime:%v", *o.UpdateTime)
  452. }
  453. return fmt.Sprintf("ActivityInformation{%s}", ret)
  454. }
  455. func (o ActivityInformation) Clone() *ActivityInformation {
  456. ret := ActivityInformation{}
  457. if o.ActivityId != nil {
  458. ret.ActivityId = new(string)
  459. *ret.ActivityId = *o.ActivityId
  460. }
  461. if o.ActivityType != nil {
  462. ret.ActivityType = new(ActType)
  463. *ret.ActivityType = *o.ActivityType
  464. }
  465. if o.ActivityBaseInfo != nil {
  466. ret.ActivityBaseInfo = o.ActivityBaseInfo.Clone()
  467. }
  468. if o.AwardSendRule != nil {
  469. ret.AwardSendRule = o.AwardSendRule.Clone()
  470. }
  471. if o.AdvancedSetting != nil {
  472. ret.AdvancedSetting = o.AdvancedSetting.Clone()
  473. }
  474. if o.ActivityStatus != nil {
  475. ret.ActivityStatus = new(ActStatus)
  476. *ret.ActivityStatus = *o.ActivityStatus
  477. }
  478. if o.CreatorMerchantId != nil {
  479. ret.CreatorMerchantId = new(string)
  480. *ret.CreatorMerchantId = *o.CreatorMerchantId
  481. }
  482. if o.BelongMerchantId != nil {
  483. ret.BelongMerchantId = new(string)
  484. *ret.BelongMerchantId = *o.BelongMerchantId
  485. }
  486. if o.CreateTime != nil {
  487. ret.CreateTime = new(string)
  488. *ret.CreateTime = *o.CreateTime
  489. }
  490. if o.UpdateTime != nil {
  491. ret.UpdateTime = new(string)
  492. *ret.UpdateTime = *o.UpdateTime
  493. }
  494. return &ret
  495. }
  496. // AddActivityMerchantBody
  497. type AddActivityMerchantBody struct {
  498. // 新增到活动中的发券商户号列表
  499. MerchantIdList []string `json:"merchant_id_list"`
  500. // 商户添加发券商户号的凭据号,商户侧需保持唯一性
  501. AddRequestNo *string `json:"add_request_no"`
  502. }
  503. func (o AddActivityMerchantBody) MarshalJSON() ([]byte, error) {
  504. toSerialize := map[string]interface{}{}
  505. if o.MerchantIdList == nil {
  506. return nil, fmt.Errorf("field `MerchantIdList` is required and must be specified in AddActivityMerchantBody")
  507. }
  508. toSerialize["merchant_id_list"] = o.MerchantIdList
  509. if o.AddRequestNo == nil {
  510. return nil, fmt.Errorf("field `AddRequestNo` is required and must be specified in AddActivityMerchantBody")
  511. }
  512. toSerialize["add_request_no"] = o.AddRequestNo
  513. return json.Marshal(toSerialize)
  514. }
  515. func (o AddActivityMerchantBody) String() string {
  516. var ret string
  517. ret += fmt.Sprintf("MerchantIdList:%v, ", o.MerchantIdList)
  518. if o.AddRequestNo == nil {
  519. ret += "AddRequestNo:<nil>"
  520. } else {
  521. ret += fmt.Sprintf("AddRequestNo:%v", *o.AddRequestNo)
  522. }
  523. return fmt.Sprintf("AddActivityMerchantBody{%s}", ret)
  524. }
  525. func (o AddActivityMerchantBody) Clone() *AddActivityMerchantBody {
  526. ret := AddActivityMerchantBody{}
  527. if o.MerchantIdList != nil {
  528. ret.MerchantIdList = make([]string, len(o.MerchantIdList))
  529. for i, item := range o.MerchantIdList {
  530. ret.MerchantIdList[i] = item
  531. }
  532. }
  533. if o.AddRequestNo != nil {
  534. ret.AddRequestNo = new(string)
  535. *ret.AddRequestNo = *o.AddRequestNo
  536. }
  537. return &ret
  538. }
  539. // AddActivityMerchantRequest
  540. type AddActivityMerchantRequest struct {
  541. // 活动Id
  542. ActivityId *string `json:"activity_id"`
  543. // 新增到活动中的发券商户号列表
  544. MerchantIdList []string `json:"merchant_id_list"`
  545. // 商户添加发券商户号的凭据号,商户侧需保持唯一性
  546. AddRequestNo *string `json:"add_request_no"`
  547. }
  548. func (o AddActivityMerchantRequest) MarshalJSON() ([]byte, error) {
  549. toSerialize := map[string]interface{}{}
  550. if o.ActivityId == nil {
  551. return nil, fmt.Errorf("field `ActivityId` is required and must be specified in AddActivityMerchantRequest")
  552. }
  553. toSerialize["activity_id"] = o.ActivityId
  554. if o.MerchantIdList == nil {
  555. return nil, fmt.Errorf("field `MerchantIdList` is required and must be specified in AddActivityMerchantRequest")
  556. }
  557. toSerialize["merchant_id_list"] = o.MerchantIdList
  558. if o.AddRequestNo == nil {
  559. return nil, fmt.Errorf("field `AddRequestNo` is required and must be specified in AddActivityMerchantRequest")
  560. }
  561. toSerialize["add_request_no"] = o.AddRequestNo
  562. return json.Marshal(toSerialize)
  563. }
  564. func (o AddActivityMerchantRequest) String() string {
  565. var ret string
  566. if o.ActivityId == nil {
  567. ret += "ActivityId:<nil>, "
  568. } else {
  569. ret += fmt.Sprintf("ActivityId:%v, ", *o.ActivityId)
  570. }
  571. ret += fmt.Sprintf("MerchantIdList:%v, ", o.MerchantIdList)
  572. if o.AddRequestNo == nil {
  573. ret += "AddRequestNo:<nil>"
  574. } else {
  575. ret += fmt.Sprintf("AddRequestNo:%v", *o.AddRequestNo)
  576. }
  577. return fmt.Sprintf("AddActivityMerchantRequest{%s}", ret)
  578. }
  579. func (o AddActivityMerchantRequest) Clone() *AddActivityMerchantRequest {
  580. ret := AddActivityMerchantRequest{}
  581. if o.ActivityId != nil {
  582. ret.ActivityId = new(string)
  583. *ret.ActivityId = *o.ActivityId
  584. }
  585. if o.MerchantIdList != nil {
  586. ret.MerchantIdList = make([]string, len(o.MerchantIdList))
  587. for i, item := range o.MerchantIdList {
  588. ret.MerchantIdList[i] = item
  589. }
  590. }
  591. if o.AddRequestNo != nil {
  592. ret.AddRequestNo = new(string)
  593. *ret.AddRequestNo = *o.AddRequestNo
  594. }
  595. return &ret
  596. }
  597. // AddActivityMerchantResponse
  598. type AddActivityMerchantResponse struct {
  599. // 活动Id
  600. ActivityId *string `json:"activity_id,omitempty"`
  601. // 未通过规则校验的发券商户号列表
  602. InvalidMerchantIdList []InvalidParticipateMerchant `json:"invalid_merchant_id_list,omitempty"`
  603. // 成功添加发券商户号的时间
  604. AddTime *string `json:"add_time,omitempty"`
  605. }
  606. func (o AddActivityMerchantResponse) MarshalJSON() ([]byte, error) {
  607. toSerialize := map[string]interface{}{}
  608. if o.ActivityId != nil {
  609. toSerialize["activity_id"] = o.ActivityId
  610. }
  611. if o.InvalidMerchantIdList != nil {
  612. toSerialize["invalid_merchant_id_list"] = o.InvalidMerchantIdList
  613. }
  614. if o.AddTime != nil {
  615. toSerialize["add_time"] = o.AddTime
  616. }
  617. return json.Marshal(toSerialize)
  618. }
  619. func (o AddActivityMerchantResponse) String() string {
  620. var ret string
  621. if o.ActivityId == nil {
  622. ret += "ActivityId:<nil>, "
  623. } else {
  624. ret += fmt.Sprintf("ActivityId:%v, ", *o.ActivityId)
  625. }
  626. ret += fmt.Sprintf("InvalidMerchantIdList:%v, ", o.InvalidMerchantIdList)
  627. if o.AddTime == nil {
  628. ret += "AddTime:<nil>"
  629. } else {
  630. ret += fmt.Sprintf("AddTime:%v", *o.AddTime)
  631. }
  632. return fmt.Sprintf("AddActivityMerchantResponse{%s}", ret)
  633. }
  634. func (o AddActivityMerchantResponse) Clone() *AddActivityMerchantResponse {
  635. ret := AddActivityMerchantResponse{}
  636. if o.ActivityId != nil {
  637. ret.ActivityId = new(string)
  638. *ret.ActivityId = *o.ActivityId
  639. }
  640. if o.InvalidMerchantIdList != nil {
  641. ret.InvalidMerchantIdList = make([]InvalidParticipateMerchant, len(o.InvalidMerchantIdList))
  642. for i, item := range o.InvalidMerchantIdList {
  643. ret.InvalidMerchantIdList[i] = *item.Clone()
  644. }
  645. }
  646. if o.AddTime != nil {
  647. ret.AddTime = new(string)
  648. *ret.AddTime = *o.AddTime
  649. }
  650. return &ret
  651. }
  652. // AvailableDayTime
  653. type AvailableDayTime struct {
  654. // 每日可用开始时间(格式:110000,表示11:00:00)
  655. BeginDayTime *string `json:"begin_day_time"`
  656. // 每日可用结束时间 (格式:135959,表示13:59:59)
  657. EndDayTime *string `json:"end_day_time"`
  658. }
  659. func (o AvailableDayTime) MarshalJSON() ([]byte, error) {
  660. toSerialize := map[string]interface{}{}
  661. if o.BeginDayTime == nil {
  662. return nil, fmt.Errorf("field `BeginDayTime` is required and must be specified in AvailableDayTime")
  663. }
  664. toSerialize["begin_day_time"] = o.BeginDayTime
  665. if o.EndDayTime == nil {
  666. return nil, fmt.Errorf("field `EndDayTime` is required and must be specified in AvailableDayTime")
  667. }
  668. toSerialize["end_day_time"] = o.EndDayTime
  669. return json.Marshal(toSerialize)
  670. }
  671. func (o AvailableDayTime) String() string {
  672. var ret string
  673. if o.BeginDayTime == nil {
  674. ret += "BeginDayTime:<nil>, "
  675. } else {
  676. ret += fmt.Sprintf("BeginDayTime:%v, ", *o.BeginDayTime)
  677. }
  678. if o.EndDayTime == nil {
  679. ret += "EndDayTime:<nil>"
  680. } else {
  681. ret += fmt.Sprintf("EndDayTime:%v", *o.EndDayTime)
  682. }
  683. return fmt.Sprintf("AvailableDayTime{%s}", ret)
  684. }
  685. func (o AvailableDayTime) Clone() *AvailableDayTime {
  686. ret := AvailableDayTime{}
  687. if o.BeginDayTime != nil {
  688. ret.BeginDayTime = new(string)
  689. *ret.BeginDayTime = *o.BeginDayTime
  690. }
  691. if o.EndDayTime != nil {
  692. ret.EndDayTime = new(string)
  693. *ret.EndDayTime = *o.EndDayTime
  694. }
  695. return &ret
  696. }
  697. // AvailablePeriod
  698. type AvailablePeriod struct {
  699. // 可用时间
  700. AvailableTime []AvailableTime `json:"available_time,omitempty"`
  701. // 每日可用时间
  702. AvailableDayTime []AvailableDayTime `json:"available_day_time,omitempty"`
  703. }
  704. func (o AvailablePeriod) MarshalJSON() ([]byte, error) {
  705. toSerialize := map[string]interface{}{}
  706. if o.AvailableTime != nil {
  707. toSerialize["available_time"] = o.AvailableTime
  708. }
  709. if o.AvailableDayTime != nil {
  710. toSerialize["available_day_time"] = o.AvailableDayTime
  711. }
  712. return json.Marshal(toSerialize)
  713. }
  714. func (o AvailablePeriod) String() string {
  715. var ret string
  716. ret += fmt.Sprintf("AvailableTime:%v, ", o.AvailableTime)
  717. ret += fmt.Sprintf("AvailableDayTime:%v", o.AvailableDayTime)
  718. return fmt.Sprintf("AvailablePeriod{%s}", ret)
  719. }
  720. func (o AvailablePeriod) Clone() *AvailablePeriod {
  721. ret := AvailablePeriod{}
  722. if o.AvailableTime != nil {
  723. ret.AvailableTime = make([]AvailableTime, len(o.AvailableTime))
  724. for i, item := range o.AvailableTime {
  725. ret.AvailableTime[i] = *item.Clone()
  726. }
  727. }
  728. if o.AvailableDayTime != nil {
  729. ret.AvailableDayTime = make([]AvailableDayTime, len(o.AvailableDayTime))
  730. for i, item := range o.AvailableDayTime {
  731. ret.AvailableDayTime[i] = *item.Clone()
  732. }
  733. }
  734. return &ret
  735. }
  736. // AvailableTime
  737. type AvailableTime struct {
  738. // 可用开始时间
  739. BeginTime *string `json:"begin_time"`
  740. // 可用结束时间
  741. EndTime *string `json:"end_time"`
  742. }
  743. func (o AvailableTime) MarshalJSON() ([]byte, error) {
  744. toSerialize := map[string]interface{}{}
  745. if o.BeginTime == nil {
  746. return nil, fmt.Errorf("field `BeginTime` is required and must be specified in AvailableTime")
  747. }
  748. toSerialize["begin_time"] = o.BeginTime
  749. if o.EndTime == nil {
  750. return nil, fmt.Errorf("field `EndTime` is required and must be specified in AvailableTime")
  751. }
  752. toSerialize["end_time"] = o.EndTime
  753. return json.Marshal(toSerialize)
  754. }
  755. func (o AvailableTime) String() string {
  756. var ret string
  757. if o.BeginTime == nil {
  758. ret += "BeginTime:<nil>, "
  759. } else {
  760. ret += fmt.Sprintf("BeginTime:%v, ", *o.BeginTime)
  761. }
  762. if o.EndTime == nil {
  763. ret += "EndTime:<nil>"
  764. } else {
  765. ret += fmt.Sprintf("EndTime:%v", *o.EndTime)
  766. }
  767. return fmt.Sprintf("AvailableTime{%s}", ret)
  768. }
  769. func (o AvailableTime) Clone() *AvailableTime {
  770. ret := AvailableTime{}
  771. if o.BeginTime != nil {
  772. ret.BeginTime = new(string)
  773. *ret.BeginTime = *o.BeginTime
  774. }
  775. if o.EndTime != nil {
  776. ret.EndTime = new(string)
  777. *ret.EndTime = *o.EndTime
  778. }
  779. return &ret
  780. }
  781. // AwardBaseInfo
  782. type AwardBaseInfo struct {
  783. // 代金券批次Id
  784. StockId *string `json:"stock_id"`
  785. // 奖品大图,必填
  786. OriginalImageUrl *string `json:"original_image_url"`
  787. // 奖品小图,当选多张券时必填
  788. ThumbnailUrl *string `json:"thumbnail_url,omitempty"`
  789. }
  790. func (o AwardBaseInfo) MarshalJSON() ([]byte, error) {
  791. toSerialize := map[string]interface{}{}
  792. if o.StockId == nil {
  793. return nil, fmt.Errorf("field `StockId` is required and must be specified in AwardBaseInfo")
  794. }
  795. toSerialize["stock_id"] = o.StockId
  796. if o.OriginalImageUrl == nil {
  797. return nil, fmt.Errorf("field `OriginalImageUrl` is required and must be specified in AwardBaseInfo")
  798. }
  799. toSerialize["original_image_url"] = o.OriginalImageUrl
  800. if o.ThumbnailUrl != nil {
  801. toSerialize["thumbnail_url"] = o.ThumbnailUrl
  802. }
  803. return json.Marshal(toSerialize)
  804. }
  805. func (o AwardBaseInfo) String() string {
  806. var ret string
  807. if o.StockId == nil {
  808. ret += "StockId:<nil>, "
  809. } else {
  810. ret += fmt.Sprintf("StockId:%v, ", *o.StockId)
  811. }
  812. if o.OriginalImageUrl == nil {
  813. ret += "OriginalImageUrl:<nil>, "
  814. } else {
  815. ret += fmt.Sprintf("OriginalImageUrl:%v, ", *o.OriginalImageUrl)
  816. }
  817. if o.ThumbnailUrl == nil {
  818. ret += "ThumbnailUrl:<nil>"
  819. } else {
  820. ret += fmt.Sprintf("ThumbnailUrl:%v", *o.ThumbnailUrl)
  821. }
  822. return fmt.Sprintf("AwardBaseInfo{%s}", ret)
  823. }
  824. func (o AwardBaseInfo) Clone() *AwardBaseInfo {
  825. ret := AwardBaseInfo{}
  826. if o.StockId != nil {
  827. ret.StockId = new(string)
  828. *ret.StockId = *o.StockId
  829. }
  830. if o.OriginalImageUrl != nil {
  831. ret.OriginalImageUrl = new(string)
  832. *ret.OriginalImageUrl = *o.OriginalImageUrl
  833. }
  834. if o.ThumbnailUrl != nil {
  835. ret.ThumbnailUrl = new(string)
  836. *ret.ThumbnailUrl = *o.ThumbnailUrl
  837. }
  838. return &ret
  839. }
  840. // AwardSendRule
  841. type AwardSendRule struct {
  842. //
  843. FullSendRule *FullSendRule `json:"full_send_rule,omitempty"`
  844. }
  845. func (o AwardSendRule) MarshalJSON() ([]byte, error) {
  846. toSerialize := map[string]interface{}{}
  847. if o.FullSendRule != nil {
  848. toSerialize["full_send_rule"] = o.FullSendRule
  849. }
  850. return json.Marshal(toSerialize)
  851. }
  852. func (o AwardSendRule) String() string {
  853. var ret string
  854. ret += fmt.Sprintf("FullSendRule:%v", o.FullSendRule)
  855. return fmt.Sprintf("AwardSendRule{%s}", ret)
  856. }
  857. func (o AwardSendRule) Clone() *AwardSendRule {
  858. ret := AwardSendRule{}
  859. if o.FullSendRule != nil {
  860. ret.FullSendRule = o.FullSendRule.Clone()
  861. }
  862. return &ret
  863. }
  864. // AwardType
  865. type AwardType string
  866. func (e AwardType) Ptr() *AwardType {
  867. return &e
  868. }
  869. // Enums of AwardType
  870. const (
  871. AWARDTYPE_BUSIFAVOR AwardType = "BUSIFAVOR"
  872. )
  873. // BankCardCategory
  874. type BankCardCategory string
  875. func (e BankCardCategory) Ptr() *BankCardCategory {
  876. return &e
  877. }
  878. // Enums of BankCardCategory
  879. const (
  880. BANKCARDCATEGORY_DEBIT_CARD BankCardCategory = "DEBIT_CARD"
  881. BANKCARDCATEGORY_CREDIT_CARD BankCardCategory = "CREDIT_CARD"
  882. )
  883. // CreateFullSendActRequest
  884. type CreateFullSendActRequest struct {
  885. // 用于创建活动的基本信息
  886. ActivityBaseInfo *ActBaseInfo `json:"activity_base_info"`
  887. // 满送活动规则
  888. AwardSendRule *FullSendRule `json:"award_send_rule"`
  889. // 其他高级配置项
  890. AdvancedSetting *ActAdvancedSetting `json:"advanced_setting,omitempty"`
  891. }
  892. func (o CreateFullSendActRequest) MarshalJSON() ([]byte, error) {
  893. toSerialize := map[string]interface{}{}
  894. if o.ActivityBaseInfo == nil {
  895. return nil, fmt.Errorf("field `ActivityBaseInfo` is required and must be specified in CreateFullSendActRequest")
  896. }
  897. toSerialize["activity_base_info"] = o.ActivityBaseInfo
  898. if o.AwardSendRule == nil {
  899. return nil, fmt.Errorf("field `AwardSendRule` is required and must be specified in CreateFullSendActRequest")
  900. }
  901. toSerialize["award_send_rule"] = o.AwardSendRule
  902. if o.AdvancedSetting != nil {
  903. toSerialize["advanced_setting"] = o.AdvancedSetting
  904. }
  905. return json.Marshal(toSerialize)
  906. }
  907. func (o CreateFullSendActRequest) String() string {
  908. var ret string
  909. ret += fmt.Sprintf("ActivityBaseInfo:%v, ", o.ActivityBaseInfo)
  910. ret += fmt.Sprintf("AwardSendRule:%v, ", o.AwardSendRule)
  911. ret += fmt.Sprintf("AdvancedSetting:%v", o.AdvancedSetting)
  912. return fmt.Sprintf("CreateFullSendActRequest{%s}", ret)
  913. }
  914. func (o CreateFullSendActRequest) Clone() *CreateFullSendActRequest {
  915. ret := CreateFullSendActRequest{}
  916. if o.ActivityBaseInfo != nil {
  917. ret.ActivityBaseInfo = o.ActivityBaseInfo.Clone()
  918. }
  919. if o.AwardSendRule != nil {
  920. ret.AwardSendRule = o.AwardSendRule.Clone()
  921. }
  922. if o.AdvancedSetting != nil {
  923. ret.AdvancedSetting = o.AdvancedSetting.Clone()
  924. }
  925. return &ret
  926. }
  927. // CreateFullSendActResponse
  928. type CreateFullSendActResponse struct {
  929. // 活动id
  930. ActivityId *string `json:"activity_id"`
  931. // 创建时间
  932. CreateTime *string `json:"create_time"`
  933. }
  934. func (o CreateFullSendActResponse) MarshalJSON() ([]byte, error) {
  935. toSerialize := map[string]interface{}{}
  936. if o.ActivityId == nil {
  937. return nil, fmt.Errorf("field `ActivityId` is required and must be specified in CreateFullSendActResponse")
  938. }
  939. toSerialize["activity_id"] = o.ActivityId
  940. if o.CreateTime == nil {
  941. return nil, fmt.Errorf("field `CreateTime` is required and must be specified in CreateFullSendActResponse")
  942. }
  943. toSerialize["create_time"] = o.CreateTime
  944. return json.Marshal(toSerialize)
  945. }
  946. func (o CreateFullSendActResponse) String() string {
  947. var ret string
  948. if o.ActivityId == nil {
  949. ret += "ActivityId:<nil>, "
  950. } else {
  951. ret += fmt.Sprintf("ActivityId:%v, ", *o.ActivityId)
  952. }
  953. if o.CreateTime == nil {
  954. ret += "CreateTime:<nil>"
  955. } else {
  956. ret += fmt.Sprintf("CreateTime:%v", *o.CreateTime)
  957. }
  958. return fmt.Sprintf("CreateFullSendActResponse{%s}", ret)
  959. }
  960. func (o CreateFullSendActResponse) Clone() *CreateFullSendActResponse {
  961. ret := CreateFullSendActResponse{}
  962. if o.ActivityId != nil {
  963. ret.ActivityId = new(string)
  964. *ret.ActivityId = *o.ActivityId
  965. }
  966. if o.CreateTime != nil {
  967. ret.CreateTime = new(string)
  968. *ret.CreateTime = *o.CreateTime
  969. }
  970. return &ret
  971. }
  972. // DeleteActivityMerchantBody
  973. type DeleteActivityMerchantBody struct {
  974. // 从活动已有的发券商户号中移除的商户号列表
  975. MerchantIdList []string `json:"merchant_id_list"`
  976. // 商户添加发券商户号的凭据号,商户侧需保持唯一性
  977. DeleteRequestNo *string `json:"delete_request_no"`
  978. }
  979. func (o DeleteActivityMerchantBody) MarshalJSON() ([]byte, error) {
  980. toSerialize := map[string]interface{}{}
  981. if o.MerchantIdList == nil {
  982. return nil, fmt.Errorf("field `MerchantIdList` is required and must be specified in DeleteActivityMerchantBody")
  983. }
  984. toSerialize["merchant_id_list"] = o.MerchantIdList
  985. if o.DeleteRequestNo == nil {
  986. return nil, fmt.Errorf("field `DeleteRequestNo` is required and must be specified in DeleteActivityMerchantBody")
  987. }
  988. toSerialize["delete_request_no"] = o.DeleteRequestNo
  989. return json.Marshal(toSerialize)
  990. }
  991. func (o DeleteActivityMerchantBody) String() string {
  992. var ret string
  993. ret += fmt.Sprintf("MerchantIdList:%v, ", o.MerchantIdList)
  994. if o.DeleteRequestNo == nil {
  995. ret += "DeleteRequestNo:<nil>"
  996. } else {
  997. ret += fmt.Sprintf("DeleteRequestNo:%v", *o.DeleteRequestNo)
  998. }
  999. return fmt.Sprintf("DeleteActivityMerchantBody{%s}", ret)
  1000. }
  1001. func (o DeleteActivityMerchantBody) Clone() *DeleteActivityMerchantBody {
  1002. ret := DeleteActivityMerchantBody{}
  1003. if o.MerchantIdList != nil {
  1004. ret.MerchantIdList = make([]string, len(o.MerchantIdList))
  1005. for i, item := range o.MerchantIdList {
  1006. ret.MerchantIdList[i] = item
  1007. }
  1008. }
  1009. if o.DeleteRequestNo != nil {
  1010. ret.DeleteRequestNo = new(string)
  1011. *ret.DeleteRequestNo = *o.DeleteRequestNo
  1012. }
  1013. return &ret
  1014. }
  1015. // DeleteActivityMerchantRequest
  1016. type DeleteActivityMerchantRequest struct {
  1017. // 活动Id
  1018. ActivityId *string `json:"activity_id"`
  1019. // 从活动已有的发券商户号中移除的商户号列表
  1020. MerchantIdList []string `json:"merchant_id_list"`
  1021. // 商户添加发券商户号的凭据号,商户侧需保持唯一性
  1022. DeleteRequestNo *string `json:"delete_request_no"`
  1023. }
  1024. func (o DeleteActivityMerchantRequest) MarshalJSON() ([]byte, error) {
  1025. toSerialize := map[string]interface{}{}
  1026. if o.ActivityId == nil {
  1027. return nil, fmt.Errorf("field `ActivityId` is required and must be specified in DeleteActivityMerchantRequest")
  1028. }
  1029. toSerialize["activity_id"] = o.ActivityId
  1030. if o.MerchantIdList == nil {
  1031. return nil, fmt.Errorf("field `MerchantIdList` is required and must be specified in DeleteActivityMerchantRequest")
  1032. }
  1033. toSerialize["merchant_id_list"] = o.MerchantIdList
  1034. if o.DeleteRequestNo == nil {
  1035. return nil, fmt.Errorf("field `DeleteRequestNo` is required and must be specified in DeleteActivityMerchantRequest")
  1036. }
  1037. toSerialize["delete_request_no"] = o.DeleteRequestNo
  1038. return json.Marshal(toSerialize)
  1039. }
  1040. func (o DeleteActivityMerchantRequest) String() string {
  1041. var ret string
  1042. if o.ActivityId == nil {
  1043. ret += "ActivityId:<nil>, "
  1044. } else {
  1045. ret += fmt.Sprintf("ActivityId:%v, ", *o.ActivityId)
  1046. }
  1047. ret += fmt.Sprintf("MerchantIdList:%v, ", o.MerchantIdList)
  1048. if o.DeleteRequestNo == nil {
  1049. ret += "DeleteRequestNo:<nil>"
  1050. } else {
  1051. ret += fmt.Sprintf("DeleteRequestNo:%v", *o.DeleteRequestNo)
  1052. }
  1053. return fmt.Sprintf("DeleteActivityMerchantRequest{%s}", ret)
  1054. }
  1055. func (o DeleteActivityMerchantRequest) Clone() *DeleteActivityMerchantRequest {
  1056. ret := DeleteActivityMerchantRequest{}
  1057. if o.ActivityId != nil {
  1058. ret.ActivityId = new(string)
  1059. *ret.ActivityId = *o.ActivityId
  1060. }
  1061. if o.MerchantIdList != nil {
  1062. ret.MerchantIdList = make([]string, len(o.MerchantIdList))
  1063. for i, item := range o.MerchantIdList {
  1064. ret.MerchantIdList[i] = item
  1065. }
  1066. }
  1067. if o.DeleteRequestNo != nil {
  1068. ret.DeleteRequestNo = new(string)
  1069. *ret.DeleteRequestNo = *o.DeleteRequestNo
  1070. }
  1071. return &ret
  1072. }
  1073. // DeleteActivityMerchantResponse
  1074. type DeleteActivityMerchantResponse struct {
  1075. // 活动Id
  1076. ActivityId *string `json:"activity_id"`
  1077. // 成功删除发券商户号的时间
  1078. DeleteTime *string `json:"delete_time,omitempty"`
  1079. }
  1080. func (o DeleteActivityMerchantResponse) MarshalJSON() ([]byte, error) {
  1081. toSerialize := map[string]interface{}{}
  1082. if o.ActivityId == nil {
  1083. return nil, fmt.Errorf("field `ActivityId` is required and must be specified in DeleteActivityMerchantResponse")
  1084. }
  1085. toSerialize["activity_id"] = o.ActivityId
  1086. if o.DeleteTime != nil {
  1087. toSerialize["delete_time"] = o.DeleteTime
  1088. }
  1089. return json.Marshal(toSerialize)
  1090. }
  1091. func (o DeleteActivityMerchantResponse) String() string {
  1092. var ret string
  1093. if o.ActivityId == nil {
  1094. ret += "ActivityId:<nil>, "
  1095. } else {
  1096. ret += fmt.Sprintf("ActivityId:%v, ", *o.ActivityId)
  1097. }
  1098. if o.DeleteTime == nil {
  1099. ret += "DeleteTime:<nil>"
  1100. } else {
  1101. ret += fmt.Sprintf("DeleteTime:%v", *o.DeleteTime)
  1102. }
  1103. return fmt.Sprintf("DeleteActivityMerchantResponse{%s}", ret)
  1104. }
  1105. func (o DeleteActivityMerchantResponse) Clone() *DeleteActivityMerchantResponse {
  1106. ret := DeleteActivityMerchantResponse{}
  1107. if o.ActivityId != nil {
  1108. ret.ActivityId = new(string)
  1109. *ret.ActivityId = *o.ActivityId
  1110. }
  1111. if o.DeleteTime != nil {
  1112. ret.DeleteTime = new(string)
  1113. *ret.DeleteTime = *o.DeleteTime
  1114. }
  1115. return &ret
  1116. }
  1117. // DeliveryPurposeCategory 投放目的枚举值
  1118. type DeliveryPurposeCategory string
  1119. func (e DeliveryPurposeCategory) Ptr() *DeliveryPurposeCategory {
  1120. return &e
  1121. }
  1122. // Enums of DeliveryPurposeCategory
  1123. const (
  1124. DELIVERYPURPOSECATEGORY_OFF_LINE_PAY DeliveryPurposeCategory = "OFF_LINE_PAY"
  1125. DELIVERYPURPOSECATEGORY_JUMP_MINI_APP DeliveryPurposeCategory = "JUMP_MINI_APP"
  1126. )
  1127. // DeliveryUserCategory
  1128. type DeliveryUserCategory string
  1129. func (e DeliveryUserCategory) Ptr() *DeliveryUserCategory {
  1130. return &e
  1131. }
  1132. // Enums of DeliveryUserCategory
  1133. const (
  1134. DELIVERYUSERCATEGORY_DELIVERY_ALL_PERSON DeliveryUserCategory = "DELIVERY_ALL_PERSON"
  1135. DELIVERYUSERCATEGORY_DELIVERY_MEMBER_PERSON DeliveryUserCategory = "DELIVERY_MEMBER_PERSON"
  1136. )
  1137. // FullSendRule
  1138. type FullSendRule struct {
  1139. // 消费金额门槛 单位分
  1140. TransactionAmountMinimum *int64 `json:"transaction_amount_minimum"`
  1141. // 发放内容,可选单张券或礼包,选礼包时奖品限定3-5个
  1142. SendContent *SendContentCategory `json:"send_content"`
  1143. // 奖品类型,暂时只支持商家券
  1144. AwardType *AwardType `json:"award_type"`
  1145. // 奖品基本信息列表
  1146. AwardList []AwardBaseInfo `json:"award_list"`
  1147. // 发券商户号选取规则,支持选择在用券商户或手动输入商户号两种,选择手动时,发券商户号必填(商家券只支持手动输入)
  1148. MerchantOption *SendMerchantOption `json:"merchant_option"`
  1149. // 发券商户号,列表
  1150. MerchantIdList []string `json:"merchant_id_list,omitempty"`
  1151. }
  1152. func (o FullSendRule) MarshalJSON() ([]byte, error) {
  1153. toSerialize := map[string]interface{}{}
  1154. if o.TransactionAmountMinimum == nil {
  1155. return nil, fmt.Errorf("field `TransactionAmountMinimum` is required and must be specified in FullSendRule")
  1156. }
  1157. toSerialize["transaction_amount_minimum"] = o.TransactionAmountMinimum
  1158. if o.SendContent == nil {
  1159. return nil, fmt.Errorf("field `SendContent` is required and must be specified in FullSendRule")
  1160. }
  1161. toSerialize["send_content"] = o.SendContent
  1162. if o.AwardType == nil {
  1163. return nil, fmt.Errorf("field `AwardType` is required and must be specified in FullSendRule")
  1164. }
  1165. toSerialize["award_type"] = o.AwardType
  1166. if o.AwardList == nil {
  1167. return nil, fmt.Errorf("field `AwardList` is required and must be specified in FullSendRule")
  1168. }
  1169. toSerialize["award_list"] = o.AwardList
  1170. if o.MerchantOption == nil {
  1171. return nil, fmt.Errorf("field `MerchantOption` is required and must be specified in FullSendRule")
  1172. }
  1173. toSerialize["merchant_option"] = o.MerchantOption
  1174. if o.MerchantIdList != nil {
  1175. toSerialize["merchant_id_list"] = o.MerchantIdList
  1176. }
  1177. return json.Marshal(toSerialize)
  1178. }
  1179. func (o FullSendRule) String() string {
  1180. var ret string
  1181. if o.TransactionAmountMinimum == nil {
  1182. ret += "TransactionAmountMinimum:<nil>, "
  1183. } else {
  1184. ret += fmt.Sprintf("TransactionAmountMinimum:%v, ", *o.TransactionAmountMinimum)
  1185. }
  1186. if o.SendContent == nil {
  1187. ret += "SendContent:<nil>, "
  1188. } else {
  1189. ret += fmt.Sprintf("SendContent:%v, ", *o.SendContent)
  1190. }
  1191. if o.AwardType == nil {
  1192. ret += "AwardType:<nil>, "
  1193. } else {
  1194. ret += fmt.Sprintf("AwardType:%v, ", *o.AwardType)
  1195. }
  1196. ret += fmt.Sprintf("AwardList:%v, ", o.AwardList)
  1197. if o.MerchantOption == nil {
  1198. ret += "MerchantOption:<nil>, "
  1199. } else {
  1200. ret += fmt.Sprintf("MerchantOption:%v, ", *o.MerchantOption)
  1201. }
  1202. ret += fmt.Sprintf("MerchantIdList:%v", o.MerchantIdList)
  1203. return fmt.Sprintf("FullSendRule{%s}", ret)
  1204. }
  1205. func (o FullSendRule) Clone() *FullSendRule {
  1206. ret := FullSendRule{}
  1207. if o.TransactionAmountMinimum != nil {
  1208. ret.TransactionAmountMinimum = new(int64)
  1209. *ret.TransactionAmountMinimum = *o.TransactionAmountMinimum
  1210. }
  1211. if o.SendContent != nil {
  1212. ret.SendContent = new(SendContentCategory)
  1213. *ret.SendContent = *o.SendContent
  1214. }
  1215. if o.AwardType != nil {
  1216. ret.AwardType = new(AwardType)
  1217. *ret.AwardType = *o.AwardType
  1218. }
  1219. if o.AwardList != nil {
  1220. ret.AwardList = make([]AwardBaseInfo, len(o.AwardList))
  1221. for i, item := range o.AwardList {
  1222. ret.AwardList[i] = *item.Clone()
  1223. }
  1224. }
  1225. if o.MerchantOption != nil {
  1226. ret.MerchantOption = new(SendMerchantOption)
  1227. *ret.MerchantOption = *o.MerchantOption
  1228. }
  1229. if o.MerchantIdList != nil {
  1230. ret.MerchantIdList = make([]string, len(o.MerchantIdList))
  1231. for i, item := range o.MerchantIdList {
  1232. ret.MerchantIdList[i] = item
  1233. }
  1234. }
  1235. return &ret
  1236. }
  1237. // GetActDetailRequest
  1238. type GetActDetailRequest struct {
  1239. // 活动Id
  1240. ActivityId *string `json:"activity_id"`
  1241. }
  1242. func (o GetActDetailRequest) MarshalJSON() ([]byte, error) {
  1243. toSerialize := map[string]interface{}{}
  1244. if o.ActivityId == nil {
  1245. return nil, fmt.Errorf("field `ActivityId` is required and must be specified in GetActDetailRequest")
  1246. }
  1247. toSerialize["activity_id"] = o.ActivityId
  1248. return json.Marshal(toSerialize)
  1249. }
  1250. func (o GetActDetailRequest) String() string {
  1251. var ret string
  1252. if o.ActivityId == nil {
  1253. ret += "ActivityId:<nil>"
  1254. } else {
  1255. ret += fmt.Sprintf("ActivityId:%v", *o.ActivityId)
  1256. }
  1257. return fmt.Sprintf("GetActDetailRequest{%s}", ret)
  1258. }
  1259. func (o GetActDetailRequest) Clone() *GetActDetailRequest {
  1260. ret := GetActDetailRequest{}
  1261. if o.ActivityId != nil {
  1262. ret.ActivityId = new(string)
  1263. *ret.ActivityId = *o.ActivityId
  1264. }
  1265. return &ret
  1266. }
  1267. // GetActDetailResponse
  1268. type GetActDetailResponse struct {
  1269. // 活动Id
  1270. ActivityId *string `json:"activity_id"`
  1271. // 活动类型
  1272. ActivityType *ActType `json:"activity_type,omitempty"`
  1273. // 创建活动时录入的基本信息
  1274. ActivityBaseInfo *ActBaseInfo `json:"activity_base_info"`
  1275. // 奖品派送规则,分别对应满送、阶梯送、满A送B中的一种
  1276. AwardSendRule *AwardSendRule `json:"award_send_rule"`
  1277. // 创建时传入的高级设置信息
  1278. AdvancedSetting *ActAdvancedSetting `json:"advanced_setting,omitempty"`
  1279. // 活动当前状态枚举值
  1280. ActivityStatus *ActStatus `json:"activity_status"`
  1281. // 创建商户号
  1282. CreatorMerchantId *string `json:"creator_merchant_id"`
  1283. // 所属商户号
  1284. BelongMerchantId *string `json:"belong_merchant_id"`
  1285. // 活动暂停时间
  1286. PauseTime *string `json:"pause_time,omitempty"`
  1287. // 活动恢复时间
  1288. RecoveryTime *string `json:"recovery_time,omitempty"`
  1289. // 活动创建时间
  1290. CreateTime *string `json:"create_time,omitempty"`
  1291. // 活动更新时间
  1292. UpdateTime *string `json:"update_time,omitempty"`
  1293. }
  1294. func (o GetActDetailResponse) MarshalJSON() ([]byte, error) {
  1295. toSerialize := map[string]interface{}{}
  1296. if o.ActivityId == nil {
  1297. return nil, fmt.Errorf("field `ActivityId` is required and must be specified in GetActDetailResponse")
  1298. }
  1299. toSerialize["activity_id"] = o.ActivityId
  1300. if o.ActivityType != nil {
  1301. toSerialize["activity_type"] = o.ActivityType
  1302. }
  1303. if o.ActivityBaseInfo == nil {
  1304. return nil, fmt.Errorf("field `ActivityBaseInfo` is required and must be specified in GetActDetailResponse")
  1305. }
  1306. toSerialize["activity_base_info"] = o.ActivityBaseInfo
  1307. if o.AwardSendRule == nil {
  1308. return nil, fmt.Errorf("field `AwardSendRule` is required and must be specified in GetActDetailResponse")
  1309. }
  1310. toSerialize["award_send_rule"] = o.AwardSendRule
  1311. if o.AdvancedSetting != nil {
  1312. toSerialize["advanced_setting"] = o.AdvancedSetting
  1313. }
  1314. if o.ActivityStatus == nil {
  1315. return nil, fmt.Errorf("field `ActivityStatus` is required and must be specified in GetActDetailResponse")
  1316. }
  1317. toSerialize["activity_status"] = o.ActivityStatus
  1318. if o.CreatorMerchantId == nil {
  1319. return nil, fmt.Errorf("field `CreatorMerchantId` is required and must be specified in GetActDetailResponse")
  1320. }
  1321. toSerialize["creator_merchant_id"] = o.CreatorMerchantId
  1322. if o.BelongMerchantId == nil {
  1323. return nil, fmt.Errorf("field `BelongMerchantId` is required and must be specified in GetActDetailResponse")
  1324. }
  1325. toSerialize["belong_merchant_id"] = o.BelongMerchantId
  1326. if o.PauseTime != nil {
  1327. toSerialize["pause_time"] = o.PauseTime
  1328. }
  1329. if o.RecoveryTime != nil {
  1330. toSerialize["recovery_time"] = o.RecoveryTime
  1331. }
  1332. if o.CreateTime != nil {
  1333. toSerialize["create_time"] = o.CreateTime
  1334. }
  1335. if o.UpdateTime != nil {
  1336. toSerialize["update_time"] = o.UpdateTime
  1337. }
  1338. return json.Marshal(toSerialize)
  1339. }
  1340. func (o GetActDetailResponse) String() string {
  1341. var ret string
  1342. if o.ActivityId == nil {
  1343. ret += "ActivityId:<nil>, "
  1344. } else {
  1345. ret += fmt.Sprintf("ActivityId:%v, ", *o.ActivityId)
  1346. }
  1347. if o.ActivityType == nil {
  1348. ret += "ActivityType:<nil>, "
  1349. } else {
  1350. ret += fmt.Sprintf("ActivityType:%v, ", *o.ActivityType)
  1351. }
  1352. ret += fmt.Sprintf("ActivityBaseInfo:%v, ", o.ActivityBaseInfo)
  1353. ret += fmt.Sprintf("AwardSendRule:%v, ", o.AwardSendRule)
  1354. ret += fmt.Sprintf("AdvancedSetting:%v, ", o.AdvancedSetting)
  1355. if o.ActivityStatus == nil {
  1356. ret += "ActivityStatus:<nil>, "
  1357. } else {
  1358. ret += fmt.Sprintf("ActivityStatus:%v, ", *o.ActivityStatus)
  1359. }
  1360. if o.CreatorMerchantId == nil {
  1361. ret += "CreatorMerchantId:<nil>, "
  1362. } else {
  1363. ret += fmt.Sprintf("CreatorMerchantId:%v, ", *o.CreatorMerchantId)
  1364. }
  1365. if o.BelongMerchantId == nil {
  1366. ret += "BelongMerchantId:<nil>, "
  1367. } else {
  1368. ret += fmt.Sprintf("BelongMerchantId:%v, ", *o.BelongMerchantId)
  1369. }
  1370. if o.PauseTime == nil {
  1371. ret += "PauseTime:<nil>, "
  1372. } else {
  1373. ret += fmt.Sprintf("PauseTime:%v, ", *o.PauseTime)
  1374. }
  1375. if o.RecoveryTime == nil {
  1376. ret += "RecoveryTime:<nil>, "
  1377. } else {
  1378. ret += fmt.Sprintf("RecoveryTime:%v, ", *o.RecoveryTime)
  1379. }
  1380. if o.CreateTime == nil {
  1381. ret += "CreateTime:<nil>, "
  1382. } else {
  1383. ret += fmt.Sprintf("CreateTime:%v, ", *o.CreateTime)
  1384. }
  1385. if o.UpdateTime == nil {
  1386. ret += "UpdateTime:<nil>"
  1387. } else {
  1388. ret += fmt.Sprintf("UpdateTime:%v", *o.UpdateTime)
  1389. }
  1390. return fmt.Sprintf("GetActDetailResponse{%s}", ret)
  1391. }
  1392. func (o GetActDetailResponse) Clone() *GetActDetailResponse {
  1393. ret := GetActDetailResponse{}
  1394. if o.ActivityId != nil {
  1395. ret.ActivityId = new(string)
  1396. *ret.ActivityId = *o.ActivityId
  1397. }
  1398. if o.ActivityType != nil {
  1399. ret.ActivityType = new(ActType)
  1400. *ret.ActivityType = *o.ActivityType
  1401. }
  1402. if o.ActivityBaseInfo != nil {
  1403. ret.ActivityBaseInfo = o.ActivityBaseInfo.Clone()
  1404. }
  1405. if o.AwardSendRule != nil {
  1406. ret.AwardSendRule = o.AwardSendRule.Clone()
  1407. }
  1408. if o.AdvancedSetting != nil {
  1409. ret.AdvancedSetting = o.AdvancedSetting.Clone()
  1410. }
  1411. if o.ActivityStatus != nil {
  1412. ret.ActivityStatus = new(ActStatus)
  1413. *ret.ActivityStatus = *o.ActivityStatus
  1414. }
  1415. if o.CreatorMerchantId != nil {
  1416. ret.CreatorMerchantId = new(string)
  1417. *ret.CreatorMerchantId = *o.CreatorMerchantId
  1418. }
  1419. if o.BelongMerchantId != nil {
  1420. ret.BelongMerchantId = new(string)
  1421. *ret.BelongMerchantId = *o.BelongMerchantId
  1422. }
  1423. if o.PauseTime != nil {
  1424. ret.PauseTime = new(string)
  1425. *ret.PauseTime = *o.PauseTime
  1426. }
  1427. if o.RecoveryTime != nil {
  1428. ret.RecoveryTime = new(string)
  1429. *ret.RecoveryTime = *o.RecoveryTime
  1430. }
  1431. if o.CreateTime != nil {
  1432. ret.CreateTime = new(string)
  1433. *ret.CreateTime = *o.CreateTime
  1434. }
  1435. if o.UpdateTime != nil {
  1436. ret.UpdateTime = new(string)
  1437. *ret.UpdateTime = *o.UpdateTime
  1438. }
  1439. return &ret
  1440. }
  1441. // InvalidParticipateMerchant
  1442. type InvalidParticipateMerchant struct {
  1443. // 商户Id
  1444. Mchid *string `json:"mchid,omitempty"`
  1445. // 活动参与商户校验失败的原因
  1446. InvalidReason *string `json:"invalid_reason,omitempty"`
  1447. }
  1448. func (o InvalidParticipateMerchant) MarshalJSON() ([]byte, error) {
  1449. toSerialize := map[string]interface{}{}
  1450. if o.Mchid != nil {
  1451. toSerialize["mchid"] = o.Mchid
  1452. }
  1453. if o.InvalidReason != nil {
  1454. toSerialize["invalid_reason"] = o.InvalidReason
  1455. }
  1456. return json.Marshal(toSerialize)
  1457. }
  1458. func (o InvalidParticipateMerchant) String() string {
  1459. var ret string
  1460. if o.Mchid == nil {
  1461. ret += "Mchid:<nil>, "
  1462. } else {
  1463. ret += fmt.Sprintf("Mchid:%v, ", *o.Mchid)
  1464. }
  1465. if o.InvalidReason == nil {
  1466. ret += "InvalidReason:<nil>"
  1467. } else {
  1468. ret += fmt.Sprintf("InvalidReason:%v", *o.InvalidReason)
  1469. }
  1470. return fmt.Sprintf("InvalidParticipateMerchant{%s}", ret)
  1471. }
  1472. func (o InvalidParticipateMerchant) Clone() *InvalidParticipateMerchant {
  1473. ret := InvalidParticipateMerchant{}
  1474. if o.Mchid != nil {
  1475. ret.Mchid = new(string)
  1476. *ret.Mchid = *o.Mchid
  1477. }
  1478. if o.InvalidReason != nil {
  1479. ret.InvalidReason = new(string)
  1480. *ret.InvalidReason = *o.InvalidReason
  1481. }
  1482. return &ret
  1483. }
  1484. // ListActMchResponse
  1485. type ListActMchResponse struct {
  1486. // 商户信息列表
  1487. Data []ActParticipateMchInfo `json:"data,omitempty"`
  1488. // 商户数量
  1489. TotalCount *int64 `json:"total_count"`
  1490. // 分页页码
  1491. Offset *int64 `json:"offset"`
  1492. // 分页大小
  1493. Limit *int64 `json:"limit"`
  1494. // 活动Id
  1495. ActivityId *string `json:"activity_id"`
  1496. }
  1497. func (o ListActMchResponse) MarshalJSON() ([]byte, error) {
  1498. toSerialize := map[string]interface{}{}
  1499. if o.Data != nil {
  1500. toSerialize["data"] = o.Data
  1501. }
  1502. if o.TotalCount == nil {
  1503. return nil, fmt.Errorf("field `TotalCount` is required and must be specified in ListActMchResponse")
  1504. }
  1505. toSerialize["total_count"] = o.TotalCount
  1506. if o.Offset == nil {
  1507. return nil, fmt.Errorf("field `Offset` is required and must be specified in ListActMchResponse")
  1508. }
  1509. toSerialize["offset"] = o.Offset
  1510. if o.Limit == nil {
  1511. return nil, fmt.Errorf("field `Limit` is required and must be specified in ListActMchResponse")
  1512. }
  1513. toSerialize["limit"] = o.Limit
  1514. if o.ActivityId == nil {
  1515. return nil, fmt.Errorf("field `ActivityId` is required and must be specified in ListActMchResponse")
  1516. }
  1517. toSerialize["activity_id"] = o.ActivityId
  1518. return json.Marshal(toSerialize)
  1519. }
  1520. func (o ListActMchResponse) String() string {
  1521. var ret string
  1522. ret += fmt.Sprintf("Data:%v, ", o.Data)
  1523. if o.TotalCount == nil {
  1524. ret += "TotalCount:<nil>, "
  1525. } else {
  1526. ret += fmt.Sprintf("TotalCount:%v, ", *o.TotalCount)
  1527. }
  1528. if o.Offset == nil {
  1529. ret += "Offset:<nil>, "
  1530. } else {
  1531. ret += fmt.Sprintf("Offset:%v, ", *o.Offset)
  1532. }
  1533. if o.Limit == nil {
  1534. ret += "Limit:<nil>, "
  1535. } else {
  1536. ret += fmt.Sprintf("Limit:%v, ", *o.Limit)
  1537. }
  1538. if o.ActivityId == nil {
  1539. ret += "ActivityId:<nil>"
  1540. } else {
  1541. ret += fmt.Sprintf("ActivityId:%v", *o.ActivityId)
  1542. }
  1543. return fmt.Sprintf("ListActMchResponse{%s}", ret)
  1544. }
  1545. func (o ListActMchResponse) Clone() *ListActMchResponse {
  1546. ret := ListActMchResponse{}
  1547. if o.Data != nil {
  1548. ret.Data = make([]ActParticipateMchInfo, len(o.Data))
  1549. for i, item := range o.Data {
  1550. ret.Data[i] = *item.Clone()
  1551. }
  1552. }
  1553. if o.TotalCount != nil {
  1554. ret.TotalCount = new(int64)
  1555. *ret.TotalCount = *o.TotalCount
  1556. }
  1557. if o.Offset != nil {
  1558. ret.Offset = new(int64)
  1559. *ret.Offset = *o.Offset
  1560. }
  1561. if o.Limit != nil {
  1562. ret.Limit = new(int64)
  1563. *ret.Limit = *o.Limit
  1564. }
  1565. if o.ActivityId != nil {
  1566. ret.ActivityId = new(string)
  1567. *ret.ActivityId = *o.ActivityId
  1568. }
  1569. return &ret
  1570. }
  1571. // ListActSkuResponse
  1572. type ListActSkuResponse struct {
  1573. // 商品信息列表(sku信息列表)
  1574. Data []SkuInfo `json:"data,omitempty"`
  1575. TotalCount *int64 `json:"total_count"`
  1576. // 分页页码
  1577. Offset *int64 `json:"offset"`
  1578. // 分页大小
  1579. Limit *int64 `json:"limit"`
  1580. // 活动ID
  1581. ActivityId *string `json:"activity_id"`
  1582. }
  1583. func (o ListActSkuResponse) MarshalJSON() ([]byte, error) {
  1584. toSerialize := map[string]interface{}{}
  1585. if o.Data != nil {
  1586. toSerialize["data"] = o.Data
  1587. }
  1588. if o.TotalCount == nil {
  1589. return nil, fmt.Errorf("field `TotalCount` is required and must be specified in ListActSkuResponse")
  1590. }
  1591. toSerialize["total_count"] = o.TotalCount
  1592. if o.Offset == nil {
  1593. return nil, fmt.Errorf("field `Offset` is required and must be specified in ListActSkuResponse")
  1594. }
  1595. toSerialize["offset"] = o.Offset
  1596. if o.Limit == nil {
  1597. return nil, fmt.Errorf("field `Limit` is required and must be specified in ListActSkuResponse")
  1598. }
  1599. toSerialize["limit"] = o.Limit
  1600. if o.ActivityId == nil {
  1601. return nil, fmt.Errorf("field `ActivityId` is required and must be specified in ListActSkuResponse")
  1602. }
  1603. toSerialize["activity_id"] = o.ActivityId
  1604. return json.Marshal(toSerialize)
  1605. }
  1606. func (o ListActSkuResponse) String() string {
  1607. var ret string
  1608. ret += fmt.Sprintf("Data:%v, ", o.Data)
  1609. if o.TotalCount == nil {
  1610. ret += "TotalCount:<nil>, "
  1611. } else {
  1612. ret += fmt.Sprintf("TotalCount:%v, ", *o.TotalCount)
  1613. }
  1614. if o.Offset == nil {
  1615. ret += "Offset:<nil>, "
  1616. } else {
  1617. ret += fmt.Sprintf("Offset:%v, ", *o.Offset)
  1618. }
  1619. if o.Limit == nil {
  1620. ret += "Limit:<nil>, "
  1621. } else {
  1622. ret += fmt.Sprintf("Limit:%v, ", *o.Limit)
  1623. }
  1624. if o.ActivityId == nil {
  1625. ret += "ActivityId:<nil>"
  1626. } else {
  1627. ret += fmt.Sprintf("ActivityId:%v", *o.ActivityId)
  1628. }
  1629. return fmt.Sprintf("ListActSkuResponse{%s}", ret)
  1630. }
  1631. func (o ListActSkuResponse) Clone() *ListActSkuResponse {
  1632. ret := ListActSkuResponse{}
  1633. if o.Data != nil {
  1634. ret.Data = make([]SkuInfo, len(o.Data))
  1635. for i, item := range o.Data {
  1636. ret.Data[i] = *item.Clone()
  1637. }
  1638. }
  1639. if o.TotalCount != nil {
  1640. ret.TotalCount = new(int64)
  1641. *ret.TotalCount = *o.TotalCount
  1642. }
  1643. if o.Offset != nil {
  1644. ret.Offset = new(int64)
  1645. *ret.Offset = *o.Offset
  1646. }
  1647. if o.Limit != nil {
  1648. ret.Limit = new(int64)
  1649. *ret.Limit = *o.Limit
  1650. }
  1651. if o.ActivityId != nil {
  1652. ret.ActivityId = new(string)
  1653. *ret.ActivityId = *o.ActivityId
  1654. }
  1655. return &ret
  1656. }
  1657. // ListActivitiesRequest
  1658. type ListActivitiesRequest struct {
  1659. // 分页页码
  1660. Offset *int64 `json:"offset"`
  1661. // 分页大小
  1662. Limit *int64 `json:"limit"`
  1663. // 活动名称,支持模糊搜索
  1664. ActivityName *string `json:"activity_name,omitempty"`
  1665. // 活动状态
  1666. ActivityStatus *ActStatus `json:"activity_status,omitempty"`
  1667. // 奖品类型,暂时只支持商家券
  1668. AwardType *AwardType `json:"award_type,omitempty"`
  1669. }
  1670. func (o ListActivitiesRequest) MarshalJSON() ([]byte, error) {
  1671. toSerialize := map[string]interface{}{}
  1672. if o.Offset == nil {
  1673. return nil, fmt.Errorf("field `Offset` is required and must be specified in ListActivitiesRequest")
  1674. }
  1675. toSerialize["offset"] = o.Offset
  1676. if o.Limit == nil {
  1677. return nil, fmt.Errorf("field `Limit` is required and must be specified in ListActivitiesRequest")
  1678. }
  1679. toSerialize["limit"] = o.Limit
  1680. if o.ActivityName != nil {
  1681. toSerialize["activity_name"] = o.ActivityName
  1682. }
  1683. if o.ActivityStatus != nil {
  1684. toSerialize["activity_status"] = o.ActivityStatus
  1685. }
  1686. if o.AwardType != nil {
  1687. toSerialize["award_type"] = o.AwardType
  1688. }
  1689. return json.Marshal(toSerialize)
  1690. }
  1691. func (o ListActivitiesRequest) String() string {
  1692. var ret string
  1693. if o.Offset == nil {
  1694. ret += "Offset:<nil>, "
  1695. } else {
  1696. ret += fmt.Sprintf("Offset:%v, ", *o.Offset)
  1697. }
  1698. if o.Limit == nil {
  1699. ret += "Limit:<nil>, "
  1700. } else {
  1701. ret += fmt.Sprintf("Limit:%v, ", *o.Limit)
  1702. }
  1703. if o.ActivityName == nil {
  1704. ret += "ActivityName:<nil>, "
  1705. } else {
  1706. ret += fmt.Sprintf("ActivityName:%v, ", *o.ActivityName)
  1707. }
  1708. if o.ActivityStatus == nil {
  1709. ret += "ActivityStatus:<nil>, "
  1710. } else {
  1711. ret += fmt.Sprintf("ActivityStatus:%v, ", *o.ActivityStatus)
  1712. }
  1713. if o.AwardType == nil {
  1714. ret += "AwardType:<nil>"
  1715. } else {
  1716. ret += fmt.Sprintf("AwardType:%v", *o.AwardType)
  1717. }
  1718. return fmt.Sprintf("ListActivitiesRequest{%s}", ret)
  1719. }
  1720. func (o ListActivitiesRequest) Clone() *ListActivitiesRequest {
  1721. ret := ListActivitiesRequest{}
  1722. if o.Offset != nil {
  1723. ret.Offset = new(int64)
  1724. *ret.Offset = *o.Offset
  1725. }
  1726. if o.Limit != nil {
  1727. ret.Limit = new(int64)
  1728. *ret.Limit = *o.Limit
  1729. }
  1730. if o.ActivityName != nil {
  1731. ret.ActivityName = new(string)
  1732. *ret.ActivityName = *o.ActivityName
  1733. }
  1734. if o.ActivityStatus != nil {
  1735. ret.ActivityStatus = new(ActStatus)
  1736. *ret.ActivityStatus = *o.ActivityStatus
  1737. }
  1738. if o.AwardType != nil {
  1739. ret.AwardType = new(AwardType)
  1740. *ret.AwardType = *o.AwardType
  1741. }
  1742. return &ret
  1743. }
  1744. // ListActivitiesResponse
  1745. type ListActivitiesResponse struct {
  1746. // 支付有礼活动列表
  1747. Data []ActivityInformation `json:"data,omitempty"`
  1748. // 总数
  1749. TotalCount *int64 `json:"total_count,omitempty"`
  1750. // 分页页码
  1751. Offset *int64 `json:"offset,omitempty"`
  1752. // 分页大小
  1753. Limit *int64 `json:"limit,omitempty"`
  1754. }
  1755. func (o ListActivitiesResponse) MarshalJSON() ([]byte, error) {
  1756. toSerialize := map[string]interface{}{}
  1757. if o.Data != nil {
  1758. toSerialize["data"] = o.Data
  1759. }
  1760. if o.TotalCount != nil {
  1761. toSerialize["total_count"] = o.TotalCount
  1762. }
  1763. if o.Offset != nil {
  1764. toSerialize["offset"] = o.Offset
  1765. }
  1766. if o.Limit != nil {
  1767. toSerialize["limit"] = o.Limit
  1768. }
  1769. return json.Marshal(toSerialize)
  1770. }
  1771. func (o ListActivitiesResponse) String() string {
  1772. var ret string
  1773. ret += fmt.Sprintf("Data:%v, ", o.Data)
  1774. if o.TotalCount == nil {
  1775. ret += "TotalCount:<nil>, "
  1776. } else {
  1777. ret += fmt.Sprintf("TotalCount:%v, ", *o.TotalCount)
  1778. }
  1779. if o.Offset == nil {
  1780. ret += "Offset:<nil>, "
  1781. } else {
  1782. ret += fmt.Sprintf("Offset:%v, ", *o.Offset)
  1783. }
  1784. if o.Limit == nil {
  1785. ret += "Limit:<nil>"
  1786. } else {
  1787. ret += fmt.Sprintf("Limit:%v", *o.Limit)
  1788. }
  1789. return fmt.Sprintf("ListActivitiesResponse{%s}", ret)
  1790. }
  1791. func (o ListActivitiesResponse) Clone() *ListActivitiesResponse {
  1792. ret := ListActivitiesResponse{}
  1793. if o.Data != nil {
  1794. ret.Data = make([]ActivityInformation, len(o.Data))
  1795. for i, item := range o.Data {
  1796. ret.Data[i] = *item.Clone()
  1797. }
  1798. }
  1799. if o.TotalCount != nil {
  1800. ret.TotalCount = new(int64)
  1801. *ret.TotalCount = *o.TotalCount
  1802. }
  1803. if o.Offset != nil {
  1804. ret.Offset = new(int64)
  1805. *ret.Offset = *o.Offset
  1806. }
  1807. if o.Limit != nil {
  1808. ret.Limit = new(int64)
  1809. *ret.Limit = *o.Limit
  1810. }
  1811. return &ret
  1812. }
  1813. // ListActivityMerchantRequest
  1814. type ListActivityMerchantRequest struct {
  1815. // 活动Id
  1816. ActivityId *string `json:"activity_id"`
  1817. // 分页页码
  1818. Offset *int64 `json:"offset,omitempty"`
  1819. // 限制分页最大数据条目
  1820. Limit *int64 `json:"limit,omitempty"`
  1821. }
  1822. func (o ListActivityMerchantRequest) MarshalJSON() ([]byte, error) {
  1823. toSerialize := map[string]interface{}{}
  1824. if o.ActivityId == nil {
  1825. return nil, fmt.Errorf("field `ActivityId` is required and must be specified in ListActivityMerchantRequest")
  1826. }
  1827. toSerialize["activity_id"] = o.ActivityId
  1828. if o.Offset != nil {
  1829. toSerialize["offset"] = o.Offset
  1830. }
  1831. if o.Limit != nil {
  1832. toSerialize["limit"] = o.Limit
  1833. }
  1834. return json.Marshal(toSerialize)
  1835. }
  1836. func (o ListActivityMerchantRequest) String() string {
  1837. var ret string
  1838. if o.ActivityId == nil {
  1839. ret += "ActivityId:<nil>, "
  1840. } else {
  1841. ret += fmt.Sprintf("ActivityId:%v, ", *o.ActivityId)
  1842. }
  1843. if o.Offset == nil {
  1844. ret += "Offset:<nil>, "
  1845. } else {
  1846. ret += fmt.Sprintf("Offset:%v, ", *o.Offset)
  1847. }
  1848. if o.Limit == nil {
  1849. ret += "Limit:<nil>"
  1850. } else {
  1851. ret += fmt.Sprintf("Limit:%v", *o.Limit)
  1852. }
  1853. return fmt.Sprintf("ListActivityMerchantRequest{%s}", ret)
  1854. }
  1855. func (o ListActivityMerchantRequest) Clone() *ListActivityMerchantRequest {
  1856. ret := ListActivityMerchantRequest{}
  1857. if o.ActivityId != nil {
  1858. ret.ActivityId = new(string)
  1859. *ret.ActivityId = *o.ActivityId
  1860. }
  1861. if o.Offset != nil {
  1862. ret.Offset = new(int64)
  1863. *ret.Offset = *o.Offset
  1864. }
  1865. if o.Limit != nil {
  1866. ret.Limit = new(int64)
  1867. *ret.Limit = *o.Limit
  1868. }
  1869. return &ret
  1870. }
  1871. // ListActivitySkuRequest
  1872. type ListActivitySkuRequest struct {
  1873. // 活动Id
  1874. ActivityId *string `json:"activity_id"`
  1875. // 分页页码
  1876. Offset *int64 `json:"offset,omitempty"`
  1877. // 分页大小
  1878. Limit *int64 `json:"limit,omitempty"`
  1879. }
  1880. func (o ListActivitySkuRequest) MarshalJSON() ([]byte, error) {
  1881. toSerialize := map[string]interface{}{}
  1882. if o.ActivityId == nil {
  1883. return nil, fmt.Errorf("field `ActivityId` is required and must be specified in ListActivitySkuRequest")
  1884. }
  1885. toSerialize["activity_id"] = o.ActivityId
  1886. if o.Offset != nil {
  1887. toSerialize["offset"] = o.Offset
  1888. }
  1889. if o.Limit != nil {
  1890. toSerialize["limit"] = o.Limit
  1891. }
  1892. return json.Marshal(toSerialize)
  1893. }
  1894. func (o ListActivitySkuRequest) String() string {
  1895. var ret string
  1896. if o.ActivityId == nil {
  1897. ret += "ActivityId:<nil>, "
  1898. } else {
  1899. ret += fmt.Sprintf("ActivityId:%v, ", *o.ActivityId)
  1900. }
  1901. if o.Offset == nil {
  1902. ret += "Offset:<nil>, "
  1903. } else {
  1904. ret += fmt.Sprintf("Offset:%v, ", *o.Offset)
  1905. }
  1906. if o.Limit == nil {
  1907. ret += "Limit:<nil>"
  1908. } else {
  1909. ret += fmt.Sprintf("Limit:%v", *o.Limit)
  1910. }
  1911. return fmt.Sprintf("ListActivitySkuRequest{%s}", ret)
  1912. }
  1913. func (o ListActivitySkuRequest) Clone() *ListActivitySkuRequest {
  1914. ret := ListActivitySkuRequest{}
  1915. if o.ActivityId != nil {
  1916. ret.ActivityId = new(string)
  1917. *ret.ActivityId = *o.ActivityId
  1918. }
  1919. if o.Offset != nil {
  1920. ret.Offset = new(int64)
  1921. *ret.Offset = *o.Offset
  1922. }
  1923. if o.Limit != nil {
  1924. ret.Limit = new(int64)
  1925. *ret.Limit = *o.Limit
  1926. }
  1927. return &ret
  1928. }
  1929. // OpActScene
  1930. type OpActScene string
  1931. func (e OpActScene) Ptr() *OpActScene {
  1932. return &e
  1933. }
  1934. // Enums of OpActScene
  1935. const (
  1936. OPACTSCENE_OP_ACT_SCENE_JONIT_PLAN_CREATOR OpActScene = "OP_ACT_SCENE_JONIT_PLAN_CREATOR"
  1937. OPACTSCENE_OP_ACT_SCENE_JONIT_PLAN_AUTHORIZED_MCH OpActScene = "OP_ACT_SCENE_JONIT_PLAN_AUTHORIZED_MCH"
  1938. )
  1939. // ParticipateMchStatus
  1940. type ParticipateMchStatus string
  1941. func (e ParticipateMchStatus) Ptr() *ParticipateMchStatus {
  1942. return &e
  1943. }
  1944. // Enums of ParticipateMchStatus
  1945. const (
  1946. PARTICIPATEMCHSTATUS_PARTIC_MCH_STATUS_INVALID ParticipateMchStatus = "PARTIC_MCH_STATUS_INVALID"
  1947. PARTICIPATEMCHSTATUS_PARTIC_MCH_STATUS_VALID ParticipateMchStatus = "PARTIC_MCH_STATUS_VALID"
  1948. PARTICIPATEMCHSTATUS_PARTIC_MCH_STATUS_EXPIRE ParticipateMchStatus = "PARTIC_MCH_STATUS_EXPIRE"
  1949. )
  1950. // PaymentMethodCategory
  1951. type PaymentMethodCategory string
  1952. func (e PaymentMethodCategory) Ptr() *PaymentMethodCategory {
  1953. return &e
  1954. }
  1955. // Enums of PaymentMethodCategory
  1956. const (
  1957. PAYMENTMETHODCATEGORY_CFT PaymentMethodCategory = "CFT"
  1958. PAYMENTMETHODCATEGORY_SPECIFIC_BANK_CARD PaymentMethodCategory = "SPECIFIC_BANK_CARD"
  1959. )
  1960. // PaymentMethodInfo
  1961. type PaymentMethodInfo struct {
  1962. // 支付方式,可以指定银行卡或零钱
  1963. PaymentMethod *PaymentMethodCategory `json:"payment_method"`
  1964. // 银行简称,指定支付方式为银行卡必填,详询附录
  1965. BankAbbreviation *string `json:"bank_abbreviation,omitempty"`
  1966. }
  1967. func (o PaymentMethodInfo) MarshalJSON() ([]byte, error) {
  1968. toSerialize := map[string]interface{}{}
  1969. if o.PaymentMethod == nil {
  1970. return nil, fmt.Errorf("field `PaymentMethod` is required and must be specified in PaymentMethodInfo")
  1971. }
  1972. toSerialize["payment_method"] = o.PaymentMethod
  1973. if o.BankAbbreviation != nil {
  1974. toSerialize["bank_abbreviation"] = o.BankAbbreviation
  1975. }
  1976. return json.Marshal(toSerialize)
  1977. }
  1978. func (o PaymentMethodInfo) String() string {
  1979. var ret string
  1980. if o.PaymentMethod == nil {
  1981. ret += "PaymentMethod:<nil>, "
  1982. } else {
  1983. ret += fmt.Sprintf("PaymentMethod:%v, ", *o.PaymentMethod)
  1984. }
  1985. if o.BankAbbreviation == nil {
  1986. ret += "BankAbbreviation:<nil>"
  1987. } else {
  1988. ret += fmt.Sprintf("BankAbbreviation:%v", *o.BankAbbreviation)
  1989. }
  1990. return fmt.Sprintf("PaymentMethodInfo{%s}", ret)
  1991. }
  1992. func (o PaymentMethodInfo) Clone() *PaymentMethodInfo {
  1993. ret := PaymentMethodInfo{}
  1994. if o.PaymentMethod != nil {
  1995. ret.PaymentMethod = new(PaymentMethodCategory)
  1996. *ret.PaymentMethod = *o.PaymentMethod
  1997. }
  1998. if o.BankAbbreviation != nil {
  1999. ret.BankAbbreviation = new(string)
  2000. *ret.BankAbbreviation = *o.BankAbbreviation
  2001. }
  2002. return &ret
  2003. }
  2004. // PaymentMode
  2005. type PaymentMode struct {
  2006. // APP_SCENE:App场景;SWING_CARD:刷卡;NO_SECRET_SCENE:免密支付;MINIAPP_SCENE:小程序;FACE_PAY_SCENE:人脸支付; OTHER_SCENE:其他支付场景
  2007. PaymentSceneList []PaymentScene `json:"payment_scene_list,omitempty"`
  2008. }
  2009. func (o PaymentMode) MarshalJSON() ([]byte, error) {
  2010. toSerialize := map[string]interface{}{}
  2011. if o.PaymentSceneList != nil {
  2012. toSerialize["payment_scene_list"] = o.PaymentSceneList
  2013. }
  2014. return json.Marshal(toSerialize)
  2015. }
  2016. func (o PaymentMode) String() string {
  2017. var ret string
  2018. ret += fmt.Sprintf("PaymentSceneList:%v", o.PaymentSceneList)
  2019. return fmt.Sprintf("PaymentMode{%s}", ret)
  2020. }
  2021. func (o PaymentMode) Clone() *PaymentMode {
  2022. ret := PaymentMode{}
  2023. if o.PaymentSceneList != nil {
  2024. ret.PaymentSceneList = make([]PaymentScene, len(o.PaymentSceneList))
  2025. for i, item := range o.PaymentSceneList {
  2026. ret.PaymentSceneList[i] = item
  2027. }
  2028. }
  2029. return &ret
  2030. }
  2031. // PaymentScene
  2032. type PaymentScene string
  2033. func (e PaymentScene) Ptr() *PaymentScene {
  2034. return &e
  2035. }
  2036. // Enums of PaymentScene
  2037. const (
  2038. PAYMENTSCENE_APP_SCENE PaymentScene = "APP_SCENE"
  2039. PAYMENTSCENE_SWING_CARD_SCENE PaymentScene = "SWING_CARD_SCENE"
  2040. PAYMENTSCENE_NO_SECRET_SCENE PaymentScene = "NO_SECRET_SCENE"
  2041. PAYMENTSCENE_MINIAPP_SCENE PaymentScene = "MINIAPP_SCENE"
  2042. PAYMENTSCENE_FACE_PAY_SCENE PaymentScene = "FACE_PAY_SCENE"
  2043. PAYMENTSCENE_OTHER_SCENE PaymentScene = "OTHER_SCENE"
  2044. )
  2045. // SendContentCategory
  2046. type SendContentCategory string
  2047. func (e SendContentCategory) Ptr() *SendContentCategory {
  2048. return &e
  2049. }
  2050. // Enums of SendContentCategory
  2051. const (
  2052. SENDCONTENTCATEGORY_SINGLE_COUPON SendContentCategory = "SINGLE_COUPON"
  2053. SENDCONTENTCATEGORY_GIFT_PACKAGE SendContentCategory = "GIFT_PACKAGE"
  2054. )
  2055. // SendMerchantOption
  2056. type SendMerchantOption string
  2057. func (e SendMerchantOption) Ptr() *SendMerchantOption {
  2058. return &e
  2059. }
  2060. // Enums of SendMerchantOption
  2061. const (
  2062. SENDMERCHANTOPTION_IN_SEVICE_COUPON_MERCHANT SendMerchantOption = "IN_SEVICE_COUPON_MERCHANT"
  2063. SENDMERCHANTOPTION_MANUAL_INPUT_MERCHANT SendMerchantOption = "MANUAL_INPUT_MERCHANT"
  2064. )
  2065. // SkuInfo
  2066. type SkuInfo struct {
  2067. // 指定商品(商品sku)
  2068. GoodsId *string `json:"goods_id"`
  2069. // 创建时间
  2070. CreateTime *string `json:"create_time"`
  2071. // 更新时间
  2072. UpdateTime *string `json:"update_time"`
  2073. }
  2074. func (o SkuInfo) MarshalJSON() ([]byte, error) {
  2075. toSerialize := map[string]interface{}{}
  2076. if o.GoodsId == nil {
  2077. return nil, fmt.Errorf("field `GoodsId` is required and must be specified in SkuInfo")
  2078. }
  2079. toSerialize["goods_id"] = o.GoodsId
  2080. if o.CreateTime == nil {
  2081. return nil, fmt.Errorf("field `CreateTime` is required and must be specified in SkuInfo")
  2082. }
  2083. toSerialize["create_time"] = o.CreateTime
  2084. if o.UpdateTime == nil {
  2085. return nil, fmt.Errorf("field `UpdateTime` is required and must be specified in SkuInfo")
  2086. }
  2087. toSerialize["update_time"] = o.UpdateTime
  2088. return json.Marshal(toSerialize)
  2089. }
  2090. func (o SkuInfo) String() string {
  2091. var ret string
  2092. if o.GoodsId == nil {
  2093. ret += "GoodsId:<nil>, "
  2094. } else {
  2095. ret += fmt.Sprintf("GoodsId:%v, ", *o.GoodsId)
  2096. }
  2097. if o.CreateTime == nil {
  2098. ret += "CreateTime:<nil>, "
  2099. } else {
  2100. ret += fmt.Sprintf("CreateTime:%v, ", *o.CreateTime)
  2101. }
  2102. if o.UpdateTime == nil {
  2103. ret += "UpdateTime:<nil>"
  2104. } else {
  2105. ret += fmt.Sprintf("UpdateTime:%v", *o.UpdateTime)
  2106. }
  2107. return fmt.Sprintf("SkuInfo{%s}", ret)
  2108. }
  2109. func (o SkuInfo) Clone() *SkuInfo {
  2110. ret := SkuInfo{}
  2111. if o.GoodsId != nil {
  2112. ret.GoodsId = new(string)
  2113. *ret.GoodsId = *o.GoodsId
  2114. }
  2115. if o.CreateTime != nil {
  2116. ret.CreateTime = new(string)
  2117. *ret.CreateTime = *o.CreateTime
  2118. }
  2119. if o.UpdateTime != nil {
  2120. ret.UpdateTime = new(string)
  2121. *ret.UpdateTime = *o.UpdateTime
  2122. }
  2123. return &ret
  2124. }
  2125. // SkuStatus
  2126. type SkuStatus string
  2127. func (e SkuStatus) Ptr() *SkuStatus {
  2128. return &e
  2129. }
  2130. // Enums of SkuStatus
  2131. const (
  2132. SKUSTATUS_SKU_STATUS_INVALID SkuStatus = "SKU_STATUS_INVALID"
  2133. SKUSTATUS_SKU_STATUS_VAILD SkuStatus = "SKU_STATUS_VAILD"
  2134. SKUSTATUS_SKU_STATUS_EXPIRE SkuStatus = "SKU_STATUS_EXPIRE"
  2135. SKUSTATUS_SKU_STATUS_UNKNOWN SkuStatus = "SKU_STATUS_UNKNOWN"
  2136. )
  2137. // TerminateActResponse
  2138. type TerminateActResponse struct {
  2139. // 生效时间
  2140. TerminateTime *string `json:"terminate_time"`
  2141. // 活动Id
  2142. ActivityId *string `json:"activity_id"`
  2143. }
  2144. func (o TerminateActResponse) MarshalJSON() ([]byte, error) {
  2145. toSerialize := map[string]interface{}{}
  2146. if o.TerminateTime == nil {
  2147. return nil, fmt.Errorf("field `TerminateTime` is required and must be specified in TerminateActResponse")
  2148. }
  2149. toSerialize["terminate_time"] = o.TerminateTime
  2150. if o.ActivityId == nil {
  2151. return nil, fmt.Errorf("field `ActivityId` is required and must be specified in TerminateActResponse")
  2152. }
  2153. toSerialize["activity_id"] = o.ActivityId
  2154. return json.Marshal(toSerialize)
  2155. }
  2156. func (o TerminateActResponse) String() string {
  2157. var ret string
  2158. if o.TerminateTime == nil {
  2159. ret += "TerminateTime:<nil>, "
  2160. } else {
  2161. ret += fmt.Sprintf("TerminateTime:%v, ", *o.TerminateTime)
  2162. }
  2163. if o.ActivityId == nil {
  2164. ret += "ActivityId:<nil>"
  2165. } else {
  2166. ret += fmt.Sprintf("ActivityId:%v", *o.ActivityId)
  2167. }
  2168. return fmt.Sprintf("TerminateActResponse{%s}", ret)
  2169. }
  2170. func (o TerminateActResponse) Clone() *TerminateActResponse {
  2171. ret := TerminateActResponse{}
  2172. if o.TerminateTime != nil {
  2173. ret.TerminateTime = new(string)
  2174. *ret.TerminateTime = *o.TerminateTime
  2175. }
  2176. if o.ActivityId != nil {
  2177. ret.ActivityId = new(string)
  2178. *ret.ActivityId = *o.ActivityId
  2179. }
  2180. return &ret
  2181. }
  2182. // TerminateActivityRequest
  2183. type TerminateActivityRequest struct {
  2184. // 活动Id
  2185. ActivityId *string `json:"activity_id"`
  2186. }
  2187. func (o TerminateActivityRequest) MarshalJSON() ([]byte, error) {
  2188. toSerialize := map[string]interface{}{}
  2189. if o.ActivityId == nil {
  2190. return nil, fmt.Errorf("field `ActivityId` is required and must be specified in TerminateActivityRequest")
  2191. }
  2192. toSerialize["activity_id"] = o.ActivityId
  2193. return json.Marshal(toSerialize)
  2194. }
  2195. func (o TerminateActivityRequest) String() string {
  2196. var ret string
  2197. if o.ActivityId == nil {
  2198. ret += "ActivityId:<nil>"
  2199. } else {
  2200. ret += fmt.Sprintf("ActivityId:%v", *o.ActivityId)
  2201. }
  2202. return fmt.Sprintf("TerminateActivityRequest{%s}", ret)
  2203. }
  2204. func (o TerminateActivityRequest) Clone() *TerminateActivityRequest {
  2205. ret := TerminateActivityRequest{}
  2206. if o.ActivityId != nil {
  2207. ret.ActivityId = new(string)
  2208. *ret.ActivityId = *o.ActivityId
  2209. }
  2210. return &ret
  2211. }
  2212. // ThresholdCategory
  2213. type ThresholdCategory string
  2214. func (e ThresholdCategory) Ptr() *ThresholdCategory {
  2215. return &e
  2216. }
  2217. // Enums of ThresholdCategory
  2218. const (
  2219. THRESHOLDCATEGORY_AMOUNT_THRESHOLD ThresholdCategory = "AMOUNT_THRESHOLD"
  2220. THRESHOLDCATEGORY_NUMBER_THRESHOLD ThresholdCategory = "NUMBER_THRESHOLD"
  2221. )