Skip to content

Commit

Permalink
Added product.variant_gids
Browse files Browse the repository at this point in the history
  • Loading branch information
clement911 committed May 8, 2024
1 parent 1058ad9 commit 4eddb54
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ShopifySharp/Entities/Product.cs
Original file line number Diff line number Diff line change
Expand Up @@ -116,5 +116,12 @@ public class Product : ShopifyObject
/// </summary>
[JsonProperty("metafields")]
public IEnumerable<MetaField> Metafields { get; set; }

/// <summary>
/// The GraphQL IDs of all of the product's variants
/// See https://shopify.dev/docs/api/admin/migrate/new-product-model/api-updates#webhook-updates
/// </summary>
[JsonProperty("variant_gids")]
public IEnumerable<ShopifyObjectGid> VariantGids { get; set; }
}
}
11 changes: 11 additions & 0 deletions ShopifySharp/Entities/ShopifyObjectGid.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
using Newtonsoft.Json;

namespace ShopifySharp
{
public class ShopifyObjectGid
{
//The GraphQL ID of the object
[JsonProperty("admin_graphql_api_id")]
public string AdminGraphQLAPIId { get; set; }
}
}

0 comments on commit 4eddb54

Please sign in to comment.