agent

package
v1.20.7 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: 5 Imported by: 1

Documentation

Overview

Package agent 代理商相关API models

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdvertiserCopyItem added in v1.19.2

type AdvertiserCopyItem struct {
	// Name 新广告主账户名称。不可重复
	Name string `json:"name,omitempty"`
	// AdvertiserID 广告主账户ID
	AdvertiserID uint64 `json:"advertiser_id,omitempty"`
	// Success 复制是否成功
	Success bool
	// ErrorMsg 当失败时,返回的失败原因
	ErrorMsg string `json:"error_msg,omitempty"`
}

AdvertiserCopyItem 复制账户信息

func (AdvertiserCopyItem) Error added in v1.19.2

func (i AdvertiserCopyItem) Error() string

Error implement error interface

func (AdvertiserCopyItem) IsError added in v1.19.2

func (i AdvertiserCopyItem) IsError() bool

IsError returns true if item is error

type AdvertiserCopyRequest added in v1.19.2

type AdvertiserCopyRequest struct {
	// AgentID 代理商账户ID
	AgentID uint64 `json:"agent_id,omitempty"`
	// AdvertiserID 被复制广告主账户ID
	AdvertiserID uint64 `json:"advertiser_id,omitempty"`
	// Item 复制账户信息
	Item []AdvertiserCopyItem `json:"item,omitempty"`
	// Copytag 是否复制原广告主账户的账户标签
	CopyTag bool `json:"copy_tag,omitempty"`
	// ReportType 自运营报备类型 可选值:
	// EMPTY 不报备
	// INCREASE_QUANTITY 走量报备
	// SELF_OPERATION 自运营报备
	//  默认值: EMPTY
	Reportype enum.AdvertiserReportType `json:"reportype,omitempty"`
}

AdvertiserCopyRequest 广告主账户复制 API Request

func (AdvertiserCopyRequest) Encode added in v1.19.2

func (r AdvertiserCopyRequest) Encode() []byte

Encode implement PostRequest interface

type AdvertiserCopyResponse added in v1.19.2

type AdvertiserCopyResponse struct {
	model.BaseResponse
	Data *AdvertiserCopyResult `json:"data,omitempty"`
}

AdvertiserCopyResponse 广告主账户复制 API Response

type AdvertiserCopyResult added in v1.19.2

type AdvertiserCopyResult struct {
	// CopyStatus 复制结果状态码 可选值:
	// 1 全部成功
	// 2 部分成功
	// 3 全部失败
	CopyStatus enum.AdvertiserCopyStatus `json:"copy_status,omitempty"`
	// Item 复制结果,包括单个账户的失败原因
	Item []AdvertiserCopyItem `json:"item,omitempty"`
}

type AdvertiserRechargeRequest

type AdvertiserRechargeRequest struct {
	// AdvertiserID 广告主ID
	AdvertiserID uint64 `json:"advertiser_id,omitempty"`
	// AgentID 代理商ID
	AgentID uint64 `json:"agent_id,omitempty"`
	// TransferType 转账类型,允许值:
	// GRANT 赠款
	// PREPAY_UNIVERSAL 通用预付
	// PREPAY_BRAND 品牌预付
	// PREPAY_BID 竞价预付
	// CREDIT_UNIVERSAL 通用授信
	// CREDIT_BRAND 品牌授信
	// CREDIT_BID 竞价授信
	TransferType AdvertiserTransferType `json:"transfer_type,omitempty"`
	// Amount 金额,单位(元),最低转账金额500元
	Amount float64 `json:"amount,omitempty"`
}

AdvertiserRechargeRequest 代理商转账 API Request

func (AdvertiserRechargeRequest) Encode

func (r AdvertiserRechargeRequest) Encode() []byte

Encode implement PostRequest interface

type AdvertiserRechargeResponse

type AdvertiserRechargeResponse struct {
	model.BaseResponse
	// Data json返回值
	Data *AdvertiserRechargeResponseData `json:"data,omitempty"`
}

AdvertiserRechargeResponse 代理商转账 API Response

type AdvertiserRechargeResponseData

type AdvertiserRechargeResponseData struct {
	// TransactionSeq 交易序列号
	TransactionSeq string `json:"transaction_seq,omitempty"`
}

AdvertiserRechargeResponseData json返回值

type AdvertiserRefundRequest

