• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Golang gmws.Parameters类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Golang中github.com/svvu/gomws/gmws.Parameters的典型用法代码示例。如果您正苦于以下问题:Golang Parameters类的具体用法?Golang Parameters怎么用?Golang Parameters使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了Parameters类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Golang代码示例。

示例1: GetOrder

// GetOrder Returns orders based on the AmazonOrderId values that you specify.
// Maximum 50 ids.
// http://docs.developer.amazonservices.com/en_US/orders/2013-09-01/Orders_GetOrder.html
func (o Orders) GetOrder(amazonOrderIds []string) *mwsHttps.Response {
	params := gmws.Parameters{
		"Action":        "GetOrder",
		"AmazonOrderId": amazonOrderIds,
	}
	structuredParams := params.StructureKeys("AmazonOrderId", "Id")

	return o.SendRequest(structuredParams)
}
开发者ID:svvu,项目名称:gomws,代码行数:12,代码来源:orders.go


示例2: GetCompetitivePricingForSKU

// GetCompetitivePricingForSKU Returns the current competitive price of a product, based on SellerSKU.
// http://docs.developer.amazonservices.com/en_US/products/Products_GetCompetitivePricingForSKU.html
func (p Products) GetCompetitivePricingForSKU(sellerSKUList []string) *mwsHttps.Response {
	params := gmws.Parameters{
		"Action":        "GetCompetitivePricingForSKU",
		"SellerSKUList": sellerSKUList,
		"MarketplaceId": p.MarketPlaceId,
	}
	structuredParams := params.StructureKeys("SellerSKUList", "SellerSKU")

	return p.SendRequest(structuredParams)
}
开发者ID:svvu,项目名称:gomws,代码行数:12,代码来源:products.go


示例3: GetMatchingProduct

// GetMatchingProduct Returns a list of products and their attributes, based on a list of ASIN values.
// http://docs.developer.amazonservices.com/en_US/products/Products_GetMatchingProduct.html
func (p Products) GetMatchingProduct(asinList []string) *mwsHttps.Response {
	params := gmws.Parameters{
		"Action":        "GetMatchingProduct",
		"ASINList":      asinList,
		"MarketplaceId": p.MarketPlaceId,
	}
	structuredParams := params.StructureKeys("ASINList", "ASIN")

	return p.SendRequest(structuredParams)
}
开发者ID:svvu,项目名称:gomws,代码行数:12,代码来源:products.go


示例4: GetMatchingProductForId

// GetMatchingProductForId Returns a list of products and their attributes, based on a list of ASIN, GCID, SellerSKU, UPC, EAN, ISBN, and JAN values.
// http://docs.developer.amazonservices.com/en_US/products/Products_GetMatchingProductForId.html
func (p Products) GetMatchingProductForId(idType string, idList []string) *mwsHttps.Response {
	params := gmws.Parameters{
		"Action":        "GetMatchingProductForId",
		"IdType":        idType,
		"IdList":        idList,
		"MarketplaceId": p.MarketPlaceId,
	}
	structuredParams := params.StructureKeys("IdList", "Id")

	return p.SendRequest(structuredParams)
}
开发者ID:svvu,项目名称:gomws,代码行数:13,代码来源:products.go


示例5: GetMyPriceForASIN

// GetMyPriceForASIN Returns pricing information for your own offer listings, based on ASIN.
// http://docs.developer.amazonservices.com/en_US/products/Products_GetMyPriceForASIN.html
func (p Products) GetMyPriceForASIN(asinList []string, optional ...gmws.Parameters) *mwsHttps.Response {
	op := gmws.OptionalParams([]string{"ItemCondition"}, optional)
	params := gmws.Parameters{
		"Action":        "GetMyPriceForASIN",
		"ASINList":      asinList,
		"MarketplaceId": p.MarketPlaceId,
	}.Merge(op)
	structuredParams := params.StructureKeys("ASINList", "ASIN")

	return p.SendRequest(structuredParams)
}
开发者ID:svvu,项目名称:gomws,代码行数:13,代码来源:products.go


示例6: GetLowestOfferListingsForSKU

