Skip to content

Commit

Permalink
Merge pull request #928 from clement911/transaction-refund-attributes
Browse files Browse the repository at this point in the history
New field transaction.payments_refund_attributes
  • Loading branch information
clement911 committed Sep 14, 2023
2 parents bfc6de0 + 47dffed commit c078193
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
20 changes: 20 additions & 0 deletions ShopifySharp/Entities/PaymentsRefundAttributes.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using Newtonsoft.Json;

namespace ShopifySharp
{
public class PaymentsRefundAttributes
{
/// <summary>
/// The current status of the refund. Valid values: pending, failure, success, and error.
/// </summary>
[JsonProperty("status")]
public string Status { get; set; }

/// <summary>
/// A unique number associated with the transaction that can be used to track the refund.
/// This property has a value only for transactions completed with Visa or Mastercard.
/// </summary>
[JsonProperty("acquirer_reference_number")]
public string AcquirerReferenceNumber { get; set; }
}
}
10 changes: 10 additions & 0 deletions ShopifySharp/Entities/Transaction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,16 @@ public class Transaction : ShopifyObject
[JsonProperty("currency_exchange_adjustment")]
public CurrencyExchangeAdjustment CurrencyExchangeAdjustment { get; set; }

/// <summary>
/// payments_refund_attributes are available only if the following criteria apply:
/// The store is on a Shopify Plus plan.
/// The store uses Shopify Payments.
/// The order transaction kind is either refund or void.
/// If the criteria isn't met, then the payments_refund_attributes property is omitted.
/// </summary>
[JsonProperty("payments_refund_attributes")]
public PaymentsRefundAttributes PaymentsRefundAttributes { get; set; }

/// <summary>
/// Unique ID is now sent to payment providers when a customer pays at checkout.
/// This ID can be used to match order information between Shopify and payment providers. An Order can have more than one Payment ID.
Expand Down

0 comments on commit c078193

Please sign in to comment.