type AdvertiserRefundRequest struct {
	// AdvertiserID 广告主ID
	AdvertiserID uint64 `json:"advertiser_id,omitempty"`
	// AgentID 代理商ID
	AgentID uint64 `json:"agent_id,omitempty"`
	// TransferType 转账类型,允许值:
	// GRANT 赠款
	// PREPAY_UNIVERSAL 通用预付
	// PREPAY_BRAND 品牌预付
	// PREPAY_BID 竞价预付
	// CREDIT_UNIVERSAL 通用授信
	// CREDIT_BRAND 品牌授信
	// CREDIT_BID 竞价授信
	TransferType AdvertiserTransferType `json:"transfer_type,omitempty"`
	// Amount 金额,单位(元),最低转账金额500元
	Amount float64 `json:"amount,omitempty"`
}

AdvertiserRefundRequest 代理商退款 API Request

func (AdvertiserRefundRequest) Encode

func (r AdvertiserRefundRequest) Encode() []byte

Encode implement PostRequest interface

type AdvertiserRefundResponse

type AdvertiserRefundResponse struct {
	model.BaseResponse
	// Data json返回值
	Data *AdvertiserRefundResponseData `json:"data,omitempty"`
}

AdvertiserRefundResponse 代理商退款 API Response

type AdvertiserRefundResponseData

type AdvertiserRefundResponseData struct {
	// TransactionSeq 交易序列号
	TransactionSeq string `json:"transaction_seq,omitempty"`
}

AdvertiserRefundResponseData json返回值

type AdvertiserSelectRequest

type AdvertiserSelectRequest struct {
	// AdvertiserID 代理商ID
	AdvertiserID uint64 `json:"advertiser_id,omitempty"`
	// CompanyIDs
	CompanyIDs []string `json:"company_ids,omitempty"`
	// Page 页码.默认值: 1
	Page int `json:"page,omitempty"`
	// PageSize 页面数据量.默认值: 100
	PageSize int `json:"page_size,omitempty"`
	// Cursor 页码游标值,第一次拉取,无需入参
	// 注:page+page_size与cursor+count为两种分页方式
	// cursor+count适用于获取数据记录数≥10000的场景
	Cursor int `json:"cursor,omitempty"`
	// Count 页面数据量,页面数据量
	// 注:page+page_size与cursor+count为两种分页方式
	// cursor+count适用于获取数据记录数≥10000的场景
	Count int `json:"count,omitempty"`
}

AdvertiserSelectRequest 代理商管理账户列表 API Request

func (AdvertiserSelectRequest) Encode

func (r AdvertiserSelectRequest) Encode() string

Encode implement GetRequest interface

type AdvertiserSelectResponse

type AdvertiserSelectResponse struct {
	model.BaseResponse
	// Data json返回值
	Data *AdvertiserSelectResponseData `json:"data,omitempty"`
}

AdvertiserSelectResponse 代理商管理账户列表 API Response

type AdvertiserSelectResponseData

type AdvertiserSelectResponseData struct {
	// List 广告主ID列表
	List []uint64 `json:"list,omitempty"`
	// AccountSource 账号列表的账号类型
	// 枚举值:AD广告主、STAR星图、LUBAN鲁班、DOMESTIC 入海
	AccountSource string `json:"account_source,omitempty"`
	// PageInfo 分页信息
	PageInfo *model.PageInfo `json:"page_info,omitempty"`
	// CursorInfo 分页信息
	CursorInfo *model.PageInfo `json:"cursor_info,omitempty"`
}

AdvertiserSelectResponseData json返回值

type AdvertiserTransferType added in v1.13.9

type AdvertiserTransferType string

AdvertiserTransferType 转账类型

const (
	// AdvertiserTransferType_GRANT 赠款
	AdvertiserTransferType_GRANT AdvertiserTransferType = "GRANT"
	// AdvertiserTransferType_PREPAY_UNIVERSAL 通用预付
	AdvertiserTransferType_PREPAY_UNIVERSAL AdvertiserTransferType = "PREPAY_UNIVERSAL"
	// AdvertiserTransferType_PREPAY_BRAND 品牌预付
	AdvertiserTransferType_PREPAY_BRAND AdvertiserTransferType = "PREPAY_BRAND"
	// AdvertiserTransferType_PREPAY_BID 竞价预付
	AdvertiserTransferType_PREPAY_BID AdvertiserTransferType = "PREPAY_BID"
	// AdvertiserTransferType_CREDIT_UNIVERSAL 通用授信
	AdvertiserTransferType_CREDIT_UNIVERSAL AdvertiserTransferType = "CREDIT_UNIVERSAL"
	// AdvertiserTransferType_CREDIT_BRAND 品牌授信
	AdvertiserTransferType_CREDIT_BRAND AdvertiserTransferType = "CREDIT_BRAND"
	// AdvertiserTransferType_CREDIT_BID 竞价授信
	AdvertiserTransferType_CREDIT_BID AdvertiserTransferType = "CREDIT_BID"
)

type AdvertiserUpdateRequest

type AdvertiserUpdateRequest struct {
	// AdvertiserID 广告主ID
	AdvertiserID uint64 `json:"advertiser_id,omitempty"`
	// Name 账户名称
	Name string `json:"name,omitempty"`
	// Contacter 联系人
	Contacter string `json:"contacter,omitempty"`
	// Phonenumber 手机号码
	Phonenumber string `json:"phonenumber,omitempty"`
	// Telephone 固定电话
	Telephone string `json:"telephone,omitempty"`
	// Note 备注
	Note string `json:"note,omitempty"`
}

AdvertiserUpdateRequest 修改广告主 API Request

func (AdvertiserUpdateRequest) Encode

func (r AdvertiserUpdateRequest) Encode() []byte

Encode implement PostRequest interface

type AdvertiserUpdateResponse

type AdvertiserUpdateResponse struct {
	model.BaseResponse
	// Data json返回值
	Data *AdvertiserUpdateResponseData `json:"data,omitempty"`
}

AdvertiserUpdateResponse 修改广告主 API Response

type AdvertiserUpdateResponseData

type AdvertiserUpdateResponseData struct {
	// AdvertiserID 广告主ID
	AdvertiserID uint64 `json:"advertiser_id,omitempty"`
	// NeedAudit 此次修改是否触发进入待审状态(1表示进入待审状态,0表示不进入待审状态)
	NeedAudit int `json:"need_audit,omitempty"`
}

AdvertiserUpdateResponseData json返回值

type ChildAgentSelectRequest

type ChildAgentSelectRequest struct {
	// AdvertiserID 代理商ID
	AdvertiserID uint64 `json:"advertiser_id,omitempty"`
	// Page 页码.默认值: 1
	Page int `json:"page,omitempty"`
	// PageSize 页面数据量.默认值: 100
	PageSize int `json:"page_size,omitempty"`
}

ChildAgentSelectRequest 二级代理商列表 API Request

func (ChildAgentSelectRequest) Encode

func (r ChildAgentSelectRequest) Encode() string

Encode implement GetRequest interface

type ChildAgentSelectResponse

type ChildAgentSelectResponse struct {
	model.BaseResponse
	// Data json返回值
	Data struct {
		// ChildAgentIDs 二级代理商ID列表
		ChildAgentIDs []uint64 `json:"child_agent_ids,omitempty"`
	} `json:"data,omitempty"`
}

ChildAgentSelectResponse 二级代理商列表 API Response

type FundTransferSeqCommitRequest added in v1.13.9

type FundTransferSeqCommitRequest struct {
	// AgentID 代理商账户ID
	AgentID uint64 `json:"agent_id,omitempty"`
	// TransferSeq 转账序列号
	TransferSeq string `json:"transfer_seq,omitempty"`
}

FundTransferSeqCommitRequest 提交转账交易号(方舟) API Request

func (FundTransferSeqCommitRequest) Encode added in v1.13.9

func (r FundTransferSeqCommitRequest) Encode() []byte

Encode implement PostRequest interface

type FundTransferSeqCreateRequest added in v1.13.9

type FundTransferSeqCreateRequest struct {
	// AgentID 代理商账户ID
	AgentID uint64 `json:"agent_id,omitempty"`
	// AccountID 广告主账户ID
	AccountID uint64 `json:"account_id,omitempty"`
	// TransferType 转账类型 可选值:
	// CASH_DEFAULT 非赠款金额
	// CREDIT_BIDDING 授信-竞价专用金额
	// CREDIT_BRAND 授信-品牌专用金额
	// CREDIT_GENERAL 授信-通用金额
	// GRANT_GENERAL 赠款金额
	// PREPAY_BIDDING 预付-竞价专用金额
	// PREPAY_BRAND 预付-品牌专用金额
	// PREPAY_GENERAL 预付-通用金额
	TransferType FundTransferType `json:"transfer_type,omitempty"`
	// Amount 转账金额,单位元,支持两位小数
	Amount float64 `json:"amount,omitempty"`
}

