-
Notifications
You must be signed in to change notification settings - Fork 43
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
3 changed files
with
60 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package dpa | ||
|
||
import ( | ||
"context" | ||
|
||
"github.com/bububa/oceanengine/marketing-api/core" | ||
"github.com/bububa/oceanengine/marketing-api/model/dpa" | ||
) | ||
|
||
func ClueProductSave(ctx context.Context, clt *core.SDKClient, accessToken string, req *dpa.ClueProductSaveRequest) (*dpa.ClueProductSaveResult, error) { | ||
var resp dpa.ClueProductSaveResponse | ||
if err := clt.PostAPI(ctx, "2/dpa/clue_product/save/", 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,34 @@ | ||
package dpa | ||
|
||
import ( | ||
"github.com/bububa/oceanengine/marketing-api/model" | ||
"github.com/bububa/oceanengine/marketing-api/util" | ||
) | ||
|
||
// ClueProductSaveRequest 创建/编辑升级版商品 API Request | ||
type ClueProductSaveRequest struct { | ||
// Product 商品信息 | ||
Product *Product `json:"product,omitempty"` | ||
// AdvertiserID 广告主ID | ||
AdvertiserID uint64 `json:"advertiser_id,omitempty"` | ||
} | ||
|
||
// Encode implements PostRequest interface | ||
func (r ClueProductSaveRequest) Encode() []byte { | ||
return util.JSONMarshal(r) | ||
} | ||
|
||
// ClueProductSaveResponse 创建/编辑升级版商品 API Response | ||
type ClueProductSaveResponse struct { | ||
model.BaseResponse | ||
Data *ClueProductSaveResult `json:"data,omitempty"` | ||
} | ||
|
||
type ClueProductSaveResult struct { | ||
// PlatformProductID 商品ID | ||
PlatformProductID uint64 `json:"platform_product_id,omitempty"` | ||
// OuterID 商品外部ID | ||
OuterID string `json:"outer_id,omitempty"` | ||
// StoreID 店铺ID | ||
StoreID string `json:"store_id,omitempty"` | ||
} |
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