giftactivity

package
v0.2.21 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 23, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActAdvancedSetting

type ActAdvancedSetting struct {
	// DELIVERY_ALL_PERSON:所有用户;DELIVERY_MEMBER_PERSON:会员用户
	DeliveryUserCategory *DeliveryUserCategory `json:"delivery_user_category,omitempty"`
	// 当投放用户类别为会员用户时必填
	MerchantMemberAppid *string `json:"merchant_member_appid,omitempty"`
	// 主要用于指定可用的支付场景,不限制支付模式不填,限制选填(商家券暂不开放)
	PaymentMode *PaymentMode `json:"payment_mode,omitempty"`
	// 支付方式信息,不填为不限制(商家券暂不开放)
	PaymentMethodInformation *PaymentMethodInfo `json:"payment_method_information,omitempty"`
	// 商户下单时需要传入相同的标记(goods_tag),用户同时符合其他规则才能享受优惠
	GoodsTags []string `json:"goods_tags,omitempty"`
}

ActAdvancedSetting

func (ActAdvancedSetting) Clone

func (ActAdvancedSetting) MarshalJSON

func (o ActAdvancedSetting) MarshalJSON() ([]byte, error)

func (ActAdvancedSetting) String

func (o ActAdvancedSetting) String() string

type ActBaseInfo

type ActBaseInfo struct {
	// 活动名称
	ActivityName *string `json:"activity_name"`
	// 活动副标题
	ActivitySecondTitle *string `json:"activity_second_title"`
	// 商户logo,送出优惠券时展示
	MerchantLogoUrl *string `json:"merchant_logo_url"`
	// 代金券的背景颜色,可设置10种颜色,颜色取值可参考[开发指引](../../../products/gift-activity/development.html) 3.2.1  background_color取值,默认为微信支付绿色, 颜色取值为颜色图中的颜色名称。
	BackgroundColor *string `json:"background_color,omitempty"`
	// 活动开始时间,最长可以配置1年内的活动,活动有效期最长90天
	BeginTime *string `json:"begin_time"`
	// 活动结束时间,最长可以配置1年内的活动,活动有效期最长90天
	EndTime *string `json:"end_time"`
	// 可自定义活动有效时间内可用的多个时间段以及天内时间点
	AvailablePeriods *AvailablePeriod `json:"available_periods,omitempty"`
	// 商户创建批次凭据号(格式:商户id+日期+流水号),商户侧需保持唯一性,可包含英文字母,数字,|,_,*,-等内容,不允许出现其他不合法符号
	OutRequestNo *string `json:"out_request_no"`
	// OFF_LINE_PAY:拉用户回店消费;JUMP_MINI_APP:引导用户前往小程序消费
	DeliveryPurpose *DeliveryPurposeCategory `json:"delivery_purpose"`
	// 投放目的为跳转小程序时必填
	MiniProgramsAppid *string `json:"mini_programs_appid,omitempty"`
	// 投放目的为跳转小程序必填
	MiniProgramsPath *string `json:"mini_programs_path,omitempty"`
}

ActBaseInfo

func (ActBaseInfo) Clone

func (o ActBaseInfo) Clone() *ActBaseInfo

func (ActBaseInfo) MarshalJSON

func (o ActBaseInfo) MarshalJSON() ([]byte, error)

func (ActBaseInfo) String

func (o ActBaseInfo) String() string

type ActParticipateMchInfo

type ActParticipateMchInfo struct {
	// 商户Id
	Mchid *string `json:"mchid"`
	// 商户名称
	MerchantName *string `json:"merchant_name,omitempty"`
	// 创建时间
	CreateTime *string `json:"create_time,omitempty"`
	// 更新时间
	UpdateTime *string `json:"update_time,omitempty"`
}

ActParticipateMchInfo

func (ActParticipateMchInfo) Clone

func (ActParticipateMchInfo) MarshalJSON

func (o ActParticipateMchInfo) MarshalJSON() ([]byte, error)

func (ActParticipateMchInfo) String

func (o ActParticipateMchInfo) String() string

type ActStatus

type ActStatus string

ActStatus

const (
	ACTSTATUS_ACT_STATUS_UNKNOWN   ActStatus = "ACT_STATUS_UNKNOWN"
	ACTSTATUS_CREATE_ACT_STATUS    ActStatus = "CREATE_ACT_STATUS"
	ACTSTATUS_ONGOING_ACT_STATUS   ActStatus = "ONGOING_ACT_STATUS"
	ACTSTATUS_TERMINATE_ACT_STATUS ActStatus = "TERMINATE_ACT_STATUS"
	ACTSTATUS_STOP_ACT_STATUS      ActStatus = "STOP_ACT_STATUS"
	ACTSTATUS_OVER_TIME_ACT_STATUS ActStatus = "OVER_TIME_ACT_STATUS"
	ACTSTATUS_CREATE_ACT_FAILED    ActStatus = "CREATE_ACT_FAILED"
)

Enums of ActStatus

func (ActStatus) Ptr

func (e ActStatus) Ptr() *ActStatus

type ActType

type ActType string

ActType 活动类型

const (
	ACTTYPE_FULL_SEND_ACT_TYPE     ActType = "FULL_SEND_ACT_TYPE"
	ACTTYPE_STEP_SEND_ACT_TYPE     ActType = "STEP_SEND_ACT_TYPE"
	ACTTYPE_SPECIFIC_SEND_ACT_TYPE ActType = "SPECIFIC_SEND_ACT_TYPE"
)

Enums of ActType

func (ActType) Ptr

func (e ActType) Ptr() *ActType

type ActivityApiService

type ActivityApiService services.Service

func (*ActivityApiService) AddActivityMerchant

func (a *ActivityApiService) AddActivityMerchant(ctx context.Context, req AddActivityMerchantRequest) (resp *AddActivityMerchantResponse, result *core.APIResult, err error)

AddActivityMerchant 新增活动发券商户号

使用场景:商户创建活动后,可以通过该接口增加支付有礼的发券商户号,用于管理活动。 可调用商户:商户/服务商/渠道商

Example
package main

import (
	"context"
	"log"

	"github.com/rjm521/wechatpay-go/core"
	"github.com/rjm521/wechatpay-go/core/option"
	"github.com/rjm521/wechatpay-go/services/giftactivity"
	"github.com/rjm521/wechatpay-go/utils"
)