FundTransferSeqCreateRequest 创建转账交易号(方舟) API Request

func (FundTransferSeqCreateRequest) Encode added in v1.13.9

func (r FundTransferSeqCreateRequest) Encode() []byte

Encode implement PostRequest interface

type FundTransferSeqCreateResponse added in v1.13.9

type FundTransferSeqCreateResponse struct {
	model.BaseResponse
	Data struct {
		// TransferSeq 转账序列号,第二步提交操作需要
		TransferSeq string `json:"transfer_seq,omitempty"`
		// Status 状态码,0表示成功,其余表示失败
		Status int `json:"status,omitempty"`
		// StatusMessage 转账失败原因
		StatusMessage string `json:"status_message,omitempty"`
	} `json:"data,omitempty"`
}

FundTransferSeqCreateResponse 创建转账交易号(方舟) API Response

type FundTransferType added in v1.13.9

type FundTransferType string

FundTransferType 转账类型(方舟)

const (
	// FundTransferType_CASH_DEFAULT 非赠款金额
	FundTransferType_CASH_DEFAULT FundTransferType = "CASH_DEFAULT"
	// FundTransferType_CREDIT_BIDDING 授信-竞价专用金额
	FundTransferType_CREDIT_BIDDING FundTransferType = "CREDIT_BIDDING"
	// FundTransferType_CREDIT_BRAND 授信-品牌专用金额
	FundTransferType_CREDIT_BRAND FundTransferType = "CREDIT_BRAND"
	// FundTransferType_CREDIT_GENERAL 授信-通用金额
	FundTransferType_CREDIT_GENERAL FundTransferType = "CREDIT_GENERAL"
	// FundTransferType_GRANT_GENERAL 赠款金额
	FundTransferType_GRANT_GENERAL FundTransferType = "GRANT_GENERAL"
	// FundTransferType_PREPAY_BIDDING 预付-竞价专用金额
	FundTransferType_PREPAY_BIDDING FundTransferType = "PREPAY_BIDDING"
	// FundTransferType_PREPAY_BRAND 预付-品牌专用金额
	FundTransferType_PREPAY_BRAND FundTransferType = "PREPAY_BRAND"
	// FundTransferType_PREPAY_GENERAL 预付-通用金额
	FundTransferType_PREPAY_GENERAL FundTransferType = "PREPAY_GENERAL"
)

type Info

type Info struct {
	// AgentID 代理商ID
	AgentID uint64 `json:"agent_id,omitempty"`
	// AgentName 代理商名称
	AgentName string `json:"agent_name,omitempty"`
	// CustomerID 客户id
	CustomerID uint64 `json:"customer_id,omitempty"`
	// CompanyID 公司id
	CompanyID uint64 `json:"company_id,omitempty"`
	// CompanyName 公司名称
	CompanyName string `json:"company_name,omitempty"`
	// AccountStatus 用户状态
	AccountStatus string `json:"account_status,omitempty"`
	// CreateTime 注册时间
	CreateTime string `json:"create_time,omitempty"`
	// Role 角色
	Role string `json:"role,omitempty"`
}

Info 代理商信息

type InfoRequest

type InfoRequest struct {
	// AdvertiserIDs 代理商ids
	AdvertiserIDs []uint64 `json:"advertiser_ids,omitempty"`
	// Fields 查询字段集合, 如果指定, 则返回结果数组中, 每个元素是包含所查询字段的字典,默认全部指定.允许值: "agent_id", "agent_name", "customer_id", "customer_name","company_id", "company_name", "create_time", "role"
	Fields []string `json:"fields,omitempty"`
}

InfoRequest 获取代理商信息 API Request

func (InfoRequest) Encode

func (r InfoRequest) Encode() string

Encode implement GetRequest inteface

type InfoResponse

type InfoResponse struct {
	model.BaseResponse
	// Data json返回值
	Data []Info `json:"data,omitempty"`
}

InfoResponse 获取代理商信息 API Response

Jump to

Keyboard shortcuts

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