From edd457afaacc807da53edd03a19de2e378840813 Mon Sep 17 00:00:00 2001 From: Joshua Harms Date: Tue, 3 Mar 2020 15:25:39 -0600 Subject: [PATCH] Revert marking CheckoutService as obsolete; mark undocumented endpoints as obsolete --- ShopifySharp/Filters/CheckoutFilter.cs | 19 ------------------- .../Services/Checkout/CheckoutService.cs | 8 ++++++-- 2 files changed, 6 insertions(+), 21 deletions(-) delete mode 100644 ShopifySharp/Filters/CheckoutFilter.cs diff --git a/ShopifySharp/Filters/CheckoutFilter.cs b/ShopifySharp/Filters/CheckoutFilter.cs deleted file mode 100644 index 2f819ba8..00000000 --- a/ShopifySharp/Filters/CheckoutFilter.cs +++ /dev/null @@ -1,19 +0,0 @@ -using Newtonsoft.Json; - -namespace ShopifySharp.Filters -{ - /// - /// Options for filtering and - /// results. - /// - public class CheckoutFilter : ListFilter - { - /// - /// An optional, parameter to determine which carts to retrieve. - /// open - All open abandoned checkouts (default) - /// closed - Show only closed abandoned checkouts - /// - [JsonProperty("status")] - public string Status { get; set; } - } -} diff --git a/ShopifySharp/Services/Checkout/CheckoutService.cs b/ShopifySharp/Services/Checkout/CheckoutService.cs index 612f895f..50ce5ff8 100644 --- a/ShopifySharp/Services/Checkout/CheckoutService.cs +++ b/ShopifySharp/Services/Checkout/CheckoutService.cs @@ -7,9 +7,8 @@ namespace ShopifySharp { /// - /// A service for manipulating Shopify checkouts. + /// A service for working with abandoned checkouts. /// - [Obsolete("The endpoints and methods on this service no longer appear to be documented by Shopify. It may be removed in a future version of ShopifySharp.")] public class CheckoutService : ShopifyService { /// The shop's *.myshopify.com URL. @@ -19,6 +18,7 @@ public CheckoutService(string myShopifyUrl, string shopAccessToken) : base(mySho /// /// Creates a new Checkout. /// + [Obsolete("This endpoint does not appear to be documented by Shopify. It may no longer work, use with caution. This method may be removed in a future version of ShopifySharp.")] public virtual async Task CreateAsync(Checkout checkout) { var req = PrepareRequest("checkout.json"); @@ -31,6 +31,7 @@ public virtual async Task CreateAsync(Checkout checkout) /// /// Completes a checkout without requiring payment. /// + [Obsolete("This endpoint does not appear to be documented by Shopify. It may no longer work, use with caution. This method may be removed in a future version of ShopifySharp.")] public virtual async Task CompleteAsync(string token) { var req = PrepareRequest($"checkouts/{token}/complete.json"); @@ -42,6 +43,7 @@ public virtual async Task CompleteAsync(string token) /// /// Gets an existing, processing or completed checkout. /// + [Obsolete("This endpoint does not appear to be documented by Shopify. It may no longer work, use with caution. This method may be removed in a future version of ShopifySharp.")] public virtual async Task GetAsync(string token) { var req = PrepareRequest($"checkouts/{token}.json"); @@ -53,6 +55,7 @@ public virtual async Task GetAsync(string token) /// /// Updates an existing checkout based on the token id. /// + [Obsolete("This endpoint does not appear to be documented by Shopify. It may no longer work, use with caution. This method may be removed in a future version of ShopifySharp.")] public virtual async Task UpdateAsync(string token, Checkout updatedCheckout) { var req = PrepareRequest($"checkouts/{token}.json"); @@ -66,6 +69,7 @@ public virtual async Task UpdateAsync(string token, Checkout updatedCh /// new subtotal price, total tax, and total price in the event that this shipping rate is selected. This can be used to update the UI without performing further API requests. To apply a /// shipping rate, update the checkout's shipping line with the handle of the selected rate. /// + [Obsolete("This endpoint does not appear to be documented by Shopify. It may no longer work, use with caution. This method may be removed in a future version of ShopifySharp.")] public virtual async Task> ListShippingRatesAsync(string token) { var req = PrepareRequest($"checkouts/{token}/shipping_rates.json");