// Copyright 2021 Tencent Inc. All rights reserved. // // 营销加价购对外API // // 指定服务商可通过该接口报名加价购活动、查询某个区域内的加价购活动列表、锁定加价活动购资格以及解锁加价购活动资格。 // // API version: 1.4.0 // Code generated by WechatPay APIv3 Generator based on [OpenAPI Generator](https://openapi-generator.tech); DO NOT EDIT. package retailstore import ( "encoding/json" "fmt" ) // ActApplyInfo type ActApplyInfo struct { // 门店信息 StoreInfo *StoreInfo `json:"store_info"` // 品牌加价购活动商品的原价,该价格会在加价购小程序插件中展示(单位:分) GoodsOriginalPrice *int64 `json:"goods_original_price"` } func (o ActApplyInfo) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.StoreInfo == nil { return nil, fmt.Errorf("field `StoreInfo` is required and must be specified in ActApplyInfo") } toSerialize["store_info"] = o.StoreInfo if o.GoodsOriginalPrice == nil { return nil, fmt.Errorf("field `GoodsOriginalPrice` is required and must be specified in ActApplyInfo") } toSerialize["goods_original_price"] = o.GoodsOriginalPrice return json.Marshal(toSerialize) } func (o ActApplyInfo) String() string { var ret string ret += fmt.Sprintf("StoreInfo:%v, ", o.StoreInfo) if o.GoodsOriginalPrice == nil { ret += "GoodsOriginalPrice:" } else { ret += fmt.Sprintf("GoodsOriginalPrice:%v", *o.GoodsOriginalPrice) } return fmt.Sprintf("ActApplyInfo{%s}", ret) } func (o ActApplyInfo) Clone() *ActApplyInfo { ret := ActApplyInfo{} if o.StoreInfo != nil { ret.StoreInfo = o.StoreInfo.Clone() } if o.GoodsOriginalPrice != nil { ret.GoodsOriginalPrice = new(int64) *ret.GoodsOriginalPrice = *o.GoodsOriginalPrice } return &ret } // ActArea type ActArea struct { // 省名称 Province *string `json:"province,omitempty"` // 市名称 City *string `json:"city,omitempty"` // 区名称 District *string `json:"district,omitempty"` } func (o ActArea) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Province != nil { toSerialize["province"] = o.Province } if o.City != nil { toSerialize["city"] = o.City } if o.District != nil { toSerialize["district"] = o.District } return json.Marshal(toSerialize) } func (o ActArea) String() string { var ret string if o.Province == nil { ret += "Province:, " } else { ret += fmt.Sprintf("Province:%v, ", *o.Province) } if o.City == nil { ret += "City:, " } else { ret += fmt.Sprintf("City:%v, ", *o.City) } if o.District == nil { ret += "District:" } else { ret += fmt.Sprintf("District:%v", *o.District) } return fmt.Sprintf("ActArea{%s}", ret) } func (o ActArea) Clone() *ActArea { ret := ActArea{} if o.Province != nil { ret.Province = new(string) *ret.Province = *o.Province } if o.City != nil { ret.City = new(string) *ret.City = *o.City } if o.District != nil { ret.District = new(string) *ret.District = *o.District } return &ret } // ActInfo type ActInfo struct { // 活动名称 ActivityName *string `json:"activity_name,omitempty"` // 遵循rfc3339标准格式,格式为YYYY-MM-DDTHH:mm:ss+TIMEZONE,YYYY-MM-DD表示年月日,T出现在字符串中,表示time元素的开头,HH:mm:ss表示时分秒,TIMEZONE表示时区(+08:00表示东八区时间,领先UTC 8小时,即北京时间) ApplyStartTime *string `json:"apply_start_time,omitempty"` // 遵循rfc3339标准格式,格式为YYYY-MM-DDTHH:mm:ss+TIMEZONE,YYYY-MM-DD表示年月日,T出现在字符串中,表示time元素的开头,HH:mm:ss表示时分秒,TIMEZONE表示时区(+08:00表示东八区时间,领先UTC 8小时,即北京时间) ApplyEndTime *string `json:"apply_end_time,omitempty"` // 遵循rfc3339标准格式,格式为YYYY-MM-DDTHH:mm:ss+TIMEZONE,YYYY-MM-DD表示年月日,T出现在字符串中,表示time元素的开头,HH:mm:ss表示时分秒,TIMEZONE表示时区(+08:00表示东八区时间,领先UTC 8小时,即北京时间) ActivityStartTime *string `json:"activity_start_time,omitempty"` // 遵循rfc3339标准格式,格式为YYYY-MM-DDTHH:mm:ss+TIMEZONE,YYYY-MM-DD表示年月日,T出现在字符串中,表示time元素的开头,HH:mm:ss表示时分秒,TIMEZONE表示时区(+08:00表示东八区时间,领先UTC 8小时,即北京时间) ActivityEndTime *string `json:"activity_end_time,omitempty"` // 活动描述 ActivityDescription *string `json:"activity_description,omitempty"` } func (o ActInfo) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.ActivityName != nil { toSerialize["activity_name"] = o.ActivityName } if o.ApplyStartTime != nil { toSerialize["apply_start_time"] = o.ApplyStartTime } if o.ApplyEndTime != nil { toSerialize["apply_end_time"] = o.ApplyEndTime } if o.ActivityStartTime != nil { toSerialize["activity_start_time"] = o.ActivityStartTime } if o.ActivityEndTime != nil { toSerialize["activity_end_time"] = o.ActivityEndTime } if o.ActivityDescription != nil { toSerialize["activity_description"] = o.ActivityDescription } return json.Marshal(toSerialize) } func (o ActInfo) String() string { var ret string if o.ActivityName == nil { ret += "ActivityName:, " } else { ret += fmt.Sprintf("ActivityName:%v, ", *o.ActivityName) } if o.ApplyStartTime == nil { ret += "ApplyStartTime:, " } else { ret += fmt.Sprintf("ApplyStartTime:%v, ", *o.ApplyStartTime) } if o.ApplyEndTime == nil { ret += "ApplyEndTime:, " } else { ret += fmt.Sprintf("ApplyEndTime:%v, ", *o.ApplyEndTime) } if o.ActivityStartTime == nil { ret += "ActivityStartTime:, " } else { ret += fmt.Sprintf("ActivityStartTime:%v, ", *o.ActivityStartTime) } if o.ActivityEndTime == nil { ret += "ActivityEndTime:, " } else { ret += fmt.Sprintf("ActivityEndTime:%v, ", *o.ActivityEndTime) } if o.ActivityDescription == nil { ret += "ActivityDescription:" } else { ret += fmt.Sprintf("ActivityDescription:%v", *o.ActivityDescription) } return fmt.Sprintf("ActInfo{%s}", ret) } func (o ActInfo) Clone() *ActInfo { ret := ActInfo{} if o.ActivityName != nil { ret.ActivityName = new(string) *ret.ActivityName = *o.ActivityName } if o.ApplyStartTime != nil { ret.ApplyStartTime = new(string) *ret.ApplyStartTime = *o.ApplyStartTime } if o.ApplyEndTime != nil { ret.ApplyEndTime = new(string) *ret.ApplyEndTime = *o.ApplyEndTime } if o.ActivityStartTime != nil { ret.ActivityStartTime = new(string) *ret.ActivityStartTime = *o.ActivityStartTime } if o.ActivityEndTime != nil { ret.ActivityEndTime = new(string) *ret.ActivityEndTime = *o.ActivityEndTime } if o.ActivityDescription != nil { ret.ActivityDescription = new(string) *ret.ActivityDescription = *o.ActivityDescription } return &ret } // ActRule type ActRule struct { // 购买单件商品,补贴给门店的金额(单位:分) StoreSubsidy *int64 `json:"store_subsidy,omitempty"` // 购买单件商品,补贴给服务商的佣金(单位:分) ServiceProviderSubsidy *int64 `json:"service_provider_subsidy,omitempty"` // 活动门店补贴商品数上限 StoreSubsidyQuota *int64 `json:"store_subsidy_quota,omitempty"` // 单用户享受加价购优惠次数上限 UserSubsidyQuota *int64 `json:"user_subsidy_quota,omitempty"` // 活动区域列表 Areas []ActArea `json:"areas,omitempty"` } func (o ActRule) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.StoreSubsidy != nil { toSerialize["store_subsidy"] = o.StoreSubsidy } if o.ServiceProviderSubsidy != nil { toSerialize["service_provider_subsidy"] = o.ServiceProviderSubsidy } if o.StoreSubsidyQuota != nil { toSerialize["store_subsidy_quota"] = o.StoreSubsidyQuota } if o.UserSubsidyQuota != nil { toSerialize["user_subsidy_quota"] = o.UserSubsidyQuota } if o.Areas != nil { toSerialize["areas"] = o.Areas } return json.Marshal(toSerialize) } func (o ActRule) String() string { var ret string if o.StoreSubsidy == nil { ret += "StoreSubsidy:, " } else { ret += fmt.Sprintf("StoreSubsidy:%v, ", *o.StoreSubsidy) } if o.ServiceProviderSubsidy == nil { ret += "ServiceProviderSubsidy:, " } else { ret += fmt.Sprintf("ServiceProviderSubsidy:%v, ", *o.ServiceProviderSubsidy) } if o.StoreSubsidyQuota == nil { ret += "StoreSubsidyQuota:, " } else { ret += fmt.Sprintf("StoreSubsidyQuota:%v, ", *o.StoreSubsidyQuota) } if o.UserSubsidyQuota == nil { ret += "UserSubsidyQuota:, " } else { ret += fmt.Sprintf("UserSubsidyQuota:%v, ", *o.UserSubsidyQuota) } ret += fmt.Sprintf("Areas:%v", o.Areas) return fmt.Sprintf("ActRule{%s}", ret) } func (o ActRule) Clone() *ActRule { ret := ActRule{} if o.StoreSubsidy != nil { ret.StoreSubsidy = new(int64) *ret.StoreSubsidy = *o.StoreSubsidy } if o.ServiceProviderSubsidy != nil { ret.ServiceProviderSubsidy = new(int64) *ret.ServiceProviderSubsidy = *o.ServiceProviderSubsidy } if o.StoreSubsidyQuota != nil { ret.StoreSubsidyQuota = new(int64) *ret.StoreSubsidyQuota = *o.StoreSubsidyQuota } if o.UserSubsidyQuota != nil { ret.UserSubsidyQuota = new(int64) *ret.UserSubsidyQuota = *o.UserSubsidyQuota } if o.Areas != nil { ret.Areas = make([]ActArea, len(o.Areas)) for i, item := range o.Areas { ret.Areas[i] = *item.Clone() } } return &ret } // AddRepresentativeRequest type AddRepresentativeRequest struct { // 零售小店活动ID ActivityId *string `json:"activity_id"` // 业务代理信息列表 RepresentativeInfoList []RepresentativeInfo `json:"representative_info_list"` // 商户新增业务代理请求的唯一标识,商户需保证唯一。可包含英文字母,数字,\\|,\\_,\\*,\\-等内容,不允许出现其他不合法符号。 OutRequestNo *string `json:"out_request_no"` // 添加时间 AddTime *string `json:"add_time,omitempty"` } func (o AddRepresentativeRequest) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.ActivityId == nil { return nil, fmt.Errorf("field `ActivityId` is required and must be specified in AddRepresentativeRequest") } toSerialize["activity_id"] = o.ActivityId if o.RepresentativeInfoList == nil { return nil, fmt.Errorf("field `RepresentativeInfoList` is required and must be specified in AddRepresentativeRequest") } toSerialize["representative_info_list"] = o.RepresentativeInfoList if o.OutRequestNo == nil { return nil, fmt.Errorf("field `OutRequestNo` is required and must be specified in AddRepresentativeRequest") } toSerialize["out_request_no"] = o.OutRequestNo if o.AddTime != nil { toSerialize["add_time"] = o.AddTime } return json.Marshal(toSerialize) } func (o AddRepresentativeRequest) String() string { var ret string if o.ActivityId == nil { ret += "ActivityId:, " } else { ret += fmt.Sprintf("ActivityId:%v, ", *o.ActivityId) } ret += fmt.Sprintf("RepresentativeInfoList:%v, ", o.RepresentativeInfoList) if o.OutRequestNo == nil { ret += "OutRequestNo:, " } else { ret += fmt.Sprintf("OutRequestNo:%v, ", *o.OutRequestNo) } if o.AddTime == nil { ret += "AddTime:" } else { ret += fmt.Sprintf("AddTime:%v", *o.AddTime) } return fmt.Sprintf("AddRepresentativeRequest{%s}", ret) } func (o AddRepresentativeRequest) Clone() *AddRepresentativeRequest { ret := AddRepresentativeRequest{} if o.ActivityId != nil { ret.ActivityId = new(string) *ret.ActivityId = *o.ActivityId } if o.RepresentativeInfoList != nil { ret.RepresentativeInfoList = make([]RepresentativeInfo, len(o.RepresentativeInfoList)) for i, item := range o.RepresentativeInfoList { ret.RepresentativeInfoList[i] = *item.Clone() } } if o.OutRequestNo != nil { ret.OutRequestNo = new(string) *ret.OutRequestNo = *o.OutRequestNo } if o.AddTime != nil { ret.AddTime = new(string) *ret.AddTime = *o.AddTime } return &ret } // AddRepresentativesRequest type AddRepresentativesRequest struct { // 业务代理信息列表 RepresentativeInfoList []RepresentativeInfo `json:"representative_info_list"` // 商户新增业务代理请求的唯一标识,商户需保证唯一。可包含英文字母,数字,\\|,\\_,\\*,\\-等内容,不允许出现其他不合法符号。 OutRequestNo *string `json:"out_request_no"` // 添加时间 AddTime *string `json:"add_time,omitempty"` } func (o AddRepresentativesRequest) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.RepresentativeInfoList == nil { return nil, fmt.Errorf("field `RepresentativeInfoList` is required and must be specified in AddRepresentativesRequest") } toSerialize["representative_info_list"] = o.RepresentativeInfoList if o.OutRequestNo == nil { return nil, fmt.Errorf("field `OutRequestNo` is required and must be specified in AddRepresentativesRequest") } toSerialize["out_request_no"] = o.OutRequestNo if o.AddTime != nil { toSerialize["add_time"] = o.AddTime } return json.Marshal(toSerialize) } func (o AddRepresentativesRequest) String() string { var ret string ret += fmt.Sprintf("RepresentativeInfoList:%v, ", o.RepresentativeInfoList) if o.OutRequestNo == nil { ret += "OutRequestNo:, " } else { ret += fmt.Sprintf("OutRequestNo:%v, ", *o.OutRequestNo) } if o.AddTime == nil { ret += "AddTime:" } else { ret += fmt.Sprintf("AddTime:%v", *o.AddTime) } return fmt.Sprintf("AddRepresentativesRequest{%s}", ret) } func (o AddRepresentativesRequest) Clone() *AddRepresentativesRequest { ret := AddRepresentativesRequest{} if o.RepresentativeInfoList != nil { ret.RepresentativeInfoList = make([]RepresentativeInfo, len(o.RepresentativeInfoList)) for i, item := range o.RepresentativeInfoList { ret.RepresentativeInfoList[i] = *item.Clone() } } if o.OutRequestNo != nil { ret.OutRequestNo = new(string) *ret.OutRequestNo = *o.OutRequestNo } if o.AddTime != nil { ret.AddTime = new(string) *ret.AddTime = *o.AddTime } return &ret } // AddRepresentativesResponse type AddRepresentativesResponse struct { // 零售小店活动ID ActivityId *string `json:"activity_id"` // 添加失败业务代理信息列表 FailedRepresentativeInfoList []RepresentativeInfo `json:"failed_representative_info_list,omitempty"` // 添加时间 AddTime *string `json:"add_time"` } func (o AddRepresentativesResponse) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.ActivityId == nil { return nil, fmt.Errorf("field `ActivityId` is required and must be specified in AddRepresentativesResponse") } toSerialize["activity_id"] = o.ActivityId if o.FailedRepresentativeInfoList != nil { toSerialize["failed_representative_info_list"] = o.FailedRepresentativeInfoList } if o.AddTime == nil { return nil, fmt.Errorf("field `AddTime` is required and must be specified in AddRepresentativesResponse") } toSerialize["add_time"] = o.AddTime return json.Marshal(toSerialize) } func (o AddRepresentativesResponse) String() string { var ret string if o.ActivityId == nil { ret += "ActivityId:, " } else { ret += fmt.Sprintf("ActivityId:%v, ", *o.ActivityId) } ret += fmt.Sprintf("FailedRepresentativeInfoList:%v, ", o.FailedRepresentativeInfoList) if o.AddTime == nil { ret += "AddTime:" } else { ret += fmt.Sprintf("AddTime:%v", *o.AddTime) } return fmt.Sprintf("AddRepresentativesResponse{%s}", ret) } func (o AddRepresentativesResponse) Clone() *AddRepresentativesResponse { ret := AddRepresentativesResponse{} if o.ActivityId != nil { ret.ActivityId = new(string) *ret.ActivityId = *o.ActivityId } if o.FailedRepresentativeInfoList != nil { ret.FailedRepresentativeInfoList = make([]RepresentativeInfo, len(o.FailedRepresentativeInfoList)) for i, item := range o.FailedRepresentativeInfoList { ret.FailedRepresentativeInfoList[i] = *item.Clone() } } if o.AddTime != nil { ret.AddTime = new(string) *ret.AddTime = *o.AddTime } return &ret } // AddStoresBody type AddStoresBody struct { // 商户新增小店活动门店凭据号,商户侧需保持唯一性。可包含英文字母,数字,\\\\|,\\\\_,\\\\*,\\\\-等内容,不允许出现其他不合法符号。 OutRequestNo *string `json:"out_request_no"` // 添加时间,遵循rfc3339标准格式,格式为yyyy-MM-DDTHH:mm:ss+TIMEZONE,yyyy-MM-DD表示年月日,T出现在字符串中,表示time元素的开头,HH:mm:ss表示时分秒,TIMEZONE表示时区(+08:00表示东八区时间,领先UTC8小时,即北京时间)。例如:2015-05-20T13:29:35+08:00表示,北京时间2015年5月20日 13点29分35秒。 AddTime *string `json:"add_time"` // 待新增的小店活动门店列表 Stores []RetailStoreInfo `json:"stores"` } func (o AddStoresBody) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.OutRequestNo == nil { return nil, fmt.Errorf("field `OutRequestNo` is required and must be specified in AddStoresBody") } toSerialize["out_request_no"] = o.OutRequestNo if o.AddTime == nil { return nil, fmt.Errorf("field `AddTime` is required and must be specified in AddStoresBody") } toSerialize["add_time"] = o.AddTime if o.Stores == nil { return nil, fmt.Errorf("field `Stores` is required and must be specified in AddStoresBody") } toSerialize["stores"] = o.Stores return json.Marshal(toSerialize) } func (o AddStoresBody) String() string { var ret string if o.OutRequestNo == nil { ret += "OutRequestNo:, " } else { ret += fmt.Sprintf("OutRequestNo:%v, ", *o.OutRequestNo) } if o.AddTime == nil { ret += "AddTime:, " } else { ret += fmt.Sprintf("AddTime:%v, ", *o.AddTime) } ret += fmt.Sprintf("Stores:%v", o.Stores) return fmt.Sprintf("AddStoresBody{%s}", ret) } func (o AddStoresBody) Clone() *AddStoresBody { ret := AddStoresBody{} if o.OutRequestNo != nil { ret.OutRequestNo = new(string) *ret.OutRequestNo = *o.OutRequestNo } if o.AddTime != nil { ret.AddTime = new(string) *ret.AddTime = *o.AddTime } if o.Stores != nil { ret.Stores = make([]RetailStoreInfo, len(o.Stores)) for i, item := range o.Stores { ret.Stores[i] = *item.Clone() } } return &ret } // AddStoresRequest type AddStoresRequest struct { // 品牌ID BrandId *string `json:"brand_id"` // 商户新增小店活动门店凭据号,商户侧需保持唯一性。可包含英文字母,数字,\\\\|,\\\\_,\\\\*,\\\\-等内容,不允许出现其他不合法符号。 OutRequestNo *string `json:"out_request_no"` // 添加时间,遵循rfc3339标准格式,格式为yyyy-MM-DDTHH:mm:ss+TIMEZONE,yyyy-MM-DD表示年月日,T出现在字符串中,表示time元素的开头,HH:mm:ss表示时分秒,TIMEZONE表示时区(+08:00表示东八区时间,领先UTC8小时,即北京时间)。例如:2015-05-20T13:29:35+08:00表示,北京时间2015年5月20日 13点29分35秒。 AddTime *string `json:"add_time"` // 待新增的小店活动门店列表 Stores []RetailStoreInfo `json:"stores"` } func (o AddStoresRequest) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.BrandId == nil { return nil, fmt.Errorf("field `BrandId` is required and must be specified in AddStoresRequest") } toSerialize["brand_id"] = o.BrandId if o.OutRequestNo == nil { return nil, fmt.Errorf("field `OutRequestNo` is required and must be specified in AddStoresRequest") } toSerialize["out_request_no"] = o.OutRequestNo if o.AddTime == nil { return nil, fmt.Errorf("field `AddTime` is required and must be specified in AddStoresRequest") } toSerialize["add_time"] = o.AddTime if o.Stores == nil { return nil, fmt.Errorf("field `Stores` is required and must be specified in AddStoresRequest") } toSerialize["stores"] = o.Stores return json.Marshal(toSerialize) } func (o AddStoresRequest) String() string { var ret string if o.BrandId == nil { ret += "BrandId:, " } else { ret += fmt.Sprintf("BrandId:%v, ", *o.BrandId) } if o.OutRequestNo == nil { ret += "OutRequestNo:, " } else { ret += fmt.Sprintf("OutRequestNo:%v, ", *o.OutRequestNo) } if o.AddTime == nil { ret += "AddTime:, " } else { ret += fmt.Sprintf("AddTime:%v, ", *o.AddTime) } ret += fmt.Sprintf("Stores:%v", o.Stores) return fmt.Sprintf("AddStoresRequest{%s}", ret) } func (o AddStoresRequest) Clone() *AddStoresRequest { ret := AddStoresRequest{} if o.BrandId != nil { ret.BrandId = new(string) *ret.BrandId = *o.BrandId } if o.OutRequestNo != nil { ret.OutRequestNo = new(string) *ret.OutRequestNo = *o.OutRequestNo } if o.AddTime != nil { ret.AddTime = new(string) *ret.AddTime = *o.AddTime } if o.Stores != nil { ret.Stores = make([]RetailStoreInfo, len(o.Stores)) for i, item := range o.Stores { ret.Stores[i] = *item.Clone() } } return &ret } // AddStoresResponse type AddStoresResponse struct { // 添加时间,遵循rfc3339标准格式,格式为yyyy-MM-DDTHH:mm:ss+TIMEZONE,yyyy-MM-DD表示年月日,T出现在字符串中,表示time元素的开头,HH:mm:ss表示时分秒,TIMEZONE表示时区(+08:00表示东八区时间,领先UTC8小时,即北京时间)。例如:2015-05-20T13:29:35+08:00表示,北京时间2015年5月20日 13点29分35秒。 AddTime *string `json:"add_time,omitempty"` // 添加失败的小店活动门店列表 FailedStores []RetailStoreInfo `json:"failed_stores,omitempty"` } func (o AddStoresResponse) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.AddTime != nil { toSerialize["add_time"] = o.AddTime } if o.FailedStores != nil { toSerialize["failed_stores"] = o.FailedStores } return json.Marshal(toSerialize) } func (o AddStoresResponse) String() string { var ret string if o.AddTime == nil { ret += "AddTime:, " } else { ret += fmt.Sprintf("AddTime:%v, ", *o.AddTime) } ret += fmt.Sprintf("FailedStores:%v", o.FailedStores) return fmt.Sprintf("AddStoresResponse{%s}", ret) } func (o AddStoresResponse) Clone() *AddStoresResponse { ret := AddStoresResponse{} if o.AddTime != nil { ret.AddTime = new(string) *ret.AddTime = *o.AddTime } if o.FailedStores != nil { ret.FailedStores = make([]RetailStoreInfo, len(o.FailedStores)) for i, item := range o.FailedStores { ret.FailedStores[i] = *item.Clone() } } return &ret } // ApplyActivityBody type ApplyActivityBody struct { // 调用报名活动API的商户的商户号 CallerMerchantId *string `json:"caller_merchant_id"` // 门店报名信息 ApplyInfos []ActApplyInfo `json:"apply_infos,omitempty"` } func (o ApplyActivityBody) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.CallerMerchantId == nil { return nil, fmt.Errorf("field `CallerMerchantId` is required and must be specified in ApplyActivityBody") } toSerialize["caller_merchant_id"] = o.CallerMerchantId if o.ApplyInfos != nil { toSerialize["apply_infos"] = o.ApplyInfos } return json.Marshal(toSerialize) } func (o ApplyActivityBody) String() string { var ret string if o.CallerMerchantId == nil { ret += "CallerMerchantId:, " } else { ret += fmt.Sprintf("CallerMerchantId:%v, ", *o.CallerMerchantId) } ret += fmt.Sprintf("ApplyInfos:%v", o.ApplyInfos) return fmt.Sprintf("ApplyActivityBody{%s}", ret) } func (o ApplyActivityBody) Clone() *ApplyActivityBody { ret := ApplyActivityBody{} if o.CallerMerchantId != nil { ret.CallerMerchantId = new(string) *ret.CallerMerchantId = *o.CallerMerchantId } if o.ApplyInfos != nil { ret.ApplyInfos = make([]ActApplyInfo, len(o.ApplyInfos)) for i, item := range o.ApplyInfos { ret.ApplyInfos[i] = *item.Clone() } } return &ret } // ApplyActivityRequest type ApplyActivityRequest struct { // 活动ID ActivityId *string `json:"activity_id"` // 调用报名活动API的商户的商户号 CallerMerchantId *string `json:"caller_merchant_id"` // 门店报名信息 ApplyInfos []ActApplyInfo `json:"apply_infos,omitempty"` } func (o ApplyActivityRequest) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.ActivityId == nil { return nil, fmt.Errorf("field `ActivityId` is required and must be specified in ApplyActivityRequest") } toSerialize["activity_id"] = o.ActivityId if o.CallerMerchantId == nil { return nil, fmt.Errorf("field `CallerMerchantId` is required and must be specified in ApplyActivityRequest") } toSerialize["caller_merchant_id"] = o.CallerMerchantId if o.ApplyInfos != nil { toSerialize["apply_infos"] = o.ApplyInfos } return json.Marshal(toSerialize) } func (o ApplyActivityRequest) String() string { var ret string if o.ActivityId == nil { ret += "ActivityId:, " } else { ret += fmt.Sprintf("ActivityId:%v, ", *o.ActivityId) } if o.CallerMerchantId == nil { ret += "CallerMerchantId:, " } else { ret += fmt.Sprintf("CallerMerchantId:%v, ", *o.CallerMerchantId) } ret += fmt.Sprintf("ApplyInfos:%v", o.ApplyInfos) return fmt.Sprintf("ApplyActivityRequest{%s}", ret) } func (o ApplyActivityRequest) Clone() *ApplyActivityRequest { ret := ApplyActivityRequest{} if o.ActivityId != nil { ret.ActivityId = new(string) *ret.ActivityId = *o.ActivityId } if o.CallerMerchantId != nil { ret.CallerMerchantId = new(string) *ret.CallerMerchantId = *o.CallerMerchantId } if o.ApplyInfos != nil { ret.ApplyInfos = make([]ActApplyInfo, len(o.ApplyInfos)) for i, item := range o.ApplyInfos { ret.ApplyInfos[i] = *item.Clone() } } return &ret } // ApplyActivityResponse type ApplyActivityResponse struct { // 返回结果文案 ReturnMessage *string `json:"return_message,omitempty"` // 失败的报名记录 FailedApplyInfos []ActApplyInfo `json:"failed_apply_infos,omitempty"` // 成功的报名记录 SucceedApplyInfos []ActApplyInfo `json:"succeed_apply_infos,omitempty"` } func (o ApplyActivityResponse) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.ReturnMessage != nil { toSerialize["return_message"] = o.ReturnMessage } if o.FailedApplyInfos != nil { toSerialize["failed_apply_infos"] = o.FailedApplyInfos } if o.SucceedApplyInfos != nil { toSerialize["succeed_apply_infos"] = o.SucceedApplyInfos } return json.Marshal(toSerialize) } func (o ApplyActivityResponse) String() string { var ret string if o.ReturnMessage == nil { ret += "ReturnMessage:, " } else { ret += fmt.Sprintf("ReturnMessage:%v, ", *o.ReturnMessage) } ret += fmt.Sprintf("FailedApplyInfos:%v, ", o.FailedApplyInfos) ret += fmt.Sprintf("SucceedApplyInfos:%v", o.SucceedApplyInfos) return fmt.Sprintf("ApplyActivityResponse{%s}", ret) } func (o ApplyActivityResponse) Clone() *ApplyActivityResponse { ret := ApplyActivityResponse{} if o.ReturnMessage != nil { ret.ReturnMessage = new(string) *ret.ReturnMessage = *o.ReturnMessage } if o.FailedApplyInfos != nil { ret.FailedApplyInfos = make([]ActApplyInfo, len(o.FailedApplyInfos)) for i, item := range o.FailedApplyInfos { ret.FailedApplyInfos[i] = *item.Clone() } } if o.SucceedApplyInfos != nil { ret.SucceedApplyInfos = make([]ActApplyInfo, len(o.SucceedApplyInfos)) for i, item := range o.SucceedApplyInfos { ret.SucceedApplyInfos[i] = *item.Clone() } } return &ret } // CreateMaterialsBody type CreateMaterialsBody struct { // 商户添加业务代理信息凭据号,商户侧需保持唯一性。可包含英文字母,数字,\\\\|,\\\\_,\\\\*,\\\\-等内容,不允许出现其他不合法符号。 OutRequestNo *string `json:"out_request_no"` // 生成物料码数量 MaterialNum *int64 `json:"material_num"` } func (o CreateMaterialsBody) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.OutRequestNo == nil { return nil, fmt.Errorf("field `OutRequestNo` is required and must be specified in CreateMaterialsBody") } toSerialize["out_request_no"] = o.OutRequestNo if o.MaterialNum == nil { return nil, fmt.Errorf("field `MaterialNum` is required and must be specified in CreateMaterialsBody") } toSerialize["material_num"] = o.MaterialNum return json.Marshal(toSerialize) } func (o CreateMaterialsBody) String() string { var ret string if o.OutRequestNo == nil { ret += "OutRequestNo:, " } else { ret += fmt.Sprintf("OutRequestNo:%v, ", *o.OutRequestNo) } if o.MaterialNum == nil { ret += "MaterialNum:" } else { ret += fmt.Sprintf("MaterialNum:%v", *o.MaterialNum) } return fmt.Sprintf("CreateMaterialsBody{%s}", ret) } func (o CreateMaterialsBody) Clone() *CreateMaterialsBody { ret := CreateMaterialsBody{} if o.OutRequestNo != nil { ret.OutRequestNo = new(string) *ret.OutRequestNo = *o.OutRequestNo } if o.MaterialNum != nil { ret.MaterialNum = new(int64) *ret.MaterialNum = *o.MaterialNum } return &ret } // CreateMaterialsRequest type CreateMaterialsRequest struct { // 品牌ID BrandId *string `json:"brand_id"` // 商户添加业务代理信息凭据号,商户侧需保持唯一性。可包含英文字母,数字,\\\\|,\\\\_,\\\\*,\\\\-等内容,不允许出现其他不合法符号。 OutRequestNo *string `json:"out_request_no"` // 生成物料码数量 MaterialNum *int64 `json:"material_num"` } func (o CreateMaterialsRequest) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.BrandId == nil { return nil, fmt.Errorf("field `BrandId` is required and must be specified in CreateMaterialsRequest") } toSerialize["brand_id"] = o.BrandId if o.OutRequestNo == nil { return nil, fmt.Errorf("field `OutRequestNo` is required and must be specified in CreateMaterialsRequest") } toSerialize["out_request_no"] = o.OutRequestNo if o.MaterialNum == nil { return nil, fmt.Errorf("field `MaterialNum` is required and must be specified in CreateMaterialsRequest") } toSerialize["material_num"] = o.MaterialNum return json.Marshal(toSerialize) } func (o CreateMaterialsRequest) String() string { var ret string if o.BrandId == nil { ret += "BrandId:, " } else { ret += fmt.Sprintf("BrandId:%v, ", *o.BrandId) } if o.OutRequestNo == nil { ret += "OutRequestNo:, " } else { ret += fmt.Sprintf("OutRequestNo:%v, ", *o.OutRequestNo) } if o.MaterialNum == nil { ret += "MaterialNum:" } else { ret += fmt.Sprintf("MaterialNum:%v", *o.MaterialNum) } return fmt.Sprintf("CreateMaterialsRequest{%s}", ret) } func (o CreateMaterialsRequest) Clone() *CreateMaterialsRequest { ret := CreateMaterialsRequest{} if o.BrandId != nil { ret.BrandId = new(string) *ret.BrandId = *o.BrandId } if o.OutRequestNo != nil { ret.OutRequestNo = new(string) *ret.OutRequestNo = *o.OutRequestNo } if o.MaterialNum != nil { ret.MaterialNum = new(int64) *ret.MaterialNum = *o.MaterialNum } return &ret } // DeleteRepresentativeBody type DeleteRepresentativeBody struct { // 业务代理信息列表 RepresentativeInfoList []RepresentativeInfo `json:"representative_info_list"` // 商户删除业务代理请求的唯一标识,商户需保证唯一。可包含英文字母,数字,\\|,\\_,\\*,\\-等内容,不允许出现其他不合法符号。 OutRequestNo *string `json:"out_request_no"` // 删除时间 DeleteTime *string `json:"delete_time"` } func (o DeleteRepresentativeBody) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.RepresentativeInfoList == nil { return nil, fmt.Errorf("field `RepresentativeInfoList` is required and must be specified in DeleteRepresentativeBody") } toSerialize["representative_info_list"] = o.RepresentativeInfoList if o.OutRequestNo == nil { return nil, fmt.Errorf("field `OutRequestNo` is required and must be specified in DeleteRepresentativeBody") } toSerialize["out_request_no"] = o.OutRequestNo if o.DeleteTime == nil { return nil, fmt.Errorf("field `DeleteTime` is required and must be specified in DeleteRepresentativeBody") } toSerialize["delete_time"] = o.DeleteTime return json.Marshal(toSerialize) } func (o DeleteRepresentativeBody) String() string { var ret string ret += fmt.Sprintf("RepresentativeInfoList:%v, ", o.RepresentativeInfoList) if o.OutRequestNo == nil { ret += "OutRequestNo:, " } else { ret += fmt.Sprintf("OutRequestNo:%v, ", *o.OutRequestNo) } if o.DeleteTime == nil { ret += "DeleteTime:" } else { ret += fmt.Sprintf("DeleteTime:%v", *o.DeleteTime) } return fmt.Sprintf("DeleteRepresentativeBody{%s}", ret) } func (o DeleteRepresentativeBody) Clone() *DeleteRepresentativeBody { ret := DeleteRepresentativeBody{} if o.RepresentativeInfoList != nil { ret.RepresentativeInfoList = make([]RepresentativeInfo, len(o.RepresentativeInfoList)) for i, item := range o.RepresentativeInfoList { ret.RepresentativeInfoList[i] = *item.Clone() } } if o.OutRequestNo != nil { ret.OutRequestNo = new(string) *ret.OutRequestNo = *o.OutRequestNo } if o.DeleteTime != nil { ret.DeleteTime = new(string) *ret.DeleteTime = *o.DeleteTime } return &ret } // DeleteRepresentativeRequest type DeleteRepresentativeRequest struct { // 零售小店活动ID ActivityId *string `json:"activity_id"` // 业务代理信息列表 RepresentativeInfoList []RepresentativeInfo `json:"representative_info_list"` // 商户删除业务代理请求的唯一标识,商户需保证唯一。可包含英文字母,数字,\\|,\\_,\\*,\\-等内容,不允许出现其他不合法符号。 OutRequestNo *string `json:"out_request_no"` // 删除时间 DeleteTime *string `json:"delete_time"` } func (o DeleteRepresentativeRequest) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.ActivityId == nil { return nil, fmt.Errorf("field `ActivityId` is required and must be specified in DeleteRepresentativeRequest") } toSerialize["activity_id"] = o.ActivityId if o.RepresentativeInfoList == nil { return nil, fmt.Errorf("field `RepresentativeInfoList` is required and must be specified in DeleteRepresentativeRequest") } toSerialize["representative_info_list"] = o.RepresentativeInfoList if o.OutRequestNo == nil { return nil, fmt.Errorf("field `OutRequestNo` is required and must be specified in DeleteRepresentativeRequest") } toSerialize["out_request_no"] = o.OutRequestNo if o.DeleteTime == nil { return nil, fmt.Errorf("field `DeleteTime` is required and must be specified in DeleteRepresentativeRequest") } toSerialize["delete_time"] = o.DeleteTime return json.Marshal(toSerialize) } func (o DeleteRepresentativeRequest) String() string { var ret string if o.ActivityId == nil { ret += "ActivityId:, " } else { ret += fmt.Sprintf("ActivityId:%v, ", *o.ActivityId) } ret += fmt.Sprintf("RepresentativeInfoList:%v, ", o.RepresentativeInfoList) if o.OutRequestNo == nil { ret += "OutRequestNo:, " } else { ret += fmt.Sprintf("OutRequestNo:%v, ", *o.OutRequestNo) } if o.DeleteTime == nil { ret += "DeleteTime:" } else { ret += fmt.Sprintf("DeleteTime:%v", *o.DeleteTime) } return fmt.Sprintf("DeleteRepresentativeRequest{%s}", ret) } func (o DeleteRepresentativeRequest) Clone() *DeleteRepresentativeRequest { ret := DeleteRepresentativeRequest{} if o.ActivityId != nil { ret.ActivityId = new(string) *ret.ActivityId = *o.ActivityId } if o.RepresentativeInfoList != nil { ret.RepresentativeInfoList = make([]RepresentativeInfo, len(o.RepresentativeInfoList)) for i, item := range o.RepresentativeInfoList { ret.RepresentativeInfoList[i] = *item.Clone() } } if o.OutRequestNo != nil { ret.OutRequestNo = new(string) *ret.OutRequestNo = *o.OutRequestNo } if o.DeleteTime != nil { ret.DeleteTime = new(string) *ret.DeleteTime = *o.DeleteTime } return &ret } // DeleteRepresentativeResponse type DeleteRepresentativeResponse struct { // 零售小店活动ID ActivityId *string `json:"activity_id"` // 删除失败业务代理信息列表 FailedRepresentativeInfoList []RepresentativeInfo `json:"failed_representative_info_list,omitempty"` // 删除时间 DeleteTime *string `json:"delete_time"` } func (o DeleteRepresentativeResponse) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.ActivityId == nil { return nil, fmt.Errorf("field `ActivityId` is required and must be specified in DeleteRepresentativeResponse") } toSerialize["activity_id"] = o.ActivityId if o.FailedRepresentativeInfoList != nil { toSerialize["failed_representative_info_list"] = o.FailedRepresentativeInfoList } if o.DeleteTime == nil { return nil, fmt.Errorf("field `DeleteTime` is required and must be specified in DeleteRepresentativeResponse") } toSerialize["delete_time"] = o.DeleteTime return json.Marshal(toSerialize) } func (o DeleteRepresentativeResponse) String() string { var ret string if o.ActivityId == nil { ret += "ActivityId:, " } else { ret += fmt.Sprintf("ActivityId:%v, ", *o.ActivityId) } ret += fmt.Sprintf("FailedRepresentativeInfoList:%v, ", o.FailedRepresentativeInfoList) if o.DeleteTime == nil { ret += "DeleteTime:" } else { ret += fmt.Sprintf("DeleteTime:%v", *o.DeleteTime) } return fmt.Sprintf("DeleteRepresentativeResponse{%s}", ret) } func (o DeleteRepresentativeResponse) Clone() *DeleteRepresentativeResponse { ret := DeleteRepresentativeResponse{} if o.ActivityId != nil { ret.ActivityId = new(string) *ret.ActivityId = *o.ActivityId } if o.FailedRepresentativeInfoList != nil { ret.FailedRepresentativeInfoList = make([]RepresentativeInfo, len(o.FailedRepresentativeInfoList)) for i, item := range o.FailedRepresentativeInfoList { ret.FailedRepresentativeInfoList[i] = *item.Clone() } } if o.DeleteTime != nil { ret.DeleteTime = new(string) *ret.DeleteTime = *o.DeleteTime } return &ret } // DeleteStoresBody type DeleteStoresBody struct { // 商户删除小店活动门店凭据号,商户侧需保持唯一性。可包含英文字母,数字,\\\\|,\\\\_,\\\\*,\\\\-等内容,不允许出现其他不合法符号。 OutRequestNo *string `json:"out_request_no"` // 删除时间,遵循rfc3339标准格式,格式为yyyy-MM-DDTHH:mm:ss+TIMEZONE,yyyy-MM-DD表示年月日,T出现在字符串中,表示time元素的开头,HH:mm:ss表示时分秒,TIMEZONE表示时区(+08:00表示东八区时间,领先UTC8小时,即北京时间)。例如:2015-05-20T13:29:35+08:00表示,北京时间2015年5月20日 13点29分35秒。 DeleteTime *string `json:"delete_time"` // 待删除的小店活动门店列表 Stores []RetailStoreInfo `json:"stores"` } func (o DeleteStoresBody) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.OutRequestNo == nil { return nil, fmt.Errorf("field `OutRequestNo` is required and must be specified in DeleteStoresBody") } toSerialize["out_request_no"] = o.OutRequestNo if o.DeleteTime == nil { return nil, fmt.Errorf("field `DeleteTime` is required and must be specified in DeleteStoresBody") } toSerialize["delete_time"] = o.DeleteTime if o.Stores == nil { return nil, fmt.Errorf("field `Stores` is required and must be specified in DeleteStoresBody") } toSerialize["stores"] = o.Stores return json.Marshal(toSerialize) } func (o DeleteStoresBody) String() string { var ret string if o.OutRequestNo == nil { ret += "OutRequestNo:, " } else { ret += fmt.Sprintf("OutRequestNo:%v, ", *o.OutRequestNo) } if o.DeleteTime == nil { ret += "DeleteTime:, " } else { ret += fmt.Sprintf("DeleteTime:%v, ", *o.DeleteTime) } ret += fmt.Sprintf("Stores:%v", o.Stores) return fmt.Sprintf("DeleteStoresBody{%s}", ret) } func (o DeleteStoresBody) Clone() *DeleteStoresBody { ret := DeleteStoresBody{} if o.OutRequestNo != nil { ret.OutRequestNo = new(string) *ret.OutRequestNo = *o.OutRequestNo } if o.DeleteTime != nil { ret.DeleteTime = new(string) *ret.DeleteTime = *o.DeleteTime } if o.Stores != nil { ret.Stores = make([]RetailStoreInfo, len(o.Stores)) for i, item := range o.Stores { ret.Stores[i] = *item.Clone() } } return &ret } // DeleteStoresRequest type DeleteStoresRequest struct { // 品牌ID BrandId *string `json:"brand_id"` // 商户删除小店活动门店凭据号,商户侧需保持唯一性。可包含英文字母,数字,\\\\|,\\\\_,\\\\*,\\\\-等内容,不允许出现其他不合法符号。 OutRequestNo *string `json:"out_request_no"` // 删除时间,遵循rfc3339标准格式,格式为yyyy-MM-DDTHH:mm:ss+TIMEZONE,yyyy-MM-DD表示年月日,T出现在字符串中,表示time元素的开头,HH:mm:ss表示时分秒,TIMEZONE表示时区(+08:00表示东八区时间,领先UTC8小时,即北京时间)。例如:2015-05-20T13:29:35+08:00表示,北京时间2015年5月20日 13点29分35秒。 DeleteTime *string `json:"delete_time"` // 待删除的小店活动门店列表 Stores []RetailStoreInfo `json:"stores"` } func (o DeleteStoresRequest) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.BrandId == nil { return nil, fmt.Errorf("field `BrandId` is required and must be specified in DeleteStoresRequest") } toSerialize["brand_id"] = o.BrandId if o.OutRequestNo == nil { return nil, fmt.Errorf("field `OutRequestNo` is required and must be specified in DeleteStoresRequest") } toSerialize["out_request_no"] = o.OutRequestNo if o.DeleteTime == nil { return nil, fmt.Errorf("field `DeleteTime` is required and must be specified in DeleteStoresRequest") } toSerialize["delete_time"] = o.DeleteTime if o.Stores == nil { return nil, fmt.Errorf("field `Stores` is required and must be specified in DeleteStoresRequest") } toSerialize["stores"] = o.Stores return json.Marshal(toSerialize) } func (o DeleteStoresRequest) String() string { var ret string if o.BrandId == nil { ret += "BrandId:, " } else { ret += fmt.Sprintf("BrandId:%v, ", *o.BrandId) } if o.OutRequestNo == nil { ret += "OutRequestNo:, " } else { ret += fmt.Sprintf("OutRequestNo:%v, ", *o.OutRequestNo) } if o.DeleteTime == nil { ret += "DeleteTime:, " } else { ret += fmt.Sprintf("DeleteTime:%v, ", *o.DeleteTime) } ret += fmt.Sprintf("Stores:%v", o.Stores) return fmt.Sprintf("DeleteStoresRequest{%s}", ret) } func (o DeleteStoresRequest) Clone() *DeleteStoresRequest { ret := DeleteStoresRequest{} if o.BrandId != nil { ret.BrandId = new(string) *ret.BrandId = *o.BrandId } if o.OutRequestNo != nil { ret.OutRequestNo = new(string) *ret.OutRequestNo = *o.OutRequestNo } if o.DeleteTime != nil { ret.DeleteTime = new(string) *ret.DeleteTime = *o.DeleteTime } if o.Stores != nil { ret.Stores = make([]RetailStoreInfo, len(o.Stores)) for i, item := range o.Stores { ret.Stores[i] = *item.Clone() } } return &ret } // DeleteStoresResponse type DeleteStoresResponse struct { // 删除时间,遵循rfc3339标准格式,格式为yyyy-MM-DDTHH:mm:ss+TIMEZONE,yyyy-MM-DD表示年月日,T出现在字符串中,表示time元素的开头,HH:mm:ss表示时分秒,TIMEZONE表示时区(+08:00表示东八区时间,领先UTC8小时,即北京时间)。例如:2015-05-20T13:29:35+08:00表示,北京时间2015年5月20日 13点29分35秒。 DeleteTime *string `json:"delete_time,omitempty"` // 删除失败的小店活动门店列表 FailedStores []RetailStoreInfo `json:"failed_stores,omitempty"` } func (o DeleteStoresResponse) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.DeleteTime != nil { toSerialize["delete_time"] = o.DeleteTime } if o.FailedStores != nil { toSerialize["failed_stores"] = o.FailedStores } return json.Marshal(toSerialize) } func (o DeleteStoresResponse) String() string { var ret string if o.DeleteTime == nil { ret += "DeleteTime:, " } else { ret += fmt.Sprintf("DeleteTime:%v, ", *o.DeleteTime) } ret += fmt.Sprintf("FailedStores:%v", o.FailedStores) return fmt.Sprintf("DeleteStoresResponse{%s}", ret) } func (o DeleteStoresResponse) Clone() *DeleteStoresResponse { ret := DeleteStoresResponse{} if o.DeleteTime != nil { ret.DeleteTime = new(string) *ret.DeleteTime = *o.DeleteTime } if o.FailedStores != nil { ret.FailedStores = make([]RetailStoreInfo, len(o.FailedStores)) for i, item := range o.FailedStores { ret.FailedStores[i] = *item.Clone() } } return &ret } // FmcgAct type FmcgAct struct { // 活动ID ActivityId *string `json:"activity_id,omitempty"` // 品牌ID BrandId *string `json:"brand_id,omitempty"` // 活动创建方商户号 CreatorMerchantId *string `json:"creator_merchant_id,omitempty"` // 活动信息 ActivityInfo *ActInfo `json:"activity_info,omitempty"` // 活动商品列表 GoodsInformation *GoodsInfo `json:"goods_information,omitempty"` // 活动规则 RuleInformation *ActRule `json:"rule_information,omitempty"` } func (o FmcgAct) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.ActivityId != nil { toSerialize["activity_id"] = o.ActivityId } if o.BrandId != nil { toSerialize["brand_id"] = o.BrandId } if o.CreatorMerchantId != nil { toSerialize["creator_merchant_id"] = o.CreatorMerchantId } if o.ActivityInfo != nil { toSerialize["activity_info"] = o.ActivityInfo } if o.GoodsInformation != nil { toSerialize["goods_information"] = o.GoodsInformation } if o.RuleInformation != nil { toSerialize["rule_information"] = o.RuleInformation } return json.Marshal(toSerialize) } func (o FmcgAct) String() string { var ret string if o.ActivityId == nil { ret += "ActivityId:, " } else { ret += fmt.Sprintf("ActivityId:%v, ", *o.ActivityId) } if o.BrandId == nil { ret += "BrandId:, " } else { ret += fmt.Sprintf("BrandId:%v, ", *o.BrandId) } if o.CreatorMerchantId == nil { ret += "CreatorMerchantId:, " } else { ret += fmt.Sprintf("CreatorMerchantId:%v, ", *o.CreatorMerchantId) } ret += fmt.Sprintf("ActivityInfo:%v, ", o.ActivityInfo) ret += fmt.Sprintf("GoodsInformation:%v, ", o.GoodsInformation) ret += fmt.Sprintf("RuleInformation:%v", o.RuleInformation) return fmt.Sprintf("FmcgAct{%s}", ret) } func (o FmcgAct) Clone() *FmcgAct { ret := FmcgAct{} if o.ActivityId != nil { ret.ActivityId = new(string) *ret.ActivityId = *o.ActivityId } if o.BrandId != nil { ret.BrandId = new(string) *ret.BrandId = *o.BrandId } if o.CreatorMerchantId != nil { ret.CreatorMerchantId = new(string) *ret.CreatorMerchantId = *o.CreatorMerchantId } if o.ActivityInfo != nil { ret.ActivityInfo = o.ActivityInfo.Clone() } if o.GoodsInformation != nil { ret.GoodsInformation = o.GoodsInformation.Clone() } if o.RuleInformation != nil { ret.RuleInformation = o.RuleInformation.Clone() } return &ret } // GetStoreRequest type GetStoreRequest struct { // 品牌ID BrandId *string `json:"brand_id"` // 门店编码,可包含英文字母,数字,\\\\|,\\\\_,\\\\*,\\\\-等内容,不允许出现其他不合法符号。 StoreCode *string `json:"store_code"` } func (o GetStoreRequest) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.BrandId == nil { return nil, fmt.Errorf("field `BrandId` is required and must be specified in GetStoreRequest") } toSerialize["brand_id"] = o.BrandId if o.StoreCode == nil { return nil, fmt.Errorf("field `StoreCode` is required and must be specified in GetStoreRequest") } toSerialize["store_code"] = o.StoreCode return json.Marshal(toSerialize) } func (o GetStoreRequest) String() string { var ret string if o.BrandId == nil { ret += "BrandId:, " } else { ret += fmt.Sprintf("BrandId:%v, ", *o.BrandId) } if o.StoreCode == nil { ret += "StoreCode:" } else { ret += fmt.Sprintf("StoreCode:%v", *o.StoreCode) } return fmt.Sprintf("GetStoreRequest{%s}", ret) } func (o GetStoreRequest) Clone() *GetStoreRequest { ret := GetStoreRequest{} if o.BrandId != nil { ret.BrandId = new(string) *ret.BrandId = *o.BrandId } if o.StoreCode != nil { ret.StoreCode = new(string) *ret.StoreCode = *o.StoreCode } return &ret } // GoodsInfo type GoodsInfo struct { // 商品ID GoodsId *string `json:"goods_id,omitempty"` // 商品名称 GoodsName *string `json:"goods_name,omitempty"` // 商品图片URL GoodsPictureUrl *string `json:"goods_picture_url,omitempty"` } func (o GoodsInfo) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.GoodsId != nil { toSerialize["goods_id"] = o.GoodsId } if o.GoodsName != nil { toSerialize["goods_name"] = o.GoodsName } if o.GoodsPictureUrl != nil { toSerialize["goods_picture_url"] = o.GoodsPictureUrl } return json.Marshal(toSerialize) } func (o GoodsInfo) String() string { var ret string if o.GoodsId == nil { ret += "GoodsId:, " } else { ret += fmt.Sprintf("GoodsId:%v, ", *o.GoodsId) } if o.GoodsName == nil { ret += "GoodsName:, " } else { ret += fmt.Sprintf("GoodsName:%v, ", *o.GoodsName) } if o.GoodsPictureUrl == nil { ret += "GoodsPictureUrl:" } else { ret += fmt.Sprintf("GoodsPictureUrl:%v", *o.GoodsPictureUrl) } return fmt.Sprintf("GoodsInfo{%s}", ret) } func (o GoodsInfo) Clone() *GoodsInfo { ret := GoodsInfo{} if o.GoodsId != nil { ret.GoodsId = new(string) *ret.GoodsId = *o.GoodsId } if o.GoodsName != nil { ret.GoodsName = new(string) *ret.GoodsName = *o.GoodsName } if o.GoodsPictureUrl != nil { ret.GoodsPictureUrl = new(string) *ret.GoodsPictureUrl = *o.GoodsPictureUrl } return &ret } // ListActsByAreaRequest type ListActsByAreaRequest struct { // 活动所属城市的ID CityId *string `json:"city_id"` // 非负整数,该次请求资源的起始位置,从0开始计数 Offset *int64 `json:"offset"` // 非0非负的整数 Limit *int64 `json:"limit"` } func (o ListActsByAreaRequest) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.CityId == nil { return nil, fmt.Errorf("field `CityId` is required and must be specified in ListActsByAreaRequest") } toSerialize["city_id"] = o.CityId if o.Offset == nil { return nil, fmt.Errorf("field `Offset` is required and must be specified in ListActsByAreaRequest") } toSerialize["offset"] = o.Offset if o.Limit == nil { return nil, fmt.Errorf("field `Limit` is required and must be specified in ListActsByAreaRequest") } toSerialize["limit"] = o.Limit return json.Marshal(toSerialize) } func (o ListActsByAreaRequest) String() string { var ret string if o.CityId == nil { ret += "CityId:, " } else { ret += fmt.Sprintf("CityId:%v, ", *o.CityId) } if o.Offset == nil { ret += "Offset:, " } else { ret += fmt.Sprintf("Offset:%v, ", *o.Offset) } if o.Limit == nil { ret += "Limit:" } else { ret += fmt.Sprintf("Limit:%v", *o.Limit) } return fmt.Sprintf("ListActsByAreaRequest{%s}", ret) } func (o ListActsByAreaRequest) Clone() *ListActsByAreaRequest { ret := ListActsByAreaRequest{} if o.CityId != nil { ret.CityId = new(string) *ret.CityId = *o.CityId } if o.Offset != nil { ret.Offset = new(int64) *ret.Offset = *o.Offset } if o.Limit != nil { ret.Limit = new(int64) *ret.Limit = *o.Limit } return &ret } // ListActsByAreaResponse type ListActsByAreaResponse struct { // 活动总数 TotalCount *int64 `json:"total_count,omitempty"` // 活动集合 Data []FmcgAct `json:"data,omitempty"` // 非负整数,该次请求资源的起始位置,从0开始计数 Offset *int64 `json:"offset"` // 非0非负的整数 Limit *int64 `json:"limit"` } func (o ListActsByAreaResponse) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.TotalCount != nil { toSerialize["total_count"] = o.TotalCount } if o.Data != nil { toSerialize["data"] = o.Data } if o.Offset == nil { return nil, fmt.Errorf("field `Offset` is required and must be specified in ListActsByAreaResponse") } toSerialize["offset"] = o.Offset if o.Limit == nil { return nil, fmt.Errorf("field `Limit` is required and must be specified in ListActsByAreaResponse") } toSerialize["limit"] = o.Limit return json.Marshal(toSerialize) } func (o ListActsByAreaResponse) String() string { var ret string if o.TotalCount == nil { ret += "TotalCount:, " } else { ret += fmt.Sprintf("TotalCount:%v, ", *o.TotalCount) } ret += fmt.Sprintf("Data:%v, ", o.Data) if o.Offset == nil { ret += "Offset:, " } else { ret += fmt.Sprintf("Offset:%v, ", *o.Offset) } if o.Limit == nil { ret += "Limit:" } else { ret += fmt.Sprintf("Limit:%v", *o.Limit) } return fmt.Sprintf("ListActsByAreaResponse{%s}", ret) } func (o ListActsByAreaResponse) Clone() *ListActsByAreaResponse { ret := ListActsByAreaResponse{} if o.TotalCount != nil { ret.TotalCount = new(int64) *ret.TotalCount = *o.TotalCount } if o.Data != nil { ret.Data = make([]FmcgAct, len(o.Data)) for i, item := range o.Data { ret.Data[i] = *item.Clone() } } if o.Offset != nil { ret.Offset = new(int64) *ret.Offset = *o.Offset } if o.Limit != nil { ret.Limit = new(int64) *ret.Limit = *o.Limit } return &ret } // ListRepresentativeRequest type ListRepresentativeRequest struct { // 零售小店活动ID ActivityId *string `json:"activity_id"` // 页码从0开始,默认第0页 Offset *int64 `json:"offset"` // 分页大小,默认查询10个业代 Limit *int64 `json:"limit"` } func (o ListRepresentativeRequest) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.ActivityId == nil { return nil, fmt.Errorf("field `ActivityId` is required and must be specified in ListRepresentativeRequest") } toSerialize["activity_id"] = o.ActivityId if o.Offset == nil { return nil, fmt.Errorf("field `Offset` is required and must be specified in ListRepresentativeRequest") } toSerialize["offset"] = o.Offset if o.Limit == nil { return nil, fmt.Errorf("field `Limit` is required and must be specified in ListRepresentativeRequest") } toSerialize["limit"] = o.Limit return json.Marshal(toSerialize) } func (o ListRepresentativeRequest) String() string { var ret string if o.ActivityId == nil { ret += "ActivityId:, " } else { ret += fmt.Sprintf("ActivityId:%v, ", *o.ActivityId) } if o.Offset == nil { ret += "Offset:, " } else { ret += fmt.Sprintf("Offset:%v, ", *o.Offset) } if o.Limit == nil { ret += "Limit:" } else { ret += fmt.Sprintf("Limit:%v", *o.Limit) } return fmt.Sprintf("ListRepresentativeRequest{%s}", ret) } func (o ListRepresentativeRequest) Clone() *ListRepresentativeRequest { ret := ListRepresentativeRequest{} if o.ActivityId != nil { ret.ActivityId = new(string) *ret.ActivityId = *o.ActivityId } if o.Offset != nil { ret.Offset = new(int64) *ret.Offset = *o.Offset } if o.Limit != nil { ret.Limit = new(int64) *ret.Limit = *o.Limit } return &ret } // ListRepresentativeResponse type ListRepresentativeResponse struct { // 小店活动业代总数 TotalCount *int64 `json:"total_count,omitempty"` // 小店活动业代集合 Data []RepresentativeInfo `json:"data,omitempty"` // 页码从0开始,默认第0页 Offset *int64 `json:"offset"` // 分页大小 Limit *int64 `json:"limit"` } func (o ListRepresentativeResponse) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.TotalCount != nil { toSerialize["total_count"] = o.TotalCount } if o.Data != nil { toSerialize["data"] = o.Data } if o.Offset == nil { return nil, fmt.Errorf("field `Offset` is required and must be specified in ListRepresentativeResponse") } toSerialize["offset"] = o.Offset if o.Limit == nil { return nil, fmt.Errorf("field `Limit` is required and must be specified in ListRepresentativeResponse") } toSerialize["limit"] = o.Limit return json.Marshal(toSerialize) } func (o ListRepresentativeResponse) String() string { var ret string if o.TotalCount == nil { ret += "TotalCount:, " } else { ret += fmt.Sprintf("TotalCount:%v, ", *o.TotalCount) } ret += fmt.Sprintf("Data:%v, ", o.Data) if o.Offset == nil { ret += "Offset:, " } else { ret += fmt.Sprintf("Offset:%v, ", *o.Offset) } if o.Limit == nil { ret += "Limit:" } else { ret += fmt.Sprintf("Limit:%v", *o.Limit) } return fmt.Sprintf("ListRepresentativeResponse{%s}", ret) } func (o ListRepresentativeResponse) Clone() *ListRepresentativeResponse { ret := ListRepresentativeResponse{} if o.TotalCount != nil { ret.TotalCount = new(int64) *ret.TotalCount = *o.TotalCount } if o.Data != nil { ret.Data = make([]RepresentativeInfo, len(o.Data)) for i, item := range o.Data { ret.Data[i] = *item.Clone() } } if o.Offset != nil { ret.Offset = new(int64) *ret.Offset = *o.Offset } if o.Limit != nil { ret.Limit = new(int64) *ret.Limit = *o.Limit } return &ret } // ListStoreRequest type ListStoreRequest struct { // 品牌ID BrandId *string `json:"brand_id"` // 页码从0开始,默认第0页 Offset *int64 `json:"offset"` // 分页大小,默认查询10家门店 Limit *int64 `json:"limit"` } func (o ListStoreRequest) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.BrandId == nil { return nil, fmt.Errorf("field `BrandId` is required and must be specified in ListStoreRequest") } toSerialize["brand_id"] = o.BrandId if o.Offset == nil { return nil, fmt.Errorf("field `Offset` is required and must be specified in ListStoreRequest") } toSerialize["offset"] = o.Offset if o.Limit == nil { return nil, fmt.Errorf("field `Limit` is required and must be specified in ListStoreRequest") } toSerialize["limit"] = o.Limit return json.Marshal(toSerialize) } func (o ListStoreRequest) String() string { var ret string if o.BrandId == nil { ret += "BrandId:, " } else { ret += fmt.Sprintf("BrandId:%v, ", *o.BrandId) } if o.Offset == nil { ret += "Offset:, " } else { ret += fmt.Sprintf("Offset:%v, ", *o.Offset) } if o.Limit == nil { ret += "Limit:" } else { ret += fmt.Sprintf("Limit:%v", *o.Limit) } return fmt.Sprintf("ListStoreRequest{%s}", ret) } func (o ListStoreRequest) Clone() *ListStoreRequest { ret := ListStoreRequest{} if o.BrandId != nil { ret.BrandId = new(string) *ret.BrandId = *o.BrandId } if o.Offset != nil { ret.Offset = new(int64) *ret.Offset = *o.Offset } if o.Limit != nil { ret.Limit = new(int64) *ret.Limit = *o.Limit } return &ret } // ListStoreResponse type ListStoreResponse struct { // 小店活动门店总数 TotalCount *int64 `json:"total_count,omitempty"` // 小店活动门店集合 Data []RetailStoreInfo `json:"data,omitempty"` // 页码从0开始,默认第0页 Offset *int64 `json:"offset,omitempty"` // 分页大小 Limit *int64 `json:"limit,omitempty"` } func (o ListStoreResponse) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.TotalCount != nil { toSerialize["total_count"] = o.TotalCount } if o.Data != nil { toSerialize["data"] = o.Data } if o.Offset != nil { toSerialize["offset"] = o.Offset } if o.Limit != nil { toSerialize["limit"] = o.Limit } return json.Marshal(toSerialize) } func (o ListStoreResponse) String() string { var ret string if o.TotalCount == nil { ret += "TotalCount:, " } else { ret += fmt.Sprintf("TotalCount:%v, ", *o.TotalCount) } ret += fmt.Sprintf("Data:%v, ", o.Data) if o.Offset == nil { ret += "Offset:, " } else { ret += fmt.Sprintf("Offset:%v, ", *o.Offset) } if o.Limit == nil { ret += "Limit:" } else { ret += fmt.Sprintf("Limit:%v", *o.Limit) } return fmt.Sprintf("ListStoreResponse{%s}", ret) } func (o ListStoreResponse) Clone() *ListStoreResponse { ret := ListStoreResponse{} if o.TotalCount != nil { ret.TotalCount = new(int64) *ret.TotalCount = *o.TotalCount } if o.Data != nil { ret.Data = make([]RetailStoreInfo, len(o.Data)) for i, item := range o.Data { ret.Data[i] = *item.Clone() } } if o.Offset != nil { ret.Offset = new(int64) *ret.Offset = *o.Offset } if o.Limit != nil { ret.Limit = new(int64) *ret.Limit = *o.Limit } return &ret } // LockQualificationRequest type LockQualificationRequest struct { // 订单信息 OrderInformation *OrderInfo `json:"order_information"` // 待锁定的加价购资格ID列表 QualificationIds []string `json:"qualification_ids,omitempty"` } func (o LockQualificationRequest) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.OrderInformation == nil { return nil, fmt.Errorf("field `OrderInformation` is required and must be specified in LockQualificationRequest") } toSerialize["order_information"] = o.OrderInformation if o.QualificationIds != nil { toSerialize["qualification_ids"] = o.QualificationIds } return json.Marshal(toSerialize) } func (o LockQualificationRequest) String() string { var ret string ret += fmt.Sprintf("OrderInformation:%v, ", o.OrderInformation) ret += fmt.Sprintf("QualificationIds:%v", o.QualificationIds) return fmt.Sprintf("LockQualificationRequest{%s}", ret) } func (o LockQualificationRequest) Clone() *LockQualificationRequest { ret := LockQualificationRequest{} if o.OrderInformation != nil { ret.OrderInformation = o.OrderInformation.Clone() } if o.QualificationIds != nil { ret.QualificationIds = make([]string, len(o.QualificationIds)) for i, item := range o.QualificationIds { ret.QualificationIds[i] = item } } return &ret } // LockQualificationResponse type LockQualificationResponse struct { // 返回结果文案 ReturnMessage *string `json:"return_message,omitempty"` // 锁定成功的资格ID列表 SucceedQualificationIds []string `json:"succeed_qualification_ids,omitempty"` // 锁定失败的资格ID列表 FailedQualificationIds []string `json:"failed_qualification_ids,omitempty"` } func (o LockQualificationResponse) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.ReturnMessage != nil { toSerialize["return_message"] = o.ReturnMessage } if o.SucceedQualificationIds != nil { toSerialize["succeed_qualification_ids"] = o.SucceedQualificationIds } if o.FailedQualificationIds != nil { toSerialize["failed_qualification_ids"] = o.FailedQualificationIds } return json.Marshal(toSerialize) } func (o LockQualificationResponse) String() string { var ret string if o.ReturnMessage == nil { ret += "ReturnMessage:, " } else { ret += fmt.Sprintf("ReturnMessage:%v, ", *o.ReturnMessage) } ret += fmt.Sprintf("SucceedQualificationIds:%v, ", o.SucceedQualificationIds) ret += fmt.Sprintf("FailedQualificationIds:%v", o.FailedQualificationIds) return fmt.Sprintf("LockQualificationResponse{%s}", ret) } func (o LockQualificationResponse) Clone() *LockQualificationResponse { ret := LockQualificationResponse{} if o.ReturnMessage != nil { ret.ReturnMessage = new(string) *ret.ReturnMessage = *o.ReturnMessage } if o.SucceedQualificationIds != nil { ret.SucceedQualificationIds = make([]string, len(o.SucceedQualificationIds)) for i, item := range o.SucceedQualificationIds { ret.SucceedQualificationIds[i] = item } } if o.FailedQualificationIds != nil { ret.FailedQualificationIds = make([]string, len(o.FailedQualificationIds)) for i, item := range o.FailedQualificationIds { ret.FailedQualificationIds[i] = item } } return &ret } // MaterialInfo type MaterialInfo struct { // 物料码ID MaterialId *string `json:"material_id,omitempty"` // 物料码链接, 用于生成活动物料二维码 MaterialUrl *string `json:"material_url,omitempty"` } func (o MaterialInfo) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.MaterialId != nil { toSerialize["material_id"] = o.MaterialId } if o.MaterialUrl != nil { toSerialize["material_url"] = o.MaterialUrl } return json.Marshal(toSerialize) } func (o MaterialInfo) String() string { var ret string if o.MaterialId == nil { ret += "MaterialId:, " } else { ret += fmt.Sprintf("MaterialId:%v, ", *o.MaterialId) } if o.MaterialUrl == nil { ret += "MaterialUrl:" } else { ret += fmt.Sprintf("MaterialUrl:%v", *o.MaterialUrl) } return fmt.Sprintf("MaterialInfo{%s}", ret) } func (o MaterialInfo) Clone() *MaterialInfo { ret := MaterialInfo{} if o.MaterialId != nil { ret.MaterialId = new(string) *ret.MaterialId = *o.MaterialId } if o.MaterialUrl != nil { ret.MaterialUrl = new(string) *ret.MaterialUrl = *o.MaterialUrl } return &ret } // Materials type Materials struct { // 成功的物料码列表 MaterialList []MaterialInfo `json:"material_list,omitempty"` } func (o Materials) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.MaterialList != nil { toSerialize["material_list"] = o.MaterialList } return json.Marshal(toSerialize) } func (o Materials) String() string { var ret string ret += fmt.Sprintf("MaterialList:%v", o.MaterialList) return fmt.Sprintf("Materials{%s}", ret) } func (o Materials) Clone() *Materials { ret := Materials{} if o.MaterialList != nil { ret.MaterialList = make([]MaterialInfo, len(o.MaterialList)) for i, item := range o.MaterialList { ret.MaterialList[i] = *item.Clone() } } return &ret } // OrderInfo type OrderInfo struct { // 支付订单的微信用户OpenID PayerOpenid *string `json:"payer_openid"` // 商户订单号 OutTradeNo *string `json:"out_trade_no"` // 订单总金额(单位:分) TotalFee *int64 `json:"total_fee"` // 门店ID StoreId *string `json:"store_id"` // 门店商户号 StoreMerchantId *string `json:"store_merchant_id"` } func (o OrderInfo) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.PayerOpenid == nil { return nil, fmt.Errorf("field `PayerOpenid` is required and must be specified in OrderInfo") } toSerialize["payer_openid"] = o.PayerOpenid if o.OutTradeNo == nil { return nil, fmt.Errorf("field `OutTradeNo` is required and must be specified in OrderInfo") } toSerialize["out_trade_no"] = o.OutTradeNo if o.TotalFee == nil { return nil, fmt.Errorf("field `TotalFee` is required and must be specified in OrderInfo") } toSerialize["total_fee"] = o.TotalFee if o.StoreId == nil { return nil, fmt.Errorf("field `StoreId` is required and must be specified in OrderInfo") } toSerialize["store_id"] = o.StoreId if o.StoreMerchantId == nil { return nil, fmt.Errorf("field `StoreMerchantId` is required and must be specified in OrderInfo") } toSerialize["store_merchant_id"] = o.StoreMerchantId return json.Marshal(toSerialize) } func (o OrderInfo) String() string { var ret string if o.PayerOpenid == nil { ret += "PayerOpenid:, " } else { ret += fmt.Sprintf("PayerOpenid:%v, ", *o.PayerOpenid) } if o.OutTradeNo == nil { ret += "OutTradeNo:, " } else { ret += fmt.Sprintf("OutTradeNo:%v, ", *o.OutTradeNo) } if o.TotalFee == nil { ret += "TotalFee:, " } else { ret += fmt.Sprintf("TotalFee:%v, ", *o.TotalFee) } if o.StoreId == nil { ret += "StoreId:, " } else { ret += fmt.Sprintf("StoreId:%v, ", *o.StoreId) } if o.StoreMerchantId == nil { ret += "StoreMerchantId:" } else { ret += fmt.Sprintf("StoreMerchantId:%v", *o.StoreMerchantId) } return fmt.Sprintf("OrderInfo{%s}", ret) } func (o OrderInfo) Clone() *OrderInfo { ret := OrderInfo{} if o.PayerOpenid != nil { ret.PayerOpenid = new(string) *ret.PayerOpenid = *o.PayerOpenid } if o.OutTradeNo != nil { ret.OutTradeNo = new(string) *ret.OutTradeNo = *o.OutTradeNo } if o.TotalFee != nil { ret.TotalFee = new(int64) *ret.TotalFee = *o.TotalFee } if o.StoreId != nil { ret.StoreId = new(string) *ret.StoreId = *o.StoreId } if o.StoreMerchantId != nil { ret.StoreMerchantId = new(string) *ret.StoreMerchantId = *o.StoreMerchantId } return &ret } // RepresentativeInfo type RepresentativeInfo struct { // [获取openid请查看文档](https://pay.weixin.qq.com/wiki/doc/apiv3_partner/terms_definition/chapter1_1_3.shtml) Openid *string `json:"openid"` } func (o RepresentativeInfo) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Openid == nil { return nil, fmt.Errorf("field `Openid` is required and must be specified in RepresentativeInfo") } toSerialize["openid"] = o.Openid return json.Marshal(toSerialize) } func (o RepresentativeInfo) String() string { var ret string if o.Openid == nil { ret += "Openid:" } else { ret += fmt.Sprintf("Openid:%v", *o.Openid) } return fmt.Sprintf("RepresentativeInfo{%s}", ret) } func (o RepresentativeInfo) Clone() *RepresentativeInfo { ret := RepresentativeInfo{} if o.Openid != nil { ret.Openid = new(string) *ret.Openid = *o.Openid } return &ret } // RetailStoreInfo type RetailStoreInfo struct { // 门店编码,可包含英文字母,数字,\\\\|,\\\\_,\\\\*,\\\\-等内容,不允许出现其他不合法符号。 StoreCode *string `json:"store_code,omitempty"` // 门店名称 StoreName *string `json:"store_name,omitempty"` } func (o RetailStoreInfo) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.StoreCode != nil { toSerialize["store_code"] = o.StoreCode } if o.StoreName != nil { toSerialize["store_name"] = o.StoreName } return json.Marshal(toSerialize) } func (o RetailStoreInfo) String() string { var ret string if o.StoreCode == nil { ret += "StoreCode:, " } else { ret += fmt.Sprintf("StoreCode:%v, ", *o.StoreCode) } if o.StoreName == nil { ret += "StoreName:" } else { ret += fmt.Sprintf("StoreName:%v", *o.StoreName) } return fmt.Sprintf("RetailStoreInfo{%s}", ret) } func (o RetailStoreInfo) Clone() *RetailStoreInfo { ret := RetailStoreInfo{} if o.StoreCode != nil { ret.StoreCode = new(string) *ret.StoreCode = *o.StoreCode } if o.StoreName != nil { ret.StoreName = new(string) *ret.StoreName = *o.StoreName } return &ret } // StoreInfo type StoreInfo struct { // 门店ID StoreId *string `json:"store_id"` // 门店指定的品牌补贴收款商户号 AccountingMerchantId *string `json:"accounting_merchant_id"` // 报名门店的商户号,即门店收款商户号 MerchantId *string `json:"merchant_id"` } func (o StoreInfo) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.StoreId == nil { return nil, fmt.Errorf("field `StoreId` is required and must be specified in StoreInfo") } toSerialize["store_id"] = o.StoreId if o.AccountingMerchantId == nil { return nil, fmt.Errorf("field `AccountingMerchantId` is required and must be specified in StoreInfo") } toSerialize["accounting_merchant_id"] = o.AccountingMerchantId if o.MerchantId == nil { return nil, fmt.Errorf("field `MerchantId` is required and must be specified in StoreInfo") } toSerialize["merchant_id"] = o.MerchantId return json.Marshal(toSerialize) } func (o StoreInfo) String() string { var ret string if o.StoreId == nil { ret += "StoreId:, " } else { ret += fmt.Sprintf("StoreId:%v, ", *o.StoreId) } if o.AccountingMerchantId == nil { ret += "AccountingMerchantId:, " } else { ret += fmt.Sprintf("AccountingMerchantId:%v, ", *o.AccountingMerchantId) } if o.MerchantId == nil { ret += "MerchantId:" } else { ret += fmt.Sprintf("MerchantId:%v", *o.MerchantId) } return fmt.Sprintf("StoreInfo{%s}", ret) } func (o StoreInfo) Clone() *StoreInfo { ret := StoreInfo{} if o.StoreId != nil { ret.StoreId = new(string) *ret.StoreId = *o.StoreId } if o.AccountingMerchantId != nil { ret.AccountingMerchantId = new(string) *ret.AccountingMerchantId = *o.AccountingMerchantId } if o.MerchantId != nil { ret.MerchantId = new(string) *ret.MerchantId = *o.MerchantId } return &ret } // UnlockQualificationRequest type UnlockQualificationRequest struct { // 订单信息 OrderInformation *OrderInfo `json:"order_information"` // 待锁定的加价购资格ID列表 QualificationIds []string `json:"qualification_ids,omitempty"` } func (o UnlockQualificationRequest) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.OrderInformation == nil { return nil, fmt.Errorf("field `OrderInformation` is required and must be specified in UnlockQualificationRequest") } toSerialize["order_information"] = o.OrderInformation if o.QualificationIds != nil { toSerialize["qualification_ids"] = o.QualificationIds } return json.Marshal(toSerialize) } func (o UnlockQualificationRequest) String() string { var ret string ret += fmt.Sprintf("OrderInformation:%v, ", o.OrderInformation) ret += fmt.Sprintf("QualificationIds:%v", o.QualificationIds) return fmt.Sprintf("UnlockQualificationRequest{%s}", ret) } func (o UnlockQualificationRequest) Clone() *UnlockQualificationRequest { ret := UnlockQualificationRequest{} if o.OrderInformation != nil { ret.OrderInformation = o.OrderInformation.Clone() } if o.QualificationIds != nil { ret.QualificationIds = make([]string, len(o.QualificationIds)) for i, item := range o.QualificationIds { ret.QualificationIds[i] = item } } return &ret } // UnlockQualificationResponse type UnlockQualificationResponse struct { // 返回结果文案 ReturnMessage *string `json:"return_message,omitempty"` // 解锁成功的资格列表 SucceedQualificationIds []string `json:"succeed_qualification_ids,omitempty"` // 解锁失败的资格ID列表 FailedQualificationIds []string `json:"failed_qualification_ids,omitempty"` } func (o UnlockQualificationResponse) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.ReturnMessage != nil { toSerialize["return_message"] = o.ReturnMessage } if o.SucceedQualificationIds != nil { toSerialize["succeed_qualification_ids"] = o.SucceedQualificationIds } if o.FailedQualificationIds != nil { toSerialize["failed_qualification_ids"] = o.FailedQualificationIds } return json.Marshal(toSerialize) } func (o UnlockQualificationResponse) String() string { var ret string if o.ReturnMessage == nil { ret += "ReturnMessage:, " } else { ret += fmt.Sprintf("ReturnMessage:%v, ", *o.ReturnMessage) } ret += fmt.Sprintf("SucceedQualificationIds:%v, ", o.SucceedQualificationIds) ret += fmt.Sprintf("FailedQualificationIds:%v", o.FailedQualificationIds) return fmt.Sprintf("UnlockQualificationResponse{%s}", ret) } func (o UnlockQualificationResponse) Clone() *UnlockQualificationResponse { ret := UnlockQualificationResponse{} if o.ReturnMessage != nil { ret.ReturnMessage = new(string) *ret.ReturnMessage = *o.ReturnMessage } if o.SucceedQualificationIds != nil { ret.SucceedQualificationIds = make([]string, len(o.SucceedQualificationIds)) for i, item := range o.SucceedQualificationIds { ret.SucceedQualificationIds[i] = item } } if o.FailedQualificationIds != nil { ret.FailedQualificationIds = make([]string, len(o.FailedQualificationIds)) for i, item := range o.FailedQualificationIds { ret.FailedQualificationIds[i] = item } } return &ret }