models.go 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440
  1. // Copyright 2021 Tencent Inc. All rights reserved.
  2. //
  3. // 点金计划对外API
  4. //
  5. // 特约商户点金计划管理API
  6. //
  7. // API version: 0.3.3
  8. // Code generated by WechatPay APIv3 Generator based on [OpenAPI Generator](https://openapi-generator.tech); DO NOT EDIT.
  9. package goldplan
  10. import (
  11. "encoding/json"
  12. "fmt"
  13. )
  14. // ChangeCustomPageStatusRequest
  15. type ChangeCustomPageStatusRequest struct {
  16. // 开通或关闭“商家自定义小票”的特约商户商户号,由微信支付生成并下发。
  17. SubMchid *string `json:"sub_mchid"`
  18. // 开通或关闭“商家自定义小票”的动作,枚举值: OPEN:表示开通 CLOSE:表示关闭
  19. OperationType *OperationType `json:"operation_type"`
  20. }
  21. func (o ChangeCustomPageStatusRequest) MarshalJSON() ([]byte, error) {
  22. toSerialize := map[string]interface{}{}
  23. if o.SubMchid == nil {
  24. return nil, fmt.Errorf("field `SubMchid` is required and must be specified in ChangeCustomPageStatusRequest")
  25. }
  26. toSerialize["sub_mchid"] = o.SubMchid
  27. if o.OperationType == nil {
  28. return nil, fmt.Errorf("field `OperationType` is required and must be specified in ChangeCustomPageStatusRequest")
  29. }
  30. toSerialize["operation_type"] = o.OperationType
  31. return json.Marshal(toSerialize)
  32. }
  33. func (o ChangeCustomPageStatusRequest) String() string {
  34. var ret string
  35. if o.SubMchid == nil {
  36. ret += "SubMchid:<nil>, "
  37. } else {
  38. ret += fmt.Sprintf("SubMchid:%v, ", *o.SubMchid)
  39. }
  40. if o.OperationType == nil {
  41. ret += "OperationType:<nil>"
  42. } else {
  43. ret += fmt.Sprintf("OperationType:%v", *o.OperationType)
  44. }
  45. return fmt.Sprintf("ChangeCustomPageStatusRequest{%s}", ret)
  46. }
  47. func (o ChangeCustomPageStatusRequest) Clone() *ChangeCustomPageStatusRequest {
  48. ret := ChangeCustomPageStatusRequest{}
  49. if o.SubMchid != nil {
  50. ret.SubMchid = new(string)
  51. *ret.SubMchid = *o.SubMchid
  52. }
  53. if o.OperationType != nil {
  54. ret.OperationType = new(OperationType)
  55. *ret.OperationType = *o.OperationType
  56. }
  57. return &ret
  58. }
  59. // ChangeCustomPageStatusResponse
  60. type ChangeCustomPageStatusResponse struct {
  61. // 开通或关闭“商家自定义小票”的特约商户商户号,由微信支付生成并下发。
  62. SubMchid *string `json:"sub_mchid"`
  63. }
  64. func (o ChangeCustomPageStatusResponse) MarshalJSON() ([]byte, error) {
  65. toSerialize := map[string]interface{}{}
  66. if o.SubMchid == nil {
  67. return nil, fmt.Errorf("field `SubMchid` is required and must be specified in ChangeCustomPageStatusResponse")
  68. }
  69. toSerialize["sub_mchid"] = o.SubMchid
  70. return json.Marshal(toSerialize)
  71. }
  72. func (o ChangeCustomPageStatusResponse) String() string {
  73. var ret string
  74. if o.SubMchid == nil {
  75. ret += "SubMchid:<nil>"
  76. } else {
  77. ret += fmt.Sprintf("SubMchid:%v", *o.SubMchid)
  78. }
  79. return fmt.Sprintf("ChangeCustomPageStatusResponse{%s}", ret)
  80. }
  81. func (o ChangeCustomPageStatusResponse) Clone() *ChangeCustomPageStatusResponse {
  82. ret := ChangeCustomPageStatusResponse{}
  83. if o.SubMchid != nil {
  84. ret.SubMchid = new(string)
  85. *ret.SubMchid = *o.SubMchid
  86. }
  87. return &ret
  88. }
  89. // ChangeGoldPlanStatusRequest
  90. type ChangeGoldPlanStatusRequest struct {
  91. // 开通或关闭点金计划的特约商户商户号,由微信支付生成并下发。
  92. SubMchid *string `json:"sub_mchid"`
  93. // 开通或关闭点金计划的动作,枚举值: OPEN:表示开通点金计划 CLOSE:表示关闭点金计划
  94. OperationType *OperationType `json:"operation_type"`
  95. // 支付场景,指定开通点金计划的支付场景。如果未指定,则默认全部打开
  96. OperationPayScene *OperationPayScene `json:"operation_pay_scene,omitempty"`
  97. }
  98. func (o ChangeGoldPlanStatusRequest) MarshalJSON() ([]byte, error) {
  99. toSerialize := map[string]interface{}{}
  100. if o.SubMchid == nil {
  101. return nil, fmt.Errorf("field `SubMchid` is required and must be specified in ChangeGoldPlanStatusRequest")
  102. }
  103. toSerialize["sub_mchid"] = o.SubMchid
  104. if o.OperationType == nil {
  105. return nil, fmt.Errorf("field `OperationType` is required and must be specified in ChangeGoldPlanStatusRequest")
  106. }
  107. toSerialize["operation_type"] = o.OperationType
  108. if o.OperationPayScene != nil {
  109. toSerialize["operation_pay_scene"] = o.OperationPayScene
  110. }
  111. return json.Marshal(toSerialize)
  112. }
  113. func (o ChangeGoldPlanStatusRequest) String() string {
  114. var ret string
  115. if o.SubMchid == nil {
  116. ret += "SubMchid:<nil>, "
  117. } else {
  118. ret += fmt.Sprintf("SubMchid:%v, ", *o.SubMchid)
  119. }
  120. if o.OperationType == nil {
  121. ret += "OperationType:<nil>, "
  122. } else {
  123. ret += fmt.Sprintf("OperationType:%v, ", *o.OperationType)
  124. }
  125. if o.OperationPayScene == nil {
  126. ret += "OperationPayScene:<nil>"
  127. } else {
  128. ret += fmt.Sprintf("OperationPayScene:%v", *o.OperationPayScene)
  129. }
  130. return fmt.Sprintf("ChangeGoldPlanStatusRequest{%s}", ret)
  131. }
  132. func (o ChangeGoldPlanStatusRequest) Clone() *ChangeGoldPlanStatusRequest {
  133. ret := ChangeGoldPlanStatusRequest{}
  134. if o.SubMchid != nil {
  135. ret.SubMchid = new(string)
  136. *ret.SubMchid = *o.SubMchid
  137. }
  138. if o.OperationType != nil {
  139. ret.OperationType = new(OperationType)
  140. *ret.OperationType = *o.OperationType
  141. }
  142. if o.OperationPayScene != nil {
  143. ret.OperationPayScene = new(OperationPayScene)
  144. *ret.OperationPayScene = *o.OperationPayScene
  145. }
  146. return &ret
  147. }
  148. // ChangeGoldPlanStatusResponse
  149. type ChangeGoldPlanStatusResponse struct {
  150. // 开通或关闭“商家自定义小票”的特约商户商户号,由微信支付生成并下发。
  151. SubMchid *string `json:"sub_mchid"`
  152. }
  153. func (o ChangeGoldPlanStatusResponse) MarshalJSON() ([]byte, error) {
  154. toSerialize := map[string]interface{}{}
  155. if o.SubMchid == nil {
  156. return nil, fmt.Errorf("field `SubMchid` is required and must be specified in ChangeGoldPlanStatusResponse")
  157. }
  158. toSerialize["sub_mchid"] = o.SubMchid
  159. return json.Marshal(toSerialize)
  160. }
  161. func (o ChangeGoldPlanStatusResponse) String() string {
  162. var ret string
  163. if o.SubMchid == nil {
  164. ret += "SubMchid:<nil>"
  165. } else {
  166. ret += fmt.Sprintf("SubMchid:%v", *o.SubMchid)
  167. }
  168. return fmt.Sprintf("ChangeGoldPlanStatusResponse{%s}", ret)
  169. }
  170. func (o ChangeGoldPlanStatusResponse) Clone() *ChangeGoldPlanStatusResponse {
  171. ret := ChangeGoldPlanStatusResponse{}
  172. if o.SubMchid != nil {
  173. ret.SubMchid = new(string)
  174. *ret.SubMchid = *o.SubMchid
  175. }
  176. return &ret
  177. }
  178. // CloseAdvertisingShowRequest
  179. type CloseAdvertisingShowRequest struct {
  180. // 需要关闭广告展示的特约商户号,由微信支付生成并下发。
  181. SubMchid *string `json:"sub_mchid"`
  182. }
  183. func (o CloseAdvertisingShowRequest) MarshalJSON() ([]byte, error) {
  184. toSerialize := map[string]interface{}{}
  185. if o.SubMchid == nil {
  186. return nil, fmt.Errorf("field `SubMchid` is required and must be specified in CloseAdvertisingShowRequest")
  187. }
  188. toSerialize["sub_mchid"] = o.SubMchid
  189. return json.Marshal(toSerialize)
  190. }
  191. func (o CloseAdvertisingShowRequest) String() string {
  192. var ret string
  193. if o.SubMchid == nil {
  194. ret += "SubMchid:<nil>"
  195. } else {
  196. ret += fmt.Sprintf("SubMchid:%v", *o.SubMchid)
  197. }
  198. return fmt.Sprintf("CloseAdvertisingShowRequest{%s}", ret)
  199. }
  200. func (o CloseAdvertisingShowRequest) Clone() *CloseAdvertisingShowRequest {
  201. ret := CloseAdvertisingShowRequest{}
  202. if o.SubMchid != nil {
  203. ret.SubMchid = new(string)
  204. *ret.SubMchid = *o.SubMchid
  205. }
  206. return &ret
  207. }
  208. // IndustryType 同业过滤标签枚举值
  209. type IndustryType string
  210. func (e IndustryType) Ptr() *IndustryType {
  211. return &e
  212. }
  213. // Enums of IndustryType
  214. const (
  215. INDUSTRYTYPE_E_COMMERCE IndustryType = "E_COMMERCE"
  216. INDUSTRYTYPE_LOVE_MARRIAGE IndustryType = "LOVE_MARRIAGE"
  217. INDUSTRYTYPE_POTOGRAPHY IndustryType = "POTOGRAPHY"
  218. INDUSTRYTYPE_EDUCATION IndustryType = "EDUCATION"
  219. INDUSTRYTYPE_FINANCE IndustryType = "FINANCE"
  220. INDUSTRYTYPE_TOURISM IndustryType = "TOURISM"
  221. INDUSTRYTYPE_SKINCARE IndustryType = "SKINCARE"
  222. INDUSTRYTYPE_FOOD IndustryType = "FOOD"
  223. INDUSTRYTYPE_SPORT IndustryType = "SPORT"
  224. INDUSTRYTYPE_JEWELRY_WATCH IndustryType = "JEWELRY_WATCH"
  225. INDUSTRYTYPE_HEALTHCARE IndustryType = "HEALTHCARE"
  226. INDUSTRYTYPE_BUSSINESS IndustryType = "BUSSINESS"
  227. INDUSTRYTYPE_PARENTING IndustryType = "PARENTING"
  228. INDUSTRYTYPE_CATERING IndustryType = "CATERING"
  229. INDUSTRYTYPE_RETAIL IndustryType = "RETAIL"
  230. INDUSTRYTYPE_SERVICES IndustryType = "SERVICES"
  231. INDUSTRYTYPE_LAW IndustryType = "LAW"
  232. INDUSTRYTYPE_ESTATE IndustryType = "ESTATE"
  233. INDUSTRYTYPE_TRANSPORTATION IndustryType = "TRANSPORTATION"
  234. INDUSTRYTYPE_ENERGY_SAVING IndustryType = "ENERGY_SAVING"
  235. INDUSTRYTYPE_SECURITY IndustryType = "SECURITY"
  236. INDUSTRYTYPE_BUILDING_MATERIAL IndustryType = "BUILDING_MATERIAL"
  237. INDUSTRYTYPE_COMMUNICATION IndustryType = "COMMUNICATION"
  238. INDUSTRYTYPE_MERCHANDISE IndustryType = "MERCHANDISE"
  239. INDUSTRYTYPE_ASSOCIATION IndustryType = "ASSOCIATION"
  240. INDUSTRYTYPE_COMMUNITY IndustryType = "COMMUNITY"
  241. INDUSTRYTYPE_ONLINE_AVR IndustryType = "ONLINE_AVR"
  242. INDUSTRYTYPE_WE_MEDIA IndustryType = "WE_MEDIA"
  243. INDUSTRYTYPE_CAR IndustryType = "CAR"
  244. INDUSTRYTYPE_SOFTWARE IndustryType = "SOFTWARE"
  245. INDUSTRYTYPE_GAME IndustryType = "GAME"
  246. INDUSTRYTYPE_CLOTHING IndustryType = "CLOTHING"
  247. INDUSTRYTYPE_INDUSTY IndustryType = "INDUSTY"
  248. INDUSTRYTYPE_AGRICULTURE IndustryType = "AGRICULTURE"
  249. INDUSTRYTYPE_PUBLISHING_MEDIA IndustryType = "PUBLISHING_MEDIA"
  250. INDUSTRYTYPE_HOME_DIGITAL IndustryType = "HOME_DIGITAL"
  251. )
  252. // OpenAdvertisingShowRequest
  253. type OpenAdvertisingShowRequest struct {
  254. // 需要开通广告展示的特约商户号,由微信支付生成并下发。
  255. SubMchid *string `json:"sub_mchid"`
  256. // 特约商户同业过滤的同业过滤标签值。如已设置同业过滤标签,再次请求传入,视为新增,将覆盖原有同业标签配置
  257. AdvertisingIndustryFilters []IndustryType `json:"advertising_industry_filters,omitempty"`
  258. }
  259. func (o OpenAdvertisingShowRequest) MarshalJSON() ([]byte, error) {
  260. toSerialize := map[string]interface{}{}
  261. if o.SubMchid == nil {
  262. return nil, fmt.Errorf("field `SubMchid` is required and must be specified in OpenAdvertisingShowRequest")
  263. }
  264. toSerialize["sub_mchid"] = o.SubMchid
  265. if o.AdvertisingIndustryFilters != nil {
  266. toSerialize["advertising_industry_filters"] = o.AdvertisingIndustryFilters
  267. }
  268. return json.Marshal(toSerialize)
  269. }
  270. func (o OpenAdvertisingShowRequest) String() string {
  271. var ret string
  272. if o.SubMchid == nil {
  273. ret += "SubMchid:<nil>, "
  274. } else {
  275. ret += fmt.Sprintf("SubMchid:%v, ", *o.SubMchid)
  276. }
  277. ret += fmt.Sprintf("AdvertisingIndustryFilters:%v", o.AdvertisingIndustryFilters)
  278. return fmt.Sprintf("OpenAdvertisingShowRequest{%s}", ret)
  279. }
  280. func (o OpenAdvertisingShowRequest) Clone() *OpenAdvertisingShowRequest {
  281. ret := OpenAdvertisingShowRequest{}
  282. if o.SubMchid != nil {
  283. ret.SubMchid = new(string)
  284. *ret.SubMchid = *o.SubMchid
  285. }
  286. if o.AdvertisingIndustryFilters != nil {
  287. ret.AdvertisingIndustryFilters = make([]IndustryType, len(o.AdvertisingIndustryFilters))
  288. for i, item := range o.AdvertisingIndustryFilters {
  289. ret.AdvertisingIndustryFilters[i] = item
  290. }
  291. }
  292. return &ret
  293. }
  294. // OperationPayScene
  295. type OperationPayScene string
  296. func (e OperationPayScene) Ptr() *OperationPayScene {
  297. return &e
  298. }
  299. // Enums of OperationPayScene
  300. const (
  301. OPERATIONPAYSCENE_JSAPI_AND_MINIPROGRAM OperationPayScene = "JSAPI_AND_MINIPROGRAM"
  302. OPERATIONPAYSCENE_JSAPI OperationPayScene = "JSAPI"
  303. OPERATIONPAYSCENE_MINIPROGRAM OperationPayScene = "MINIPROGRAM"
  304. )
  305. // OperationType
  306. type OperationType string
  307. func (e OperationType) Ptr() *OperationType {
  308. return &e
  309. }
  310. // Enums of OperationType
  311. const (
  312. OPERATIONTYPE_OPEN OperationType = "OPEN"
  313. OPERATIONTYPE_CLOSE OperationType = "CLOSE"
  314. )
  315. // SetAdvertisingIndustryFilterRequest
  316. type SetAdvertisingIndustryFilterRequest struct {
  317. // 需要设置“同业过滤标签”的特约商户号,由微信支付生成并下发。
  318. SubMchid *string `json:"sub_mchid"`
  319. // 特约商户同业过滤的同业过滤标签值,同业过滤标签最少传一个,最多三个。如已设置同业过滤标签,再次请求传入,视为新增,将覆盖原有同业标签配置。 注:若配置完成后需清空标签的,可登陆商户平台手动清空(路径:商户平台->服务商功能->点金计划->特约商户管理->同业过滤标签)
  320. AdvertisingIndustryFilters []IndustryType `json:"advertising_industry_filters"`
  321. }
  322. func (o SetAdvertisingIndustryFilterRequest) MarshalJSON() ([]byte, error) {
  323. toSerialize := map[string]interface{}{}
  324. if o.SubMchid == nil {
  325. return nil, fmt.Errorf("field `SubMchid` is required and must be specified in SetAdvertisingIndustryFilterRequest")
  326. }
  327. toSerialize["sub_mchid"] = o.SubMchid
  328. if o.AdvertisingIndustryFilters == nil {
  329. return nil, fmt.Errorf("field `AdvertisingIndustryFilters` is required and must be specified in SetAdvertisingIndustryFilterRequest")
  330. }
  331. toSerialize["advertising_industry_filters"] = o.AdvertisingIndustryFilters
  332. return json.Marshal(toSerialize)
  333. }
  334. func (o SetAdvertisingIndustryFilterRequest) String() string {
  335. var ret string
  336. if o.SubMchid == nil {
  337. ret += "SubMchid:<nil>, "
  338. } else {
  339. ret += fmt.Sprintf("SubMchid:%v, ", *o.SubMchid)
  340. }
  341. ret += fmt.Sprintf("AdvertisingIndustryFilters:%v", o.AdvertisingIndustryFilters)
  342. return fmt.Sprintf("SetAdvertisingIndustryFilterRequest{%s}", ret)
  343. }
  344. func (o SetAdvertisingIndustryFilterRequest) Clone() *SetAdvertisingIndustryFilterRequest {
  345. ret := SetAdvertisingIndustryFilterRequest{}
  346. if o.SubMchid != nil {
  347. ret.SubMchid = new(string)
  348. *ret.SubMchid = *o.SubMchid
  349. }
  350. if o.AdvertisingIndustryFilters != nil {
  351. ret.AdvertisingIndustryFilters = make([]IndustryType, len(o.AdvertisingIndustryFilters))
  352. for i, item := range o.AdvertisingIndustryFilters {
  353. ret.AdvertisingIndustryFilters[i] = item
  354. }
  355. }
  356. return &ret
  357. }