Skip to content

Commit

Permalink
chore: deprecate ProductListingService and its related factories/inte…
Browse files Browse the repository at this point in the history
…rfaces
  • Loading branch information
nozzlegear committed Jan 15, 2025
1 parent 9ca3445 commit ac2c322
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions ShopifySharp/Factories/ProductListingServiceFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@

namespace ShopifySharp.Factories;

[Obsolete("Shopify has deprecated the REST API for product listings. This service is deprecated and will be removed in a future version of ShopifySharp. Use ShopifySharp's GraphService to manage product listings via the GraphQL API, and check https://github.com/nozzlegear/shopifysharp for a migration guide.")]
public interface IProductListingServiceFactory : IServiceFactory<IProductListingService>;

[Obsolete("Shopify has deprecated the REST API for product listings. This service is deprecated and will be removed in a future version of ShopifySharp. Use ShopifySharp's GraphService to manage product listings via the GraphQL API, and check https://github.com/nozzlegear/shopifysharp for a migration guide.")]
public class ProductListingServiceFactory : IProductListingServiceFactory
{
private readonly IShopifyDomainUtility? _shopifyDomainUtility;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
using System;
using System.Threading;
using System.Threading.Tasks;
using ShopifySharp.Filters;
using ShopifySharp.Lists;

namespace ShopifySharp;

[Obsolete("Shopify has deprecated the REST API for product listings. This service is deprecated and will be removed in a future version of ShopifySharp. Use ShopifySharp's GraphService to manage product listings via the GraphQL API, and check https://github.com/nozzlegear/shopifysharp for a migration guide.")]
public interface IProductListingService : IShopifyService
{
/// <summary>
Expand Down Expand Up @@ -51,4 +53,4 @@ Task<ProductListing> GetAsync(long productId,
/// <param name="productId">The product object's Id.</param>
/// <param name="cancellationToken">Cancellation Token</param>
Task DeleteAsync(long productId, CancellationToken cancellationToken = default);
}
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using System;
using ShopifySharp.Filters;
using ShopifySharp.Infrastructure;
using ShopifySharp.Lists;
Expand All @@ -12,6 +13,7 @@ namespace ShopifySharp;
/// <summary>
/// A service for manipulating Shopify Product which is available to your sales channel
/// </summary>
[Obsolete("Shopify has deprecated the REST API for product listings. This service is deprecated and will be removed in a future version of ShopifySharp. Use ShopifySharp's GraphService to manage product listings via the GraphQL API, and check https://github.com/nozzlegear/shopifysharp for a migration guide.")]
public class ProductListingService: ShopifyService, IProductListingService
{
/// <summary>
Expand Down Expand Up @@ -65,4 +67,4 @@ public virtual async Task DeleteAsync(long productId, CancellationToken cancella

await ExecuteRequestAsync(req, HttpMethod.Delete, cancellationToken);
}
}
}

0 comments on commit ac2c322

Please sign in to comment.