// Code generated by lark_sdk_gen. DO NOT EDIT.
/**
 * Copyright 2022 chyroc
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package lark

import (
	"context"
)

// EventV2HireReferralAccountAssetsUpdateV1 当内推账号余额发生变更时, 触发该事件。
//
// - 了解事件订阅的使用场景和配置流程, 请点击查看 [事件订阅概述](https://open.feishu.cn/document/ukTMukTMukTM/uUTNz4SN1MjL1UzM)。
// - 订阅前, 请确认已完成[「注册外部系统内推账户」](https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/referral_account/create), 约定需推送的内推账号范围。收到事件后, 如需将余额充值到三方平台发放给用户, 请使用接口[「全额扣减内推奖励的积分总额」](https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/referral_account/withdraw)
// 配合接口: [注册外部系统内推账户](https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/referral_account/create)、[全额扣减内推奖励的积分总额](https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/referral_account/withdraw)
//
// doc: https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/referral_account/events/assets_update
func (r *EventCallbackService) HandlerEventV2HireReferralAccountAssetsUpdateV1(f EventV2HireReferralAccountAssetsUpdateV1Handler) {
	r.cli.eventHandler.eventV2HireReferralAccountAssetsUpdateV1Handler = f
}

// EventV2HireReferralAccountAssetsUpdateV1Handler event EventV2HireReferralAccountAssetsUpdateV1 handler
type EventV2HireReferralAccountAssetsUpdateV1Handler func(ctx context.Context, cli *Lark, schema string, header *EventHeaderV2, event *EventV2HireReferralAccountAssetsUpdateV1) (string, error)

// EventV2HireReferralAccountAssetsUpdateV1 ...
type EventV2HireReferralAccountAssetsUpdateV1 struct {
	AccountID  string                                          `json:"account_id,omitempty"`  // 账户ID, 同一用户在同一租户同一应用中账户唯一
	Assets     *EventV2HireReferralAccountAssetsUpdateV1Assets `json:"assets,omitempty"`      // 账户余额信息
	ModifyTime string                                          `json:"modify_time,omitempty"` // 变更时间
}

// EventV2HireReferralAccountAssetsUpdateV1Assets ...
type EventV2HireReferralAccountAssetsUpdateV1Assets struct {
	ConfirmedBonus *EventV2HireReferralAccountAssetsUpdateV1AssetsConfirmedBonus `json:"confirmed_bonus,omitempty"` // 已确认的奖励
}

// EventV2HireReferralAccountAssetsUpdateV1AssetsConfirmedBonus ...
type EventV2HireReferralAccountAssetsUpdateV1AssetsConfirmedBonus struct {
	PointBonus int64 `json:"point_bonus,omitempty"` // 积分奖励
}
