From 097965d4c34e33f028858ffe379f2920752e94db Mon Sep 17 00:00:00 2001 From: benjamin eckel Date: Fri, 13 Oct 2017 10:11:40 -0700 Subject: [PATCH 1/4] Bump API version 2.8 --- Library/Configuration/Settings.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Configuration/Settings.cs b/Library/Configuration/Settings.cs index 18514dfd..23d1f9e7 100644 --- a/Library/Configuration/Settings.cs +++ b/Library/Configuration/Settings.cs @@ -63,7 +63,7 @@ public int PageSize } protected const string RecurlyServerUri = "https://{0}.recurly.com/v2{1}"; - public const string RecurlyApiVersion = "2.7"; + public const string RecurlyApiVersion = "2.8"; // static, unlikely to change public string UserAgent From d685bc3877851e5cca6a9b71c1580cf661fbb6d5 Mon Sep 17 00:00:00 2001 From: benjamin eckel Date: Fri, 13 Oct 2017 10:12:56 -0700 Subject: [PATCH 2/4] Purchases notes --- Library/Purchase.cs | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/Library/Purchase.cs b/Library/Purchase.cs index 160aa3b7..d93c0dc0 100644 --- a/Library/Purchase.cs +++ b/Library/Purchase.cs @@ -67,6 +67,33 @@ public List CouponCodes } private List _couponCodes; + /// + /// Optional notes field. This will default to the Customer Notes + /// text specified on the Invoice Settings page in your Recurly admin. + /// Custom notes made on an invoice for a one time charge will + /// not carry over to subsequent invoices. + /// + public string CustomerNotes { get; set; } + + /// + /// Optional Terms and Conditions field. This will default to the + /// Terms and Conditions text specified on the Invoice Settings page + /// in your Recurly admin. Custom notes will stay with a subscription + /// on all renewals. + /// + public string TermsAndConditions { get; set; } + + /// + /// Optional VAT Reverse Charge Notes only appear if you have EU VAT + /// enabled or are using your own Avalara AvaTax account and the customer + /// is in the EU, has a VAT number, and is in a different country than + /// your own. This 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. Custom + /// notes will stay with a subscription on all renewals. + /// + public string VatReverseChargeNotes { get; set; } + #region Constructors internal Purchase() @@ -184,6 +211,15 @@ internal override void WriteXml(XmlTextWriter xmlWriter) gc.WriteRedemptionXml(xmlWriter); } + if (CustomerNotes != null) + xmlWriter.WriteElementString("customer_notes", CustomerNotes); + + if (TermsAndConditions != null) + xmlWriter.WriteElementString("terms_and_conditions", TermsAndConditions); + + if (VatReverseChargeNotes != null) + xmlWriter.WriteElementString("vat_reverse_charge_notes", VatReverseChargeNotes); + xmlWriter.WriteEndElement(); // End: purchase } From 2c8755a3f2298b04ee67ed998188e7525f781d56 Mon Sep 17 00:00:00 2001 From: benjamin eckel Date: Fri, 13 Oct 2017 11:04:17 -0700 Subject: [PATCH 3/4] ImportedTrial flag --- Library/Subscription.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Library/Subscription.cs b/Library/Subscription.cs index 550f0be2..0866cb4d 100644 --- a/Library/Subscription.cs +++ b/Library/Subscription.cs @@ -292,6 +292,11 @@ public SubscriptionAddOnList AddOns /// public DateTime? ConvertedAt { get; private set; } + /// + /// Optionally set true to denote that this subscription was imported from a trial. + /// + public bool? ImportedTrial { get; set; } + internal Subscription() { IsPendingSubscription = false; @@ -702,6 +707,9 @@ internal override void ReadXml(XmlTextReader reader) case "no_billing_info_reason": NoBillingInfoReason = reader.ReadElementContentAsString(); break; + case "imported_trial": + ImportedTrial = reader.ReadElementContentAsBoolean(); + break; } } } @@ -821,6 +829,11 @@ internal void WriteSubscriptionXml(XmlTextWriter xmlWriter, bool embedded) xmlWriter.WriteElementString("shipping_address_id", ShippingAddressId.Value.ToString()); } + if (ImportedTrial.HasValue) + { + xmlWriter.WriteElementString("imported_trial", ImportedTrial.Value.ToString().ToLower()); + } + xmlWriter.WriteEndElement(); // End: subscription } From 7c24c5add2ed9167547f33c775e9a5edace998bf Mon Sep 17 00:00:00 2001 From: benjamin eckel Date: Tue, 17 Oct 2017 12:23:51 -0700 Subject: [PATCH 4/4] Bump 1.7.0 --- History.md | 16 ++++++++++++++++ Library/Properties/AssemblyInfo.cs | 4 ++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/History.md b/History.md index 0f0d9685..3839e8bc 100644 --- a/History.md +++ b/History.md @@ -1,6 +1,20 @@ Unreleased =============== +1.7.0 (stable) / 2017-10-17 +=============== + +* ImportedTrial flag on Subscription +* Purchases Notes Changes + +### Upgrade Notes + +This release will upgrade us to API version 2.8. + +There is one breaking change in this API version you must consider. All `country` fields must now contain valid [2 letter ISO 3166 country codes](https://www.iso.org/iso-3166-country-codes.html). If your code fails +validation, you will receive a validation error. This affects anywhere and address is collected. + + 1.6.1 (stable) / 2017-10-04 =============== @@ -13,6 +27,8 @@ Unreleased * Gift Card Support * Purchases Endpoint Support +### Upgrade Notes + This release will upgrade us to API version 2.7. There is only 1 breaking change in this library. `Invoice` will now use an enum for the `CollectionMethod` property instead of a string. The enum has 2 values (Automatic and Manual). Example: diff --git a/Library/Properties/AssemblyInfo.cs b/Library/Properties/AssemblyInfo.cs index 1af89d8b..ebdd19e2 100644 --- a/Library/Properties/AssemblyInfo.cs +++ b/Library/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.6.1.0")] -[assembly: AssemblyFileVersion("1.6.1.0")] +[assembly: AssemblyVersion("1.7.0.0")] +[assembly: AssemblyFileVersion("1.7.0.0")]