// 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) }
// ListMatchingProducts Returns a list of products and their attributes, based on a search query. // Optional Parameters: // QueryContextId - string // http://docs.developer.amazonservices.com/en_US/products/Products_ListMatchingProducts.html func (p Products) ListMatchingProducts(query string, optional ...gmws.Parameters) *mwsHttps.Response { op := gmws.OptionalParams([]string{"QueryContextId"}, optional) params := gmws.Parameters{ "Action": "ListMatchingProducts", "Query": query, "MarketplaceId": p.MarketPlaceId, }.Merge(op) return p.SendRequest(params) }
// 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) }
// 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) }