// GetLowestOfferListingsForSKU Returns pricing information for the lowest-price active offer listings for up to 20 products, based on SellerSKU.
// Optional Parameters:
// 	ItemCondition - string
// 	ExcludeMe - bool
// http://docs.developer.amazonservices.com/en_US/products/Products_GetLowestOfferListingsForSKU.html
func (p Products) GetLowestOfferListingsForSKU(sellerSKUList []string, optional ...gmws.Parameters) *mwsHttps.Response {
	op := gmws.OptionalParams([]string{"ItemCondition", "ExcludeMe"}, optional)
	params := gmws.Parameters{
		"Action":        "GetLowestOfferListingsForSKU",
		"SellerSKUList": sellerSKUList,
		"MarketplaceId": p.MarketPlaceId,
	}.Merge(op)
	structuredParams := params.StructureKeys("SellerSKUList", "SellerSKU")

	return p.SendRequest(structuredParams)
}
开发者ID:svvu,项目名称:gomws,代码行数:16,代码来源:products.go


示例7: ListOrders

// ListOrders Returns orders created or updated during a time frame that you specify.
//
// Note: When calling this operation, either CreatedAfter or LastUpdatedAfter must be specify.
// Specify both will return an error.
//
// other params:
// 	CreatedAfter - string, ISO-8601 date format.
// 		Required, if LastUpdatedAfter is not specified.
// 	CreatedBefore - string, ISO-8601 date format.
// 		Can only be specified if CreatedAfter is specified.
//	LastUpdatedAfter - string, ISO-8601 date format.
// 		Required, if CreatedAfter is not specified.
// 		If LastUpdatedAfter is specified, then BuyerEmail and SellerOrderId cannot be specified.
// 	LastUpdatedBefore - string, ISO-8601 date format.
// 		Can only be specified if LastUpdatedAfter is specified.
// 	OrderStatus - []string.
// 		Values: PendingAvailability, Pending, Unshipped, PartiallyShipped, Shipped,
// 		InvoiceUnconfirmed, Canceled, Unfulfillable. Default: All.
//	FulfillmentChannel - []string.
// 		Values: AFN, MFN. Default: All.
// 	PaymentMethod - []string.
// 		Values: COD, CVS, Other. Default: All.
// 	BuyerEmail - string.
// 		If BuyerEmail is specified, then FulfillmentChannel, OrderStatus, PaymentMethod,
// 		LastUpdatedAfter, LastUpdatedBefore, and SellerOrderId cannot be specified.
// 	SellerOrderId - string.
// 		If SellerOrderId is specified, then FulfillmentChannel, OrderStatus,
// 		PaymentMethod, LastUpdatedAfter, LastUpdatedBefore, and BuyerEmail cannot be specified.
// 	MaxResultsPerPage - int.
// 		Value 1 - 100. Default 100.
// 	TFMShipmentStatus - []string.
// 		Values: PendingPickUp, LabelCanceled, PickedUp, AtDestinationFC,
// 		Delivered, RejectedByBuyer, Undeliverable, ReturnedToSeller, Lost.
func (o Orders) ListOrders(others ...gmws.Parameters) *mwsHttps.Response {
	op := gmws.OptionalParams([]string{
		"CreatedAfter", "CreatedBefore",
		"LastUpdatedAfter", "LastUpdatedBefore",
		"OrderStatus", "FulfillmentChannel", "PaymentMethod",
		"SellerOrderId", "BuyerEmail",
		"TFMShipmentStatus", "MaxResultsPerPage",
	}, others)
	params := gmws.Parameters{
		"Action":        "ListOrders",
		"MarketplaceId": []string{o.MarketPlaceId},
	}.Merge(op)

	structuredParams := params.StructureKeys("MarketplaceId", "Id")
	if _, ok := structuredParams["OrderStatus"]; ok {
		structuredParams = params.StructureKeys("OrderStatus", "Status")
	}
	if _, ok := structuredParams["FulfillmentChannel"]; ok {
		structuredParams = params.StructureKeys("FulfillmentChannel", "Channel")
	}
	if _, ok := structuredParams["OrderStatus"]; ok {
		structuredParams = params.StructureKeys("PaymentMethod", "Method")
	}
	if _, ok := structuredParams["OrderStatus"]; ok {
		structuredParams = params.StructureKeys("TFMShipmentStatus", "Status")
	}

	return o.SendRequest(structuredParams)
}
开发者ID:svvu,项目名称:gomws,代码行数:62,代码来源:orders.go



注:本文中的github.com/svvu/gomws/gmws.Parameters类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Golang cli.Context类代码示例发布时间:2022-05-29
下一篇:
Golang interfaces.Tile类代码示例发布时间:2022-05-29
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap