Skip to content

Commit

Permalink
Merge pull request #1061 from clement911/master
Browse files Browse the repository at this point in the history
Added product.variant_gids
  • Loading branch information
clement911 committed May 8, 2024
2 parents 1058ad9 + 4eddb54 commit a328077
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
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
@@ -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 a328077

Please sign in to comment.