Skip to content

Commit

Permalink
Merge pull request #845 from recurly/v3-v2021-02-25-10306936898
Browse files Browse the repository at this point in the history
Breaking change: The constant RefuneMethod Enum has been renamed RefundMethod
  • Loading branch information
douglasmiller committed Aug 9, 2024
2 parents cfb4bdc + f39f5d4 commit ee5854e
Show file tree
Hide file tree
Showing 15 changed files with 147 additions and 81 deletions.
11 changes: 10 additions & 1 deletion Recurly/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -900,12 +900,15 @@ public enum InvoiceRefundType
[EnumMember(Value = "amount")]
Amount,

[EnumMember(Value = "percentage")]
Percentage,

[EnumMember(Value = "line_items")]
LineItems,

};

public enum RefuneMethod
public enum RefundMethod
{
Undefined = 0,

Expand Down Expand Up @@ -939,6 +942,9 @@ public enum ExternalPaymentMethod
[EnumMember(Value = "apple_pay")]
ApplePay,

[EnumMember(Value = "braintree_apple_pay")]
BraintreeApplePay,

[EnumMember(Value = "check")]
Check,

Expand Down Expand Up @@ -1458,6 +1464,9 @@ public enum PaymentMethod
[EnumMember(Value = "bank_account_info")]
BankAccountInfo,

[EnumMember(Value = "braintree_apple_pay")]
BraintreeApplePay,

[EnumMember(Value = "check")]
Check,

Expand Down
2 changes: 1 addition & 1 deletion Recurly/Resources/AddOn.cs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ public class AddOn : Resource
[JsonConverter(typeof(RecurlyStringEnumConverter))]
public Constants.ActiveState? State { get; set; }

/// <value>Used by Avalara, Vertex, and Recurly’s EU VAT tax feature. The tax code values are specific to each tax system. If you are using Recurly’s EU VAT feature you can use `unknown`, `physical`, or `digital`.</value>
/// <value>Optional field used by Avalara, Vertex, and Recurly's In-the-Box tax solution to determine taxation rules. You can pass in specific tax codes using any of these tax integrations. For Recurly's In-the-Box tax offering you can also choose to instead use simple values of `unknown`, `physical`, or `digital` tax codes. If `item_code`/`item_id` is part of the request then `tax_code` must be absent.</value>
[JsonProperty("tax_code")]
public string TaxCode { get; set; }

Expand Down
2 changes: 1 addition & 1 deletion Recurly/Resources/AddOnCreate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public class AddOnCreate : Request
[JsonConverter(typeof(RecurlyStringEnumConverter))]
public Constants.RevenueScheduleType? RevenueScheduleType { get; set; }

/// <value>Optional field used by Avalara, Vertex, and Recurly's EU VAT tax feature to determine taxation rules. If you have your own AvaTax or Vertex account configured, use their tax codes to assign specific tax rules. If you are using Recurly's EU VAT feature, you can use values of `unknown`, `physical`, or `digital`. If `item_code`/`item_id` is part of the request then `tax_code` must be absent.</value>
/// <value>Optional field used by Avalara, Vertex, and Recurly's In-the-Box tax solution to determine taxation rules. You can pass in specific tax codes using any of these tax integrations. For Recurly's In-the-Box tax offering you can also choose to instead use simple values of `unknown`, `physical`, or `digital` tax codes. If `item_code`/`item_id` is part of the request then `tax_code` must be absent.</value>
[JsonProperty("tax_code")]
public string TaxCode { get; set; }

Expand Down
2 changes: 1 addition & 1 deletion Recurly/Resources/AddOnUpdate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public class AddOnUpdate : Request
[JsonConverter(typeof(RecurlyStringEnumConverter))]
public Constants.RevenueScheduleType? RevenueScheduleType { get; set; }

/// <value>Optional field used by Avalara, Vertex, and Recurly's EU VAT tax feature to determine taxation rules. If you have your own AvaTax or Vertex account configured, use their tax codes to assign specific tax rules. If you are using Recurly's EU VAT feature, you can use values of `unknown`, `physical`, or `digital`. If an `Item` is associated to the `AddOn` then `tax code` must be absent.</value>
/// <value>Optional field used by Avalara, Vertex, and Recurly's In-the-Box tax solution to determine taxation rules. You can pass in specific tax codes using any of these tax integrations. For Recurly's In-the-Box tax offering you can also choose to instead use simple values of `unknown`, `physical`, or `digital` tax codes. If an `Item` is associated to the `AddOn` then `tax_code` must be absent.</value>
[JsonProperty("tax_code")]
public string TaxCode { get; set; }

Expand Down
8 changes: 6 additions & 2 deletions Recurly/Resources/InvoiceRefund.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public class InvoiceRefund : Request

/// <value>
/// The amount to be refunded. The amount will be split between the line items.
/// If no amount is specified, it will default to refunding the total refundable amount on the invoice.
/// If `type` is "amount" and no amount is specified, it will default to refunding the total refundable amount on the invoice. Can only be present if `type` is "amount".
/// </value>
[JsonProperty("amount")]
public decimal? Amount { get; set; }
Expand Down Expand Up @@ -47,6 +47,10 @@ public class InvoiceRefund : Request
[JsonProperty("line_items")]
public List<LineItemRefund> LineItems { get; set; }

/// <value>The percentage of the remaining balance to be refunded. The percentage will be split between the line items. If `type` is "percentage" and no percentage is specified, it will default to refunding 100% of the refundable amount on the invoice. Can only be present if `type` is "percentage".</value>
[JsonProperty("percentage")]
public int? Percentage { get; set; }

/// <value>
/// Indicates how the invoice should be refunded when both a credit and transaction are present on the invoice:
/// - `transaction_first` – Refunds the transaction first, then any amount is issued as credit back to the account. Default value when Credit Invoices feature is enabled.
Expand All @@ -56,7 +60,7 @@ public class InvoiceRefund : Request
/// </value>
[JsonProperty("refund_method")]
[JsonConverter(typeof(RecurlyStringEnumConverter))]
public Constants.RefuneMethod? RefundMethod { get; set; }
public Constants.RefundMethod? RefundMethod { get; set; }

/// <value>The type of refund. Amount and line items cannot both be specified in the request.</value>
[JsonProperty("type")]
Expand Down
2 changes: 1 addition & 1 deletion Recurly/Resources/Item.cs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public class Item : Resource
[JsonConverter(typeof(RecurlyStringEnumConverter))]
public Constants.ActiveState? State { get; set; }

/// <value>Used by Avalara, Vertex, and Recurly’s EU VAT tax feature. The tax code values are specific to each tax system. If you are using Recurly’s EU VAT feature you can use `unknown`, `physical`, or `digital`.</value>
/// <value>Optional field used by Avalara, Vertex, and Recurly's In-the-Box tax solution to determine taxation rules. You can pass in specific tax codes using any of these tax integrations. For Recurly's In-the-Box tax offering you can also choose to instead use simple values of `unknown`, `physical`, or `digital` tax codes.</value>
[JsonProperty("tax_code")]
public string TaxCode { get; set; }

Expand Down
2 changes: 1 addition & 1 deletion Recurly/Resources/ItemCreate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public class ItemCreate : Request
[JsonConverter(typeof(RecurlyStringEnumConverter))]
public Constants.RevenueScheduleType? RevenueScheduleType { get; set; }

/// <value>Used by Avalara, Vertex, and Recurly’s EU VAT tax feature. The tax code values are specific to each tax system. If you are using Recurly’s EU VAT feature you can use `unknown`, `physical`, or `digital`.</value>
/// <value>Optional field used by Avalara, Vertex, and Recurly's In-the-Box tax solution to determine taxation rules. You can pass in specific tax codes using any of these tax integrations. For Recurly's In-the-Box tax offering you can also choose to instead use simple values of `unknown`, `physical`, or `digital` tax codes.</value>
[JsonProperty("tax_code")]
public string TaxCode { get; set; }

Expand Down
2 changes: 1 addition & 1 deletion Recurly/Resources/ItemUpdate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public class ItemUpdate : Request
[JsonConverter(typeof(RecurlyStringEnumConverter))]
public Constants.RevenueScheduleType? RevenueScheduleType { get; set; }

/// <value>Used by Avalara, Vertex, and Recurly’s EU VAT tax feature. The tax code values are specific to each tax system. If you are using Recurly’s EU VAT feature you can use `unknown`, `physical`, or `digital`.</value>
/// <value>Optional field used by Avalara, Vertex, and Recurly's In-the-Box tax solution to determine taxation rules. You can pass in specific tax codes using any of these tax integrations. For Recurly's In-the-Box tax offering you can also choose to instead use simple values of `unknown`, `physical`, or `digital` tax codes.</value>
[JsonProperty("tax_code")]
public string TaxCode { get; set; }

Expand Down
2 changes: 1 addition & 1 deletion Recurly/Resources/LineItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ public class LineItem : Resource
[JsonProperty("tax")]
public decimal? Tax { get; set; }

/// <value>Used by Avalara, Vertex, and Recurly’s EU VAT tax feature. The tax code values are specific to each tax system. If you are using Recurly’s EU VAT feature you can use `unknown`, `physical`, or `digital`.</value>
/// <value>Optional field used by Avalara, Vertex, and Recurly's In-the-Box tax solution to determine taxation rules. You can pass in specific tax codes using any of these tax integrations. For Recurly's In-the-Box tax offering you can also choose to instead use simple values of `unknown`, `physical`, or `digital` tax codes.</value>
[JsonProperty("tax_code")]
public string TaxCode { get; set; }

Expand Down
2 changes: 1 addition & 1 deletion Recurly/Resources/LineItemCreate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public class LineItemCreate : Request
[JsonProperty("start_date")]
public DateTime? StartDate { get; set; }

/// <value>Optional field used by Avalara, Vertex, and Recurly's EU VAT tax feature to determine taxation rules. If you have your own AvaTax or Vertex account configured, use their tax codes to assign specific tax rules. If you are using Recurly's EU VAT feature, you can use values of `unknown`, `physical`, or `digital`.</value>
/// <value>Optional field used by Avalara, Vertex, and Recurly's In-the-Box tax solution to determine taxation rules. You can pass in specific tax codes using any of these tax integrations. For Recurly's In-the-Box tax offering you can also choose to instead use simple values of `unknown`, `physical`, or `digital` tax codes.</value>
[JsonProperty("tax_code")]
public string TaxCode { get; set; }

Expand Down
12 changes: 10 additions & 2 deletions Recurly/Resources/LineItemRefund.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,30 @@ namespace Recurly.Resources
public class LineItemRefund : Request
{

/// <value>The specific amount to be refunded from the adjustment. Must be less than or equal to the adjustment's remaining balance. If `quantity`, `quantity_decimal` and `percentage` are not present, `amount` is required. If `quantity`, `quantity_decimal`, or `percentage` is present, `amount` must be absent.</value>
[JsonProperty("amount")]
public decimal? Amount { get; set; }

/// <value>Line item ID</value>
[JsonProperty("id")]
public string Id { get; set; }

/// <value>The percentage of the adjustment's remaining balance to refund. If `quantity`, `quantity_decimal` and `amount_in_cents` are not present, `percentage` is required. If `quantity`, `quantity_decimal` or `amount_in_cents` is present, `percentage` must be absent.</value>
[JsonProperty("percentage")]
public int? Percentage { get; set; }

/// <value>
/// Set to `true` if the line item should be prorated; set to `false` if not.
/// This can only be used on line items that have a start and end date.
/// </value>
[JsonProperty("prorate")]
public bool? Prorate { get; set; }

/// <value>Line item quantity to be refunded.</value>
/// <value>Line item quantity to be refunded. Must be less than or equal to the `quantity_remaining`. If `quantity_decimal`, `amount`, and `percentage` are not present, `quantity` is required. If `amount` or `percentage` is present, `quantity` must be absent.</value>
[JsonProperty("quantity")]
public int? Quantity { get; set; }

/// <value>A floating-point alternative to Quantity. If this value is present, it will be used in place of Quantity for calculations, and Quantity will be the rounded integer value of this number. This field supports up to 9 decimal places. The Decimal Quantity feature must be enabled to utilize this field.</value>
/// <value>Decimal quantity to refund. The `quantity_decimal` will be used to refund charges that has a NOT null quantity decimal. Must be less than or equal to the `quantity_decimal_remaining`. If `quantity`, `amount`, and `percentage` are not present, `quantity_decimal` is required. If `amount` or `percentage` is present, `quantity_decimal` must be absent. The Decimal Quantity feature must be enabled to utilize this field.</value>
[JsonProperty("quantity_decimal")]
public string QuantityDecimal { get; set; }

Expand Down
2 changes: 1 addition & 1 deletion Recurly/Resources/Plan.cs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public class Plan : Resource
[JsonConverter(typeof(RecurlyStringEnumConverter))]
public Constants.ActiveState? State { get; set; }

/// <value>Used by Avalara, Vertex, and Recurly’s EU VAT tax feature. The tax code values are specific to each tax system. If you are using Recurly’s EU VAT feature you can use `unknown`, `physical`, or `digital`.</value>
/// <value>Optional field used by Avalara, Vertex, and Recurly's In-the-Box tax solution to determine taxation rules. You can pass in specific tax codes using any of these tax integrations. For Recurly's In-the-Box tax offering you can also choose to instead use simple values of `unknown`, `physical`, or `digital` tax codes.</value>
[JsonProperty("tax_code")]
public string TaxCode { get; set; }

Expand Down
2 changes: 1 addition & 1 deletion Recurly/Resources/PlanCreate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ public class PlanCreate : Request
[JsonConverter(typeof(RecurlyStringEnumConverter))]
public Constants.RevenueScheduleType? SetupFeeRevenueScheduleType { get; set; }

/// <value>Optional field used by Avalara, Vertex, and Recurly's EU VAT tax feature to determine taxation rules. If you have your own AvaTax or Vertex account configured, use their tax codes to assign specific tax rules. If you are using Recurly's EU VAT feature, you can use values of `unknown`, `physical`, or `digital`.</value>
/// <value>Optional field used by Avalara, Vertex, and Recurly's In-the-Box tax solution to determine taxation rules. You can pass in specific tax codes using any of these tax integrations. For Recurly's In-the-Box tax offering you can also choose to instead use simple values of `unknown`, `physical`, or `digital` tax codes.</value>
[JsonProperty("tax_code")]
public string TaxCode { get; set; }

Expand Down
2 changes: 1 addition & 1 deletion Recurly/Resources/PlanUpdate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ public class PlanUpdate : Request
[JsonConverter(typeof(RecurlyStringEnumConverter))]
public Constants.RevenueScheduleType? SetupFeeRevenueScheduleType { get; set; }

/// <value>Optional field used by Avalara, Vertex, and Recurly's EU VAT tax feature to determine taxation rules. If you have your own AvaTax or Vertex account configured, use their tax codes to assign specific tax rules. If you are using Recurly's EU VAT feature, you can use values of `unknown`, `physical`, or `digital`.</value>
/// <value>Optional field used by Avalara, Vertex, and Recurly's In-the-Box tax solution to determine taxation rules. You can pass in specific tax codes using any of these tax integrations. For Recurly's In-the-Box tax offering you can also choose to instead use simple values of `unknown`, `physical`, or `digital` tax codes.</value>
[JsonProperty("tax_code")]
public string TaxCode { get; set; }

Expand Down
Loading

0 comments on commit ee5854e

Please sign in to comment.