func main() {
	var (
		mchID                      string = "190000****"                               // 商户号
		mchCertificateSerialNumber string = "3775************************************" // 商户证书序列号
		mchAPIv3Key                string = "2ab9****************************"         // 商户APIv3密钥
	)

	// 使用 utils 提供的函数从本地文件中加载商户私钥,商户私钥会用来生成请求的签名
	mchPrivateKey, err := utils.LoadPrivateKeyWithPath("/path/to/merchant/apiclient_key.pem")
	if err != nil {
		log.Printf("load merchant private key error:%s", err)
		return
	}

	ctx := context.Background()
	// 使用商户私钥等初始化 client,并使它具有自动定时获取微信支付平台证书的能力
	opts := []core.ClientOption{
		option.WithWechatPayAutoAuthCipher(mchID, mchCertificateSerialNumber, mchPrivateKey, mchAPIv3Key),
	}
	client, err := core.NewClient(ctx, opts...)
	if err != nil {
		log.Printf("new wechat pay client err:%s", err)
		return
	}

	svc := giftactivity.ActivityApiService{Client: client}
	resp, result, err := svc.AddActivityMerchant(ctx,
		giftactivity.AddActivityMerchantRequest{
			ActivityId:     core.String("126002309"),
			MerchantIdList: []string{"100123456"},
			AddRequestNo:   core.String("100002322019090134234sfdf"),
		},
	)

	if err != nil {
		// 处理错误
		log.Printf("call AddActivityMerchant err:%s", err)
	} else {
		// 处理返回结果
		log.Printf("status=%d resp=%s", result.Response.StatusCode, resp)
	}
}
Output:

func (*ActivityApiService) CreateFullSendAct

func (a *ActivityApiService) CreateFullSendAct(ctx context.Context, req CreateFullSendActRequest) (resp *CreateFullSendActResponse, result *core.APIResult, err error)

CreateFullSendAct 创建全场满额送活动

使用场景:商户可以创建满额送活动,用户支付后送全场券,提升交易额。 可调用商户:商户/服务商/渠道商

Example
package main

import (
	"context"
	"log"

	"github.com/rjm521/wechatpay-go/core"
	"github.com/rjm521/wechatpay-go/core/option"
	"github.com/rjm521/wechatpay-go/services/giftactivity"
	"github.com/rjm521/wechatpay-go/utils"
)

func main() {
	var (
		mchID                      string = "190000****"                               // 商户号
		mchCertificateSerialNumber string = "3775************************************" // 商户证书序列号
		mchAPIv3Key                string = "2ab9****************************"         // 商户APIv3密钥
	)

	// 使用 utils 提供的函数从本地文件中加载商户私钥,商户私钥会用来生成请求的签名
	mchPrivateKey, err := utils.LoadPrivateKeyWithPath("/path/to/merchant/apiclient_key.pem")
	if err != nil {
		log.Printf("load merchant private key error:%s", err)
		return
	}

	ctx := context.Background()
	// 使用商户私钥等初始化 client,并使它具有自动定时获取微信支付平台证书的能力
	opts := []core.ClientOption{
		option.WithWechatPayAutoAuthCipher(mchID, mchCertificateSerialNumber, mchPrivateKey, mchAPIv3Key),
	}
	client, err := core.NewClient(ctx, opts...)
	if err != nil {
		log.Printf("new wechat pay client err:%s", err)
		return
	}

	svc := giftactivity.ActivityApiService{Client: client}
	resp, result, err := svc.CreateFullSendAct(ctx,
		giftactivity.CreateFullSendActRequest{
			ActivityBaseInfo: &giftactivity.ActBaseInfo{
				ActivityName:        core.String("良品铺子回馈活动"),
				ActivitySecondTitle: core.String("海飞丝的券"),
				MerchantLogoUrl:     core.String("https://tool.oschina.net/regex.jpg"),
				BackgroundColor:     core.String("Color010"),
				BeginTime:           core.String("2015-05-20T13:29:35.120+08:00"),
				EndTime:             core.String("2015-05-20T13:29:35.120+08:00"),
				AvailablePeriods: &giftactivity.AvailablePeriod{
					AvailableTime: []giftactivity.AvailableTime{giftactivity.AvailableTime{
						BeginTime: core.String("2015-05-20T00:00:00.000+08:00"),
						EndTime:   core.String("2015-05-20T23:59:59.000+08:00"),
					}},
					AvailableDayTime: []giftactivity.AvailableDayTime{giftactivity.AvailableDayTime{
						BeginDayTime: core.String("110000"),
						EndDayTime:   core.String("135959"),
					}},
				},
				OutRequestNo:      core.String("100002322019090134234sfdf"),
				DeliveryPurpose:   giftactivity.DELIVERYPURPOSECATEGORY_OFF_LINE_PAY.Ptr(),
				MiniProgramsAppid: core.String("wx23232232323"),
				MiniProgramsPath:  core.String("/path/index/index"),
			},
			AwardSendRule: &giftactivity.FullSendRule{
				TransactionAmountMinimum: core.Int64(100),
				SendContent:              giftactivity.SENDCONTENTCATEGORY_SINGLE_COUPON.Ptr(),
				AwardType:                giftactivity.AWARDTYPE_BUSIFAVOR.Ptr(),
				AwardList: []giftactivity.AwardBaseInfo{giftactivity.AwardBaseInfo{
					StockId:          core.String("98065001"),
					OriginalImageUrl: core.String("https://tool.oschina.net/regex.jpg"),
					ThumbnailUrl:     core.String("https://tool.oschina.net/regex.jpg"),
				}},
				MerchantOption: giftactivity.SENDMERCHANTOPTION_IN_SEVICE_COUPON_MERCHANT.Ptr(),
				MerchantIdList: []string{"10000022"},
			},
			AdvancedSetting: &giftactivity.ActAdvancedSetting{
				DeliveryUserCategory: giftactivity.DELIVERYUSERCATEGORY_DELIVERY_ALL_PERSON.Ptr(),
				MerchantMemberAppid:  core.String("34567890"),
				PaymentMode: &giftactivity.PaymentMode{
					PaymentSceneList: []giftactivity.PaymentScene{giftactivity.PAYMENTSCENE_APP_SCENE},
				},
				PaymentMethodInformation: &giftactivity.PaymentMethodInfo{
					PaymentMethod:    giftactivity.PAYMENTMETHODCATEGORY_CFT.Ptr(),
					BankAbbreviation: core.String("AHRCUB_CREDIT"),
				},
				GoodsTags: []string{"xxx"},
			},
		},
	)

	if err != nil {
		// 处理错误
		log.Printf("call CreateFullSendAct err:%s", err)
	} else {
		// 处理返回结果
		log.Printf("status=%d resp=%s", result.Response.StatusCode, resp)
	}
}
Output:

