models.go 50 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622
  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.0.2
  8. // Code generated by WechatPay APIv3 Generator based on [OpenAPI Generator](https://openapi-generator.tech); DO NOT EDIT.
  9. package partnertransferbatch
  10. import (
  11. "encoding/json"
  12. "fmt"
  13. "time"
  14. )
  15. // AuthType * `INFORMATION_AUTHORIZATION_TYPE` - 特约商户信息授权类型, 表示使用特约商户用户信息,出款方服务商 * `FUND_AUTHORIZATION_TYPE` - 特约商户资金授权类型, 表示使用特约商户的资金,出款方为特约商户,用户信息为服务商appid对应的openid * `INFORMATION_AND_FUND_AUTHORIZATION_TYPE` - 特约商户信息和资金授权类型, 表示使用特约商户的用户信息且出款方为特约商户
  16. type AuthType string
  17. func (e AuthType) Ptr() *AuthType {
  18. return &e
  19. }
  20. // Enums of AuthType
  21. const (
  22. AUTHTYPE_INFORMATION_AUTHORIZATION_TYPE AuthType = "INFORMATION_AUTHORIZATION_TYPE"
  23. AUTHTYPE_FUND_AUTHORIZATION_TYPE AuthType = "FUND_AUTHORIZATION_TYPE"
  24. AUTHTYPE_INFORMATION_AND_FUND_AUTHORIZATION_TYPE AuthType = "INFORMATION_AND_FUND_AUTHORIZATION_TYPE"
  25. )
  26. // CloseReasonType * `MERCHANT_REVOCATION` - 商户主动撤销, 商户主动撤销(页面方式) * `OVERDUE_CLOSE` - 系统超时关闭, 系统超时关闭,可能原因账户余额不足或其他错误
  27. type CloseReasonType string
  28. func (e CloseReasonType) Ptr() *CloseReasonType {
  29. return &e
  30. }
  31. // Enums of CloseReasonType
  32. const (
  33. CLOSEREASONTYPE_MERCHANT_REVOCATION CloseReasonType = "MERCHANT_REVOCATION"
  34. CLOSEREASONTYPE_OVERDUE_CLOSE CloseReasonType = "OVERDUE_CLOSE"
  35. )
  36. // FailReasonType * `ACCOUNT_FROZEN` - 账户冻结, 该用户账户被冻结 * `REAL_NAME_CHECK_FAIL` - 用户未实名, 收款人未实名认证,需要用户完成微信实名认证 * `NAME_NOT_CORRECT` - 用户姓名校验失败, 收款人姓名校验不通过,请核实信息 * `OPENID_INVALID` - Openid校验失败, Openid格式错误或者不属于商家公众账号 * `TRANSFER_QUOTA_EXCEED` - 超过用户单笔收款额度, 超过用户单笔收款额度,核实产品设置是否准确 * `DAY_RECEIVED_QUOTA_EXCEED` - 超过用户单日收款额度, 超过用户单日收款额度,核实产品设置是否准确 * `MONTH_RECEIVED_QUOTA_EXCEED` - 超过用户单月收款额度, 超过用户单月收款额度,核实产品设置是否准确 * `DAY_RECEIVED_COUNT_EXCEED` - 超过用户单日收款次数, 超过用户单日收款次数,核实产品设置是否准确 * `PRODUCT_AUTH_CHECK_FAIL` - 产品权限校验失败, 未开通该权限或权限被冻结,请核实产品权限状态 * `OVERDUE_CLOSE` - 转账关闭, 超过系统重试期,系统自动关闭 * `ID_CARD_NOT_CORRECT` - 用户身份证校验失败, 收款人身份证校验不通过,请核实信息 * `ACCOUNT_NOT_EXIST` - 用户账户不存在, 该用户账户不存在 * `TRANSFER_RISK` - 转账存在风险, 该笔转账可能存在风险,已被微信拦截 * `PAY_ROLL_CARD_ALREADY_LOGOUT` - 用户薪工卡已注销, 该用户的薪工卡已经注销 * `PAY_ROLL_CARD_ALREADY_FROZEN` - 用户薪工卡已冻结, 该用户的薪工卡已经被冻结 * `PAY_ROLL_CARD_UNAUTHORIZED` - 用户薪工卡未授权该商户, 该用户的薪工卡未授权该商户 * `PAY_ROLL_CARD_USER_NOT_OPEN` - 用户未开通薪工卡, 该用户没有开通薪工卡
  37. type FailReasonType string
  38. func (e FailReasonType) Ptr() *FailReasonType {
  39. return &e
  40. }
  41. // Enums of FailReasonType
  42. const (
  43. FAILREASONTYPE_ACCOUNT_FROZEN FailReasonType = "ACCOUNT_FROZEN"
  44. FAILREASONTYPE_REAL_NAME_CHECK_FAIL FailReasonType = "REAL_NAME_CHECK_FAIL"
  45. FAILREASONTYPE_NAME_NOT_CORRECT FailReasonType = "NAME_NOT_CORRECT"
  46. FAILREASONTYPE_OPENID_INVALID FailReasonType = "OPENID_INVALID"
  47. FAILREASONTYPE_TRANSFER_QUOTA_EXCEED FailReasonType = "TRANSFER_QUOTA_EXCEED"
  48. FAILREASONTYPE_DAY_RECEIVED_QUOTA_EXCEED FailReasonType = "DAY_RECEIVED_QUOTA_EXCEED"
  49. FAILREASONTYPE_MONTH_RECEIVED_QUOTA_EXCEED FailReasonType = "MONTH_RECEIVED_QUOTA_EXCEED"
  50. FAILREASONTYPE_DAY_RECEIVED_COUNT_EXCEED FailReasonType = "DAY_RECEIVED_COUNT_EXCEED"
  51. FAILREASONTYPE_PRODUCT_AUTH_CHECK_FAIL FailReasonType = "PRODUCT_AUTH_CHECK_FAIL"
  52. FAILREASONTYPE_OVERDUE_CLOSE FailReasonType = "OVERDUE_CLOSE"
  53. FAILREASONTYPE_ID_CARD_NOT_CORRECT FailReasonType = "ID_CARD_NOT_CORRECT"
  54. FAILREASONTYPE_ACCOUNT_NOT_EXIST FailReasonType = "ACCOUNT_NOT_EXIST"
  55. FAILREASONTYPE_TRANSFER_RISK FailReasonType = "TRANSFER_RISK"
  56. FAILREASONTYPE_PAY_ROLL_CARD_ALREADY_LOGOUT FailReasonType = "PAY_ROLL_CARD_ALREADY_LOGOUT"
  57. FAILREASONTYPE_PAY_ROLL_CARD_ALREADY_FROZEN FailReasonType = "PAY_ROLL_CARD_ALREADY_FROZEN"
  58. FAILREASONTYPE_PAY_ROLL_CARD_UNAUTHORIZED FailReasonType = "PAY_ROLL_CARD_UNAUTHORIZED"
  59. FAILREASONTYPE_PAY_ROLL_CARD_USER_NOT_OPEN FailReasonType = "PAY_ROLL_CARD_USER_NOT_OPEN"
  60. )
  61. // GetTransferBatchByNoRequest
  62. type GetTransferBatchByNoRequest struct {
  63. // 微信支付批次单号,微信商家转账系统返回的唯一标识
  64. BatchId *string `json:"batch_id"`
  65. // true-是;false-否,默认否。商户可选择是否查询指定状态的转账明细单,当转账批次单状态为“FINISHED”(已完成)时,才会返回满足条件的转账明细单
  66. NeedQueryDetail *bool `json:"need_query_detail"`
  67. // 该次请求资源的起始位置。返回的明细是按照设置的明细条数进行分页展示的,一次查询可能无法返回所有明细,我们使用该参数标识查询开始位置,默认值为0
  68. Offset *int64 `json:"offset,omitempty"`
  69. // 该次请求可返回的最大明细条数,最小20条,最大100条,不传则默认20条。不足20条按实际条数返回
  70. Limit *int64 `json:"limit,omitempty"`
  71. // 查询指定状态的转账明细单 ALL:全部。需要同时查询转账成功和转账失败的明细单 SUCCESS:转账成功。只查询转账成功的明细单 FAIL:转账失败。只查询转账失败的明细单
  72. DetailStatus *string `json:"detail_status,omitempty"`
  73. }
  74. func (o GetTransferBatchByNoRequest) MarshalJSON() ([]byte, error) {
  75. toSerialize := map[string]interface{}{}
  76. if o.BatchId == nil {
  77. return nil, fmt.Errorf("field `BatchId` is required and must be specified in GetTransferBatchByNoRequest")
  78. }
  79. toSerialize["batch_id"] = o.BatchId
  80. if o.NeedQueryDetail == nil {
  81. return nil, fmt.Errorf("field `NeedQueryDetail` is required and must be specified in GetTransferBatchByNoRequest")
  82. }
  83. toSerialize["need_query_detail"] = o.NeedQueryDetail
  84. if o.Offset != nil {
  85. toSerialize["offset"] = o.Offset
  86. }
  87. if o.Limit != nil {
  88. toSerialize["limit"] = o.Limit
  89. }
  90. if o.DetailStatus != nil {
  91. toSerialize["detail_status"] = o.DetailStatus
  92. }
  93. return json.Marshal(toSerialize)
  94. }
  95. func (o GetTransferBatchByNoRequest) String() string {
  96. var ret string
  97. if o.BatchId == nil {
  98. ret += "BatchId:<nil>, "
  99. } else {
  100. ret += fmt.Sprintf("BatchId:%v, ", *o.BatchId)
  101. }
  102. if o.NeedQueryDetail == nil {
  103. ret += "NeedQueryDetail:<nil>, "
  104. } else {
  105. ret += fmt.Sprintf("NeedQueryDetail:%v, ", *o.NeedQueryDetail)
  106. }
  107. if o.Offset == nil {
  108. ret += "Offset:<nil>, "
  109. } else {
  110. ret += fmt.Sprintf("Offset:%v, ", *o.Offset)
  111. }
  112. if o.Limit == nil {
  113. ret += "Limit:<nil>, "
  114. } else {
  115. ret += fmt.Sprintf("Limit:%v, ", *o.Limit)
  116. }
  117. if o.DetailStatus == nil {
  118. ret += "DetailStatus:<nil>"
  119. } else {
  120. ret += fmt.Sprintf("DetailStatus:%v", *o.DetailStatus)
  121. }
  122. return fmt.Sprintf("GetTransferBatchByNoRequest{%s}", ret)
  123. }
  124. func (o GetTransferBatchByNoRequest) Clone() *GetTransferBatchByNoRequest {
  125. ret := GetTransferBatchByNoRequest{}
  126. if o.BatchId != nil {
  127. ret.BatchId = new(string)
  128. *ret.BatchId = *o.BatchId
  129. }
  130. if o.NeedQueryDetail != nil {
  131. ret.NeedQueryDetail = new(bool)
  132. *ret.NeedQueryDetail = *o.NeedQueryDetail
  133. }
  134. if o.Offset != nil {
  135. ret.Offset = new(int64)
  136. *ret.Offset = *o.Offset
  137. }
  138. if o.Limit != nil {
  139. ret.Limit = new(int64)
  140. *ret.Limit = *o.Limit
  141. }
  142. if o.DetailStatus != nil {
  143. ret.DetailStatus = new(string)
  144. *ret.DetailStatus = *o.DetailStatus
  145. }
  146. return &ret
  147. }
  148. // GetTransferBatchByOutNoRequest
  149. type GetTransferBatchByOutNoRequest struct {
  150. // 商户系统内部的商家批次单号,在商户系统内部唯一
  151. OutBatchNo *string `json:"out_batch_no"`
  152. // true-是;false-否,默认否。商户可选择是否查询指定状态的转账明细单,当转账批次单状态为“FINISHED”(已完成)时,才会返回满足条件的转账明细单
  153. NeedQueryDetail *bool `json:"need_query_detail"`
  154. // 该次请求资源(转账明细单)的起始位置,从0开始,默认值为0
  155. Offset *int64 `json:"offset,omitempty"`
  156. // 该次请求可返回的最大资源(转账明细单)条数,最小20条,最大100条,不传则默认20条。不足20条按实际条数返回
  157. Limit *int64 `json:"limit,omitempty"`
  158. // 查询指定状态的转账明细单 ALL:全部。需要同时查询转账成功和转账失败的明细单 SUCCESS:转账成功。只查询转账成功的明细单 FAIL:转账失败。只查询转账失败的明细单
  159. DetailStatus *string `json:"detail_status,omitempty"`
  160. }
  161. func (o GetTransferBatchByOutNoRequest) MarshalJSON() ([]byte, error) {
  162. toSerialize := map[string]interface{}{}
  163. if o.OutBatchNo == nil {
  164. return nil, fmt.Errorf("field `OutBatchNo` is required and must be specified in GetTransferBatchByOutNoRequest")
  165. }
  166. toSerialize["out_batch_no"] = o.OutBatchNo
  167. if o.NeedQueryDetail == nil {
  168. return nil, fmt.Errorf("field `NeedQueryDetail` is required and must be specified in GetTransferBatchByOutNoRequest")
  169. }
  170. toSerialize["need_query_detail"] = o.NeedQueryDetail
  171. if o.Offset != nil {
  172. toSerialize["offset"] = o.Offset
  173. }
  174. if o.Limit != nil {
  175. toSerialize["limit"] = o.Limit
  176. }
  177. if o.DetailStatus != nil {
  178. toSerialize["detail_status"] = o.DetailStatus
  179. }
  180. return json.Marshal(toSerialize)
  181. }
  182. func (o GetTransferBatchByOutNoRequest) String() string {
  183. var ret string
  184. if o.OutBatchNo == nil {
  185. ret += "OutBatchNo:<nil>, "
  186. } else {
  187. ret += fmt.Sprintf("OutBatchNo:%v, ", *o.OutBatchNo)
  188. }
  189. if o.NeedQueryDetail == nil {
  190. ret += "NeedQueryDetail:<nil>, "
  191. } else {
  192. ret += fmt.Sprintf("NeedQueryDetail:%v, ", *o.NeedQueryDetail)
  193. }
  194. if o.Offset == nil {
  195. ret += "Offset:<nil>, "
  196. } else {
  197. ret += fmt.Sprintf("Offset:%v, ", *o.Offset)
  198. }
  199. if o.Limit == nil {
  200. ret += "Limit:<nil>, "
  201. } else {
  202. ret += fmt.Sprintf("Limit:%v, ", *o.Limit)
  203. }
  204. if o.DetailStatus == nil {
  205. ret += "DetailStatus:<nil>"
  206. } else {
  207. ret += fmt.Sprintf("DetailStatus:%v", *o.DetailStatus)
  208. }
  209. return fmt.Sprintf("GetTransferBatchByOutNoRequest{%s}", ret)
  210. }
  211. func (o GetTransferBatchByOutNoRequest) Clone() *GetTransferBatchByOutNoRequest {
  212. ret := GetTransferBatchByOutNoRequest{}
  213. if o.OutBatchNo != nil {
  214. ret.OutBatchNo = new(string)
  215. *ret.OutBatchNo = *o.OutBatchNo
  216. }
  217. if o.NeedQueryDetail != nil {
  218. ret.NeedQueryDetail = new(bool)
  219. *ret.NeedQueryDetail = *o.NeedQueryDetail
  220. }
  221. if o.Offset != nil {
  222. ret.Offset = new(int64)
  223. *ret.Offset = *o.Offset
  224. }
  225. if o.Limit != nil {
  226. ret.Limit = new(int64)
  227. *ret.Limit = *o.Limit
  228. }
  229. if o.DetailStatus != nil {
  230. ret.DetailStatus = new(string)
  231. *ret.DetailStatus = *o.DetailStatus
  232. }
  233. return &ret
  234. }
  235. // GetTransferDetailByNoRequest
  236. type GetTransferDetailByNoRequest struct {
  237. // 微信支付批次单号,微信商家转账系统返回的唯一标识
  238. BatchId *string `json:"batch_id"`
  239. // 微信支付系统内部区分转账批次单下不同转账明细单的唯一标识
  240. DetailId *string `json:"detail_id"`
  241. }
  242. func (o GetTransferDetailByNoRequest) MarshalJSON() ([]byte, error) {
  243. toSerialize := map[string]interface{}{}
  244. if o.BatchId == nil {
  245. return nil, fmt.Errorf("field `BatchId` is required and must be specified in GetTransferDetailByNoRequest")
  246. }
  247. toSerialize["batch_id"] = o.BatchId
  248. if o.DetailId == nil {
  249. return nil, fmt.Errorf("field `DetailId` is required and must be specified in GetTransferDetailByNoRequest")
  250. }
  251. toSerialize["detail_id"] = o.DetailId
  252. return json.Marshal(toSerialize)
  253. }
  254. func (o GetTransferDetailByNoRequest) String() string {
  255. var ret string
  256. if o.BatchId == nil {
  257. ret += "BatchId:<nil>, "
  258. } else {
  259. ret += fmt.Sprintf("BatchId:%v, ", *o.BatchId)
  260. }
  261. if o.DetailId == nil {
  262. ret += "DetailId:<nil>"
  263. } else {
  264. ret += fmt.Sprintf("DetailId:%v", *o.DetailId)
  265. }
  266. return fmt.Sprintf("GetTransferDetailByNoRequest{%s}", ret)
  267. }
  268. func (o GetTransferDetailByNoRequest) Clone() *GetTransferDetailByNoRequest {
  269. ret := GetTransferDetailByNoRequest{}
  270. if o.BatchId != nil {
  271. ret.BatchId = new(string)
  272. *ret.BatchId = *o.BatchId
  273. }
  274. if o.DetailId != nil {
  275. ret.DetailId = new(string)
  276. *ret.DetailId = *o.DetailId
  277. }
  278. return &ret
  279. }
  280. // GetTransferDetailByOutNoRequest
  281. type GetTransferDetailByOutNoRequest struct {
  282. // 商户系统内部的商家批次单号,在商户系统内部唯一
  283. OutBatchNo *string `json:"out_batch_no"`
  284. // 商户系统内部区分转账批次单下不同转账明细单的唯一标识
  285. OutDetailNo *string `json:"out_detail_no"`
  286. }
  287. func (o GetTransferDetailByOutNoRequest) MarshalJSON() ([]byte, error) {
  288. toSerialize := map[string]interface{}{}
  289. if o.OutBatchNo == nil {
  290. return nil, fmt.Errorf("field `OutBatchNo` is required and must be specified in GetTransferDetailByOutNoRequest")
  291. }
  292. toSerialize["out_batch_no"] = o.OutBatchNo
  293. if o.OutDetailNo == nil {
  294. return nil, fmt.Errorf("field `OutDetailNo` is required and must be specified in GetTransferDetailByOutNoRequest")
  295. }
  296. toSerialize["out_detail_no"] = o.OutDetailNo
  297. return json.Marshal(toSerialize)
  298. }
  299. func (o GetTransferDetailByOutNoRequest) String() string {
  300. var ret string
  301. if o.OutBatchNo == nil {
  302. ret += "OutBatchNo:<nil>, "
  303. } else {
  304. ret += fmt.Sprintf("OutBatchNo:%v, ", *o.OutBatchNo)
  305. }
  306. if o.OutDetailNo == nil {
  307. ret += "OutDetailNo:<nil>"
  308. } else {
  309. ret += fmt.Sprintf("OutDetailNo:%v", *o.OutDetailNo)
  310. }
  311. return fmt.Sprintf("GetTransferDetailByOutNoRequest{%s}", ret)
  312. }
  313. func (o GetTransferDetailByOutNoRequest) Clone() *GetTransferDetailByOutNoRequest {
  314. ret := GetTransferDetailByOutNoRequest{}
  315. if o.OutBatchNo != nil {
  316. ret.OutBatchNo = new(string)
  317. *ret.OutBatchNo = *o.OutBatchNo
  318. }
  319. if o.OutDetailNo != nil {
  320. ret.OutDetailNo = new(string)
  321. *ret.OutDetailNo = *o.OutDetailNo
  322. }
  323. return &ret
  324. }
  325. // InitiateTransferBatchRequest
  326. type InitiateTransferBatchRequest struct {
  327. // 特约商户号
  328. SubMchid *string `json:"sub_mchid"`
  329. // 微信分配的特约商户公众账号ID,特约商户授权类型为INFORMATION_AUTHORIZATION_TYPE和INFORMATION_AND_FUND_AUTHORIZATION_TYPE时 需要填写
  330. SubAppid *string `json:"sub_appid,omitempty"`
  331. // 特约商户授权类型 * `INFORMATION_AUTHORIZATION_TYPE` - 特约商户信息授权类型 * `FUND_AUTHORIZATION_TYPE` - 特约商户资金授权类型 * `INFORMATION_AND_FUND_AUTHORIZATION_TYPE` - 特约商户信息和资金授权类型
  332. AuthorizationType *AuthType `json:"authorization_type"`
  333. // 商户系统内部的商家批次单号,在商户系统内部唯一
  334. OutBatchNo *string `json:"out_batch_no"`
  335. // 该笔批量转账的名称
  336. BatchName *string `json:"batch_name"`
  337. // 转账说明,UTF8编码,最多允许32个字符
  338. BatchRemark *string `json:"batch_remark"`
  339. // 转账金额单位为“分”。转账总金额必须与批次内所有明细转账金额之和保持一致,否则无法发起转账操作
  340. TotalAmount *int64 `json:"total_amount"`
  341. // 一个转账批次单最多发起三千笔转账。转账总笔数必须与批次内所有明细之和保持一致,否则无法发起转账操作
  342. TotalNum *int64 `json:"total_num"`
  343. // 发起批量转账的明细列表,最多三千笔
  344. TransferDetailList []TransferDetailInput `json:"transfer_detail_list,omitempty"`
  345. // 微信分配的服务商商户公众账号ID,特约商户授权类型为FUND_AUTHORIZATION_TYPE时 需要填写
  346. SpAppid *string `json:"sp_appid,omitempty"`
  347. // 批量转账用途 * `GOODSPAYMENT` - 货款 * `COMMISSION` - 佣金 * `REFUND` - 退款 * `REIMBURSEMENT` - 报销 * `FREIGHT` - 运费 * `OTHERS` - 其他
  348. TransferPurpose *TransferUseType `json:"transfer_purpose,omitempty"`
  349. // 商户的转账场景 * `ORDINARY_TRANSFER` - 普通转账 * `PAYROLL_CARD_TRANSFER` - 薪工卡转账
  350. TransferScene *TransferScene `json:"transfer_scene,omitempty"`
  351. }
  352. func (o InitiateTransferBatchRequest) MarshalJSON() ([]byte, error) {
  353. toSerialize := map[string]interface{}{}
  354. if o.SubMchid == nil {
  355. return nil, fmt.Errorf("field `SubMchid` is required and must be specified in InitiateTransferBatchRequest")
  356. }
  357. toSerialize["sub_mchid"] = o.SubMchid
  358. if o.SubAppid != nil {
  359. toSerialize["sub_appid"] = o.SubAppid
  360. }
  361. if o.AuthorizationType == nil {
  362. return nil, fmt.Errorf("field `AuthorizationType` is required and must be specified in InitiateTransferBatchRequest")
  363. }
  364. toSerialize["authorization_type"] = o.AuthorizationType
  365. if o.OutBatchNo == nil {
  366. return nil, fmt.Errorf("field `OutBatchNo` is required and must be specified in InitiateTransferBatchRequest")
  367. }
  368. toSerialize["out_batch_no"] = o.OutBatchNo
  369. if o.BatchName == nil {
  370. return nil, fmt.Errorf("field `BatchName` is required and must be specified in InitiateTransferBatchRequest")
  371. }
  372. toSerialize["batch_name"] = o.BatchName
  373. if o.BatchRemark == nil {
  374. return nil, fmt.Errorf("field `BatchRemark` is required and must be specified in InitiateTransferBatchRequest")
  375. }
  376. toSerialize["batch_remark"] = o.BatchRemark
  377. if o.TotalAmount == nil {
  378. return nil, fmt.Errorf("field `TotalAmount` is required and must be specified in InitiateTransferBatchRequest")
  379. }
  380. toSerialize["total_amount"] = o.TotalAmount
  381. if o.TotalNum == nil {
  382. return nil, fmt.Errorf("field `TotalNum` is required and must be specified in InitiateTransferBatchRequest")
  383. }
  384. toSerialize["total_num"] = o.TotalNum
  385. if o.TransferDetailList != nil {
  386. toSerialize["transfer_detail_list"] = o.TransferDetailList
  387. }
  388. if o.SpAppid != nil {
  389. toSerialize["sp_appid"] = o.SpAppid
  390. }
  391. if o.TransferPurpose != nil {
  392. toSerialize["transfer_purpose"] = o.TransferPurpose
  393. }
  394. if o.TransferScene != nil {
  395. toSerialize["transfer_scene"] = o.TransferScene
  396. }
  397. return json.Marshal(toSerialize)
  398. }
  399. func (o InitiateTransferBatchRequest) String() string {
  400. var ret string
  401. if o.SubMchid == nil {
  402. ret += "SubMchid:<nil>, "
  403. } else {
  404. ret += fmt.Sprintf("SubMchid:%v, ", *o.SubMchid)
  405. }
  406. if o.SubAppid == nil {
  407. ret += "SubAppid:<nil>, "
  408. } else {
  409. ret += fmt.Sprintf("SubAppid:%v, ", *o.SubAppid)
  410. }
  411. if o.AuthorizationType == nil {
  412. ret += "AuthorizationType:<nil>, "
  413. } else {
  414. ret += fmt.Sprintf("AuthorizationType:%v, ", *o.AuthorizationType)
  415. }
  416. if o.OutBatchNo == nil {
  417. ret += "OutBatchNo:<nil>, "
  418. } else {
  419. ret += fmt.Sprintf("OutBatchNo:%v, ", *o.OutBatchNo)
  420. }
  421. if o.BatchName == nil {
  422. ret += "BatchName:<nil>, "
  423. } else {
  424. ret += fmt.Sprintf("BatchName:%v, ", *o.BatchName)
  425. }
  426. if o.BatchRemark == nil {
  427. ret += "BatchRemark:<nil>, "
  428. } else {
  429. ret += fmt.Sprintf("BatchRemark:%v, ", *o.BatchRemark)
  430. }
  431. if o.TotalAmount == nil {
  432. ret += "TotalAmount:<nil>, "
  433. } else {
  434. ret += fmt.Sprintf("TotalAmount:%v, ", *o.TotalAmount)
  435. }
  436. if o.TotalNum == nil {
  437. ret += "TotalNum:<nil>, "
  438. } else {
  439. ret += fmt.Sprintf("TotalNum:%v, ", *o.TotalNum)
  440. }
  441. ret += fmt.Sprintf("TransferDetailList:%v, ", o.TransferDetailList)
  442. if o.SpAppid == nil {
  443. ret += "SpAppid:<nil>, "
  444. } else {
  445. ret += fmt.Sprintf("SpAppid:%v, ", *o.SpAppid)
  446. }
  447. if o.TransferPurpose == nil {
  448. ret += "TransferPurpose:<nil>, "
  449. } else {
  450. ret += fmt.Sprintf("TransferPurpose:%v, ", *o.TransferPurpose)
  451. }
  452. if o.TransferScene == nil {
  453. ret += "TransferScene:<nil>"
  454. } else {
  455. ret += fmt.Sprintf("TransferScene:%v", *o.TransferScene)
  456. }
  457. return fmt.Sprintf("InitiateTransferBatchRequest{%s}", ret)
  458. }
  459. func (o InitiateTransferBatchRequest) Clone() *InitiateTransferBatchRequest {
  460. ret := InitiateTransferBatchRequest{}
  461. if o.SubMchid != nil {
  462. ret.SubMchid = new(string)
  463. *ret.SubMchid = *o.SubMchid
  464. }
  465. if o.SubAppid != nil {
  466. ret.SubAppid = new(string)
  467. *ret.SubAppid = *o.SubAppid
  468. }
  469. if o.AuthorizationType != nil {
  470. ret.AuthorizationType = new(AuthType)
  471. *ret.AuthorizationType = *o.AuthorizationType
  472. }
  473. if o.OutBatchNo != nil {
  474. ret.OutBatchNo = new(string)
  475. *ret.OutBatchNo = *o.OutBatchNo
  476. }
  477. if o.BatchName != nil {
  478. ret.BatchName = new(string)
  479. *ret.BatchName = *o.BatchName
  480. }
  481. if o.BatchRemark != nil {
  482. ret.BatchRemark = new(string)
  483. *ret.BatchRemark = *o.BatchRemark
  484. }
  485. if o.TotalAmount != nil {
  486. ret.TotalAmount = new(int64)
  487. *ret.TotalAmount = *o.TotalAmount
  488. }
  489. if o.TotalNum != nil {
  490. ret.TotalNum = new(int64)
  491. *ret.TotalNum = *o.TotalNum
  492. }
  493. if o.TransferDetailList != nil {
  494. ret.TransferDetailList = make([]TransferDetailInput, len(o.TransferDetailList))
  495. for i, item := range o.TransferDetailList {
  496. ret.TransferDetailList[i] = *item.Clone()
  497. }
  498. }
  499. if o.SpAppid != nil {
  500. ret.SpAppid = new(string)
  501. *ret.SpAppid = *o.SpAppid
  502. }
  503. if o.TransferPurpose != nil {
  504. ret.TransferPurpose = new(TransferUseType)
  505. *ret.TransferPurpose = *o.TransferPurpose
  506. }
  507. if o.TransferScene != nil {
  508. ret.TransferScene = new(TransferScene)
  509. *ret.TransferScene = *o.TransferScene
  510. }
  511. return &ret
  512. }
  513. // InitiateTransferBatchResponse
  514. type InitiateTransferBatchResponse struct {
  515. // 商户系统内部的商家批次单号,在商户系统内部唯一
  516. OutBatchNo *string `json:"out_batch_no"`
  517. // 微信支付批次单号,微信商家转账系统返回的唯一标识
  518. BatchId *string `json:"batch_id"`
  519. // 批次受理成功时返回,按照使用rfc3339所定义的格式,格式为YYYY-MM-DDThh:mm:ss+TIMEZONE
  520. CreateTime *time.Time `json:"create_time"`
  521. }
  522. func (o InitiateTransferBatchResponse) MarshalJSON() ([]byte, error) {
  523. toSerialize := map[string]interface{}{}
  524. if o.OutBatchNo == nil {
  525. return nil, fmt.Errorf("field `OutBatchNo` is required and must be specified in InitiateTransferBatchResponse")
  526. }
  527. toSerialize["out_batch_no"] = o.OutBatchNo
  528. if o.BatchId == nil {
  529. return nil, fmt.Errorf("field `BatchId` is required and must be specified in InitiateTransferBatchResponse")
  530. }
  531. toSerialize["batch_id"] = o.BatchId
  532. if o.CreateTime == nil {
  533. return nil, fmt.Errorf("field `CreateTime` is required and must be specified in InitiateTransferBatchResponse")
  534. }
  535. toSerialize["create_time"] = o.CreateTime.Format(time.RFC3339)
  536. return json.Marshal(toSerialize)
  537. }
  538. func (o InitiateTransferBatchResponse) String() string {
  539. var ret string
  540. if o.OutBatchNo == nil {
  541. ret += "OutBatchNo:<nil>, "
  542. } else {
  543. ret += fmt.Sprintf("OutBatchNo:%v, ", *o.OutBatchNo)
  544. }
  545. if o.BatchId == nil {
  546. ret += "BatchId:<nil>, "
  547. } else {
  548. ret += fmt.Sprintf("BatchId:%v, ", *o.BatchId)
  549. }
  550. if o.CreateTime == nil {
  551. ret += "CreateTime:<nil>"
  552. } else {
  553. ret += fmt.Sprintf("CreateTime:%v", *o.CreateTime)
  554. }
  555. return fmt.Sprintf("InitiateTransferBatchResponse{%s}", ret)
  556. }
  557. func (o InitiateTransferBatchResponse) Clone() *InitiateTransferBatchResponse {
  558. ret := InitiateTransferBatchResponse{}
  559. if o.OutBatchNo != nil {
  560. ret.OutBatchNo = new(string)
  561. *ret.OutBatchNo = *o.OutBatchNo
  562. }
  563. if o.BatchId != nil {
  564. ret.BatchId = new(string)
  565. *ret.BatchId = *o.BatchId
  566. }
  567. if o.CreateTime != nil {
  568. ret.CreateTime = new(time.Time)
  569. *ret.CreateTime = *o.CreateTime
  570. }
  571. return &ret
  572. }
  573. // TransferBatchEntity
  574. type TransferBatchEntity struct {
  575. // 微信支付分配的服务商商户号
  576. SpMchid *string `json:"sp_mchid"`
  577. // 微信支付分配的特约商户号
  578. SubMchid *string `json:"sub_mchid"`
  579. // 商户系统内部的商家批次单号,在商户系统内部唯一
  580. OutBatchNo *string `json:"out_batch_no"`
  581. // 微信支付批次单号,微信商家转账系统返回的唯一标识
  582. BatchId *string `json:"batch_id"`
  583. // 微信分配的特约商户公众账号ID。特约商户appid
  584. SubAppid *string `json:"sub_appid,omitempty"`
  585. // WAIT_PAY:待付款,商户员工确认付款阶段。ACCEPTED:已受理。批次已受理成功,若发起批量转账的30分钟后,转账批次单仍处于该状态,可能原因是商户账户余额不足等。商户可查询账户资金流水,若该笔转账批次单的扣款已经发生,则表示批次已经进入转账中,请再次查单确认 PROCESSING:转账中。已开始处理批次内的转账明细单 FINISHED:已完成。批次内的所有转账明细单都已处理完成 CLOSED:已关闭。可查询具体的批次关闭原因确认
  586. BatchStatus *string `json:"batch_status"`
  587. // API:API方式发起 WEB:页面方式发起
  588. BatchType *string `json:"batch_type"`
  589. // 特约商户授权类型 * `INFORMATION_AUTHORIZATION_TYPE` - 特约商户信息授权类型 * `FUND_AUTHORIZATION_TYPE` - 特约商户资金授权类型 * `INFORMATION_AND_FUND_AUTHORIZATION_TYPE` - 特约商户信息和资金授权类型
  590. AuthorizationType *AuthType `json:"authorization_type"`
  591. // 该笔批量转账的名称
  592. BatchName *string `json:"batch_name"`
  593. // 转账说明,UTF8编码,最多允许32个字符
  594. BatchRemark *string `json:"batch_remark"`
  595. // 如果批次单状态为“CLOSED”(已关闭),则有关闭原因 * `MERCHANT_REVOCATION` - 商户主动撤销 * `OVERDUE_CLOSE` - 系统超时关闭
  596. CloseReason *CloseReasonType `json:"close_reason,omitempty"`
  597. // 转账金额单位为“分”
  598. TotalAmount *int64 `json:"total_amount"`
  599. // 一个转账批次单最多发起三千笔转账
  600. TotalNum *int64 `json:"total_num"`
  601. // 批次受理成功时返回,按照使用rfc3339所定义的格式,格式为YYYY-MM-DDThh:mm:ss+TIMEZONE
  602. CreateTime *time.Time `json:"create_time,omitempty"`
  603. // 批次最近一次状态变更的时间,按照使用rfc3339所定义的格式,格式为YYYY-MM-DDThh:mm:ss+TIMEZONE
  604. UpdateTime *time.Time `json:"update_time,omitempty"`
  605. // 转账成功的金额,单位为“分”。当批次状态为“PROCESSING”(转账中)时,转账成功金额随时可能变化
  606. SuccessAmount *int64 `json:"success_amount,omitempty"`
  607. // 转账成功的笔数。当批次状态为“PROCESSING”(转账中)时,转账成功笔数随时可能变化
  608. SuccessNum *int64 `json:"success_num,omitempty"`
  609. // 转账失败的金额,单位为“分”
  610. FailAmount *int64 `json:"fail_amount,omitempty"`
  611. // 转账失败的笔数
  612. FailNum *int64 `json:"fail_num,omitempty"`
  613. // 当批次状态为“FINISHED”(已完成),且成功查询到转账明细单时返回。包括微信明细单号、明细状态信息
  614. TransferDetailList []TransferDetailCompact `json:"transfer_detail_list,omitempty"`
  615. // 微信分配的服务商商户公众账号ID,特约商户授权类型为FUND_AUTHORIZATION_TYPE时才有该字段
  616. SpAppid *string `json:"sp_appid,omitempty"`
  617. // 批量转账用途 * `GOODSPAYMENT` - 货款 * `COMMISSION` - 佣金 * `REFUND` - 退款 * `REIMBURSEMENT` - 报销 * `FREIGHT` - 运费 * `OTHERS` - 其他
  618. TransferPurpose *TransferUseType `json:"transfer_purpose,omitempty"`
  619. // 商户的转账场景 * `ORDINARY_TRANSFER` - 普通转账 * `PAYROLL_CARD_TRANSFER` - 薪工卡转账
  620. TransferScene *TransferScene `json:"transfer_scene,omitempty"`
  621. }
  622. func (o TransferBatchEntity) MarshalJSON() ([]byte, error) {
  623. toSerialize := map[string]interface{}{}
  624. if o.SpMchid == nil {
  625. return nil, fmt.Errorf("field `SpMchid` is required and must be specified in TransferBatchEntity")
  626. }
  627. toSerialize["sp_mchid"] = o.SpMchid
  628. if o.SubMchid == nil {
  629. return nil, fmt.Errorf("field `SubMchid` is required and must be specified in TransferBatchEntity")
  630. }
  631. toSerialize["sub_mchid"] = o.SubMchid
  632. if o.OutBatchNo == nil {
  633. return nil, fmt.Errorf("field `OutBatchNo` is required and must be specified in TransferBatchEntity")
  634. }
  635. toSerialize["out_batch_no"] = o.OutBatchNo
  636. if o.BatchId == nil {
  637. return nil, fmt.Errorf("field `BatchId` is required and must be specified in TransferBatchEntity")
  638. }
  639. toSerialize["batch_id"] = o.BatchId
  640. if o.SubAppid != nil {
  641. toSerialize["sub_appid"] = o.SubAppid
  642. }
  643. if o.BatchStatus == nil {
  644. return nil, fmt.Errorf("field `BatchStatus` is required and must be specified in TransferBatchEntity")
  645. }
  646. toSerialize["batch_status"] = o.BatchStatus
  647. if o.BatchType == nil {
  648. return nil, fmt.Errorf("field `BatchType` is required and must be specified in TransferBatchEntity")
  649. }
  650. toSerialize["batch_type"] = o.BatchType
  651. if o.AuthorizationType == nil {
  652. return nil, fmt.Errorf("field `AuthorizationType` is required and must be specified in TransferBatchEntity")
  653. }
  654. toSerialize["authorization_type"] = o.AuthorizationType
  655. if o.BatchName == nil {
  656. return nil, fmt.Errorf("field `BatchName` is required and must be specified in TransferBatchEntity")
  657. }
  658. toSerialize["batch_name"] = o.BatchName
  659. if o.BatchRemark == nil {
  660. return nil, fmt.Errorf("field `BatchRemark` is required and must be specified in TransferBatchEntity")
  661. }
  662. toSerialize["batch_remark"] = o.BatchRemark
  663. if o.CloseReason != nil {
  664. toSerialize["close_reason"] = o.CloseReason
  665. }
  666. if o.TotalAmount == nil {
  667. return nil, fmt.Errorf("field `TotalAmount` is required and must be specified in TransferBatchEntity")
  668. }
  669. toSerialize["total_amount"] = o.TotalAmount
  670. if o.TotalNum == nil {
  671. return nil, fmt.Errorf("field `TotalNum` is required and must be specified in TransferBatchEntity")
  672. }
  673. toSerialize["total_num"] = o.TotalNum
  674. if o.CreateTime != nil {
  675. toSerialize["create_time"] = o.CreateTime.Format(time.RFC3339)
  676. }
  677. if o.UpdateTime != nil {
  678. toSerialize["update_time"] = o.UpdateTime.Format(time.RFC3339)
  679. }
  680. if o.SuccessAmount != nil {
  681. toSerialize["success_amount"] = o.SuccessAmount
  682. }
  683. if o.SuccessNum != nil {
  684. toSerialize["success_num"] = o.SuccessNum
  685. }
  686. if o.FailAmount != nil {
  687. toSerialize["fail_amount"] = o.FailAmount
  688. }
  689. if o.FailNum != nil {
  690. toSerialize["fail_num"] = o.FailNum
  691. }
  692. if o.TransferDetailList != nil {
  693. toSerialize["transfer_detail_list"] = o.TransferDetailList
  694. }
  695. if o.SpAppid != nil {
  696. toSerialize["sp_appid"] = o.SpAppid
  697. }
  698. if o.TransferPurpose != nil {
  699. toSerialize["transfer_purpose"] = o.TransferPurpose
  700. }
  701. if o.TransferScene != nil {
  702. toSerialize["transfer_scene"] = o.TransferScene
  703. }
  704. return json.Marshal(toSerialize)
  705. }
  706. func (o TransferBatchEntity) String() string {
  707. var ret string
  708. if o.SpMchid == nil {
  709. ret += "SpMchid:<nil>, "
  710. } else {
  711. ret += fmt.Sprintf("SpMchid:%v, ", *o.SpMchid)
  712. }
  713. if o.SubMchid == nil {
  714. ret += "SubMchid:<nil>, "
  715. } else {
  716. ret += fmt.Sprintf("SubMchid:%v, ", *o.SubMchid)
  717. }
  718. if o.OutBatchNo == nil {
  719. ret += "OutBatchNo:<nil>, "
  720. } else {
  721. ret += fmt.Sprintf("OutBatchNo:%v, ", *o.OutBatchNo)
  722. }
  723. if o.BatchId == nil {
  724. ret += "BatchId:<nil>, "
  725. } else {
  726. ret += fmt.Sprintf("BatchId:%v, ", *o.BatchId)
  727. }
  728. if o.SubAppid == nil {
  729. ret += "SubAppid:<nil>, "
  730. } else {
  731. ret += fmt.Sprintf("SubAppid:%v, ", *o.SubAppid)
  732. }
  733. if o.BatchStatus == nil {
  734. ret += "BatchStatus:<nil>, "
  735. } else {
  736. ret += fmt.Sprintf("BatchStatus:%v, ", *o.BatchStatus)
  737. }
  738. if o.BatchType == nil {
  739. ret += "BatchType:<nil>, "
  740. } else {
  741. ret += fmt.Sprintf("BatchType:%v, ", *o.BatchType)
  742. }
  743. if o.AuthorizationType == nil {
  744. ret += "AuthorizationType:<nil>, "
  745. } else {
  746. ret += fmt.Sprintf("AuthorizationType:%v, ", *o.AuthorizationType)
  747. }
  748. if o.BatchName == nil {
  749. ret += "BatchName:<nil>, "
  750. } else {
  751. ret += fmt.Sprintf("BatchName:%v, ", *o.BatchName)
  752. }
  753. if o.BatchRemark == nil {
  754. ret += "BatchRemark:<nil>, "
  755. } else {
  756. ret += fmt.Sprintf("BatchRemark:%v, ", *o.BatchRemark)
  757. }
  758. if o.CloseReason == nil {
  759. ret += "CloseReason:<nil>, "
  760. } else {
  761. ret += fmt.Sprintf("CloseReason:%v, ", *o.CloseReason)
  762. }
  763. if o.TotalAmount == nil {
  764. ret += "TotalAmount:<nil>, "
  765. } else {
  766. ret += fmt.Sprintf("TotalAmount:%v, ", *o.TotalAmount)
  767. }
  768. if o.TotalNum == nil {
  769. ret += "TotalNum:<nil>, "
  770. } else {
  771. ret += fmt.Sprintf("TotalNum:%v, ", *o.TotalNum)
  772. }
  773. if o.CreateTime == nil {
  774. ret += "CreateTime:<nil>, "
  775. } else {
  776. ret += fmt.Sprintf("CreateTime:%v, ", *o.CreateTime)
  777. }
  778. if o.UpdateTime == nil {
  779. ret += "UpdateTime:<nil>, "
  780. } else {
  781. ret += fmt.Sprintf("UpdateTime:%v, ", *o.UpdateTime)
  782. }
  783. if o.SuccessAmount == nil {
  784. ret += "SuccessAmount:<nil>, "
  785. } else {
  786. ret += fmt.Sprintf("SuccessAmount:%v, ", *o.SuccessAmount)
  787. }
  788. if o.SuccessNum == nil {
  789. ret += "SuccessNum:<nil>, "
  790. } else {
  791. ret += fmt.Sprintf("SuccessNum:%v, ", *o.SuccessNum)
  792. }
  793. if o.FailAmount == nil {
  794. ret += "FailAmount:<nil>, "
  795. } else {
  796. ret += fmt.Sprintf("FailAmount:%v, ", *o.FailAmount)
  797. }
  798. if o.FailNum == nil {
  799. ret += "FailNum:<nil>, "
  800. } else {
  801. ret += fmt.Sprintf("FailNum:%v, ", *o.FailNum)
  802. }
  803. ret += fmt.Sprintf("TransferDetailList:%v, ", o.TransferDetailList)
  804. if o.SpAppid == nil {
  805. ret += "SpAppid:<nil>, "
  806. } else {
  807. ret += fmt.Sprintf("SpAppid:%v, ", *o.SpAppid)
  808. }
  809. if o.TransferPurpose == nil {
  810. ret += "TransferPurpose:<nil>, "
  811. } else {
  812. ret += fmt.Sprintf("TransferPurpose:%v, ", *o.TransferPurpose)
  813. }
  814. if o.TransferScene == nil {
  815. ret += "TransferScene:<nil>"
  816. } else {
  817. ret += fmt.Sprintf("TransferScene:%v", *o.TransferScene)
  818. }
  819. return fmt.Sprintf("TransferBatchEntity{%s}", ret)
  820. }
  821. func (o TransferBatchEntity) Clone() *TransferBatchEntity {
  822. ret := TransferBatchEntity{}
  823. if o.SpMchid != nil {
  824. ret.SpMchid = new(string)
  825. *ret.SpMchid = *o.SpMchid
  826. }
  827. if o.SubMchid != nil {
  828. ret.SubMchid = new(string)
  829. *ret.SubMchid = *o.SubMchid
  830. }
  831. if o.OutBatchNo != nil {
  832. ret.OutBatchNo = new(string)
  833. *ret.OutBatchNo = *o.OutBatchNo
  834. }
  835. if o.BatchId != nil {
  836. ret.BatchId = new(string)
  837. *ret.BatchId = *o.BatchId
  838. }
  839. if o.SubAppid != nil {
  840. ret.SubAppid = new(string)
  841. *ret.SubAppid = *o.SubAppid
  842. }
  843. if o.BatchStatus != nil {
  844. ret.BatchStatus = new(string)
  845. *ret.BatchStatus = *o.BatchStatus
  846. }
  847. if o.BatchType != nil {
  848. ret.BatchType = new(string)
  849. *ret.BatchType = *o.BatchType
  850. }
  851. if o.AuthorizationType != nil {
  852. ret.AuthorizationType = new(AuthType)
  853. *ret.AuthorizationType = *o.AuthorizationType
  854. }
  855. if o.BatchName != nil {
  856. ret.BatchName = new(string)
  857. *ret.BatchName = *o.BatchName
  858. }
  859. if o.BatchRemark != nil {
  860. ret.BatchRemark = new(string)
  861. *ret.BatchRemark = *o.BatchRemark
  862. }
  863. if o.CloseReason != nil {
  864. ret.CloseReason = new(CloseReasonType)
  865. *ret.CloseReason = *o.CloseReason
  866. }
  867. if o.TotalAmount != nil {
  868. ret.TotalAmount = new(int64)
  869. *ret.TotalAmount = *o.TotalAmount
  870. }
  871. if o.TotalNum != nil {
  872. ret.TotalNum = new(int64)
  873. *ret.TotalNum = *o.TotalNum
  874. }
  875. if o.CreateTime != nil {
  876. ret.CreateTime = new(time.Time)
  877. *ret.CreateTime = *o.CreateTime
  878. }
  879. if o.UpdateTime != nil {
  880. ret.UpdateTime = new(time.Time)
  881. *ret.UpdateTime = *o.UpdateTime
  882. }
  883. if o.SuccessAmount != nil {
  884. ret.SuccessAmount = new(int64)
  885. *ret.SuccessAmount = *o.SuccessAmount
  886. }
  887. if o.SuccessNum != nil {
  888. ret.SuccessNum = new(int64)
  889. *ret.SuccessNum = *o.SuccessNum
  890. }
  891. if o.FailAmount != nil {
  892. ret.FailAmount = new(int64)
  893. *ret.FailAmount = *o.FailAmount
  894. }
  895. if o.FailNum != nil {
  896. ret.FailNum = new(int64)
  897. *ret.FailNum = *o.FailNum
  898. }
  899. if o.TransferDetailList != nil {
  900. ret.TransferDetailList = make([]TransferDetailCompact, len(o.TransferDetailList))
  901. for i, item := range o.TransferDetailList {
  902. ret.TransferDetailList[i] = *item.Clone()
  903. }
  904. }
  905. if o.SpAppid != nil {
  906. ret.SpAppid = new(string)
  907. *ret.SpAppid = *o.SpAppid
  908. }
  909. if o.TransferPurpose != nil {
  910. ret.TransferPurpose = new(TransferUseType)
  911. *ret.TransferPurpose = *o.TransferPurpose
  912. }
  913. if o.TransferScene != nil {
  914. ret.TransferScene = new(TransferScene)
  915. *ret.TransferScene = *o.TransferScene
  916. }
  917. return &ret
  918. }
  919. // TransferDetailCompact
  920. type TransferDetailCompact struct {
  921. // 微信支付系统内部区分转账批次单下不同转账明细单的唯一标识
  922. DetailId *string `json:"detail_id"`
  923. // 商户系统内部区分转账批次单下不同转账明细单的唯一标识
  924. OutDetailNo *string `json:"out_detail_no"`
  925. // PROCESSING:转账中。正在处理中,转账结果尚未明确 SUCCESS:转账成功 FAIL:转账失败。需要确认失败原因后,再决定是否重新发起对该笔明细单的转账(并非整个转账批次单)
  926. DetailStatus *string `json:"detail_status"`
  927. }
  928. func (o TransferDetailCompact) MarshalJSON() ([]byte, error) {
  929. toSerialize := map[string]interface{}{}
  930. if o.DetailId == nil {
  931. return nil, fmt.Errorf("field `DetailId` is required and must be specified in TransferDetailCompact")
  932. }
  933. toSerialize["detail_id"] = o.DetailId
  934. if o.OutDetailNo == nil {
  935. return nil, fmt.Errorf("field `OutDetailNo` is required and must be specified in TransferDetailCompact")
  936. }
  937. toSerialize["out_detail_no"] = o.OutDetailNo
  938. if o.DetailStatus == nil {
  939. return nil, fmt.Errorf("field `DetailStatus` is required and must be specified in TransferDetailCompact")
  940. }
  941. toSerialize["detail_status"] = o.DetailStatus
  942. return json.Marshal(toSerialize)
  943. }
  944. func (o TransferDetailCompact) String() string {
  945. var ret string
  946. if o.DetailId == nil {
  947. ret += "DetailId:<nil>, "
  948. } else {
  949. ret += fmt.Sprintf("DetailId:%v, ", *o.DetailId)
  950. }
  951. if o.OutDetailNo == nil {
  952. ret += "OutDetailNo:<nil>, "
  953. } else {
  954. ret += fmt.Sprintf("OutDetailNo:%v, ", *o.OutDetailNo)
  955. }
  956. if o.DetailStatus == nil {
  957. ret += "DetailStatus:<nil>"
  958. } else {
  959. ret += fmt.Sprintf("DetailStatus:%v", *o.DetailStatus)
  960. }
  961. return fmt.Sprintf("TransferDetailCompact{%s}", ret)
  962. }
  963. func (o TransferDetailCompact) Clone() *TransferDetailCompact {
  964. ret := TransferDetailCompact{}
  965. if o.DetailId != nil {
  966. ret.DetailId = new(string)
  967. *ret.DetailId = *o.DetailId
  968. }
  969. if o.OutDetailNo != nil {
  970. ret.OutDetailNo = new(string)
  971. *ret.OutDetailNo = *o.OutDetailNo
  972. }
  973. if o.DetailStatus != nil {
  974. ret.DetailStatus = new(string)
  975. *ret.DetailStatus = *o.DetailStatus
  976. }
  977. return &ret
  978. }
  979. // TransferDetailEntity
  980. type TransferDetailEntity struct {
  981. // 微信支付分配的商户号,此处为服务商商户号
  982. SpMchid *string `json:"sp_mchid"`
  983. // 商户系统内部的商家批次单号,在商户系统内部唯一
  984. OutBatchNo *string `json:"out_batch_no"`
  985. // 微信支付批次单号,微信商家转账系统返回的唯一标识
  986. BatchId *string `json:"batch_id"`
  987. // 微信分配的商户公众账号ID。特约商户授权类型为INFORMATION_AUTHORIZATION_TYPE和INFORMATION_AND_FUND_AUTHORIZATION_TYPE时对应的是特约商户的appid,特约商户授权类型为FUND_AUTHORIZATION_TYPE时为服务商的appid
  988. Appid *string `json:"appid,omitempty"`
  989. // 商户系统内部区分转账批次单下不同转账明细单的唯一标识
  990. OutDetailNo *string `json:"out_detail_no"`
  991. // 微信支付系统内部区分转账批次单下不同转账明细单的唯一标识
  992. DetailId *string `json:"detail_id"`
  993. // PROCESSING:转账中。正在处理中,转账结果尚未明确 SUCCESS:转账成功 FAIL:转账失败。需要确认失败原因后,再决定是否重新发起对该笔明细单的转账(并非整个转账批次单)
  994. DetailStatus *string `json:"detail_status"`
  995. // 转账金额单位为“分”
  996. TransferAmount *int64 `json:"transfer_amount"`
  997. // 单条转账备注(微信用户会收到该备注),UTF8编码,最多允许32个字符
  998. TransferRemark *string `json:"transfer_remark"`
  999. // 如果转账失败则有失败原因 * `ACCOUNT_FROZEN` - 账户冻结 * `REAL_NAME_CHECK_FAIL` - 用户未实名 * `NAME_NOT_CORRECT` - 用户姓名校验失败 * `OPENID_INVALID` - Openid校验失败 * `TRANSFER_QUOTA_EXCEED` - 超过用户单笔收款额度 * `DAY_RECEIVED_QUOTA_EXCEED` - 超过用户单日收款额度 * `MONTH_RECEIVED_QUOTA_EXCEED` - 超过用户单月收款额度 * `DAY_RECEIVED_COUNT_EXCEED` - 超过用户单日收款次数 * `PRODUCT_AUTH_CHECK_FAIL` - 产品权限校验失败 * `OVERDUE_CLOSE` - 转账关闭 * `ID_CARD_NOT_CORRECT` - 用户身份证校验失败 * `ACCOUNT_NOT_EXIST` - 用户账户不存在 * `TRANSFER_RISK` - 转账存在风险 * `PAY_ROLL_CARD_ALREADY_LOGOUT` - 用户薪工卡已注销 * `PAY_ROLL_CARD_ALREADY_FROZEN` - 用户薪工卡已冻结 * `PAY_ROLL_CARD_UNAUTHORIZED` - 用户薪工卡未授权该商户 * `PAY_ROLL_CARD_USER_NOT_OPEN` - 用户未开通薪工卡
  1000. FailReason *FailReasonType `json:"fail_reason,omitempty"`
  1001. // 收款用户openid。如果转账特约商户授权类型是INFORMATION_AUTHORIZATION_TYPE,对应的是特约商户公众号下的openid;如果转账特约商户授权类型是FUND_AUTHORIZATION_TYPE,对应的是服务商商户公众号下的openid。
  1002. Openid *string `json:"openid"`
  1003. // 收款方姓名。采用标准RSA算法,公钥由微信侧提供
  1004. Username *string `json:"username" encryption:"EM_APIV3"`
  1005. // 转账发起的时间,按照使用rfc3339所定义的格式,格式为YYYY-MM-DDThh:mm:ss+TIMEZONE
  1006. InitiateTime *time.Time `json:"initiate_time"`
  1007. // 明细最后一次状态变更的时间,按照使用rfc3339所定义的格式,格式为YYYY-MM-DDThh:mm:ss+TIMEZONE
  1008. UpdateTime *time.Time `json:"update_time"`
  1009. }
  1010. func (o TransferDetailEntity) MarshalJSON() ([]byte, error) {
  1011. toSerialize := map[string]interface{}{}
  1012. if o.SpMchid == nil {
  1013. return nil, fmt.Errorf("field `SpMchid` is required and must be specified in TransferDetailEntity")
  1014. }
  1015. toSerialize["sp_mchid"] = o.SpMchid
  1016. if o.OutBatchNo == nil {
  1017. return nil, fmt.Errorf("field `OutBatchNo` is required and must be specified in TransferDetailEntity")
  1018. }
  1019. toSerialize["out_batch_no"] = o.OutBatchNo
  1020. if o.BatchId == nil {
  1021. return nil, fmt.Errorf("field `BatchId` is required and must be specified in TransferDetailEntity")
  1022. }
  1023. toSerialize["batch_id"] = o.BatchId
  1024. if o.Appid != nil {
  1025. toSerialize["appid"] = o.Appid
  1026. }
  1027. if o.OutDetailNo == nil {
  1028. return nil, fmt.Errorf("field `OutDetailNo` is required and must be specified in TransferDetailEntity")
  1029. }
  1030. toSerialize["out_detail_no"] = o.OutDetailNo
  1031. if o.DetailId == nil {
  1032. return nil, fmt.Errorf("field `DetailId` is required and must be specified in TransferDetailEntity")
  1033. }
  1034. toSerialize["detail_id"] = o.DetailId
  1035. if o.DetailStatus == nil {
  1036. return nil, fmt.Errorf("field `DetailStatus` is required and must be specified in TransferDetailEntity")
  1037. }
  1038. toSerialize["detail_status"] = o.DetailStatus
  1039. if o.TransferAmount == nil {
  1040. return nil, fmt.Errorf("field `TransferAmount` is required and must be specified in TransferDetailEntity")
  1041. }
  1042. toSerialize["transfer_amount"] = o.TransferAmount
  1043. if o.TransferRemark == nil {
  1044. return nil, fmt.Errorf("field `TransferRemark` is required and must be specified in TransferDetailEntity")
  1045. }
  1046. toSerialize["transfer_remark"] = o.TransferRemark
  1047. if o.FailReason != nil {
  1048. toSerialize["fail_reason"] = o.FailReason
  1049. }
  1050. if o.Openid == nil {
  1051. return nil, fmt.Errorf("field `Openid` is required and must be specified in TransferDetailEntity")
  1052. }
  1053. toSerialize["openid"] = o.Openid
  1054. if o.Username == nil {
  1055. return nil, fmt.Errorf("field `Username` is required and must be specified in TransferDetailEntity")
  1056. }
  1057. toSerialize["username"] = o.Username
  1058. if o.InitiateTime == nil {
  1059. return nil, fmt.Errorf("field `InitiateTime` is required and must be specified in TransferDetailEntity")
  1060. }
  1061. toSerialize["initiate_time"] = o.InitiateTime.Format(time.RFC3339)
  1062. if o.UpdateTime == nil {
  1063. return nil, fmt.Errorf("field `UpdateTime` is required and must be specified in TransferDetailEntity")
  1064. }
  1065. toSerialize["update_time"] = o.UpdateTime.Format(time.RFC3339)
  1066. return json.Marshal(toSerialize)
  1067. }
  1068. func (o TransferDetailEntity) String() string {
  1069. var ret string
  1070. if o.SpMchid == nil {
  1071. ret += "SpMchid:<nil>, "
  1072. } else {
  1073. ret += fmt.Sprintf("SpMchid:%v, ", *o.SpMchid)
  1074. }
  1075. if o.OutBatchNo == nil {
  1076. ret += "OutBatchNo:<nil>, "
  1077. } else {
  1078. ret += fmt.Sprintf("OutBatchNo:%v, ", *o.OutBatchNo)
  1079. }
  1080. if o.BatchId == nil {
  1081. ret += "BatchId:<nil>, "
  1082. } else {
  1083. ret += fmt.Sprintf("BatchId:%v, ", *o.BatchId)
  1084. }
  1085. if o.Appid == nil {
  1086. ret += "Appid:<nil>, "
  1087. } else {
  1088. ret += fmt.Sprintf("Appid:%v, ", *o.Appid)
  1089. }
  1090. if o.OutDetailNo == nil {
  1091. ret += "OutDetailNo:<nil>, "
  1092. } else {
  1093. ret += fmt.Sprintf("OutDetailNo:%v, ", *o.OutDetailNo)
  1094. }
  1095. if o.DetailId == nil {
  1096. ret += "DetailId:<nil>, "
  1097. } else {
  1098. ret += fmt.Sprintf("DetailId:%v, ", *o.DetailId)
  1099. }
  1100. if o.DetailStatus == nil {
  1101. ret += "DetailStatus:<nil>, "
  1102. } else {
  1103. ret += fmt.Sprintf("DetailStatus:%v, ", *o.DetailStatus)
  1104. }
  1105. if o.TransferAmount == nil {
  1106. ret += "TransferAmount:<nil>, "
  1107. } else {
  1108. ret += fmt.Sprintf("TransferAmount:%v, ", *o.TransferAmount)
  1109. }
  1110. if o.TransferRemark == nil {
  1111. ret += "TransferRemark:<nil>, "
  1112. } else {
  1113. ret += fmt.Sprintf("TransferRemark:%v, ", *o.TransferRemark)
  1114. }
  1115. if o.FailReason == nil {
  1116. ret += "FailReason:<nil>, "
  1117. } else {
  1118. ret += fmt.Sprintf("FailReason:%v, ", *o.FailReason)
  1119. }
  1120. if o.Openid == nil {
  1121. ret += "Openid:<nil>, "
  1122. } else {
  1123. ret += fmt.Sprintf("Openid:%v, ", *o.Openid)
  1124. }
  1125. if o.Username == nil {
  1126. ret += "Username:<nil>, "
  1127. } else {
  1128. ret += fmt.Sprintf("Username:%v, ", *o.Username)
  1129. }
  1130. if o.InitiateTime == nil {
  1131. ret += "InitiateTime:<nil>, "
  1132. } else {
  1133. ret += fmt.Sprintf("InitiateTime:%v, ", *o.InitiateTime)
  1134. }
  1135. if o.UpdateTime == nil {
  1136. ret += "UpdateTime:<nil>"
  1137. } else {
  1138. ret += fmt.Sprintf("UpdateTime:%v", *o.UpdateTime)
  1139. }
  1140. return fmt.Sprintf("TransferDetailEntity{%s}", ret)
  1141. }
  1142. func (o TransferDetailEntity) Clone() *TransferDetailEntity {
  1143. ret := TransferDetailEntity{}
  1144. if o.SpMchid != nil {
  1145. ret.SpMchid = new(string)
  1146. *ret.SpMchid = *o.SpMchid
  1147. }
  1148. if o.OutBatchNo != nil {
  1149. ret.OutBatchNo = new(string)
  1150. *ret.OutBatchNo = *o.OutBatchNo
  1151. }
  1152. if o.BatchId != nil {
  1153. ret.BatchId = new(string)
  1154. *ret.BatchId = *o.BatchId
  1155. }
  1156. if o.Appid != nil {
  1157. ret.Appid = new(string)
  1158. *ret.Appid = *o.Appid
  1159. }
  1160. if o.OutDetailNo != nil {
  1161. ret.OutDetailNo = new(string)
  1162. *ret.OutDetailNo = *o.OutDetailNo
  1163. }
  1164. if o.DetailId != nil {
  1165. ret.DetailId = new(string)
  1166. *ret.DetailId = *o.DetailId
  1167. }
  1168. if o.DetailStatus != nil {
  1169. ret.DetailStatus = new(string)
  1170. *ret.DetailStatus = *o.DetailStatus
  1171. }
  1172. if o.TransferAmount != nil {
  1173. ret.TransferAmount = new(int64)
  1174. *ret.TransferAmount = *o.TransferAmount
  1175. }
  1176. if o.TransferRemark != nil {
  1177. ret.TransferRemark = new(string)
  1178. *ret.TransferRemark = *o.TransferRemark
  1179. }
  1180. if o.FailReason != nil {
  1181. ret.FailReason = new(FailReasonType)
  1182. *ret.FailReason = *o.FailReason
  1183. }
  1184. if o.Openid != nil {
  1185. ret.Openid = new(string)
  1186. *ret.Openid = *o.Openid
  1187. }
  1188. if o.Username != nil {
  1189. ret.Username = new(string)
  1190. *ret.Username = *o.Username
  1191. }
  1192. if o.InitiateTime != nil {
  1193. ret.InitiateTime = new(time.Time)
  1194. *ret.InitiateTime = *o.InitiateTime
  1195. }
  1196. if o.UpdateTime != nil {
  1197. ret.UpdateTime = new(time.Time)
  1198. *ret.UpdateTime = *o.UpdateTime
  1199. }
  1200. return &ret
  1201. }
  1202. // TransferDetailInput
  1203. type TransferDetailInput struct {
  1204. // 商户系统内部区分转账批次单下不同转账明细单的唯一标识
  1205. OutDetailNo *string `json:"out_detail_no"`
  1206. // 转账金额单位为“分”
  1207. TransferAmount *int64 `json:"transfer_amount"`
  1208. // 单条转账备注(微信用户会收到该备注),UTF8编码,最多允许32个字符
  1209. TransferRemark *string `json:"transfer_remark"`
  1210. // 收款用户openid。如果转账特约商户授权类型是INFORMATION_AUTHORIZATION_TYPE,对应的是特约商户公众号下的openid。
  1211. Openid *string `json:"openid"`
  1212. // 收款用户姓名。采用标准RSA算法,公钥由微信侧提供
  1213. UserName *string `json:"user_name" encryption:"EM_APIV3"`
  1214. // 收款方身份证号,可不用填(采用标准RSA算法,公钥由微信侧提供)
  1215. UserIdCard *string `json:"user_id_card,omitempty" encryption:"EM_APIV3"`
  1216. }
  1217. func (o TransferDetailInput) MarshalJSON() ([]byte, error) {
  1218. toSerialize := map[string]interface{}{}
  1219. if o.OutDetailNo == nil {
  1220. return nil, fmt.Errorf("field `OutDetailNo` is required and must be specified in TransferDetailInput")
  1221. }
  1222. toSerialize["out_detail_no"] = o.OutDetailNo
  1223. if o.TransferAmount == nil {
  1224. return nil, fmt.Errorf("field `TransferAmount` is required and must be specified in TransferDetailInput")
  1225. }
  1226. toSerialize["transfer_amount"] = o.TransferAmount
  1227. if o.TransferRemark == nil {
  1228. return nil, fmt.Errorf("field `TransferRemark` is required and must be specified in TransferDetailInput")
  1229. }
  1230. toSerialize["transfer_remark"] = o.TransferRemark
  1231. if o.Openid == nil {
  1232. return nil, fmt.Errorf("field `Openid` is required and must be specified in TransferDetailInput")
  1233. }
  1234. toSerialize["openid"] = o.Openid
  1235. if o.UserName == nil {
  1236. return nil, fmt.Errorf("field `UserName` is required and must be specified in TransferDetailInput")
  1237. }
  1238. toSerialize["user_name"] = o.UserName
  1239. if o.UserIdCard != nil {
  1240. toSerialize["user_id_card"] = o.UserIdCard
  1241. }
  1242. return json.Marshal(toSerialize)
  1243. }
  1244. func (o TransferDetailInput) String() string {
  1245. var ret string
  1246. if o.OutDetailNo == nil {
  1247. ret += "OutDetailNo:<nil>, "
  1248. } else {
  1249. ret += fmt.Sprintf("OutDetailNo:%v, ", *o.OutDetailNo)
  1250. }
  1251. if o.TransferAmount == nil {
  1252. ret += "TransferAmount:<nil>, "
  1253. } else {
  1254. ret += fmt.Sprintf("TransferAmount:%v, ", *o.TransferAmount)
  1255. }
  1256. if o.TransferRemark == nil {
  1257. ret += "TransferRemark:<nil>, "
  1258. } else {
  1259. ret += fmt.Sprintf("TransferRemark:%v, ", *o.TransferRemark)
  1260. }
  1261. if o.Openid == nil {
  1262. ret += "Openid:<nil>, "
  1263. } else {
  1264. ret += fmt.Sprintf("Openid:%v, ", *o.Openid)
  1265. }
  1266. if o.UserName == nil {
  1267. ret += "UserName:<nil>, "
  1268. } else {
  1269. ret += fmt.Sprintf("UserName:%v, ", *o.UserName)
  1270. }
  1271. if o.UserIdCard == nil {
  1272. ret += "UserIdCard:<nil>"
  1273. } else {
  1274. ret += fmt.Sprintf("UserIdCard:%v", *o.UserIdCard)
  1275. }
  1276. return fmt.Sprintf("TransferDetailInput{%s}", ret)
  1277. }
  1278. func (o TransferDetailInput) Clone() *TransferDetailInput {
  1279. ret := TransferDetailInput{}
  1280. if o.OutDetailNo != nil {
  1281. ret.OutDetailNo = new(string)
  1282. *ret.OutDetailNo = *o.OutDetailNo
  1283. }
  1284. if o.TransferAmount != nil {
  1285. ret.TransferAmount = new(int64)
  1286. *ret.TransferAmount = *o.TransferAmount
  1287. }
  1288. if o.TransferRemark != nil {
  1289. ret.TransferRemark = new(string)
  1290. *ret.TransferRemark = *o.TransferRemark
  1291. }
  1292. if o.Openid != nil {
  1293. ret.Openid = new(string)
  1294. *ret.Openid = *o.Openid
  1295. }
  1296. if o.UserName != nil {
  1297. ret.UserName = new(string)
  1298. *ret.UserName = *o.UserName
  1299. }
  1300. if o.UserIdCard != nil {
  1301. ret.UserIdCard = new(string)
  1302. *ret.UserIdCard = *o.UserIdCard
  1303. }
  1304. return &ret
  1305. }
  1306. // TransferScene * `ORDINARY_TRANSFER` - 普通转账, 普通转账(默认) * `PAYROLL_CARD_TRANSFER` - 薪工卡转账, 给使用微信薪工卡的用户进行转账
  1307. type TransferScene string
  1308. func (e TransferScene) Ptr() *TransferScene {
  1309. return &e
  1310. }
  1311. // Enums of TransferScene
  1312. const (
  1313. TRANSFERSCENE_ORDINARY_TRANSFER TransferScene = "ORDINARY_TRANSFER"
  1314. TRANSFERSCENE_PAYROLL_CARD_TRANSFER TransferScene = "PAYROLL_CARD_TRANSFER"
  1315. )
  1316. // TransferUseType * `GOODSPAYMENT` - 货款, 给用户支付货物采购资金 * `COMMISSION` - 佣金, 给用户支付业务推广佣金 * `REFUND` - 退款, 给用户支付交易退款 * `REIMBURSEMENT` - 报销, 企业给员工支付差旅等报销资金 * `FREIGHT` - 运费, 给司机支付运输费用 * `OTHERS` - 其他, 其他
  1317. type TransferUseType string
  1318. func (e TransferUseType) Ptr() *TransferUseType {
  1319. return &e
  1320. }
  1321. // Enums of TransferUseType
  1322. const (
  1323. TRANSFERUSETYPE_GOODSPAYMENT TransferUseType = "GOODSPAYMENT"
  1324. TRANSFERUSETYPE_COMMISSION TransferUseType = "COMMISSION"
  1325. TRANSFERUSETYPE_REFUND TransferUseType = "REFUND"
  1326. TRANSFERUSETYPE_REIMBURSEMENT TransferUseType = "REIMBURSEMENT"
  1327. TRANSFERUSETYPE_FREIGHT TransferUseType = "FREIGHT"
  1328. TRANSFERUSETYPE_OTHERS TransferUseType = "OTHERS"
  1329. )