/// <summary> /// Returns orders created or updated during the time frame indicated by the /// specified parameters. You can also apply a range of filtering criteria to /// narrow the list of orders returned. If NextToken is present, that will be /// used to retrieve the orders instead of other criteria. /// /// **Usage Plans:** /// /// | Plan type | Rate (requests per second) | Burst | /// | ---- | ---- | ---- | /// |Default| 0.0055 | 20 | /// |Selling partner specific| Variable | Variable | /// /// The x-amzn-RateLimit-Limit response header returns the usage plan rate /// limits that were applied to the requested operation. Rate limits for some /// selling partners will vary from the default rate and burst shown in the /// table above. For more information, see "Usage Plans and Rate Limits" in the /// Selling Partner API documentation. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='marketplaceIds'> /// A list of MarketplaceId values. Used to select orders that were placed in /// the specified marketplaces. /// /// See the [Selling Partner API Developer /// Guide](https://github.com/amzn/selling-partner-api-docs/blob/main/guides/en-US/developer-guide/SellingPartnerApiDeveloperGuide.md#marketplaceid-values) /// for a complete list of marketplaceId values. /// </param> /// <param name='createdAfter'> /// A date used for selecting orders created after (or at) a specified time. /// Only orders placed after the specified time are returned. Either the /// CreatedAfter parameter or the LastUpdatedAfter parameter is required. Both /// cannot be empty. The date must be in ISO 8601 format. /// </param> /// <param name='createdBefore'> /// A date used for selecting orders created before (or at) a specified time. /// Only orders placed before the specified time are returned. The date must be /// in ISO 8601 format. /// </param> /// <param name='lastUpdatedAfter'> /// A date used for selecting orders that were last updated after (or at) a /// specified time. An update is defined as any change in order status, /// including the creation of a new order. Includes updates made by Amazon and /// by the seller. The date must be in ISO 8601 format. /// </param> /// <param name='lastUpdatedBefore'> /// A date used for selecting orders that were last updated before (or at) a /// specified time. An update is defined as any change in order status, /// including the creation of a new order. Includes updates made by Amazon and /// by the seller. The date must be in ISO 8601 format. /// </param> /// <param name='orderStatuses'> /// A list of OrderStatus values used to filter the results. Possible values: /// PendingAvailability (This status is available for pre-orders only. The /// order has been placed, payment has not been authorized, and the release /// date of the item is in the future.); Pending (The order has been placed but /// payment has not been authorized); Unshipped (Payment has been authorized /// and the order is ready for shipment, but no items in the order have been /// shipped); PartiallyShipped (One or more, but not all, items in the order /// have been shipped); Shipped (All items in the order have been shipped); /// InvoiceUnconfirmed (All items in the order have been shipped. The seller /// has not yet given confirmation to Amazon that the invoice has been shipped /// to the buyer.); Canceled (The order has been canceled); and Unfulfillable /// (The order cannot be fulfilled. This state applies only to Multi-Channel /// Fulfillment orders.). /// </param> /// <param name='fulfillmentChannels'> /// A list that indicates how an order was fulfilled. Filters the results by /// fulfillment channel. Possible values: FBA (Fulfillment by Amazon); /// SellerFulfilled (Fulfilled by the seller). /// </param> /// <param name='paymentMethods'> /// A list of payment method values. Used to select orders paid using the /// specified payment methods. Possible values: COD (Cash on delivery); CVS /// (Convenience store payment); Other (Any payment method other than COD or /// CVS). /// </param> /// <param name='buyerEmail'> /// The email address of a buyer. Used to select orders that contain the /// specified email address. /// </param> /// <param name='sellerOrderId'> /// An order identifier that is specified by the seller. Used to select only /// the orders that match the order identifier. If SellerOrderId is specified, /// then FulfillmentChannels, OrderStatuses, PaymentMethod, LastUpdatedAfter, /// LastUpdatedBefore, and BuyerEmail cannot be specified. /// </param> /// <param name='maxResultsPerPage'> /// A number that indicates the maximum number of orders that can be returned /// per page. Value must be 1 - 100. Default 100. /// </param> /// <param name='easyShipShipmentStatuses'> /// A list of EasyShipShipmentStatus values. Used to select Easy Ship orders /// with statuses that match the specified values. If EasyShipShipmentStatus /// is specified, only Amazon Easy Ship orders are returned.Possible values: /// PendingPickUp (Amazon has not yet picked up the package from the seller). /// LabelCanceled (The seller canceled the pickup). PickedUp (Amazon has picked /// up the package from the seller). AtOriginFC (The packaged is at the origin /// fulfillment center). AtDestinationFC (The package is at the destination /// fulfillment center). OutForDelivery (The package is out for delivery). /// Damaged (The package was damaged by the carrier). Delivered (The package /// has been delivered to the buyer). RejectedByBuyer (The package has been /// rejected by the buyer). Undeliverable (The package cannot be delivered). /// ReturnedToSeller (The package was not delivered to the buyer and was /// returned to the seller). ReturningToSeller (The package was not delivered /// to the buyer and is being returned to the seller). /// </param> /// <param name='nextToken'> /// A string token returned in the response of your previous request. /// </param> /// <param name='amazonOrderIds'> /// A list of AmazonOrderId values. An AmazonOrderId is an Amazon-defined order /// identifier, in 3-7-7 format. /// </param> /// <param name='actualFulfillmentSupplySourceId'> /// Denotes the recommended sourceId where the order should be fulfilled from. /// </param> /// <param name='isISPU'> /// When true, this order is marked to be picked up from a store rather than /// delivered. /// </param> /// <param name='storeChainStoreId'> /// The store chain store identifier. Linked to a specific store in a store /// chain. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <GetOrdersResponse> GetOrdersAsync(this IOrdersClient operations, IList <string> marketplaceIds, string createdAfter = default(string), string createdBefore = default(string), string lastUpdatedAfter = default(string), string lastUpdatedBefore = default(string), IList <string> orderStatuses = default(IList <string>), IList <string> fulfillmentChannels = default(IList <string>), IList <string> paymentMethods = default(IList <string>), string buyerEmail = default(string), string sellerOrderId = default(string), int?maxResultsPerPage = default(int?), IList <string> easyShipShipmentStatuses = default(IList <string>), string nextToken = default(string), IList <string> amazonOrderIds = default(IList <string>), string actualFulfillmentSupplySourceId = default(string), bool?isISPU = default(bool?), string storeChainStoreId = default(string), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetOrdersWithHttpMessagesAsync(marketplaceIds, createdAfter, createdBefore, lastUpdatedAfter, lastUpdatedBefore, orderStatuses, fulfillmentChannels, paymentMethods, buyerEmail, sellerOrderId, maxResultsPerPage, easyShipShipmentStatuses, nextToken, amazonOrderIds, actualFulfillmentSupplySourceId, isISPU, storeChainStoreId, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Returns detailed order item information for the order indicated by the /// specified order ID. If NextToken is provided, it's used to retrieve the /// next page of order items. /// /// Note: When an order is in the Pending state (the order has been placed but /// payment has not been authorized), the getOrderItems operation does not /// return information about pricing, taxes, shipping charges, gift status or /// promotions for the order items in the order. After an order leaves the /// Pending state (this occurs when payment has been authorized) and enters the /// Unshipped, Partially Shipped, or Shipped state, the getOrderItems operation /// returns information about pricing, taxes, shipping charges, gift status and /// promotions for the order items in the order. /// /// **Usage Plans:** /// /// | Plan type | Rate (requests per second) | Burst | /// | ---- | ---- | ---- | /// |Default| 0.0055 | 20 | /// |Selling partner specific| Variable | Variable | /// /// The x-amzn-RateLimit-Limit response header returns the usage plan rate /// limits that were applied to the requested operation. Rate limits for some /// selling partners will vary from the default rate and burst shown in the /// table above. For more information, see "Usage Plans and Rate Limits" in the /// Selling Partner API documentation. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='orderId'> /// An Amazon-defined order identifier, in 3-7-7 format. /// </param> /// <param name='nextToken'> /// A string token returned in the response of your previous request. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <GetOrderItemsResponse> GetOrderItemsAsync(this IOrdersClient operations, string orderId, string nextToken = default(string), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetOrderItemsWithHttpMessagesAsync(orderId, nextToken, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
public OrdersTests( ICreate create, IDefaultRequestHeadersService defaultRequestHeadersService, IOrdersClient ordersClient) { _create = create; _defaultRequestHeadersService = defaultRequestHeadersService; _ordersClient = ordersClient; }
public Phase2Scenario(IProductsClient productsClient, IOrdersClient ordersClient, ICustomersClient customersClient, ILogger <Phase2Scenario> logger ) { this.productsClient = productsClient; this.ordersClient = ordersClient; this.customersClient = customersClient; this.logger = logger; }
public WeorderOrderingClient(HttpClient httpClient, string accessToken = null, ILoggerFactory loggerFactory = null, TargetEnvironment environment = TargetEnvironment.STAGING) : base(httpClient, accessToken, loggerFactory) { SetBaseUri(environment == TargetEnvironment.PRODUCTION ? OrderingUrls.PRODUCTION : environment == TargetEnvironment.STAGING ? OrderingUrls.STAGING : OrderingUrls.QA); _integrationsClient = new IntegrationsClient(this); _ordersClient = new OrdersClient(this); _inventoryClient = new InventoryClient(this); _tableSessionsClient = new TableSessionsClient(this); }
public OrderBuilder(IDefaultRequestHeadersService defaultRequestHeadersService, IOrdersClient ordersClient) { _ordersClient = ordersClient; _defaultRequestHeadersService = defaultRequestHeadersService; _order = new Order { Id = Guid.NewGuid(), Name = "Test".WithGuid(), StartDateTime = DateTime.UtcNow, EndDateTime = DateTime.UtcNow.AddDays(1), Sum = 1, SumWithoutDiscount = 1, IsDeleted = false }; }
/// <summary> /// Update the shipment status. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='orderId'> /// An Amazon-defined order identifier, in 3-7-7 format. /// </param> /// <param name='payload'> /// Request to update the shipment status. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <UpdateShipmentStatusErrorResponse> UpdateShipmentStatusAsync(this IOrdersClient operations, string orderId, UpdateShipmentStatusRequest payload, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.UpdateShipmentStatusWithHttpMessagesAsync(orderId, payload, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Update the shipment status. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='orderId'> /// An Amazon-defined order identifier, in 3-7-7 format. /// </param> /// <param name='payload'> /// Request to update the shipment status. /// </param> public static UpdateShipmentStatusErrorResponse UpdateShipmentStatus(this IOrdersClient operations, string orderId, UpdateShipmentStatusRequest payload) { return(operations.UpdateShipmentStatusAsync(orderId, payload).GetAwaiter().GetResult()); }
/// <summary> /// Returns buyer information for the order items in the specified order. /// /// **Important.** We recommend using the getOrderItems operation to get buyer /// information for the order items in an order, as the getOrderItemsBuyerInfo /// operation is scheduled for deprecation on January 12, 2022. For more /// information, see the [Tokens API Use Case /// Guide](https://github.com/amzn/selling-partner-api-docs/blob/main/guides/en-US/use-case-guides/tokens-api-use-case-guide/tokens-API-use-case-guide-2021-03-01.md). /// /// **Usage Plans:** /// /// | Plan type | Rate (requests per second) | Burst | /// | ---- | ---- | ---- | /// |Default| 0.0055 | 20 | /// |Selling partner specific| Variable | Variable | /// /// The x-amzn-RateLimit-Limit response header returns the usage plan rate /// limits that were applied to the requested operation. Rate limits for some /// selling partners will vary from the default rate and burst shown in the /// table above. For more information, see "Usage Plans and Rate Limits" in the /// Selling Partner API documentation. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='orderId'> /// An Amazon-defined order identifier, in 3-7-7 format. /// </param> /// <param name='nextToken'> /// A string token returned in the response of your previous request. /// </param> public static GetOrderItemsBuyerInfoResponse GetOrderItemsBuyerInfo(this IOrdersClient operations, string orderId, string nextToken = default(string)) { return(operations.GetOrderItemsBuyerInfoAsync(orderId, nextToken).GetAwaiter().GetResult()); }
/// <summary> /// Returns the shipping address for the specified order. /// /// **Important.** We recommend using the getOrders operation to get shipping /// address information for an order, as the getOrderAddress operation is /// scheduled for deprecation on January 12, 2022. For more information, see /// the [Tokens API Use Case /// Guide](https://github.com/amzn/selling-partner-api-docs/blob/main/guides/en-US/use-case-guides/tokens-api-use-case-guide/tokens-API-use-case-guide-2021-03-01.md). /// /// **Usage Plans:** /// /// | Plan type | Rate (requests per second) | Burst | /// | ---- | ---- | ---- | /// |Default| 0.0055 | 20 | /// |Selling partner specific| Variable | Variable | /// /// The x-amzn-RateLimit-Limit response header returns the usage plan rate /// limits that were applied to the requested operation. Rate limits for some /// selling partners will vary from the default rate and burst shown in the /// table above. For more information, see "Usage Plans and Rate Limits" in the /// Selling Partner API documentation. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='orderId'> /// An orderId is an Amazon-defined order identifier, in 3-7-7 format. /// </param> public static GetOrderAddressResponse GetOrderAddress(this IOrdersClient operations, string orderId) { return(operations.GetOrderAddressAsync(orderId).GetAwaiter().GetResult()); }
/// <summary> /// Returns buyer information for the specified order. /// /// **Important.** We recommend using the getOrders operation to get buyer /// information for an order, as the getOrderBuyerInfo operation is scheduled /// for deprecation on January 12, 2022. For more information, see the [Tokens /// API Use Case /// Guide](https://github.com/amzn/selling-partner-api-docs/blob/main/guides/en-US/use-case-guides/tokens-api-use-case-guide/tokens-API-use-case-guide-2021-03-01.md). /// /// **Usage Plans:** /// /// | Plan type | Rate (requests per second) | Burst | /// | ---- | ---- | ---- | /// |Default| 0.0055 | 20 | /// |Selling partner specific| Variable | Variable | /// /// The x-amzn-RateLimit-Limit response header returns the usage plan rate /// limits that were applied to the requested operation. Rate limits for some /// selling partners will vary from the default rate and burst shown in the /// table above. For more information, see "Usage Plans and Rate Limits" in the /// Selling Partner API documentation. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='orderId'> /// An orderId is an Amazon-defined order identifier, in 3-7-7 format. /// </param> public static GetOrderBuyerInfoResponse GetOrderBuyerInfo(this IOrdersClient operations, string orderId) { return(operations.GetOrderBuyerInfoAsync(orderId).GetAwaiter().GetResult()); }
/// <summary> /// Returns orders created or updated during the time frame indicated by the /// specified parameters. You can also apply a range of filtering criteria to /// narrow the list of orders returned. If NextToken is present, that will be /// used to retrieve the orders instead of other criteria. /// /// **Usage Plans:** /// /// | Plan type | Rate (requests per second) | Burst | /// | ---- | ---- | ---- | /// |Default| 0.0055 | 20 | /// |Selling partner specific| Variable | Variable | /// /// The x-amzn-RateLimit-Limit response header returns the usage plan rate /// limits that were applied to the requested operation. Rate limits for some /// selling partners will vary from the default rate and burst shown in the /// table above. For more information, see "Usage Plans and Rate Limits" in the /// Selling Partner API documentation. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='marketplaceIds'> /// A list of MarketplaceId values. Used to select orders that were placed in /// the specified marketplaces. /// /// See the [Selling Partner API Developer /// Guide](https://github.com/amzn/selling-partner-api-docs/blob/main/guides/en-US/developer-guide/SellingPartnerApiDeveloperGuide.md#marketplaceid-values) /// for a complete list of marketplaceId values. /// </param> /// <param name='createdAfter'> /// A date used for selecting orders created after (or at) a specified time. /// Only orders placed after the specified time are returned. Either the /// CreatedAfter parameter or the LastUpdatedAfter parameter is required. Both /// cannot be empty. The date must be in ISO 8601 format. /// </param> /// <param name='createdBefore'> /// A date used for selecting orders created before (or at) a specified time. /// Only orders placed before the specified time are returned. The date must be /// in ISO 8601 format. /// </param> /// <param name='lastUpdatedAfter'> /// A date used for selecting orders that were last updated after (or at) a /// specified time. An update is defined as any change in order status, /// including the creation of a new order. Includes updates made by Amazon and /// by the seller. The date must be in ISO 8601 format. /// </param> /// <param name='lastUpdatedBefore'> /// A date used for selecting orders that were last updated before (or at) a /// specified time. An update is defined as any change in order status, /// including the creation of a new order. Includes updates made by Amazon and /// by the seller. The date must be in ISO 8601 format. /// </param> /// <param name='orderStatuses'> /// A list of OrderStatus values used to filter the results. Possible values: /// PendingAvailability (This status is available for pre-orders only. The /// order has been placed, payment has not been authorized, and the release /// date of the item is in the future.); Pending (The order has been placed but /// payment has not been authorized); Unshipped (Payment has been authorized /// and the order is ready for shipment, but no items in the order have been /// shipped); PartiallyShipped (One or more, but not all, items in the order /// have been shipped); Shipped (All items in the order have been shipped); /// InvoiceUnconfirmed (All items in the order have been shipped. The seller /// has not yet given confirmation to Amazon that the invoice has been shipped /// to the buyer.); Canceled (The order has been canceled); and Unfulfillable /// (The order cannot be fulfilled. This state applies only to Multi-Channel /// Fulfillment orders.). /// </param> /// <param name='fulfillmentChannels'> /// A list that indicates how an order was fulfilled. Filters the results by /// fulfillment channel. Possible values: FBA (Fulfillment by Amazon); /// SellerFulfilled (Fulfilled by the seller). /// </param> /// <param name='paymentMethods'> /// A list of payment method values. Used to select orders paid using the /// specified payment methods. Possible values: COD (Cash on delivery); CVS /// (Convenience store payment); Other (Any payment method other than COD or /// CVS). /// </param> /// <param name='buyerEmail'> /// The email address of a buyer. Used to select orders that contain the /// specified email address. /// </param> /// <param name='sellerOrderId'> /// An order identifier that is specified by the seller. Used to select only /// the orders that match the order identifier. If SellerOrderId is specified, /// then FulfillmentChannels, OrderStatuses, PaymentMethod, LastUpdatedAfter, /// LastUpdatedBefore, and BuyerEmail cannot be specified. /// </param> /// <param name='maxResultsPerPage'> /// A number that indicates the maximum number of orders that can be returned /// per page. Value must be 1 - 100. Default 100. /// </param> /// <param name='easyShipShipmentStatuses'> /// A list of EasyShipShipmentStatus values. Used to select Easy Ship orders /// with statuses that match the specified values. If EasyShipShipmentStatus /// is specified, only Amazon Easy Ship orders are returned.Possible values: /// PendingPickUp (Amazon has not yet picked up the package from the seller). /// LabelCanceled (The seller canceled the pickup). PickedUp (Amazon has picked /// up the package from the seller). AtOriginFC (The packaged is at the origin /// fulfillment center). AtDestinationFC (The package is at the destination /// fulfillment center). OutForDelivery (The package is out for delivery). /// Damaged (The package was damaged by the carrier). Delivered (The package /// has been delivered to the buyer). RejectedByBuyer (The package has been /// rejected by the buyer). Undeliverable (The package cannot be delivered). /// ReturnedToSeller (The package was not delivered to the buyer and was /// returned to the seller). ReturningToSeller (The package was not delivered /// to the buyer and is being returned to the seller). /// </param> /// <param name='nextToken'> /// A string token returned in the response of your previous request. /// </param> /// <param name='amazonOrderIds'> /// A list of AmazonOrderId values. An AmazonOrderId is an Amazon-defined order /// identifier, in 3-7-7 format. /// </param> /// <param name='actualFulfillmentSupplySourceId'> /// Denotes the recommended sourceId where the order should be fulfilled from. /// </param> /// <param name='isISPU'> /// When true, this order is marked to be picked up from a store rather than /// delivered. /// </param> /// <param name='storeChainStoreId'> /// The store chain store identifier. Linked to a specific store in a store /// chain. /// </param> public static GetOrdersResponse GetOrders(this IOrdersClient operations, IList <string> marketplaceIds, string createdAfter = default(string), string createdBefore = default(string), string lastUpdatedAfter = default(string), string lastUpdatedBefore = default(string), IList <string> orderStatuses = default(IList <string>), IList <string> fulfillmentChannels = default(IList <string>), IList <string> paymentMethods = default(IList <string>), string buyerEmail = default(string), string sellerOrderId = default(string), int?maxResultsPerPage = default(int?), IList <string> easyShipShipmentStatuses = default(IList <string>), string nextToken = default(string), IList <string> amazonOrderIds = default(IList <string>), string actualFulfillmentSupplySourceId = default(string), bool?isISPU = default(bool?), string storeChainStoreId = default(string)) { return(operations.GetOrdersAsync(marketplaceIds, createdAfter, createdBefore, lastUpdatedAfter, lastUpdatedBefore, orderStatuses, fulfillmentChannels, paymentMethods, buyerEmail, sellerOrderId, maxResultsPerPage, easyShipShipmentStatuses, nextToken, amazonOrderIds, actualFulfillmentSupplySourceId, isISPU, storeChainStoreId).GetAwaiter().GetResult()); }