当前位置: 首页>>代码示例>>Golang>>正文


Golang Parameters.StructureKeys方法代码示例

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


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

示例1: 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

示例2: 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

示例3: 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

示例4: 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

示例5: 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

示例6: 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

示例7: 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


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