func (*ActivityApiService) DeleteActivityMerchant

func (a *ActivityApiService) DeleteActivityMerchant(ctx context.Context, req DeleteActivityMerchantRequest) (resp *DeleteActivityMerchantResponse, result *core.APIResult, err error)

DeleteActivityMerchant 删除活动发券商户号

使用场景:商户创建活动后,可以通过该接口删除支付有礼的发券商户号,用于管理活动。 可调用商户:商户/服务商/渠道商

Example
package main

import (
	"context"
	"log"

	"github.com/rjm521/wechatpay-go/core"
	"github.com/rjm521/wechatpay-go/core/option"
	"github.com/rjm521/wechatpay-go/services/giftactivity"
	"github.com/rjm521/wechatpay-go/utils"
)

func main() {
	var (
		mchID                      string = "190000****"                               // 商户号
		mchCertificateSerialNumber string = "3775************************************" // 商户证书序列号
		mchAPIv3Key                string = "2ab9****************************"         // 商户APIv3密钥
	)

	// 使用 utils 提供的函数从本地文件中加载商户私钥,商户私钥会用来生成请求的签名
	mchPrivateKey, err := utils.LoadPrivateKeyWithPath("/path/to/merchant/apiclient_key.pem")
	if err != nil {
		log.Printf("load merchant private key error:%s", err)
		return
	}

	ctx := context.Background()
	// 使用商户私钥等初始化 client,并使它具有自动定时获取微信支付平台证书的能力
	opts := []core.ClientOption{
		option.WithWechatPayAutoAuthCipher(mchID, mchCertificateSerialNumber, mchPrivateKey, mchAPIv3Key),
	}
	client, err := core.NewClient(ctx, opts...)
	if err != nil {
		log.Printf("new wechat pay client err:%s", err)
		return
	}

	svc := giftactivity.ActivityApiService{Client: client}
	resp, result, err := svc.DeleteActivityMerchant(ctx,
		giftactivity.DeleteActivityMerchantRequest{
			ActivityId:      core.String("126002309"),
			MerchantIdList:  []string{"100123456"},
			DeleteRequestNo: core.String("100002322019090134234sfdf"),
		},
	)

	if err != nil {
		// 处理错误
		log.Printf("call DeleteActivityMerchant err:%s", err)
	} else {
		// 处理返回结果
		log.Printf("status=%d resp=%s", result.Response.StatusCode, resp)
	}
}
Output:

func (*ActivityApiService) GetActDetail

func (a *ActivityApiService) GetActDetail(ctx context.Context, req GetActDetailRequest) (resp *GetActDetailResponse, result *core.APIResult, err error)

GetActDetail 获取活动详情接口

使用场景:商户创建活动后,可以通过该接口查询支付有礼的活动详情,用于管理活动。 可调用商户:商户/服务商/渠道商

Example
package main

import (
	"context"
	"log"

	"github.com/rjm521/wechatpay-go/core"
	"github.com/rjm521/wechatpay-go/core/option"
	"github.com/rjm521/wechatpay-go/services/giftactivity"
	"github.com/rjm521/wechatpay-go/utils"
)

func main() {
	var (
		mchID                      string = "190000****"                               // 商户号
		mchCertificateSerialNumber string = "3775************************************" // 商户证书序列号
		mchAPIv3Key                string = "2ab9****************************"         // 商户APIv3密钥
	)

	// 使用 utils 提供的函数从本地文件中加载商户私钥,商户私钥会用来生成请求的签名
	mchPrivateKey, err := utils.LoadPrivateKeyWithPath("/path/to/merchant/apiclient_key.pem")
	if err != nil {
		log.Printf("load merchant private key error:%s", err)
		return
	}

	ctx := context.Background()
	// 使用商户私钥等初始化 client,并使它具有自动定时获取微信支付平台证书的能力
	opts := []core.ClientOption{
		option.WithWechatPayAutoAuthCipher(mchID, mchCertificateSerialNumber, mchPrivateKey, mchAPIv3Key),
	}
	client, err := core.NewClient(ctx, opts...)
	if err != nil {
		log.Printf("new wechat pay client err:%s", err)
		return
	}

	svc := giftactivity.ActivityApiService{Client: client}
	resp, result, err := svc.GetActDetail(ctx,
		giftactivity.GetActDetailRequest{
			ActivityId: core.String("10028001"),
		},
	)

	if err != nil {
		// 处理错误
		log.Printf("call GetActDetail err:%s", err)
	} else {
		// 处理返回结果
		log.Printf("status=%d resp=%s", result.Response.StatusCode, resp)
	}
}
Output:

func (*ActivityApiService) ListActivities

func (a *ActivityApiService) ListActivities(ctx context.Context, req ListActivitiesRequest) (resp *ListActivitiesResponse, result *core.APIResult, err error)

ListActivities 获取支付有礼活动列表

使用场景:商户根据一定过滤条件,查询已创建的支付有礼活动。 可调用商户:商户/服务商/渠道商

Example
package main

import (
	"context"
	"log"

	"github.com/rjm521/wechatpay-go/core"
	"github.com/rjm521/wechatpay-go/core/option"
	"github.com/rjm521/wechatpay-go/services/giftactivity"
	"github.com/rjm521/wechatpay-go/utils"
)

func main() {
	var (
		mchID                      string = "190000****"                               // 商户号
		mchCertificateSerialNumber string = "3775************************************" // 商户证书序列号
		mchAPIv3Key                string = "2ab9****************************"         // 商户APIv3密钥
	)

	// 使用 utils 提供的函数从本地文件中加载商户私钥,商户私钥会用来生成请求的签名
	mchPrivateKey, err := utils.LoadPrivateKeyWithPath("/path/to/merchant/apiclient_key.pem")
	if err != nil {
		log.Printf("load merchant private key error:%s", err)
		return
	}

	ctx := context.Background()
	// 使用商户私钥等初始化 client,并使它具有自动定时获取微信支付平台证书的能力
	opts := []core.ClientOption{
		option.WithWechatPayAutoAuthCipher(mchID, mchCertificateSerialNumber, mchPrivateKey, mchAPIv3Key),
	}
	client, err := core.NewClient(ctx, opts...)
	if err != nil {
		log.Printf("new wechat pay client err:%s", err)
		return
	}

	svc := giftactivity.ActivityApiService{Client: client}
	resp, result, err := svc.ListActivities(ctx,
		giftactivity.ListActivitiesRequest{
			Offset:         core.Int64(1),
			Limit:          core.Int64(20),
			ActivityName:   core.String("良品铺子回馈活动"),
			ActivityStatus: giftactivity.ACTSTATUS_ACT_STATUS_UNKNOWN.Ptr(),
			AwardType:      giftactivity.AWARDTYPE_BUSIFAVOR.Ptr(),
		},
	)

	if err != nil {
		// 处理错误
		log.Printf("call ListActivities err:%s", err)
	} else {
		// 处理返回结果
		log.Printf("status=%d resp=%s", result.Response.StatusCode, resp)
	}
}
Output:

func (*ActivityApiService) ListActivityMerchant

func (a *ActivityApiService) ListActivityMerchant(ctx context.Context, req ListActivityMerchantRequest) (resp *ListActMchResponse, result *core.APIResult, err error)

ListActivityMerchant 获取活动发券商户号

使用场景:商户创建活动后,可以通过该接口查询支付有礼的发券商户号,用于管理活动。 可调用商户:商户/服务商/渠道商

Example
package main

import (
	"context"
	"log"

	"github.com/rjm521/wechatpay-go/core"
	"github.com/rjm521/wechatpay-go/core/option"
	"github.com/rjm521/wechatpay-go/services/giftactivity"
	"github.com/rjm521/wechatpay-go/utils"
)

func main() {
	var (
		mchID                      string = "190000****"                               // 商户号
		mchCertificateSerialNumber string = "3775************************************" // 商户证书序列号
		mchAPIv3Key                string = "2ab9****************************"         // 商户APIv3密钥
	)

	// 使用 utils 提供的函数从本地文件中加载商户私钥,商户私钥会用来生成请求的签名
	mchPrivateKey, err := utils.LoadPrivateKeyWithPath("/path/to/merchant/apiclient_key.pem")
	if err != nil {
		log.Printf("load merchant private key error:%s", err)
		return
	}

	ctx := context.Background()
	// 使用商户私钥等初始化 client,并使它具有自动定时获取微信支付平台证书的能力
	opts := []core.ClientOption{
		option.WithWechatPayAutoAuthCipher(mchID, mchCertificateSerialNumber, mchPrivateKey, mchAPIv3Key),
	}
	client, err := core.NewClient(ctx, opts...)
	if err != nil {
		log.Printf("new wechat pay client err:%s", err)
		return
	}

	svc := giftactivity.ActivityApiService{Client: client}
	resp, result, err := svc.ListActivityMerchant(ctx,
		giftactivity.ListActivityMerchantRequest{
			ActivityId: core.String("126002309"),
			Offset:     core.Int64(1),
			Limit:      core.Int64(20),
		},
	)

	if err != nil {
		// 处理错误
		log.Printf("call ListActivityMerchant err:%s", err)
	} else {
		// 处理返回结果
		log.Printf("status=%d resp=%s", result.Response.StatusCode, resp)
	}
}
Output:

func (*ActivityApiService) ListActivitySku

func (a *ActivityApiService) ListActivitySku(ctx context.Context, req ListActivitySkuRequest) (resp *ListActSkuResponse, result *core.APIResult, err error)

ListActivitySku 获取活动指定商品列表

使用场景:商户创建活动后,可以通过该接口查询支付有礼的活动指定商品,用于管理活动。 可调用商户:商户/服务商/渠道商

Example
package main

import (
	"context"
	"log"

	"github.com/rjm521/wechatpay-go/core"
	"github.com/rjm521/wechatpay-go/core/option"
	"github.com/rjm521/wechatpay-go/services/giftactivity"
	"github.com/rjm521/wechatpay-go/utils"
)

func main() {
	var (
		mchID                      string = "190000****"                               // 商户号
		mchCertificateSerialNumber string = "3775************************************" // 商户证书序列号
		mchAPIv3Key                string = "2ab9****************************"         // 商户APIv3密钥
	)

	// 使用 utils 提供的函数从本地文件中加载商户私钥,商户私钥会用来生成请求的签名
	mchPrivateKey, err := utils.LoadPrivateKeyWithPath("/path/to/merchant/apiclient_key.pem")
	if err != nil {
		log.Printf("load merchant private key error:%s", err)
		return
	}

	ctx := context.Background()
	// 使用商户私钥等初始化 client,并使它具有自动定时获取微信支付平台证书的能力
	opts := []core.ClientOption{
		option.WithWechatPayAutoAuthCipher(mchID, mchCertificateSerialNumber, mchPrivateKey, mchAPIv3Key),
	}
	client, err := core.NewClient(ctx, opts...)
	if err != nil {
		log.Printf("new wechat pay client err:%s", err)
		return
	}

	svc := giftactivity.ActivityApiService{Client: client}
	resp, result, err := svc.ListActivitySku(ctx,
		giftactivity.ListActivitySkuRequest{
			ActivityId: core.String("10028001"),
			Offset:     core.Int64(1),
			Limit:      core.Int64(20),
		},
	)

	if err != nil {
		// 处理错误
		log.Printf("call ListActivitySku err:%s", err)
	} else {
		// 处理返回结果
		log.Printf("status=%d resp=%s", result.Response.StatusCode, resp)
	}
}
Output:

func (*ActivityApiService) TerminateActivity

func (a *ActivityApiService) TerminateActivity(ctx context.Context, req TerminateActivityRequest) (resp *TerminateActResponse, result *core.APIResult, err error)

TerminateActivity 终止活动

使用场景:商户可以通过该接口停止支付有礼活动。 可调用商户:商户/服务商/渠道商

Example
package main

import (
	"context"
	"log"

	"github.com/rjm521/wechatpay-go/core"
	"github.com/rjm521/wechatpay-go/core/option"
	"github.com/rjm521/wechatpay-go/services/giftactivity"
	"github.com/rjm521/wechatpay-go/utils"
)

func main() {
	var (
		mchID                      string = "190000****"                               // 商户号
		mchCertificateSerialNumber string = "3775************************************" // 商户证书序列号
		mchAPIv3Key                string = "2ab9****************************"         // 商户APIv3密钥
	)

	// 使用 utils 提供的函数从本地文件中加载商户私钥,商户私钥会用来生成请求的签名
	mchPrivateKey, err := utils.LoadPrivateKeyWithPath("/path/to/merchant/apiclient_key.pem")
	if err != nil {
		log.Printf("load merchant private key error:%s", err)
		return
	}

	ctx := context.Background()
	// 使用商户私钥等初始化 client,并使它具有自动定时获取微信支付平台证书的能力
	opts := []core.ClientOption{
		option.WithWechatPayAutoAuthCipher(mchID, mchCertificateSerialNumber, mchPrivateKey, mchAPIv3Key),
	}
	client, err := core.NewClient(ctx, opts...)
	if err != nil {
		log.Printf("new wechat pay client err:%s", err)
		return
	}

	svc := giftactivity.ActivityApiService{Client: client}
	resp, result, err := svc.TerminateActivity(ctx,
		giftactivity.TerminateActivityRequest{
			ActivityId: core.String("10028001"),
		},
	)

	if err != nil {
		// 处理错误
		log.Printf("call TerminateActivity err:%s", err)
	} else {
		// 处理返回结果
		log.Printf("status=%d resp=%s", result.Response.StatusCode, resp)
	}
}
Output:

