diff --git a/Recurly/Constants.cs b/Recurly/Constants.cs index bf764970..8c37a885 100644 --- a/Recurly/Constants.cs +++ b/Recurly/Constants.cs @@ -254,6 +254,21 @@ public enum LineItemType }; + public enum VertexTransactionType + { + Undefined = 0, + + [EnumMember(Value = "sale")] + Sale, + + [EnumMember(Value = "rental")] + Rental, + + [EnumMember(Value = "lease")] + Lease, + + }; + public enum FilterTransactionType { Undefined = 0, diff --git a/Recurly/Resources/GiftCardCreate.cs b/Recurly/Resources/GiftCardCreate.cs index 9ee897a6..975008c6 100644 --- a/Recurly/Resources/GiftCardCreate.cs +++ b/Recurly/Resources/GiftCardCreate.cs @@ -31,6 +31,10 @@ public class GiftCardCreate : Request [JsonProperty("product_code")] public string ProductCode { get; set; } + /// Set to `true` to bypass sending the purchase to your configured tax service. Defaults to `false`. + [JsonProperty("tax_service_opt_out")] + public bool? TaxServiceOptOut { get; set; } + /// The amount of the gift card, which is the amount of the charge to the gifter account and the amount of credit that is applied to the recipient account upon successful redemption. [JsonProperty("unit_amount")] public decimal? UnitAmount { get; set; } diff --git a/Recurly/Resources/InvoiceCreate.cs b/Recurly/Resources/InvoiceCreate.cs index 721e81c8..0a62d2d9 100644 --- a/Recurly/Resources/InvoiceCreate.cs +++ b/Recurly/Resources/InvoiceCreate.cs @@ -88,5 +88,10 @@ public class InvoiceCreate : Request [JsonProperty("vat_reverse_charge_notes")] public string VatReverseChargeNotes { get; set; } + /// Used by Vertex for tax calculations. Possible values are sale, rental, lease. + [JsonProperty("vertex_transaction_type")] + [JsonConverter(typeof(RecurlyStringEnumConverter))] + public Constants.VertexTransactionType? VertexTransactionType { get; set; } + } } diff --git a/Recurly/Resources/LineItem.cs b/Recurly/Resources/LineItem.cs index 950b93a6..b0cbb670 100644 --- a/Recurly/Resources/LineItem.cs +++ b/Recurly/Resources/LineItem.cs @@ -277,5 +277,10 @@ public class LineItem : Resource [JsonProperty("uuid")] public string Uuid { get; set; } + /// Used by Vertex for tax calculations. Possible values are sale, rental, lease. + [JsonProperty("vertex_transaction_type")] + [JsonConverter(typeof(RecurlyStringEnumConverter))] + public Constants.VertexTransactionType? VertexTransactionType { get; set; } + } } diff --git a/Recurly/Resources/LineItemCreate.cs b/Recurly/Resources/LineItemCreate.cs index ccb65a85..6ba9e92a 100644 --- a/Recurly/Resources/LineItemCreate.cs +++ b/Recurly/Resources/LineItemCreate.cs @@ -142,5 +142,10 @@ public class LineItemCreate : Request [JsonProperty("unit_amount")] public decimal? UnitAmount { get; set; } + /// Used by Vertex for tax calculations. Possible values are sale, rental, lease. + [JsonProperty("vertex_transaction_type")] + [JsonConverter(typeof(RecurlyStringEnumConverter))] + public Constants.VertexTransactionType? VertexTransactionType { get; set; } + } } diff --git a/Recurly/Resources/PurchaseCreate.cs b/Recurly/Resources/PurchaseCreate.cs index f7f34edf..f41777ea 100644 --- a/Recurly/Resources/PurchaseCreate.cs +++ b/Recurly/Resources/PurchaseCreate.cs @@ -129,5 +129,10 @@ public class PurchaseCreate : Request [JsonProperty("vat_reverse_charge_notes")] public string VatReverseChargeNotes { get; set; } + /// Used by Vertex for tax calculations. Possible values are sale, rental, lease. + [JsonProperty("vertex_transaction_type")] + [JsonConverter(typeof(RecurlyStringEnumConverter))] + public Constants.VertexTransactionType? VertexTransactionType { get; set; } + } } diff --git a/openapi/api.yaml b/openapi/api.yaml index 1ef07267..e606589c 100644 --- a/openapi/api.yaml +++ b/openapi/api.yaml @@ -20934,6 +20934,8 @@ components: will default to the VAT Reverse Charge Notes text specified on the Tax Settings page in your Recurly admin, unless custom notes were created with the original subscription. + vertex_transaction_type: + "$ref": "#/components/schemas/VertexTransactionTypeEnum" required: - currency InvoiceCollect: @@ -21464,6 +21466,8 @@ components: Refer to [the documentation](https://help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types. minimum: 0 + vertex_transaction_type: + "$ref": "#/components/schemas/VertexTransactionTypeEnum" tax_code: type: string maxLength: 50 @@ -21719,6 +21723,8 @@ components: for more available t/s types. If an `Item` is associated to the `LineItem`, then the `avalara_service_type` must be absent. minimum: 0 + vertex_transaction_type: + "$ref": "#/components/schemas/VertexTransactionTypeEnum" tax_code: type: string maxLength: 50 @@ -25080,6 +25086,8 @@ components: type: string title: VAT reverse charge notes description: VAT reverse charge notes for cross border European tax settlement. + vertex_transaction_type: + "$ref": "#/components/schemas/VertexTransactionTypeEnum" credit_customer_notes: type: string title: Credit customer notes @@ -26496,6 +26504,11 @@ components: type: string description: 3-letter ISO 4217 currency code. maxLength: 3 + tax_service_opt_out: + title: Tax service opt-out + type: boolean + description: Set to `true` to bypass sending the purchase to your configured + tax service. Defaults to `false`. delivery: title: Delivery details description: The delivery details for the gift card. @@ -26760,6 +26773,15 @@ components: enum: - charge - credit + VertexTransactionTypeEnum: + type: string + title: Vertex Transaction Type + description: Used by Vertex for tax calculations. Possible values are sale, + rental, lease. + enum: + - sale + - rental + - lease FilterTransactionTypeEnum: type: string enum: