Skip to content

Commit ac2c322

Browse files
committed
chore: deprecate ProductListingService and its related factories/interfaces
1 parent 9ca3445 commit ac2c322

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

ShopifySharp/Factories/ProductListingServiceFactory.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@
99

1010
namespace ShopifySharp.Factories;
1111

12+
[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.")]
1213
public interface IProductListingServiceFactory : IServiceFactory<IProductListingService>;
1314

15+
[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.")]
1416
public class ProductListingServiceFactory : IProductListingServiceFactory
1517
{
1618
private readonly IShopifyDomainUtility? _shopifyDomainUtility;

ShopifySharp/Services/ProductListing/IProductListingService.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1+
using System;
12
using System.Threading;
23
using System.Threading.Tasks;
34
using ShopifySharp.Filters;
45
using ShopifySharp.Lists;
56

67
namespace ShopifySharp;
78

9+
[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.")]
810
public interface IProductListingService : IShopifyService
911
{
1012
/// <summary>
@@ -51,4 +53,4 @@ Task<ProductListing> GetAsync(long productId,
5153
/// <param name="productId">The product object's Id.</param>
5254
/// <param name="cancellationToken">Cancellation Token</param>
5355
Task DeleteAsync(long productId, CancellationToken cancellationToken = default);
54-
}
56+
}

ShopifySharp/Services/ProductListing/ProductListingService.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
using System;
12
using ShopifySharp.Filters;
23
using ShopifySharp.Infrastructure;
34
using ShopifySharp.Lists;
@@ -12,6 +13,7 @@ namespace ShopifySharp;
1213
/// <summary>
1314
/// A service for manipulating Shopify Product which is available to your sales channel
1415
/// </summary>
16+
[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.")]
1517
public class ProductListingService: ShopifyService, IProductListingService
1618
{
1719
/// <summary>
@@ -65,4 +67,4 @@ public virtual async Task DeleteAsync(long productId, CancellationToken cancella
6567

6668
await ExecuteRequestAsync(req, HttpMethod.Delete, cancellationToken);
6769
}
68-
}
70+
}

0 commit comments

Comments
 (0)