123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440 |
- // Copyright 2021 Tencent Inc. All rights reserved.
- //
- // 点金计划对外API
- //
- // 特约商户点金计划管理API
- //
- // API version: 0.3.3
- // Code generated by WechatPay APIv3 Generator based on [OpenAPI Generator](https://openapi-generator.tech); DO NOT EDIT.
- package goldplan
- import (
- "encoding/json"
- "fmt"
- )
- // ChangeCustomPageStatusRequest
- type ChangeCustomPageStatusRequest struct {
- // 开通或关闭“商家自定义小票”的特约商户商户号,由微信支付生成并下发。
- SubMchid *string `json:"sub_mchid"`
- // 开通或关闭“商家自定义小票”的动作,枚举值: OPEN:表示开通 CLOSE:表示关闭
- OperationType *OperationType `json:"operation_type"`
- }
- func (o ChangeCustomPageStatusRequest) MarshalJSON() ([]byte, error) {
- toSerialize := map[string]interface{}{}
- if o.SubMchid == nil {
- return nil, fmt.Errorf("field `SubMchid` is required and must be specified in ChangeCustomPageStatusRequest")
- }
- toSerialize["sub_mchid"] = o.SubMchid
- if o.OperationType == nil {
- return nil, fmt.Errorf("field `OperationType` is required and must be specified in ChangeCustomPageStatusRequest")
- }
- toSerialize["operation_type"] = o.OperationType
- return json.Marshal(toSerialize)
- }
- func (o ChangeCustomPageStatusRequest) String() string {
- var ret string
- if o.SubMchid == nil {
- ret += "SubMchid:<nil>, "
- } else {
- ret += fmt.Sprintf("SubMchid:%v, ", *o.SubMchid)
- }
- if o.OperationType == nil {
- ret += "OperationType:<nil>"
- } else {
- ret += fmt.Sprintf("OperationType:%v", *o.OperationType)
- }
- return fmt.Sprintf("ChangeCustomPageStatusRequest{%s}", ret)
- }
- func (o ChangeCustomPageStatusRequest) Clone() *ChangeCustomPageStatusRequest {
- ret := ChangeCustomPageStatusRequest{}
- if o.SubMchid != nil {
- ret.SubMchid = new(string)
- *ret.SubMchid = *o.SubMchid
- }
- if o.OperationType != nil {
- ret.OperationType = new(OperationType)
- *ret.OperationType = *o.OperationType
- }
- return &ret
- }
- // ChangeCustomPageStatusResponse
- type ChangeCustomPageStatusResponse struct {
- // 开通或关闭“商家自定义小票”的特约商户商户号,由微信支付生成并下发。
- SubMchid *string `json:"sub_mchid"`
- }
- func (o ChangeCustomPageStatusResponse) MarshalJSON() ([]byte, error) {
- toSerialize := map[string]interface{}{}
- if o.SubMchid == nil {
- return nil, fmt.Errorf("field `SubMchid` is required and must be specified in ChangeCustomPageStatusResponse")
- }
- toSerialize["sub_mchid"] = o.SubMchid
- return json.Marshal(toSerialize)
- }
- func (o ChangeCustomPageStatusResponse) String() string {
- var ret string
- if o.SubMchid == nil {
- ret += "SubMchid:<nil>"
- } else {
- ret += fmt.Sprintf("SubMchid:%v", *o.SubMchid)
- }
- return fmt.Sprintf("ChangeCustomPageStatusResponse{%s}", ret)
- }
- func (o ChangeCustomPageStatusResponse) Clone() *ChangeCustomPageStatusResponse {
- ret := ChangeCustomPageStatusResponse{}
- if o.SubMchid != nil {
- ret.SubMchid = new(string)
- *ret.SubMchid = *o.SubMchid
- }
- return &ret
- }
- // ChangeGoldPlanStatusRequest
- type ChangeGoldPlanStatusRequest struct {
- // 开通或关闭点金计划的特约商户商户号,由微信支付生成并下发。
- SubMchid *string `json:"sub_mchid"`
- // 开通或关闭点金计划的动作,枚举值: OPEN:表示开通点金计划 CLOSE:表示关闭点金计划
- OperationType *OperationType `json:"operation_type"`
- // 支付场景,指定开通点金计划的支付场景。如果未指定,则默认全部打开
- OperationPayScene *OperationPayScene `json:"operation_pay_scene,omitempty"`
- }
- func (o ChangeGoldPlanStatusRequest) MarshalJSON() ([]byte, error) {
- toSerialize := map[string]interface{}{}
- if o.SubMchid == nil {
- return nil, fmt.Errorf("field `SubMchid` is required and must be specified in ChangeGoldPlanStatusRequest")
- }
- toSerialize["sub_mchid"] = o.SubMchid
- if o.OperationType == nil {
- return nil, fmt.Errorf("field `OperationType` is required and must be specified in ChangeGoldPlanStatusRequest")
- }
- toSerialize["operation_type"] = o.OperationType
- if o.OperationPayScene != nil {
- toSerialize["operation_pay_scene"] = o.OperationPayScene
- }
- return json.Marshal(toSerialize)
- }
- func (o ChangeGoldPlanStatusRequest) String() string {
- var ret string
- if o.SubMchid == nil {
- ret += "SubMchid:<nil>, "
- } else {
- ret += fmt.Sprintf("SubMchid:%v, ", *o.SubMchid)
- }
- if o.OperationType == nil {
- ret += "OperationType:<nil>, "
- } else {
- ret += fmt.Sprintf("OperationType:%v, ", *o.OperationType)
- }
- if o.OperationPayScene == nil {
- ret += "OperationPayScene:<nil>"
- } else {
- ret += fmt.Sprintf("OperationPayScene:%v", *o.OperationPayScene)
- }
- return fmt.Sprintf("ChangeGoldPlanStatusRequest{%s}", ret)
- }
- func (o ChangeGoldPlanStatusRequest) Clone() *ChangeGoldPlanStatusRequest {
- ret := ChangeGoldPlanStatusRequest{}
- if o.SubMchid != nil {
- ret.SubMchid = new(string)
- *ret.SubMchid = *o.SubMchid
- }
- if o.OperationType != nil {
- ret.OperationType = new(OperationType)
- *ret.OperationType = *o.OperationType
- }
- if o.OperationPayScene != nil {
- ret.OperationPayScene = new(OperationPayScene)
- *ret.OperationPayScene = *o.OperationPayScene
- }
- return &ret
- }
- // ChangeGoldPlanStatusResponse
- type ChangeGoldPlanStatusResponse struct {
- // 开通或关闭“商家自定义小票”的特约商户商户号,由微信支付生成并下发。
- SubMchid *string `json:"sub_mchid"`
- }
- func (o ChangeGoldPlanStatusResponse) MarshalJSON() ([]byte, error) {
- toSerialize := map[string]interface{}{}
- if o.SubMchid == nil {
- return nil, fmt.Errorf("field `SubMchid` is required and must be specified in ChangeGoldPlanStatusResponse")
- }
- toSerialize["sub_mchid"] = o.SubMchid
- return json.Marshal(toSerialize)
- }
- func (o ChangeGoldPlanStatusResponse) String() string {
- var ret string
- if o.SubMchid == nil {
- ret += "SubMchid:<nil>"
- } else {
- ret += fmt.Sprintf("SubMchid:%v", *o.SubMchid)
- }
- return fmt.Sprintf("ChangeGoldPlanStatusResponse{%s}", ret)
- }
- func (o ChangeGoldPlanStatusResponse) Clone() *ChangeGoldPlanStatusResponse {
- ret := ChangeGoldPlanStatusResponse{}
- if o.SubMchid != nil {
- ret.SubMchid = new(string)
- *ret.SubMchid = *o.SubMchid
- }
- return &ret
- }
- // CloseAdvertisingShowRequest
- type CloseAdvertisingShowRequest struct {
- // 需要关闭广告展示的特约商户号,由微信支付生成并下发。
- SubMchid *string `json:"sub_mchid"`
- }
- func (o CloseAdvertisingShowRequest) MarshalJSON() ([]byte, error) {
- toSerialize := map[string]interface{}{}
- if o.SubMchid == nil {
- return nil, fmt.Errorf("field `SubMchid` is required and must be specified in CloseAdvertisingShowRequest")
- }
- toSerialize["sub_mchid"] = o.SubMchid
- return json.Marshal(toSerialize)
- }
- func (o CloseAdvertisingShowRequest) String() string {
- var ret string
- if o.SubMchid == nil {
- ret += "SubMchid:<nil>"
- } else {
- ret += fmt.Sprintf("SubMchid:%v", *o.SubMchid)
- }
- return fmt.Sprintf("CloseAdvertisingShowRequest{%s}", ret)
- }
- func (o CloseAdvertisingShowRequest) Clone() *CloseAdvertisingShowRequest {
- ret := CloseAdvertisingShowRequest{}
- if o.SubMchid != nil {
- ret.SubMchid = new(string)
- *ret.SubMchid = *o.SubMchid
- }
- return &ret
- }
- // IndustryType 同业过滤标签枚举值
- type IndustryType string
- func (e IndustryType) Ptr() *IndustryType {
- return &e
- }
- // Enums of IndustryType
- const (
- INDUSTRYTYPE_E_COMMERCE IndustryType = "E_COMMERCE"
- INDUSTRYTYPE_LOVE_MARRIAGE IndustryType = "LOVE_MARRIAGE"
- INDUSTRYTYPE_POTOGRAPHY IndustryType = "POTOGRAPHY"
- INDUSTRYTYPE_EDUCATION IndustryType = "EDUCATION"
- INDUSTRYTYPE_FINANCE IndustryType = "FINANCE"
- INDUSTRYTYPE_TOURISM IndustryType = "TOURISM"
- INDUSTRYTYPE_SKINCARE IndustryType = "SKINCARE"
- INDUSTRYTYPE_FOOD IndustryType = "FOOD"
- INDUSTRYTYPE_SPORT IndustryType = "SPORT"
- INDUSTRYTYPE_JEWELRY_WATCH IndustryType = "JEWELRY_WATCH"
- INDUSTRYTYPE_HEALTHCARE IndustryType = "HEALTHCARE"
- INDUSTRYTYPE_BUSSINESS IndustryType = "BUSSINESS"
- INDUSTRYTYPE_PARENTING IndustryType = "PARENTING"
- INDUSTRYTYPE_CATERING IndustryType = "CATERING"
- INDUSTRYTYPE_RETAIL IndustryType = "RETAIL"
- INDUSTRYTYPE_SERVICES IndustryType = "SERVICES"
- INDUSTRYTYPE_LAW IndustryType = "LAW"
- INDUSTRYTYPE_ESTATE IndustryType = "ESTATE"
- INDUSTRYTYPE_TRANSPORTATION IndustryType = "TRANSPORTATION"
- INDUSTRYTYPE_ENERGY_SAVING IndustryType = "ENERGY_SAVING"
- INDUSTRYTYPE_SECURITY IndustryType = "SECURITY"
- INDUSTRYTYPE_BUILDING_MATERIAL IndustryType = "BUILDING_MATERIAL"
- INDUSTRYTYPE_COMMUNICATION IndustryType = "COMMUNICATION"
- INDUSTRYTYPE_MERCHANDISE IndustryType = "MERCHANDISE"
- INDUSTRYTYPE_ASSOCIATION IndustryType = "ASSOCIATION"
- INDUSTRYTYPE_COMMUNITY IndustryType = "COMMUNITY"
- INDUSTRYTYPE_ONLINE_AVR IndustryType = "ONLINE_AVR"
- INDUSTRYTYPE_WE_MEDIA IndustryType = "WE_MEDIA"
- INDUSTRYTYPE_CAR IndustryType = "CAR"
- INDUSTRYTYPE_SOFTWARE IndustryType = "SOFTWARE"
- INDUSTRYTYPE_GAME IndustryType = "GAME"
- INDUSTRYTYPE_CLOTHING IndustryType = "CLOTHING"
- INDUSTRYTYPE_INDUSTY IndustryType = "INDUSTY"
- INDUSTRYTYPE_AGRICULTURE IndustryType = "AGRICULTURE"
- INDUSTRYTYPE_PUBLISHING_MEDIA IndustryType = "PUBLISHING_MEDIA"
- INDUSTRYTYPE_HOME_DIGITAL IndustryType = "HOME_DIGITAL"
- )
- // OpenAdvertisingShowRequest
- type OpenAdvertisingShowRequest struct {
- // 需要开通广告展示的特约商户号,由微信支付生成并下发。
- SubMchid *string `json:"sub_mchid"`
- // 特约商户同业过滤的同业过滤标签值。如已设置同业过滤标签,再次请求传入,视为新增,将覆盖原有同业标签配置
- AdvertisingIndustryFilters []IndustryType `json:"advertising_industry_filters,omitempty"`
- }
- func (o OpenAdvertisingShowRequest) MarshalJSON() ([]byte, error) {
- toSerialize := map[string]interface{}{}
- if o.SubMchid == nil {
- return nil, fmt.Errorf("field `SubMchid` is required and must be specified in OpenAdvertisingShowRequest")
- }
- toSerialize["sub_mchid"] = o.SubMchid
- if o.AdvertisingIndustryFilters != nil {
- toSerialize["advertising_industry_filters"] = o.AdvertisingIndustryFilters
- }
- return json.Marshal(toSerialize)
- }
- func (o OpenAdvertisingShowRequest) String() string {
- var ret string
- if o.SubMchid == nil {
- ret += "SubMchid:<nil>, "
- } else {
- ret += fmt.Sprintf("SubMchid:%v, ", *o.SubMchid)
- }
- ret += fmt.Sprintf("AdvertisingIndustryFilters:%v", o.AdvertisingIndustryFilters)
- return fmt.Sprintf("OpenAdvertisingShowRequest{%s}", ret)
- }
- func (o OpenAdvertisingShowRequest) Clone() *OpenAdvertisingShowRequest {
- ret := OpenAdvertisingShowRequest{}
- if o.SubMchid != nil {
- ret.SubMchid = new(string)
- *ret.SubMchid = *o.SubMchid
- }
- if o.AdvertisingIndustryFilters != nil {
- ret.AdvertisingIndustryFilters = make([]IndustryType, len(o.AdvertisingIndustryFilters))
- for i, item := range o.AdvertisingIndustryFilters {
- ret.AdvertisingIndustryFilters[i] = item
- }
- }
- return &ret
- }
- // OperationPayScene
- type OperationPayScene string
- func (e OperationPayScene) Ptr() *OperationPayScene {
- return &e
- }
- // Enums of OperationPayScene
- const (
- OPERATIONPAYSCENE_JSAPI_AND_MINIPROGRAM OperationPayScene = "JSAPI_AND_MINIPROGRAM"
- OPERATIONPAYSCENE_JSAPI OperationPayScene = "JSAPI"
- OPERATIONPAYSCENE_MINIPROGRAM OperationPayScene = "MINIPROGRAM"
- )
- // OperationType
- type OperationType string
- func (e OperationType) Ptr() *OperationType {
- return &e
- }
- // Enums of OperationType
- const (
- OPERATIONTYPE_OPEN OperationType = "OPEN"
- OPERATIONTYPE_CLOSE OperationType = "CLOSE"
- )
- // SetAdvertisingIndustryFilterRequest
- type SetAdvertisingIndustryFilterRequest struct {
- // 需要设置“同业过滤标签”的特约商户号,由微信支付生成并下发。
- SubMchid *string `json:"sub_mchid"`
- // 特约商户同业过滤的同业过滤标签值,同业过滤标签最少传一个,最多三个。如已设置同业过滤标签,再次请求传入,视为新增,将覆盖原有同业标签配置。 注:若配置完成后需清空标签的,可登陆商户平台手动清空(路径:商户平台->服务商功能->点金计划->特约商户管理->同业过滤标签)
- AdvertisingIndustryFilters []IndustryType `json:"advertising_industry_filters"`
- }
- func (o SetAdvertisingIndustryFilterRequest) MarshalJSON() ([]byte, error) {
- toSerialize := map[string]interface{}{}
- if o.SubMchid == nil {
- return nil, fmt.Errorf("field `SubMchid` is required and must be specified in SetAdvertisingIndustryFilterRequest")
- }
- toSerialize["sub_mchid"] = o.SubMchid
- if o.AdvertisingIndustryFilters == nil {
- return nil, fmt.Errorf("field `AdvertisingIndustryFilters` is required and must be specified in SetAdvertisingIndustryFilterRequest")
- }
- toSerialize["advertising_industry_filters"] = o.AdvertisingIndustryFilters
- return json.Marshal(toSerialize)
- }
- func (o SetAdvertisingIndustryFilterRequest) String() string {
- var ret string
- if o.SubMchid == nil {
- ret += "SubMchid:<nil>, "
- } else {
- ret += fmt.Sprintf("SubMchid:%v, ", *o.SubMchid)
- }
- ret += fmt.Sprintf("AdvertisingIndustryFilters:%v", o.AdvertisingIndustryFilters)
- return fmt.Sprintf("SetAdvertisingIndustryFilterRequest{%s}", ret)
- }
- func (o SetAdvertisingIndustryFilterRequest) Clone() *SetAdvertisingIndustryFilterRequest {
- ret := SetAdvertisingIndustryFilterRequest{}
- if o.SubMchid != nil {
- ret.SubMchid = new(string)
- *ret.SubMchid = *o.SubMchid
- }
- if o.AdvertisingIndustryFilters != nil {
- ret.AdvertisingIndustryFilters = make([]IndustryType, len(o.AdvertisingIndustryFilters))
- for i, item := range o.AdvertisingIndustryFilters {
- ret.AdvertisingIndustryFilters[i] = item
- }
- }
- return &ret
- }
|