diff --git a/src/Stripe.net/Entities/CreditNoteLineItems/CreditNoteLineItemTaxTaxRateDetails.cs b/src/Stripe.net/Entities/CreditNoteLineItems/CreditNoteLineItemTaxTaxRateDetails.cs index eb2c5ff2c7..f5dad35bfc 100644 --- a/src/Stripe.net/Entities/CreditNoteLineItems/CreditNoteLineItemTaxTaxRateDetails.cs +++ b/src/Stripe.net/Entities/CreditNoteLineItems/CreditNoteLineItemTaxTaxRateDetails.cs @@ -8,11 +8,39 @@ namespace Stripe [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class CreditNoteLineItemTaxTaxRateDetails : StripeEntity { + #region Expandable TaxRate + + /// + /// (ID of the TaxRate) + /// ID of the tax rate. + /// + [JsonIgnore] + [STJS.JsonIgnore] + public string TaxRateId + { + get => this.InternalTaxRate?.Id; + set => this.InternalTaxRate = SetExpandableFieldId(value, this.InternalTaxRate); + } + /// + /// (Expanded) /// ID of the tax rate. + /// + /// For more information, see the expand documentation. /// + [JsonIgnore] + [STJS.JsonIgnore] + public TaxRate TaxRate + { + get => this.InternalTaxRate?.ExpandedObject; + set => this.InternalTaxRate = SetExpandableFieldObject(value, this.InternalTaxRate); + } + [JsonProperty("tax_rate")] + [JsonConverter(typeof(ExpandableFieldConverter))] [STJS.JsonPropertyName("tax_rate")] - public string TaxRate { get; set; } + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] + internal ExpandableField InternalTaxRate { get; set; } + #endregion } } diff --git a/src/Stripe.net/Entities/CreditNotes/CreditNoteTotalTaxTaxRateDetails.cs b/src/Stripe.net/Entities/CreditNotes/CreditNoteTotalTaxTaxRateDetails.cs index 59fc50292a..f86b1479c8 100644 --- a/src/Stripe.net/Entities/CreditNotes/CreditNoteTotalTaxTaxRateDetails.cs +++ b/src/Stripe.net/Entities/CreditNotes/CreditNoteTotalTaxTaxRateDetails.cs @@ -8,11 +8,39 @@ namespace Stripe [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class CreditNoteTotalTaxTaxRateDetails : StripeEntity { + #region Expandable TaxRate + + /// + /// (ID of the TaxRate) + /// ID of the tax rate. + /// + [JsonIgnore] + [STJS.JsonIgnore] + public string TaxRateId + { + get => this.InternalTaxRate?.Id; + set => this.InternalTaxRate = SetExpandableFieldId(value, this.InternalTaxRate); + } + /// + /// (Expanded) /// ID of the tax rate. + /// + /// For more information, see the expand documentation. /// + [JsonIgnore] + [STJS.JsonIgnore] + public TaxRate TaxRate + { + get => this.InternalTaxRate?.ExpandedObject; + set => this.InternalTaxRate = SetExpandableFieldObject(value, this.InternalTaxRate); + } + [JsonProperty("tax_rate")] + [JsonConverter(typeof(ExpandableFieldConverter))] [STJS.JsonPropertyName("tax_rate")] - public string TaxRate { get; set; } + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] + internal ExpandableField InternalTaxRate { get; set; } + #endregion } } diff --git a/src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItemTaxTaxRateDetails.cs b/src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItemTaxTaxRateDetails.cs index b02ad2da16..58187cd350 100644 --- a/src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItemTaxTaxRateDetails.cs +++ b/src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItemTaxTaxRateDetails.cs @@ -8,11 +8,39 @@ namespace Stripe [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class InvoiceLineItemTaxTaxRateDetails : StripeEntity { + #region Expandable TaxRate + + /// + /// (ID of the TaxRate) + /// ID of the tax rate. + /// + [JsonIgnore] + [STJS.JsonIgnore] + public string TaxRateId + { + get => this.InternalTaxRate?.Id; + set => this.InternalTaxRate = SetExpandableFieldId(value, this.InternalTaxRate); + } + /// + /// (Expanded) /// ID of the tax rate. + /// + /// For more information, see the expand documentation. /// + [JsonIgnore] + [STJS.JsonIgnore] + public TaxRate TaxRate + { + get => this.InternalTaxRate?.ExpandedObject; + set => this.InternalTaxRate = SetExpandableFieldObject(value, this.InternalTaxRate); + } + [JsonProperty("tax_rate")] + [JsonConverter(typeof(ExpandableFieldConverter))] [STJS.JsonPropertyName("tax_rate")] - public string TaxRate { get; set; } + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] + internal ExpandableField InternalTaxRate { get; set; } + #endregion } } diff --git a/src/Stripe.net/Entities/Invoices/InvoiceTotalTaxTaxRateDetails.cs b/src/Stripe.net/Entities/Invoices/InvoiceTotalTaxTaxRateDetails.cs index c1dc2e7a8f..9ac30976bb 100644 --- a/src/Stripe.net/Entities/Invoices/InvoiceTotalTaxTaxRateDetails.cs +++ b/src/Stripe.net/Entities/Invoices/InvoiceTotalTaxTaxRateDetails.cs @@ -8,11 +8,39 @@ namespace Stripe [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class InvoiceTotalTaxTaxRateDetails : StripeEntity { + #region Expandable TaxRate + + /// + /// (ID of the TaxRate) + /// ID of the tax rate. + /// + [JsonIgnore] + [STJS.JsonIgnore] + public string TaxRateId + { + get => this.InternalTaxRate?.Id; + set => this.InternalTaxRate = SetExpandableFieldId(value, this.InternalTaxRate); + } + /// + /// (Expanded) /// ID of the tax rate. + /// + /// For more information, see the expand documentation. /// + [JsonIgnore] + [STJS.JsonIgnore] + public TaxRate TaxRate + { + get => this.InternalTaxRate?.ExpandedObject; + set => this.InternalTaxRate = SetExpandableFieldObject(value, this.InternalTaxRate); + } + [JsonProperty("tax_rate")] + [JsonConverter(typeof(ExpandableFieldConverter))] [STJS.JsonPropertyName("tax_rate")] - public string TaxRate { get; set; } + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] + internal ExpandableField InternalTaxRate { get; set; } + #endregion } }