type ActivityInformation

type ActivityInformation struct {
	// 活动Id
	ActivityId *string `json:"activity_id,omitempty"`
	// 活动类型
	ActivityType *ActType `json:"activity_type,omitempty"`
	// 创建活动时录入的基本信息
	ActivityBaseInfo *ActBaseInfo `json:"activity_base_info,omitempty"`
	// 奖品派送规则,分别对应满送、阶梯送、满A送B中的一种
	AwardSendRule *AwardSendRule `json:"award_send_rule,omitempty"`
	// 创建时传入的高级设置信息
	AdvancedSetting *ActAdvancedSetting `json:"advanced_setting,omitempty"`
	// 活动当前状态枚举值
	ActivityStatus *ActStatus `json:"activity_status,omitempty"`
	// 创建商户号
	CreatorMerchantId *string `json:"creator_merchant_id,omitempty"`
	// 所属商户号
	BelongMerchantId *string `json:"belong_merchant_id,omitempty"`
	// 活动创建时间
	CreateTime *string `json:"create_time,omitempty"`
	// 活动更新时间
	UpdateTime *string `json:"update_time,omitempty"`
}

ActivityInformation

func (ActivityInformation) Clone

func (ActivityInformation) MarshalJSON

func (o ActivityInformation) MarshalJSON() ([]byte, error)

func (ActivityInformation) String

func (o ActivityInformation) String() string

type AddActivityMerchantBody

type AddActivityMerchantBody struct {
	// 新增到活动中的发券商户号列表
	MerchantIdList []string `json:"merchant_id_list"`
	// 商户添加发券商户号的凭据号,商户侧需保持唯一性
	AddRequestNo *string `json:"add_request_no"`
}

AddActivityMerchantBody

func (AddActivityMerchantBody) Clone

func (AddActivityMerchantBody) MarshalJSON

func (o AddActivityMerchantBody) MarshalJSON() ([]byte, error)

func (AddActivityMerchantBody) String

func (o AddActivityMerchantBody) String() string

type AddActivityMerchantRequest

type AddActivityMerchantRequest struct {
	// 活动Id
	ActivityId *string `json:"activity_id"`
	// 新增到活动中的发券商户号列表
	MerchantIdList []string `json:"merchant_id_list"`
	// 商户添加发券商户号的凭据号,商户侧需保持唯一性
	AddRequestNo *string `json:"add_request_no"`
}

AddActivityMerchantRequest

func (AddActivityMerchantRequest) Clone

func (AddActivityMerchantRequest) MarshalJSON

func (o AddActivityMerchantRequest) MarshalJSON() ([]byte, error)

func (AddActivityMerchantRequest) String

type AddActivityMerchantResponse

type AddActivityMerchantResponse struct {
	// 活动Id
	ActivityId *string `json:"activity_id,omitempty"`
	// 未通过规则校验的发券商户号列表
	InvalidMerchantIdList []InvalidParticipateMerchant `json:"invalid_merchant_id_list,omitempty"`
	// 成功添加发券商户号的时间
	AddTime *string `json:"add_time,omitempty"`
}

AddActivityMerchantResponse

func (AddActivityMerchantResponse) Clone

func (AddActivityMerchantResponse) MarshalJSON

func (o AddActivityMerchantResponse) MarshalJSON() ([]byte, error)

func (AddActivityMerchantResponse) String

type AvailableDayTime

type AvailableDayTime struct {
	// 每日可用开始时间(格式:110000,表示11:00:00)
	BeginDayTime *string `json:"begin_day_time"`
	// 每日可用结束时间 (格式:135959,表示13:59:59)
	EndDayTime *string `json:"end_day_time"`
}

AvailableDayTime

func (AvailableDayTime) Clone

func (AvailableDayTime) MarshalJSON

func (o AvailableDayTime) MarshalJSON() ([]byte, error)

func (AvailableDayTime) String

func (o AvailableDayTime) String() string

type AvailablePeriod

type AvailablePeriod struct {
	// 可用时间
	AvailableTime []AvailableTime `json:"available_time,omitempty"`
	// 每日可用时间
	AvailableDayTime []AvailableDayTime `json:"available_day_time,omitempty"`
}

AvailablePeriod

func (AvailablePeriod) Clone

func (o AvailablePeriod) Clone() *AvailablePeriod

func (AvailablePeriod) MarshalJSON

func (o AvailablePeriod) MarshalJSON() ([]byte, error)

func (AvailablePeriod) String

func (o AvailablePeriod) String() string

type AvailableTime

type AvailableTime struct {
	// 可用开始时间
	BeginTime *string `json:"begin_time"`
	// 可用结束时间
	EndTime *string `json:"end_time"`
}

AvailableTime

func (AvailableTime) Clone

func (o AvailableTime) Clone() *AvailableTime

func (AvailableTime) MarshalJSON

func (o AvailableTime) MarshalJSON() ([]byte, error)

func (AvailableTime) String

func (o AvailableTime) String() string

type AwardBaseInfo

type AwardBaseInfo struct {
	// 代金券批次Id
	StockId *string `json:"stock_id"`
	// 奖品大图,必填
	OriginalImageUrl *string `json:"original_image_url"`
	// 奖品小图,当选多张券时必填
	ThumbnailUrl *string `json:"thumbnail_url,omitempty"`
}

AwardBaseInfo

func (AwardBaseInfo) Clone

func (o AwardBaseInfo) Clone() *AwardBaseInfo

func (AwardBaseInfo) MarshalJSON

func (o AwardBaseInfo) MarshalJSON() ([]byte, error)

func (AwardBaseInfo) String

func (o AwardBaseInfo) String() string

type AwardSendRule

type AwardSendRule struct {
	//
	FullSendRule *FullSendRule `json:"full_send_rule,omitempty"`
}

AwardSendRule

func (AwardSendRule) Clone

func (o AwardSendRule) Clone() *AwardSendRule

func (AwardSendRule) MarshalJSON

func (o AwardSendRule) MarshalJSON() ([]byte, error)

func (AwardSendRule) String

func (o AwardSendRule) String() string

type AwardType

type AwardType string

AwardType

const (
	AWARDTYPE_BUSIFAVOR AwardType = "BUSIFAVOR"
)

Enums of AwardType

func (AwardType) Ptr

func (e AwardType) Ptr() *AwardType

type BankCardCategory

type BankCardCategory string

BankCardCategory

const (
	BANKCARDCATEGORY_DEBIT_CARD  BankCardCategory = "DEBIT_CARD"
	BANKCARDCATEGORY_CREDIT_CARD BankCardCategory = "CREDIT_CARD"
)

Enums of BankCardCategory

func (BankCardCategory) Ptr

type CreateFullSendActRequest

type CreateFullSendActRequest struct {
	// 用于创建活动的基本信息
	ActivityBaseInfo *ActBaseInfo `json:"activity_base_info"`
	// 满送活动规则
	AwardSendRule *FullSendRule `json:"award_send_rule"`
	// 其他高级配置项
	AdvancedSetting *ActAdvancedSetting `json:"advanced_setting,omitempty"`
}

CreateFullSendActRequest

func (CreateFullSendActRequest) Clone

func (CreateFullSendActRequest) MarshalJSON

func (o CreateFullSendActRequest) MarshalJSON() ([]byte, error)

func (CreateFullSendActRequest) String

func (o CreateFullSendActRequest) String() string

type CreateFullSendActResponse

type CreateFullSendActResponse struct {
	// 活动id
	ActivityId *string `json:"activity_id"`
	// 创建时间
	CreateTime *string `json:"create_time"`
}

CreateFullSendActResponse

func (CreateFullSendActResponse) Clone

func (CreateFullSendActResponse) MarshalJSON

func (o CreateFullSendActResponse) MarshalJSON() ([]byte, error)

func (CreateFullSendActResponse) String

func (o CreateFullSendActResponse) String() string

type DeleteActivityMerchantBody

type DeleteActivityMerchantBody struct {
	// 从活动已有的发券商户号中移除的商户号列表
	MerchantIdList []string `json:"merchant_id_list"`
	// 商户添加发券商户号的凭据号,商户侧需保持唯一性
	DeleteRequestNo *string `json:"delete_request_no"`
}

DeleteActivityMerchantBody

func (DeleteActivityMerchantBody) Clone

func (DeleteActivityMerchantBody) MarshalJSON

func (o DeleteActivityMerchantBody) MarshalJSON() ([]byte, error)

func (DeleteActivityMerchantBody) String

type DeleteActivityMerchantRequest

type DeleteActivityMerchantRequest struct {
	// 活动Id
	ActivityId *string `json:"activity_id"`
	// 从活动已有的发券商户号中移除的商户号列表
	MerchantIdList []string `json:"merchant_id_list"`
	// 商户添加发券商户号的凭据号,商户侧需保持唯一性
	DeleteRequestNo *string `json:"delete_request_no"`
}

DeleteActivityMerchantRequest

func (DeleteActivityMerchantRequest) Clone

func (DeleteActivityMerchantRequest) MarshalJSON

func (o DeleteActivityMerchantRequest) MarshalJSON() ([]byte, error)

func (DeleteActivityMerchantRequest) String

type DeleteActivityMerchantResponse

type DeleteActivityMerchantResponse struct {
	// 活动Id
	ActivityId *string `json:"activity_id"`
	// 成功删除发券商户号的时间
	DeleteTime *string `json:"delete_time,omitempty"`
}

DeleteActivityMerchantResponse

func (DeleteActivityMerchantResponse) Clone

func (DeleteActivityMerchantResponse) MarshalJSON

func (o DeleteActivityMerchantResponse) MarshalJSON() ([]byte, error)

func (DeleteActivityMerchantResponse) String

type DeliveryPurposeCategory

type DeliveryPurposeCategory string

DeliveryPurposeCategory 投放目的枚举值

const (
	DELIVERYPURPOSECATEGORY_OFF_LINE_PAY  DeliveryPurposeCategory = "OFF_LINE_PAY"
	DELIVERYPURPOSECATEGORY_JUMP_MINI_APP DeliveryPurposeCategory = "JUMP_MINI_APP"
)

Enums of DeliveryPurposeCategory

func (DeliveryPurposeCategory) Ptr

type DeliveryUserCategory

type DeliveryUserCategory string

DeliveryUserCategory

const (
	DELIVERYUSERCATEGORY_DELIVERY_ALL_PERSON    DeliveryUserCategory = "DELIVERY_ALL_PERSON"
	DELIVERYUSERCATEGORY_DELIVERY_MEMBER_PERSON DeliveryUserCategory = "DELIVERY_MEMBER_PERSON"
)

Enums of DeliveryUserCategory

func (DeliveryUserCategory) Ptr

type FullSendRule

type FullSendRule struct {
	// 消费金额门槛 单位分
	TransactionAmountMinimum *int64 `json:"transaction_amount_minimum"`
	// 发放内容,可选单张券或礼包,选礼包时奖品限定3-5个
	SendContent *SendContentCategory `json:"send_content"`
	// 奖品类型,暂时只支持商家券
	AwardType *AwardType `json:"award_type"`
	// 奖品基本信息列表
	AwardList []AwardBaseInfo `json:"award_list"`
	// 发券商户号选取规则,支持选择在用券商户或手动输入商户号两种,选择手动时,发券商户号必填(商家券只支持手动输入)
	MerchantOption *SendMerchantOption `json:"merchant_option"`
	// 发券商户号,列表
	MerchantIdList []string `json:"merchant_id_list,omitempty"`
}

FullSendRule

func (FullSendRule) Clone

func (o FullSendRule) Clone() *FullSendRule

func (FullSendRule) MarshalJSON

func (o FullSendRule) MarshalJSON() ([]byte, error)

func (FullSendRule) String

func (o FullSendRule) String() string

type GetActDetailRequest

type GetActDetailRequest struct {
	// 活动Id
	ActivityId *string `json:"activity_id"`
}

GetActDetailRequest

func (GetActDetailRequest) Clone

func (GetActDetailRequest) MarshalJSON

func (o GetActDetailRequest) MarshalJSON() ([]byte, error)

func (GetActDetailRequest) String

func (o GetActDetailRequest) String() string

type GetActDetailResponse

