From 4eddb5484e916e08b2b186fb7ae0e41935341869 Mon Sep 17 00:00:00 2001 From: Clement Date: Wed, 8 May 2024 10:53:02 +1000 Subject: [PATCH] Added product.variant_gids See https://shopify.dev/docs/api/admin/migrate/new-product-model/api-updates#webhook-updates --- ShopifySharp/Entities/Product.cs | 7 +++++++ ShopifySharp/Entities/ShopifyObjectGid.cs | 11 +++++++++++ 2 files changed, 18 insertions(+) create mode 100644 ShopifySharp/Entities/ShopifyObjectGid.cs diff --git a/ShopifySharp/Entities/Product.cs b/ShopifySharp/Entities/Product.cs index d7ec6c54..e6aa5ffd 100644 --- a/ShopifySharp/Entities/Product.cs +++ b/ShopifySharp/Entities/Product.cs @@ -116,5 +116,12 @@ public class Product : ShopifyObject /// [JsonProperty("metafields")] public IEnumerable Metafields { get; set; } + + /// + /// 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 + /// + [JsonProperty("variant_gids")] + public IEnumerable VariantGids { get; set; } } } diff --git a/ShopifySharp/Entities/ShopifyObjectGid.cs b/ShopifySharp/Entities/ShopifyObjectGid.cs new file mode 100644 index 00000000..59912c8a --- /dev/null +++ b/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; } + } +}