Skip to content

Commit

Permalink
Add new DeliveryMethod and Transaction properties for API version 202…
Browse files Browse the repository at this point in the history
…4-07
  • Loading branch information
nozzlegear committed Jul 2, 2024
1 parent 8ff451c commit e10ba48
Show file tree
Hide file tree
Showing 4 changed files with 70 additions and 2 deletions.
26 changes: 25 additions & 1 deletion ShopifySharp/Entities/DeliveryMethod.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,28 @@ public class DeliveryMethod
/// </summary>
[JsonProperty("method_type")]
public string MethodType { get; set; }
}

/// <summary>
/// The branded promise that was presented to the customer during checkout. For example, "Shop Promise".
/// </summary>
[JsonProperty("branded_promise")]
public DeliveryMethodBrandedPromise BrandedPromise { get; set; }

/// <summary>
/// The additional information to consider when performing the delivery.
/// </summary>
[JsonProperty("additional_information")]
public DeliveryMethodAdditionalInformation AdditionalInformation { get; set; }

/// <summary>
/// A reference to the shipping method.
/// </summary>
[JsonProperty("service_code")]
public string ServiceCode { get; set; }

/// <summary>
/// The promise provider data associated with the delivery promise.
/// </summary>
[JsonProperty("source_reference")]
public string SourceReference { get; set; }
}
18 changes: 18 additions & 0 deletions ShopifySharp/Entities/DeliveryMethodAdditionalInformation.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
using Newtonsoft.Json;

namespace ShopifySharp;

public class DeliveryMethodAdditionalInformation
{
/// <summary>
/// instructions: The delivery instructions to follow when performing the delivery.
/// </summary>
[JsonProperty("instructions")]
public string Instructions { get; set; }

/// <summary>
/// The phone number to contact when performing the delivery.
/// </summary>
[JsonProperty("phone")]
public string Phone { get; set; }
}
18 changes: 18 additions & 0 deletions ShopifySharp/Entities/DeliveryMethodBrandedPromise.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
using Newtonsoft.Json;

namespace ShopifySharp;

public class DeliveryMethodBrandedPromise
{
/// <summary>
/// The name of the branded promise. For example: `Shop Promise`.
/// </summary>
[JsonProperty("name")]
public string Name { get; set; }

/// <summary>
/// The handle of the branded promise. For example: `shop_promise`
/// </summary>
[JsonProperty("handle")]
public string Handle { get; set; }
}
10 changes: 9 additions & 1 deletion ShopifySharp/Entities/Transaction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -170,4 +170,12 @@ public class Transaction : ShopifyObject
/// </summary>
[JsonProperty("total_unsettled_set")]
public PriceSet TotalUnsettledSet { get; set; }
}

#nullable enable
/// <summary>
/// The reason for the adjustment that is associated with the transaction. If the source_type is not an adjustment, the value will be null.
/// </summary>
[JsonProperty("adjustment_reason")]
public string? AdjustmentReason { get; set; }
#nullable disable
}

0 comments on commit e10ba48

Please sign in to comment.