Skip to content

Commit

Permalink
Merge pull request #888 from CrimsonOrion/master
Browse files Browse the repository at this point in the history
Update PriceRule.cs
  • Loading branch information
nozzlegear committed Jun 22, 2023
2 parents d78c252 + 5ff31df commit fa42a75
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 13 deletions.
2 changes: 1 addition & 1 deletion ShopifySharp/Entities/PrerequisiteQuantityRange.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ namespace ShopifySharp
public class PrerequisiteQuantityRange
{
[JsonProperty("greater_than_or_equal_to")]
public int greater_than_or_equal_to { get; set; }
public int GreaterThanOrEqualTo { get; set; }
}
}
2 changes: 1 addition & 1 deletion ShopifySharp/Entities/PrerequisiteToEntitlementPurchase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ namespace ShopifySharp
public class PrerequisiteToEntitlementPurchase
{
[JsonProperty("prerequisite_amount")]
public string prerequisite_amount { get; set; }
public string PrerequisiteAmount { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ namespace ShopifySharp
public class PrerequisiteToEntitlementQuantityRatio
{
[JsonProperty("prerequisite_quantity")]
public int prerequisite_quantity { get; set; }
public int PrerequisiteQuantity { get; set; }

[JsonProperty("entitled_quantity")]
public int entitled_quantity { get; set; }
public int EntitledQuantity { get; set; }
}
}
22 changes: 13 additions & 9 deletions ShopifySharp/Entities/PriceRule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,11 @@ public class PriceRule : ShopifyObject
[JsonProperty("prerequisite_shipping_price_range")]
public PrerequisiteValueRange PrerequisiteShippingPriceRange { get; set; }

/**
* Prerequisite cart quantity range.
*/
[JsonProperty("prerequisite_quantity_range")]
public PrerequisiteQuantityRange prerequisite_quantity_range { get; set; }
public PrerequisiteQuantityRange PrerequisiteQuantityRange { get; set; }

/**
* A list of prerequisite customer saved search ids. For the price rule to be applicable,
Expand All @@ -89,24 +92,25 @@ public class PriceRule : ShopifyObject
public IEnumerable<long> PrerequisiteSavedSearchIds { get; set; }

[JsonProperty("customer_segment_prerequisite_ids")]
public IEnumerable<long> customer_segment_prerequisite_ids { get; set; }
public IEnumerable<long> CustomerSegmentPrerequisiteIds { get; set; }

[JsonProperty("prerequisite_to_entitlement_purchase")]
public PrerequisiteToEntitlementPurchase prerequisite_to_entitlement_purchase { get; set; }
public PrerequisiteToEntitlementPurchase PrerequisiteToEntitlementPurchase { get; set; }

[JsonProperty("prerequisite_product_ids")]
public IEnumerable<long> prerequisite_product_ids { get; set; }
public IEnumerable<long> PrerequisiteProductIds { get; set; }

[JsonProperty("prerequisite_variant_ids")]
public IEnumerable<long> prerequisite_variant_ids { get; set; }
public IEnumerable<long> PrerequisiteVariantIds { get; set; }

[JsonProperty("prerequisite_collection_ids")]
public List<object> prerequisite_collection_ids { get; set; }
public List<object> PrerequisiteCollectionIds { get; set; }

[JsonProperty("prerequisite_to_entitlement_quantity_ratio")]
public PrerequisiteToEntitlementQuantityRatio prerequisite_to_entitlement_quantity_ratio { get; set; }
public PrerequisiteToEntitlementQuantityRatio PrerequisiteToEntitlementQuantityRatio { get; set; }

[JsonProperty("allocation_limit")]
public int allocation_limit { get; set; }
public int? AllocationLimit { get; set; }



Expand Down Expand Up @@ -173,4 +177,4 @@ public class PriceRule : ShopifyObject
[JsonProperty("updated_at")]
public DateTimeOffset? UpdatedAt { get; set; }
}
}
}

0 comments on commit fa42a75

Please sign in to comment.