type GetActDetailResponse struct {
	// 活动Id
	ActivityId *string `json:"activity_id"`
	// 活动类型
	ActivityType *ActType `json:"activity_type,omitempty"`
	// 创建活动时录入的基本信息
	ActivityBaseInfo *ActBaseInfo `json:"activity_base_info"`
	// 奖品派送规则,分别对应满送、阶梯送、满A送B中的一种
	AwardSendRule *AwardSendRule `json:"award_send_rule"`
	// 创建时传入的高级设置信息
	AdvancedSetting *ActAdvancedSetting `json:"advanced_setting,omitempty"`
	// 活动当前状态枚举值
	ActivityStatus *ActStatus `json:"activity_status"`
	// 创建商户号
	CreatorMerchantId *string `json:"creator_merchant_id"`
	// 所属商户号
	BelongMerchantId *string `json:"belong_merchant_id"`
	// 活动暂停时间
	PauseTime *string `json:"pause_time,omitempty"`
	// 活动恢复时间
	RecoveryTime *string `json:"recovery_time,omitempty"`
	// 活动创建时间
	CreateTime *string `json:"create_time,omitempty"`
	// 活动更新时间
	UpdateTime *string `json:"update_time,omitempty"`
}

GetActDetailResponse

func (GetActDetailResponse) Clone

func (GetActDetailResponse) MarshalJSON

func (o GetActDetailResponse) MarshalJSON() ([]byte, error)

func (GetActDetailResponse) String

func (o GetActDetailResponse) String() string

type InvalidParticipateMerchant

type InvalidParticipateMerchant struct {
	// 商户Id
	Mchid *string `json:"mchid,omitempty"`
	// 活动参与商户校验失败的原因
	InvalidReason *string `json:"invalid_reason,omitempty"`
}

InvalidParticipateMerchant

func (InvalidParticipateMerchant) Clone

func (InvalidParticipateMerchant) MarshalJSON

func (o InvalidParticipateMerchant) MarshalJSON() ([]byte, error)

func (InvalidParticipateMerchant) String

type ListActMchResponse

type ListActMchResponse struct {
	// 商户信息列表
	Data []ActParticipateMchInfo `json:"data,omitempty"`
	// 商户数量
	TotalCount *int64 `json:"total_count"`
	// 分页页码
	Offset *int64 `json:"offset"`
	// 分页大小
	Limit *int64 `json:"limit"`
	// 活动Id
	ActivityId *string `json:"activity_id"`
}

ListActMchResponse

func (ListActMchResponse) Clone

func (ListActMchResponse) MarshalJSON

func (o ListActMchResponse) MarshalJSON() ([]byte, error)

func (ListActMchResponse) String

func (o ListActMchResponse) String() string

type ListActSkuResponse

type ListActSkuResponse struct {
	// 商品信息列表(sku信息列表)
	Data       []SkuInfo `json:"data,omitempty"`
	TotalCount *int64    `json:"total_count"`
	// 分页页码
	Offset *int64 `json:"offset"`
	// 分页大小
	Limit *int64 `json:"limit"`
	// 活动ID
	ActivityId *string `json:"activity_id"`
}

ListActSkuResponse

func (ListActSkuResponse) Clone

func (ListActSkuResponse) MarshalJSON

func (o ListActSkuResponse) MarshalJSON() ([]byte, error)

func (ListActSkuResponse) String

func (o ListActSkuResponse) String() string

type ListActivitiesRequest

type ListActivitiesRequest struct {
	// 分页页码
	Offset *int64 `json:"offset"`
	// 分页大小
	Limit *int64 `json:"limit"`
	// 活动名称,支持模糊搜索
	ActivityName *string `json:"activity_name,omitempty"`
	// 活动状态
	ActivityStatus *ActStatus `json:"activity_status,omitempty"`
	// 奖品类型,暂时只支持商家券
	AwardType *AwardType `json:"award_type,omitempty"`
}

ListActivitiesRequest

func (ListActivitiesRequest) Clone

func (ListActivitiesRequest) MarshalJSON

func (o ListActivitiesRequest) MarshalJSON() ([]byte, error)

func (ListActivitiesRequest) String

func (o ListActivitiesRequest) String() string

type ListActivitiesResponse

type ListActivitiesResponse struct {
	// 支付有礼活动列表
	Data []ActivityInformation `json:"data,omitempty"`
	// 总数
	TotalCount *int64 `json:"total_count,omitempty"`
	// 分页页码
	Offset *int64 `json:"offset,omitempty"`
	// 分页大小
	Limit *int64 `json:"limit,omitempty"`
}

ListActivitiesResponse

func (ListActivitiesResponse) Clone

func (ListActivitiesResponse) MarshalJSON

func (o ListActivitiesResponse) MarshalJSON() ([]byte, error)

func (ListActivitiesResponse) String

func (o ListActivitiesResponse) String() string

type ListActivityMerchantRequest

type ListActivityMerchantRequest struct {
	// 活动Id
	ActivityId *string `json:"activity_id"`
	// 分页页码
	Offset *int64 `json:"offset,omitempty"`
	// 限制分页最大数据条目
	Limit *int64 `json:"limit,omitempty"`
}

ListActivityMerchantRequest

func (ListActivityMerchantRequest) Clone

func (ListActivityMerchantRequest) MarshalJSON

func (o ListActivityMerchantRequest) MarshalJSON() ([]byte, error)

func (ListActivityMerchantRequest) String

type ListActivitySkuRequest

type ListActivitySkuRequest struct {
	// 活动Id
	ActivityId *string `json:"activity_id"`
	// 分页页码
	Offset *int64 `json:"offset,omitempty"`
	// 分页大小
	Limit *int64 `json:"limit,omitempty"`
}

ListActivitySkuRequest

func (ListActivitySkuRequest) Clone

func (ListActivitySkuRequest) MarshalJSON

func (o ListActivitySkuRequest) MarshalJSON() ([]byte, error)

func (ListActivitySkuRequest) String

func (o ListActivitySkuRequest) String() string

type OpActScene

type OpActScene string

OpActScene

const (
	OPACTSCENE_OP_ACT_SCENE_JONIT_PLAN_CREATOR        OpActScene = "OP_ACT_SCENE_JONIT_PLAN_CREATOR"
	OPACTSCENE_OP_ACT_SCENE_JONIT_PLAN_AUTHORIZED_MCH OpActScene = "OP_ACT_SCENE_JONIT_PLAN_AUTHORIZED_MCH"
)

Enums of OpActScene

func (OpActScene) Ptr

func (e OpActScene) Ptr() *OpActScene

type ParticipateMchStatus

type ParticipateMchStatus string

ParticipateMchStatus

