-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
58 changed files
with
2,646 additions
and
104 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package agent | ||
|
||
import ( | ||
"context" | ||
|
||
"github.com/bububa/oceanengine/marketing-api/core" | ||
"github.com/bububa/oceanengine/marketing-api/model/agent" | ||
) | ||
|
||
// CreateStatementInvoice 开票-新建开票申请单(代理商版) | ||
// 创建结算单开票接口,支持差额开票 | ||
func CreateStatementInvoice(ctx context.Context, clt *core.SDKClient, accessToken string, req *agent.CreateStatementInvoiceRequest) (string, error) { | ||
var resp agent.CreateStatementInvoiceResponse | ||
if err := clt.PostAPI(ctx, "2/create/statement_invoice/", req, &resp, accessToken); err != nil { | ||
return "", err | ||
} | ||
return resp.Data.InvoiceSerial, nil | ||
} |
17 changes: 17 additions & 0 deletions
17
marketing-api/api/agent/query_booking_business_entity_id_get.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package agent | ||
|
||
import ( | ||
"context" | ||
|
||
"github.com/bububa/oceanengine/marketing-api/core" | ||
"github.com/bububa/oceanengine/marketing-api/model/agent" | ||
) | ||
|
||
// QueryBookingBusinessEntityIDGet 排期—查询业务实体ID | ||
func QueryBookingBusinessEntityIDGet(ctx context.Context, clt *core.SDKClient, accessToken string, req *agent.QueryBookingBusinessEntityIDGetRequest) ([]agent.BusinessEntityIDInfo, error) { | ||
var resp agent.QueryBookingBusinessEntityIDGetResponse | ||
if err := clt.GetAPI(ctx, "2/query/booking/business_entity_id/get/", req, &resp, accessToken); err != nil { | ||
return nil, err | ||
} | ||
return resp.Data.BusinessEntityIDInfos, nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package agent | ||
|
||
import ( | ||
"context" | ||
|
||
"github.com/bububa/oceanengine/marketing-api/core" | ||
"github.com/bububa/oceanengine/marketing-api/model/agent" | ||
) | ||
|
||
// QueryInvoice 开票-查询开票单数据(代理商版) | ||
// 通过结算单/项目查询开票单数据 | ||
func QueryInvoice(ctx context.Context, clt *core.SDKClient, accessToken string, req *agent.QueryInvoiceRequest) (*agent.QueryInvoiceResult, error) { | ||
var resp agent.QueryInvoiceResponse | ||
if err := clt.GetAPI(ctx, "2/query/invoice/", req, &resp, accessToken); err != nil { | ||
return nil, err | ||
} | ||
return resp.Data, nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package agent | ||
|
||
import ( | ||
"context" | ||
|
||
"github.com/bububa/oceanengine/marketing-api/core" | ||
"github.com/bububa/oceanengine/marketing-api/model/agent" | ||
) | ||
|
||
// QueryInvoiceElectronicURL 开票-获取电子发票文件接口(代理商版) | ||
// 开票-获取电票/数电票发票文件下载链接接口 | ||
func QueryInvoiceElectronicURL(ctx context.Context, clt *core.SDKClient, accessToken string, req *agent.QueryInvoiceElectronicURLRequest) ([]agent.InvoiceElectronicURL, error) { | ||
var resp agent.QueryInvoiceElectronicURLResponse | ||
if err := clt.GetAPI(ctx, "2/query/invoice_electronic_url/", req, &resp, accessToken); err != nil { | ||
return nil, err | ||
} | ||
return resp.Data.URLList, nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package agent | ||
|
||
import ( | ||
"context" | ||
|
||
"github.com/bububa/oceanengine/marketing-api/core" | ||
"github.com/bububa/oceanengine/marketing-api/model/agent" | ||
) | ||
|
||
// QueryProject 查询项目信息 | ||
func QueryProject(ctx context.Context, clt *core.SDKClient, accessToken string, req *agent.QueryProjectRequest) (*agent.QueryProjectResult, error) { | ||
var resp agent.QueryProjectResponse | ||
if err := clt.GetAPI(ctx, "2/query/project/", req, &resp, accessToken); err != nil { | ||
return nil, err | ||
} | ||
return resp.Data, nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package agent | ||
|
||
import ( | ||
"context" | ||
|
||
"github.com/bububa/oceanengine/marketing-api/core" | ||
"github.com/bububa/oceanengine/marketing-api/model/agent" | ||
) | ||
|
||
// QueryRebateAccountingInfo 返点-查询返点核算流水 | ||
// 结算-查询返点核算信息 | ||
func QueryRebateAccountingInfo(ctx context.Context, clt *core.SDKClient, accessToken string, req *agent.QueryRebateAccountingInfoRequest) (*agent.QueryRebateAccountingInfoResult, error) { | ||
var resp agent.QueryRebateAccountingInfoResponse | ||
if err := clt.GetAPI(ctx, "2/query/rebate_accounting_info/", req, &resp, accessToken); err != nil { | ||
return nil, err | ||
} | ||
return resp.Data, nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package agent | ||
|
||
import ( | ||
"context" | ||
|
||
"github.com/bububa/oceanengine/marketing-api/core" | ||
"github.com/bububa/oceanengine/marketing-api/model/agent" | ||
) | ||
|
||
// QueryRebateBalance 返点-查询返点流水 | ||
// 结算-查询返点流水信息 | ||
func QueryRebateBalance(ctx context.Context, clt *core.SDKClient, accessToken string, req *agent.QueryRebateBalanceRequest) (*agent.QueryRebateBalanceResult, error) { | ||
var resp agent.QueryRebateBalanceResponse | ||
if err := clt.GetAPI(ctx, "2/query/rebate_balance/", req, &resp, accessToken); err != nil { | ||
return nil, err | ||
} | ||
return resp.Data, nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package agent | ||
|
||
import ( | ||
"context" | ||
|
||
"github.com/bububa/oceanengine/marketing-api/core" | ||
"github.com/bububa/oceanengine/marketing-api/model/agent" | ||
) | ||
|
||
// QueryStatement 查询项目关联结算单信息 | ||
// 代理商查询项目关联结算单信息 | ||
func QueryStatement(ctx context.Context, clt *core.SDKClient, accessToken string, req *agent.QueryStatementRequest) ([]agent.ProjectRefStatement, error) { | ||
var resp agent.QueryStatementResponse | ||
if err := clt.GetAPI(ctx, "2/query/statement/", req, &resp, accessToken); err != nil { | ||
return nil, err | ||
} | ||
return resp.Data.ProjectRefStatmentList, nil | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package sharedwallet | ||
|
||
import ( | ||
"context" | ||
|
||
"github.com/bububa/oceanengine/marketing-api/core" | ||
"github.com/bububa/oceanengine/marketing-api/model/sharedwallet" | ||
) | ||
|
||
// AccountRelationGet 共享钱包-查询账户对应公司下的钱包关系 | ||
func AccountRelationGet(ctx context.Context, clt *core.SDKClient, accessToken string, req *sharedwallet.AccountRelationGetRequest) (*sharedwallet.AccountRelationGetResult, error) { | ||
var resp sharedwallet.AccountRelationGetResponse | ||
if err := clt.GetAPI(ctx, "v3.0/shared_wallet/account_relation/get/", req, &resp, accessToken); err != nil { | ||
return nil, err | ||
} | ||
return resp.Data, nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package sharedwallet | ||
|
||
import ( | ||
"context" | ||
|
||
"github.com/bububa/oceanengine/marketing-api/core" | ||
"github.com/bububa/oceanengine/marketing-api/model/sharedwallet" | ||
) | ||
|
||
// BalanceGet 获取共享钱包余额 | ||
// 返货相关需要咨询相关的运营和销售同学对接,具备返货相关前置条件下,相关返货资金信息可以通过本接口获得 | ||
func BalanceGet(ctx context.Context, clt *core.SDKClient, accessToken string, advertiserIDs []uint64) ([]sharedwallet.BalanceInfo, error) { | ||
req := &sharedwallet.BalanceGetRequest{ | ||
AdvertiserIDs: advertiserIDs, | ||
} | ||
var resp sharedwallet.BalanceGetResponse | ||
if err := clt.GetAPI(ctx, "2/fund/shared_wallet_balance/get", req, &resp, accessToken); err != nil { | ||
return nil, err | ||
} | ||
return resp.Data.List, nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package sharedwallet | ||
|
||
import ( | ||
"context" | ||
|
||
"github.com/bububa/oceanengine/marketing-api/core" | ||
"github.com/bububa/oceanengine/marketing-api/model/sharedwallet" | ||
) | ||
|
||
// CanTransferBalance 资金共享-最大可转余额查询 | ||
// 支持查询减款方与加款方之间最大可转金额、减款方非品牌最大可转出金额、加款方非品牌最小转入金额, | ||
// 为了最大限度保证转账申请成功率,在发起转账申请之前,建议调用方做以下校验: | ||
// - 减款钱包非品牌资金申请转账金额 <= 减款钱包非品牌资金最大可转出金额(non_brand_max_transfer_balance) | ||
// - 减款钱包资金-业务线维度申请转账金额 <= 减款钱包资金-业务线维度可转金额(remitter_capital_detail_list) | ||
// - 加款钱包非品牌资金申请转账金额 >= 加款钱包非品牌资金最小转入金额(non_brand_min_transfer_balance) | ||
// - 加款钱包资金-业务线维度申请转账金额 <= 加款钱包资金-业务线维度可转金额(payee_transfer_amount_detail_list.capital_detail_list) | ||
func CanTransferBalance(ctx context.Context, clt *core.SDKClient, accessToken string, req *sharedwallet.CanTransferBalanceRequest) ([]sharedwallet.CanTransferDetail, error) { | ||
var resp sharedwallet.CanTransferBalanceResponse | ||
if err := clt.GetAPI(ctx, "v3.0/cg_transfer/wallet/transfer/can_transfer_balance/", req, &resp, accessToken); err != nil { | ||
return nil, err | ||
} | ||
return resp.Data.CanTransferDetailList, nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package sharedwallet | ||
|
||
import ( | ||
"context" | ||
|
||
"github.com/bububa/oceanengine/marketing-api/core" | ||
"github.com/bububa/oceanengine/marketing-api/model/sharedwallet" | ||
) | ||
|
||
// DailyStatGet 资金共享-查询共享钱包日流水 | ||
// 资金共享-查询共享钱包日流水信息,一般每天8点会出来前一天的数据,如果当天存在数据延迟可往后再尝试。 | ||
func DailyStatGet(ctx context.Context, clt *core.SDKClient, accessToken string, req *sharedwallet.DailyStatGetRequest) (*sharedwallet.DailyStatGetResult, error) { | ||
var resp sharedwallet.DailyStatGetResponse | ||
if err := clt.GetAPI(ctx, "v3.0/shared_wallet/daily_stat/get/", req, &resp, accessToken); err != nil { | ||
return nil, err | ||
} | ||
return resp.Data, nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
// Package sharedwallet 资金共享 | ||
package sharedwallet |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package sharedwallet | ||
|
||
import ( | ||
"context" | ||
|
||
"github.com/bububa/oceanengine/marketing-api/core" | ||
"github.com/bububa/oceanengine/marketing-api/model/sharedwallet" | ||
) | ||
|
||
// MainWalletGet 资金共享-共享钱包信息查询 | ||
// 查询当前共享钱包(大钱包)的信息 | ||
func MainWalletGet(ctx context.Context, clt *core.SDKClient, accessToken string, req *sharedwallet.MainWalletGetRequest) (*sharedwallet.MainWalletInfo, error) { | ||
var resp sharedwallet.MainWalletGetResponse | ||
if err := clt.GetAPI(ctx, "v3.0/shared_wallet/main_wallet/get/", req, &resp, accessToken); err != nil { | ||
return nil, err | ||
} | ||
return resp.Data, nil | ||
} |
Oops, something went wrong.