const (
	PARTICIPATEMCHSTATUS_PARTIC_MCH_STATUS_INVALID ParticipateMchStatus = "PARTIC_MCH_STATUS_INVALID"
	PARTICIPATEMCHSTATUS_PARTIC_MCH_STATUS_VALID   ParticipateMchStatus = "PARTIC_MCH_STATUS_VALID"
	PARTICIPATEMCHSTATUS_PARTIC_MCH_STATUS_EXPIRE  ParticipateMchStatus = "PARTIC_MCH_STATUS_EXPIRE"
)

Enums of ParticipateMchStatus

func (ParticipateMchStatus) Ptr

type PaymentMethodCategory

type PaymentMethodCategory string

PaymentMethodCategory

const (
	PAYMENTMETHODCATEGORY_CFT                PaymentMethodCategory = "CFT"
	PAYMENTMETHODCATEGORY_SPECIFIC_BANK_CARD PaymentMethodCategory = "SPECIFIC_BANK_CARD"
)

Enums of PaymentMethodCategory

func (PaymentMethodCategory) Ptr

type PaymentMethodInfo

type PaymentMethodInfo struct {
	// 支付方式,可以指定银行卡或零钱
	PaymentMethod *PaymentMethodCategory `json:"payment_method"`
	// 银行简称,指定支付方式为银行卡必填,详询附录
	BankAbbreviation *string `json:"bank_abbreviation,omitempty"`
}

PaymentMethodInfo

func (PaymentMethodInfo) Clone

func (PaymentMethodInfo) MarshalJSON

func (o PaymentMethodInfo) MarshalJSON() ([]byte, error)

func (PaymentMethodInfo) String

func (o PaymentMethodInfo) String() string

type PaymentMode

type PaymentMode struct {
	// APP_SCENE:App场景;SWING_CARD:刷卡;NO_SECRET_SCENE:免密支付;MINIAPP_SCENE:小程序;FACE_PAY_SCENE:人脸支付; OTHER_SCENE:其他支付场景
	PaymentSceneList []PaymentScene `json:"payment_scene_list,omitempty"`
}

PaymentMode

func (PaymentMode) Clone

func (o PaymentMode) Clone() *PaymentMode

func (PaymentMode) MarshalJSON

func (o PaymentMode) MarshalJSON() ([]byte, error)

func (PaymentMode) String

func (o PaymentMode) String() string

type PaymentScene

type PaymentScene string

PaymentScene

const (
	PAYMENTSCENE_APP_SCENE        PaymentScene = "APP_SCENE"
	PAYMENTSCENE_SWING_CARD_SCENE PaymentScene = "SWING_CARD_SCENE"
	PAYMENTSCENE_NO_SECRET_SCENE  PaymentScene = "NO_SECRET_SCENE"
	PAYMENTSCENE_MINIAPP_SCENE    PaymentScene = "MINIAPP_SCENE"
	PAYMENTSCENE_FACE_PAY_SCENE   PaymentScene = "FACE_PAY_SCENE"
	PAYMENTSCENE_OTHER_SCENE      PaymentScene = "OTHER_SCENE"
)

Enums of PaymentScene

func (PaymentScene) Ptr

func (e PaymentScene) Ptr() *PaymentScene

type SendContentCategory

type SendContentCategory string

SendContentCategory

const (
	SENDCONTENTCATEGORY_SINGLE_COUPON SendContentCategory = "SINGLE_COUPON"
	SENDCONTENTCATEGORY_GIFT_PACKAGE  SendContentCategory = "GIFT_PACKAGE"
)

Enums of SendContentCategory

func (SendContentCategory) Ptr

type SendMerchantOption

type SendMerchantOption string

SendMerchantOption

const (
	SENDMERCHANTOPTION_IN_SEVICE_COUPON_MERCHANT SendMerchantOption = "IN_SEVICE_COUPON_MERCHANT"
	SENDMERCHANTOPTION_MANUAL_INPUT_MERCHANT     SendMerchantOption = "MANUAL_INPUT_MERCHANT"
)

Enums of SendMerchantOption

func (SendMerchantOption) Ptr

type SkuInfo

type SkuInfo struct {
	// 指定商品(商品sku)
	GoodsId *string `json:"goods_id"`
	// 创建时间
	CreateTime *string `json:"create_time"`
	// 更新时间
	UpdateTime *string `json:"update_time"`
}

SkuInfo

func (SkuInfo) Clone

func (o SkuInfo) Clone() *SkuInfo

func (SkuInfo) MarshalJSON

func (o SkuInfo) MarshalJSON() ([]byte, error)

func (SkuInfo) String

func (o SkuInfo) String() string

type SkuStatus

type SkuStatus string

SkuStatus

const (
	SKUSTATUS_SKU_STATUS_INVALID SkuStatus = "SKU_STATUS_INVALID"
	SKUSTATUS_SKU_STATUS_VAILD   SkuStatus = "SKU_STATUS_VAILD"
	SKUSTATUS_SKU_STATUS_EXPIRE  SkuStatus = "SKU_STATUS_EXPIRE"
	SKUSTATUS_SKU_STATUS_UNKNOWN SkuStatus = "SKU_STATUS_UNKNOWN"
)

Enums of SkuStatus

func (SkuStatus) Ptr

func (e SkuStatus) Ptr() *SkuStatus

type TerminateActResponse

type TerminateActResponse struct {
	// 生效时间
	TerminateTime *string `json:"terminate_time"`
	// 活动Id
	ActivityId *string `json:"activity_id"`
}

TerminateActResponse

func (TerminateActResponse) Clone

func (TerminateActResponse) MarshalJSON

func (o TerminateActResponse) MarshalJSON() ([]byte, error)

func (TerminateActResponse) String

func (o TerminateActResponse) String() string

type TerminateActivityRequest

type TerminateActivityRequest struct {
	// 活动Id
	ActivityId *string `json:"activity_id"`
}

TerminateActivityRequest

func (TerminateActivityRequest) Clone

func (TerminateActivityRequest) MarshalJSON

func (o TerminateActivityRequest) MarshalJSON() ([]byte, error)

func (TerminateActivityRequest) String

func (o TerminateActivityRequest) String() string

type ThresholdCategory

type ThresholdCategory string

ThresholdCategory

const (
	THRESHOLDCATEGORY_AMOUNT_THRESHOLD ThresholdCategory = "AMOUNT_THRESHOLD"
	THRESHOLDCATEGORY_NUMBER_THRESHOLD ThresholdCategory = "NUMBER_THRESHOLD"
)

Enums of ThresholdCategory

func (ThresholdCategory) Ptr

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL