diff --git a/AdvancedBilling.Standard/AdvancedBilling.Standard.csproj b/AdvancedBilling.Standard/AdvancedBilling.Standard.csproj
index e34484b7..96507285 100644
--- a/AdvancedBilling.Standard/AdvancedBilling.Standard.csproj
+++ b/AdvancedBilling.Standard/AdvancedBilling.Standard.csproj
@@ -9,13 +9,13 @@
netstandard2.0
Maxio.AdvancedBillingSdk
- 7.0.1.0
+ 8.0.0.0
MaxioSdk
AdvancedBilling.Standard
Copyright © 2019
- 7.0.1.0
- 7.0.1.0
+ 8.0.0.0
+ 8.0.0.0
Ultimate billing and pricing flexibility for B2B SaaS.
Maxio integrates directly into your product, so you can seamlessly manage your product catalog, bill customers, and collect payments.
7.3
@@ -29,12 +29,14 @@ Maxio integrates directly into your product, so you can seamlessly manage your p
LICENSE
true
+ $(NoWarn);1591
-
+
+
diff --git a/AdvancedBilling.Standard/AdvancedBillingClient.cs b/AdvancedBilling.Standard/AdvancedBillingClient.cs
index 4940b59b..13201c00 100644
--- a/AdvancedBilling.Standard/AdvancedBillingClient.cs
+++ b/AdvancedBilling.Standard/AdvancedBillingClient.cs
@@ -12,6 +12,7 @@
using AdvancedBilling.Standard.Controllers;
using AdvancedBilling.Standard.Http.Client;
using AdvancedBilling.Standard.Utilities;
+using Microsoft.Extensions.Configuration;
namespace AdvancedBilling.Standard
{
@@ -42,7 +43,7 @@ public sealed class AdvancedBillingClient : IConfiguration
};
private readonly GlobalConfiguration globalConfiguration;
- private const string userAgent = "AB SDK DotNet:7.0.1 on OS {os-info}";
+ private const string userAgent = "AB SDK DotNet:8.0.0 on OS {os-info}";
private readonly HttpCallback httpCallback;
private readonly Lazy aPIExports;
private readonly Lazy advanceInvoice;
@@ -435,6 +436,13 @@ internal static AdvancedBillingClient CreateFromEnvironment()
return builder.Build();
}
+ ///
+ /// Creates the client from configuration.
+ ///
+ /// AdvancedBillingClient.
+ public static AdvancedBillingClient FromConfiguration(IConfigurationSection configuration) =>
+ Builder.FromConfiguration(configuration).Build();
+
///
/// Builder class.
///
@@ -500,6 +508,15 @@ public Builder HttpClientConfig(Action action)
return this;
}
+ private Builder HttpClientConfig(HttpClientConfiguration.Builder httpClientConfigurationBuilder)
+ {
+ if (httpClientConfigurationBuilder != null)
+ {
+ this.httpClientConfig = httpClientConfigurationBuilder;
+ }
+
+ return this;
+ }
///
@@ -530,6 +547,34 @@ public AdvancedBillingClient Build()
httpCallback,
httpClientConfig.Build());
}
+
+ ///
+ /// Creates the client builder from configuration.
+ ///
+ /// Builder.
+ public static Builder FromConfiguration(IConfigurationSection config)
+ {
+ var builder = new Builder();
+ var options = config.Get();
+ if (options == null) return builder;
+ if (options.Environment != null)
+ builder.Environment(options.Environment.Value);
+ if (options.Site != null)
+ builder.Site(options.Site);
+ if (options.BasicAuthCredentials != null)
+ builder.BasicAuthCredentials(BasicAuthModel.FromOptions(options.BasicAuthCredentials));
+ if (options.HttpClientConfig != null)
+ builder.HttpClientConfig(Http.Client.HttpClientConfiguration.FromOptions(options.HttpClientConfig));
+ return builder;
+ }
+ }
+
+ public class AdvancedBillingClientOptions
+ {
+ public Environment? Environment { get; set; }
+ public string Site { get; set; }
+ public BasicAuthModelOptions BasicAuthCredentials { get; set; }
+ public HttpClientConfigurationOptions HttpClientConfig { get; set; }
}
}
}
diff --git a/AdvancedBilling.Standard/Authentication/BasicAuthManager.cs b/AdvancedBilling.Standard/Authentication/BasicAuthManager.cs
index 1e45edce..522ea33b 100644
--- a/AdvancedBilling.Standard/Authentication/BasicAuthManager.cs
+++ b/AdvancedBilling.Standard/Authentication/BasicAuthManager.cs
@@ -130,5 +130,17 @@ public BasicAuthModel Build()
};
}
}
+
+ internal static BasicAuthModel FromOptions(BasicAuthModelOptions options)
+ {
+ var builder = new Builder(options.Username, options.Password);
+ return builder.Build();
+ }
+ }
+
+ public class BasicAuthModelOptions
+ {
+ public string Username { get; set; }
+ public string Password { get; set; }
}
}
\ No newline at end of file
diff --git a/AdvancedBilling.Standard/Controllers/AdvanceInvoiceController.cs b/AdvancedBilling.Standard/Controllers/AdvanceInvoiceController.cs
index f1f8bd43..72c2f475 100644
--- a/AdvancedBilling.Standard/Controllers/AdvanceInvoiceController.cs
+++ b/AdvancedBilling.Standard/Controllers/AdvanceInvoiceController.cs
@@ -36,7 +36,7 @@ public class AdvanceInvoiceController : BaseController
internal AdvanceInvoiceController(GlobalConfiguration globalConfiguration) : base(globalConfiguration) { }
///
- /// Generate an invoice in advance for a subscription's next renewal date. [Please see our docs](https://maxio.zendesk.com/hc/en-us/articles/24252026404749-Issue-Invoice-In-Advance) for more information on advance invoices, including eligibility on generating one; for the most part, they function like any other invoice, except they are issued early and have special behavior upon being voided.
+ /// Generate an invoice in advance for a subscription's next renewal date. [See our docs](https://maxio.zendesk.com/hc/en-us/articles/24252026404749-Issue-Invoice-In-Advance) for more information on advance invoices, including eligibility on generating one; for the most part, they function like any other invoice, except they are issued early and have special behavior upon being voided.
/// A subscription may only have one advance invoice per billing period. Attempting to issue an advance invoice when one already exists will return an error.
/// That said, regeneration of the invoice may be forced with the params `force: true`, which will void an advance invoice if one exists and generate a new one. If no advance invoice exists, a new one will be generated.
/// We recommend using either the create or preview endpoints for proforma invoices to preview this advance invoice before using this endpoint to generate it.
@@ -50,7 +50,7 @@ public Models.Invoice IssueAdvanceInvoice(
=> CoreHelper.RunTask(IssueAdvanceInvoiceAsync(subscriptionId, body));
///
- /// Generate an invoice in advance for a subscription's next renewal date. [Please see our docs](https://maxio.zendesk.com/hc/en-us/articles/24252026404749-Issue-Invoice-In-Advance) for more information on advance invoices, including eligibility on generating one; for the most part, they function like any other invoice, except they are issued early and have special behavior upon being voided.
+ /// Generate an invoice in advance for a subscription's next renewal date. [See our docs](https://maxio.zendesk.com/hc/en-us/articles/24252026404749-Issue-Invoice-In-Advance) for more information on advance invoices, including eligibility on generating one; for the most part, they function like any other invoice, except they are issued early and have special behavior upon being voided.
/// A subscription may only have one advance invoice per billing period. Attempting to issue an advance invoice when one already exists will return an error.
/// That said, regeneration of the invoice may be forced with the params `force: true`, which will void an advance invoice if one exists and generate a new one. If no advance invoice exists, a new one will be generated.
/// We recommend using either the create or preview endpoints for proforma invoices to preview this advance invoice before using this endpoint to generate it.
@@ -106,7 +106,7 @@ public Models.Invoice ReadAdvanceInvoice(
///
/// Void a subscription's existing advance invoice. Once voided, it can later be regenerated if desired.
- /// A `reason` is required in order to void, and the invoice must have an open status. Voiding will cause any prepayments and credits that were applied to the invoice to be returned to the subscription. For a full overview of the impact of voiding, please [see our help docs]($m/Invoice).
+ /// A `reason` is required in order to void, and the invoice must have an open status. Voiding will cause any prepayments and credits that were applied to the invoice to be returned to the subscription. For a full overview of the impact of voiding, [see our help docs]($m/Invoice).
///
/// Required parameter: The Chargify id of the subscription.
/// Optional parameter: .
@@ -118,7 +118,7 @@ public Models.Invoice VoidAdvanceInvoice(
///
/// Void a subscription's existing advance invoice. Once voided, it can later be regenerated if desired.
- /// A `reason` is required in order to void, and the invoice must have an open status. Voiding will cause any prepayments and credits that were applied to the invoice to be returned to the subscription. For a full overview of the impact of voiding, please [see our help docs]($m/Invoice).
+ /// A `reason` is required in order to void, and the invoice must have an open status. Voiding will cause any prepayments and credits that were applied to the invoice to be returned to the subscription. For a full overview of the impact of voiding, [see our help docs]($m/Invoice).
///
/// Required parameter: The Chargify id of the subscription.
/// Optional parameter: .
diff --git a/AdvancedBilling.Standard/Controllers/BillingPortalController.cs b/AdvancedBilling.Standard/Controllers/BillingPortalController.cs
index 17fa53a2..65867d7b 100644
--- a/AdvancedBilling.Standard/Controllers/BillingPortalController.cs
+++ b/AdvancedBilling.Standard/Controllers/BillingPortalController.cs
@@ -44,7 +44,7 @@ internal BillingPortalController(GlobalConfiguration globalConfiguration) : base
/// ## Billing Portal Security.
/// If your customer has been invited to the Billing Portal, then they will receive a link to manage their subscription (the “Management URL”) automatically at the bottom of their statements, invoices, and receipts. **This link changes periodically for security and is only valid for 65 days.**.
/// If you need to provide your customer their Management URL through other means, you can retrieve it via the API. Because the URL is cryptographically signed with a timestamp, it is not possible for merchants to generate the URL without requesting it from Advanced Billing.
- /// In order to prevent abuse & overuse, we ask that you request a new URL only when absolutely necessary. Management URLs are good for 65 days, so you should re-use a previously generated one as much as possible. If you use the URL frequently (such as to display on your website), please **do not** make an API request to Advanced Billing every time.
+ /// In order to prevent abuse & overuse, we ask that you request a new URL only when absolutely necessary. Management URLs are good for 65 days, so you should re-use a previously generated one as much as possible. If you use the URL frequently (such as to display on your website), **do not** make an API request to Advanced Billing every time.
/// ]]>
///
/// Required parameter: The Chargify id of the customer.
@@ -64,7 +64,7 @@ public Models.CustomerResponse EnableBillingPortalForCustomer(
/// ## Billing Portal Security.
/// If your customer has been invited to the Billing Portal, then they will receive a link to manage their subscription (the “Management URL”) automatically at the bottom of their statements, invoices, and receipts. **This link changes periodically for security and is only valid for 65 days.**.
/// If you need to provide your customer their Management URL through other means, you can retrieve it via the API. Because the URL is cryptographically signed with a timestamp, it is not possible for merchants to generate the URL without requesting it from Advanced Billing.
- /// In order to prevent abuse & overuse, we ask that you request a new URL only when absolutely necessary. Management URLs are good for 65 days, so you should re-use a previously generated one as much as possible. If you use the URL frequently (such as to display on your website), please **do not** make an API request to Advanced Billing every time.
+ /// In order to prevent abuse & overuse, we ask that you request a new URL only when absolutely necessary. Management URLs are good for 65 days, so you should re-use a previously generated one as much as possible. If you use the URL frequently (such as to display on your website), **do not** make an API request to Advanced Billing every time.
/// ]]>
///
/// Required parameter: The Chargify id of the customer.
diff --git a/AdvancedBilling.Standard/Controllers/ComponentPricePointsController.cs b/AdvancedBilling.Standard/Controllers/ComponentPricePointsController.cs
index fab80825..6694f123 100644
--- a/AdvancedBilling.Standard/Controllers/ComponentPricePointsController.cs
+++ b/AdvancedBilling.Standard/Controllers/ComponentPricePointsController.cs
@@ -176,7 +176,7 @@ public Models.ComponentPricePointsResponse BulkCreateComponentPricePoints(
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
///
- /// When updating a price point, it's prices can be updated as well by creating new prices or editing / removing existing ones.
+ /// When updating a price point, prices can be updated as well by creating new prices or editing / removing existing ones.
/// Passing in a price bracket without an `id` will attempt to create a new price.
/// Including an `id` will update the corresponding price, and including the `_destroy` flag set to true along with the `id` will remove that price.
/// Note: Custom price points cannot be updated directly. They must be edited through the Subscription.
@@ -192,7 +192,7 @@ public Models.ComponentPricePointResponse UpdateComponentPricePoint(
=> CoreHelper.RunTask(UpdateComponentPricePointAsync(componentId, pricePointId, body));
///
- /// When updating a price point, it's prices can be updated as well by creating new prices or editing / removing existing ones.
+ /// When updating a price point, prices can be updated as well by creating new prices or editing / removing existing ones.
/// Passing in a price bracket without an `id` will attempt to create a new price.
/// Including an `id` will update the corresponding price, and including the `_destroy` flag set to true along with the `id` will remove that price.
/// Note: Custom price points cannot be updated directly. They must be edited through the Subscription.
diff --git a/AdvancedBilling.Standard/Controllers/ComponentsController.cs b/AdvancedBilling.Standard/Controllers/ComponentsController.cs
index b27bfe3a..b00799e1 100644
--- a/AdvancedBilling.Standard/Controllers/ComponentsController.cs
+++ b/AdvancedBilling.Standard/Controllers/ComponentsController.cs
@@ -39,7 +39,7 @@ internal ComponentsController(GlobalConfiguration globalConfiguration) : base(gl
/// This request will create a component definition of kind **metered_component** under the specified product family. Metered component can then be added and “allocated” for a subscription.
/// Metered components are used to bill for any type of unit that resets to 0 at the end of the billing period (think daily Google Adwords clicks or monthly cell phone minutes). This is most commonly associated with usage-based billing and many other pricing schemes.
/// Note that this is different from recurring quantity-based components, which DO NOT reset to zero at the start of every billing period. If you want to bill for a quantity of something that does not change unless you change it, then you want quantity components, instead.
- /// For more information on components, please see our documentation [here](https://maxio.zendesk.com/hc/en-us/articles/24261141522189-Components-Overview).
+ /// For more information on components, see our documentation [here](https://maxio.zendesk.com/hc/en-us/articles/24261141522189-Components-Overview).
///
/// Required parameter: Either the product family's id or its handle prefixed with `handle:`.
/// Optional parameter: .
@@ -53,7 +53,7 @@ public Models.ComponentResponse CreateMeteredComponent(
/// This request will create a component definition of kind **metered_component** under the specified product family. Metered component can then be added and “allocated” for a subscription.
/// Metered components are used to bill for any type of unit that resets to 0 at the end of the billing period (think daily Google Adwords clicks or monthly cell phone minutes). This is most commonly associated with usage-based billing and many other pricing schemes.
/// Note that this is different from recurring quantity-based components, which DO NOT reset to zero at the start of every billing period. If you want to bill for a quantity of something that does not change unless you change it, then you want quantity components, instead.
- /// For more information on components, please see our documentation [here](https://maxio.zendesk.com/hc/en-us/articles/24261141522189-Components-Overview).
+ /// For more information on components, see our documentation [here](https://maxio.zendesk.com/hc/en-us/articles/24261141522189-Components-Overview).
///
/// Required parameter: Either the product family's id or its handle prefixed with `handle:`.
/// Optional parameter: .
@@ -84,7 +84,7 @@ public Models.ComponentResponse CreateMeteredComponent(
/// #### One-time.
/// One-time quantity-based components are used to create ad hoc usage charges that do not recur. For example, at the time of signup, you might want to charge your customer a one-time fee for onboarding or other services.
/// The allocated quantity for one-time quantity-based components immediately gets reset back to zero after the allocation is made.
- /// For more information on components, please see our documentation [here](https://maxio.zendesk.com/hc/en-us/articles/24261141522189-Components-Overview).
+ /// For more information on components, see our documentation [here](https://maxio.zendesk.com/hc/en-us/articles/24261141522189-Components-Overview).
///
/// Required parameter: Either the product family's id or its handle prefixed with `handle:`.
/// Optional parameter: .
@@ -102,7 +102,7 @@ public Models.ComponentResponse CreateQuantityBasedComponent(
/// #### One-time.
/// One-time quantity-based components are used to create ad hoc usage charges that do not recur. For example, at the time of signup, you might want to charge your customer a one-time fee for onboarding or other services.
/// The allocated quantity for one-time quantity-based components immediately gets reset back to zero after the allocation is made.
- /// For more information on components, please see our documentation [here](https://maxio.zendesk.com/hc/en-us/articles/24261141522189-Components-Overview).
+ /// For more information on components, see our documentation [here](https://maxio.zendesk.com/hc/en-us/articles/24261141522189-Components-Overview).
///
/// Required parameter: Either the product family's id or its handle prefixed with `handle:`.
/// Optional parameter: .
@@ -128,7 +128,7 @@ public Models.ComponentResponse CreateQuantityBasedComponent(
///
/// This request will create a component definition of kind **on_off_component** under the specified product family. On/Off component can then be added and “allocated” for a subscription.
/// On/off components are used for any flat fee, recurring add on (think $99/month for tech support or a flat add on shipping fee).
- /// For more information on components, please see our documentation [here](https://maxio.zendesk.com/hc/en-us/articles/24261141522189-Components-Overview).
+ /// For more information on components, see our documentation [here](https://maxio.zendesk.com/hc/en-us/articles/24261141522189-Components-Overview).
///
/// Required parameter: Either the product family's id or its handle prefixed with `handle:`.
/// Optional parameter: .
@@ -141,7 +141,7 @@ public Models.ComponentResponse CreateOnOffComponent(
///
/// This request will create a component definition of kind **on_off_component** under the specified product family. On/Off component can then be added and “allocated” for a subscription.
/// On/off components are used for any flat fee, recurring add on (think $99/month for tech support or a flat add on shipping fee).
- /// For more information on components, please see our documentation [here](https://maxio.zendesk.com/hc/en-us/articles/24261141522189-Components-Overview).
+ /// For more information on components, see our documentation [here](https://maxio.zendesk.com/hc/en-us/articles/24261141522189-Components-Overview).
///
/// Required parameter: Either the product family's id or its handle prefixed with `handle:`.
/// Optional parameter: .
@@ -167,7 +167,7 @@ public Models.ComponentResponse CreateOnOffComponent(
///
/// This request will create a component definition of kind **prepaid_usage_component** under the specified product family. Prepaid component can then be added and “allocated” for a subscription.
/// Prepaid components allow customers to pre-purchase units that can be used up over time on their subscription. In a sense, they are the mirror image of metered components; while metered components charge at the end of the period for the amount of units used, prepaid components are charged for at the time of purchase, and we subsequently keep track of the usage against the amount purchased.
- /// For more information on components, please see our documentation [here](https://maxio.zendesk.com/hc/en-us/articles/24261141522189-Components-Overview).
+ /// For more information on components, see our documentation [here](https://maxio.zendesk.com/hc/en-us/articles/24261141522189-Components-Overview).
///
/// Required parameter: Either the product family's id or its handle prefixed with `handle:`.
/// Optional parameter: .
@@ -180,7 +180,7 @@ public Models.ComponentResponse CreatePrepaidUsageComponent(
///
/// This request will create a component definition of kind **prepaid_usage_component** under the specified product family. Prepaid component can then be added and “allocated” for a subscription.
/// Prepaid components allow customers to pre-purchase units that can be used up over time on their subscription. In a sense, they are the mirror image of metered components; while metered components charge at the end of the period for the amount of units used, prepaid components are charged for at the time of purchase, and we subsequently keep track of the usage against the amount purchased.
- /// For more information on components, please see our documentation [here](https://maxio.zendesk.com/hc/en-us/articles/24261141522189-Components-Overview).
+ /// For more information on components, see our documentation [here](https://maxio.zendesk.com/hc/en-us/articles/24261141522189-Components-Overview).
///
/// Required parameter: Either the product family's id or its handle prefixed with `handle:`.
/// Optional parameter: .
@@ -207,7 +207,7 @@ public Models.ComponentResponse CreatePrepaidUsageComponent(
/// This request will create a component definition of kind **event_based_component** under the specified product family. Event-based component can then be added and “allocated” for a subscription.
/// Event-based components are similar to other component types, in that you define the component parameters (such as name and taxability) and the pricing. A key difference for the event-based component is that it must be attached to a metric. This is because the metric provides the component with the actual quantity used in computing what and how much will be billed each period for each subscription.
/// So, instead of reporting usage directly for each component (as you would with metered components), the usage is derived from analysis of your events.
- /// For more information on components, please see our documentation [here](https://maxio.zendesk.com/hc/en-us/articles/24261141522189-Components-Overview).
+ /// For more information on components, see our documentation [here](https://maxio.zendesk.com/hc/en-us/articles/24261141522189-Components-Overview).
///
/// Required parameter: Either the product family's id or its handle prefixed with `handle:`.
/// Optional parameter: .
@@ -221,7 +221,7 @@ public Models.ComponentResponse CreateEventBasedComponent(
/// This request will create a component definition of kind **event_based_component** under the specified product family. Event-based component can then be added and “allocated” for a subscription.
/// Event-based components are similar to other component types, in that you define the component parameters (such as name and taxability) and the pricing. A key difference for the event-based component is that it must be attached to a metric. This is because the metric provides the component with the actual quantity used in computing what and how much will be billed each period for each subscription.
/// So, instead of reporting usage directly for each component (as you would with metered components), the usage is derived from analysis of your events.
- /// For more information on components, please see our documentation [here](https://maxio.zendesk.com/hc/en-us/articles/24261141522189-Components-Overview).
+ /// For more information on components, see our documentation [here](https://maxio.zendesk.com/hc/en-us/articles/24261141522189-Components-Overview).
///
/// Required parameter: Either the product family's id or its handle prefixed with `handle:`.
/// Optional parameter: .
diff --git a/AdvancedBilling.Standard/Controllers/CouponsController.cs b/AdvancedBilling.Standard/Controllers/CouponsController.cs
index 92e3549d..1909b9bf 100644
--- a/AdvancedBilling.Standard/Controllers/CouponsController.cs
+++ b/AdvancedBilling.Standard/Controllers/CouponsController.cs
@@ -38,8 +38,8 @@ internal CouponsController(GlobalConfiguration globalConfiguration) : base(globa
///
///
///
/// List coupons for a specific Product Family in a Site.
- /// If the coupon is set to `use_site_exchange_rate: true`, it will return pricing based on the current exchange rate. If the flag is set to false, it will return all of the defined prices for each currency.
///
/// Object containing request parameters.
/// Returns the List of Models.CouponResponse response from the API call.
@@ -99,7 +98,6 @@ public Models.CouponResponse CreateCoupon(
///
/// List coupons for a specific Product Family in a Site.
- /// If the coupon is set to `use_site_exchange_rate: true`, it will return pricing based on the current exchange rate. If the flag is set to false, it will return all of the defined prices for each currency.
///
/// Object containing request parameters.
/// cancellationToken.
@@ -285,7 +283,6 @@ public Models.CouponResponse ArchiveCoupon(
///
/// You can retrieve a list of coupons.
- /// If the coupon is set to `use_site_exchange_rate: true`, it will return pricing based on the current exchange rate. If the flag is set to false, it will return all of the defined prices for each currency.
///
/// Object containing request parameters.
/// Returns the List of Models.CouponResponse response from the API call.
@@ -295,7 +292,6 @@ public Models.CouponResponse ArchiveCoupon(
///
/// You can retrieve a list of coupons.
- /// If the coupon is set to `use_site_exchange_rate: true`, it will return pricing based on the current exchange rate. If the flag is set to false, it will return all of the defined prices for each currency.
///
/// Object containing request parameters.
/// cancellationToken.
@@ -317,8 +313,8 @@ public Models.CouponResponse ArchiveCoupon(
///
/// This request will provide details about the coupon usage as an array of data hashes, one per product.
///
- /// Required parameter: The Advanced Billing id of the product family to which the coupon belongs.
- /// Required parameter: The Advanced Billing id of the coupon.
+ /// Required parameter: The Advanced Billing id of the product family to which the coupon belongs..
+ /// Required parameter: The Advanced Billing id of the coupon..
/// Returns the List of Models.CouponUsage response from the API call.
public List ReadCouponUsage(
int productFamilyId,
@@ -328,8 +324,8 @@ public Models.CouponResponse ArchiveCoupon(
///
/// This request will provide details about the coupon usage as an array of data hashes, one per product.
///
- /// Required parameter: The Advanced Billing id of the product family to which the coupon belongs.
- /// Required parameter: The Advanced Billing id of the coupon.
+ /// Required parameter: The Advanced Billing id of the product family to which the coupon belongs..
+ /// Required parameter: The Advanced Billing id of the coupon..
/// cancellationToken.
/// Returns the List of Models.CouponUsage response from the API call.
public async Task> ReadCouponUsageAsync(
@@ -459,7 +455,7 @@ public Models.CouponCurrencyResponse CreateOrUpdateCouponCurrencyPrices(
/// When creating a coupon subcode, you must specify a coupon to attach it to using the coupon_id. Valid coupon subcodes are all capital letters, contain only letters and numbers, and do not have any spaces. Lowercase letters will be capitalized before the subcode is created.
/// ## Coupon Subcodes Documentation.
/// Full documentation on how to create coupon subcodes in the Advanced Billing UI can be located [here](https://maxio.zendesk.com/hc/en-us/articles/24261208729229-Coupon-Codes).
- /// Additionally, for documentation on how to apply a coupon to a Subscription within the Advanced Billing UI, please see our documentation [here](https://maxio.zendesk.com/hc/en-us/articles/24261259337101-Coupons-and-Subscriptions).
+ /// Additionally, for documentation on how to apply a coupon to a Subscription within the Advanced Billing UI, see our documentation [here](https://maxio.zendesk.com/hc/en-us/articles/24261259337101-Coupons-and-Subscriptions).
/// ## Create Coupon Subcode.
/// This request allows you to create specific subcodes underneath an existing coupon code.
/// *Note*: If you are using any of the allowed special characters ("%", "@", "+", "-", "_", and "."), you must encode them for use in the URL.
@@ -495,7 +491,7 @@ public Models.CouponSubcodesResponse CreateCouponSubcodes(
/// When creating a coupon subcode, you must specify a coupon to attach it to using the coupon_id. Valid coupon subcodes are all capital letters, contain only letters and numbers, and do not have any spaces. Lowercase letters will be capitalized before the subcode is created.
/// ## Coupon Subcodes Documentation.
/// Full documentation on how to create coupon subcodes in the Advanced Billing UI can be located [here](https://maxio.zendesk.com/hc/en-us/articles/24261208729229-Coupon-Codes).
- /// Additionally, for documentation on how to apply a coupon to a Subscription within the Advanced Billing UI, please see our documentation [here](https://maxio.zendesk.com/hc/en-us/articles/24261259337101-Coupons-and-Subscriptions).
+ /// Additionally, for documentation on how to apply a coupon to a Subscription within the Advanced Billing UI, see our documentation [here](https://maxio.zendesk.com/hc/en-us/articles/24261259337101-Coupons-and-Subscriptions).
/// ## Create Coupon Subcode.
/// This request allows you to create specific subcodes underneath an existing coupon code.
/// *Note*: If you are using any of the allowed special characters ("%", "@", "+", "-", "_", and "."), you must encode them for use in the URL.
diff --git a/AdvancedBilling.Standard/Controllers/CustomFieldsController.cs b/AdvancedBilling.Standard/Controllers/CustomFieldsController.cs
index f01d04bc..09b25dba 100644
--- a/AdvancedBilling.Standard/Controllers/CustomFieldsController.cs
+++ b/AdvancedBilling.Standard/Controllers/CustomFieldsController.cs
@@ -37,21 +37,16 @@ public class CustomFieldsController : BaseController
internal CustomFieldsController(GlobalConfiguration globalConfiguration) : base(globalConfiguration) { }
///
- /// ## Custom Fields: Metafield Intro.
- /// **Advanced Billing refers to Custom Fields in the API documentation as metafields and metadata.** Within the Advanced Billing UI, metadata and metafields are grouped together under the umbrella of "Custom Fields." All of our UI-based documentation that references custom fields will not cite the terminology metafields or metadata.
- /// + **Metafield is the custom field**.
- /// + **Metadata is the data populating the custom field.**.
- /// Advanced Billing Metafields are used to add meaningful attributes to subscription and customer resources. Full documentation on how to create Custom Fields in the Advanced Billing UI can be located [here](https://maxio.zendesk.com/hc/en-us/sections/24266118312589-Custom-Fields). For additional documentation on how to record data within custom fields, please see our subscription-based documentation [here](https://maxio.zendesk.com/hc/en-us/articles/24251701302925-Subscription-Summary-Custom-Fields-Tab).
- /// Metafield are the place where you will set up your resource to accept additional data. It is scoped to the site instead of a specific customer or subscription. Think of it as the key, and Metadata as the value on every record.
- /// ## Create Metafields.
- /// Use this endpoint to create metafields for your Site. Metafields can be populated with metadata after the fact.
- /// Each site is limited to 100 unique Metafields (i.e. keys, or names) per resource. This means you can have 100 Metafields for Subscription and another 100 for Customer.
- /// ### Metafields "On-the-Fly".
- /// It is possible to create Metafields “on the fly” when you create your Metadata – if a non-existent name is passed when creating Metadata, a Metafield for that key will be automatically created. The Metafield API, however, gives you more control over your “keys”.
- /// ### Metafield Scope Warning.
- /// If configuring metafields in the Admin UI or via the API, be careful sending updates to metafields with the scope attribute – **if a partial update is sent it will overwrite the current configuration**.
+ /// Creates metafields on a Site for either the Subscriptions or Customers resource. .
+ /// Metafields and their metadata are created in the Custom Fields configuration page on your Site. Metafields can be populated with metadata when you create them or later with the [Update Metafield]($e/Custom%20Fields/updateMetafield), [Create Metadata]($e/Custom%20Fields/createMetadata), or [Update Metadata]($e/Custom%20Fields/updateMetadata) endpoints. The Create Metadata and Update Metadata endpoints allow you to add metafields and metadata values to a specific subscription or customer.
+ /// Each site is limited to 100 unique metafields per resource. This means you can have 100 metafields for Subscriptions and another 100 for Customers.
+ /// > Note: After creating a metafield, the resource type cannot be modified.
+ /// In the UI and product documentation, metafields and metadata are called Custom Fields. .
+ /// - Metafield is the custom field.
+ /// - Metadata is the data populating the custom field.
+ /// See [Custom Fields Reference](https://docs.maxio.com/hc/en-us/articles/24266140850573-Custom-Fields-Reference) and [Custom Fields Tab](https://maxio.zendesk.com/hc/en-us/articles/24251701302925-Subscription-Summary-Custom-Fields-Tab) for information on using Custom Fields in the Advanced Billing UI.
///
- /// Required parameter: the resource type to which the metafields belong.
+ /// Required parameter: The resource type to which the metafields belong..
/// Optional parameter: .
/// Returns the List of Models.Metafield response from the API call.
public List CreateMetafields(
@@ -60,21 +55,16 @@ internal CustomFieldsController(GlobalConfiguration globalConfiguration) : base(
=> CoreHelper.RunTask(CreateMetafieldsAsync(resourceType, body));
///
- /// ## Custom Fields: Metafield Intro.
- /// **Advanced Billing refers to Custom Fields in the API documentation as metafields and metadata.** Within the Advanced Billing UI, metadata and metafields are grouped together under the umbrella of "Custom Fields." All of our UI-based documentation that references custom fields will not cite the terminology metafields or metadata.
- /// + **Metafield is the custom field**.
- /// + **Metadata is the data populating the custom field.**.
- /// Advanced Billing Metafields are used to add meaningful attributes to subscription and customer resources. Full documentation on how to create Custom Fields in the Advanced Billing UI can be located [here](https://maxio.zendesk.com/hc/en-us/sections/24266118312589-Custom-Fields). For additional documentation on how to record data within custom fields, please see our subscription-based documentation [here](https://maxio.zendesk.com/hc/en-us/articles/24251701302925-Subscription-Summary-Custom-Fields-Tab).
- /// Metafield are the place where you will set up your resource to accept additional data. It is scoped to the site instead of a specific customer or subscription. Think of it as the key, and Metadata as the value on every record.
- /// ## Create Metafields.
- /// Use this endpoint to create metafields for your Site. Metafields can be populated with metadata after the fact.
- /// Each site is limited to 100 unique Metafields (i.e. keys, or names) per resource. This means you can have 100 Metafields for Subscription and another 100 for Customer.
- /// ### Metafields "On-the-Fly".
- /// It is possible to create Metafields “on the fly” when you create your Metadata – if a non-existent name is passed when creating Metadata, a Metafield for that key will be automatically created. The Metafield API, however, gives you more control over your “keys”.
- /// ### Metafield Scope Warning.
- /// If configuring metafields in the Admin UI or via the API, be careful sending updates to metafields with the scope attribute – **if a partial update is sent it will overwrite the current configuration**.
+ /// Creates metafields on a Site for either the Subscriptions or Customers resource. .
+ /// Metafields and their metadata are created in the Custom Fields configuration page on your Site. Metafields can be populated with metadata when you create them or later with the [Update Metafield]($e/Custom%20Fields/updateMetafield), [Create Metadata]($e/Custom%20Fields/createMetadata), or [Update Metadata]($e/Custom%20Fields/updateMetadata) endpoints. The Create Metadata and Update Metadata endpoints allow you to add metafields and metadata values to a specific subscription or customer.
+ /// Each site is limited to 100 unique metafields per resource. This means you can have 100 metafields for Subscriptions and another 100 for Customers.
+ /// > Note: After creating a metafield, the resource type cannot be modified.
+ /// In the UI and product documentation, metafields and metadata are called Custom Fields. .
+ /// - Metafield is the custom field.
+ /// - Metadata is the data populating the custom field.
+ /// See [Custom Fields Reference](https://docs.maxio.com/hc/en-us/articles/24266140850573-Custom-Fields-Reference) and [Custom Fields Tab](https://maxio.zendesk.com/hc/en-us/articles/24251701302925-Subscription-Summary-Custom-Fields-Tab) for information on using Custom Fields in the Advanced Billing UI.
///
- /// Required parameter: the resource type to which the metafields belong.
+ /// Required parameter: The resource type to which the metafields belong..
/// Optional parameter: .
/// cancellationToken.
/// Returns the List of Models.Metafield response from the API call.
@@ -95,7 +85,7 @@ internal CustomFieldsController(GlobalConfiguration globalConfiguration) : base(
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
///
- /// This endpoint lists metafields associated with a site. The metafield description and usage is contained in the response.
+ /// Lists the metafields and their associated details for a Site and resource type. You can filter the request to a specific metafield.
///
/// Object containing request parameters.
/// Returns the Models.ListMetafieldsResponse response from the API call.
@@ -104,7 +94,7 @@ public Models.ListMetafieldsResponse ListMetafields(
=> CoreHelper.RunTask(ListMetafieldsAsync(input));
///
- /// This endpoint lists metafields associated with a site. The metafield description and usage is contained in the response.
+ /// Lists the metafields and their associated details for a Site and resource type. You can filter the request to a specific metafield.
///
/// Object containing request parameters.
/// cancellationToken.
@@ -125,9 +115,22 @@ public Models.ListMetafieldsResponse ListMetafields(
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
///
- /// Use the following method to update metafields for your Site. Metafields can be populated with metadata after the fact.
+ /// Updates metafields on your Site for a resource type. Depending on the request structure, you can update or add metafields and metadata to the Subscriptions or Customers resource.
+ /// With this endpoint, you can: .
+ /// - Add metafields. If the metafield specified in current_name does not exist, a new metafield is added. .
+ /// >Note: Each site is limited to 100 unique metafields per resource. This means you can have 100 metafields for Subscriptions and another 100 for Customers.
+ /// - Change the name of a metafield. .
+ /// >Note: To keep the metafield name the same and only update the metadata for the metafield, you must use the current metafield name in both the `current_name` and `name` parameters.
+ /// - Change the input type for the metafield. For example, you can change a metafield input type from text to a dropdown. If you change the input type from text to a dropdown or radio, you must update the specific subscriptions or customers where the metafield was used to reflect the updated metafield and metadata. .
+ /// - Add metadata values to the existing metadata for a dropdown or radio metafield. .
+ /// >Note: Updates to metadata overwrite. To add one or more values, you must specify all metadata values including the new value you want to add.
+ /// - Add new metadata to a dropdown or radio for a metafield that was created without metadata.
+ /// - Remove metadata for a dropdown or radio for a metafield. .
+ /// >Note: Updates to metadata overwrite existing values. To remove one or more values, specify all metadata values except those you want to remove.
+ /// - Add or update scope settings for a metafield.
+ /// >Note: Scope changes overwrite existing settings. You must specify the complete scope, including the changes you want to make.
///
- /// Required parameter: the resource type to which the metafields belong.
+ /// Required parameter: The resource type to which the metafields belong..
/// Optional parameter: .
/// Returns the List of Models.Metafield response from the API call.
public List UpdateMetafield(
@@ -136,9 +139,22 @@ public Models.ListMetafieldsResponse ListMetafields(
=> CoreHelper.RunTask(UpdateMetafieldAsync(resourceType, body));
///
- /// Use the following method to update metafields for your Site. Metafields can be populated with metadata after the fact.
+ /// Updates metafields on your Site for a resource type. Depending on the request structure, you can update or add metafields and metadata to the Subscriptions or Customers resource.
+ /// With this endpoint, you can: .
+ /// - Add metafields. If the metafield specified in current_name does not exist, a new metafield is added. .
+ /// >Note: Each site is limited to 100 unique metafields per resource. This means you can have 100 metafields for Subscriptions and another 100 for Customers.
+ /// - Change the name of a metafield. .
+ /// >Note: To keep the metafield name the same and only update the metadata for the metafield, you must use the current metafield name in both the `current_name` and `name` parameters.
+ /// - Change the input type for the metafield. For example, you can change a metafield input type from text to a dropdown. If you change the input type from text to a dropdown or radio, you must update the specific subscriptions or customers where the metafield was used to reflect the updated metafield and metadata. .
+ /// - Add metadata values to the existing metadata for a dropdown or radio metafield. .
+ /// >Note: Updates to metadata overwrite. To add one or more values, you must specify all metadata values including the new value you want to add.
+ /// - Add new metadata to a dropdown or radio for a metafield that was created without metadata.
+ /// - Remove metadata for a dropdown or radio for a metafield. .
+ /// >Note: Updates to metadata overwrite existing values. To remove one or more values, specify all metadata values except those you want to remove.
+ /// - Add or update scope settings for a metafield.
+ /// >Note: Scope changes overwrite existing settings. You must specify the complete scope, including the changes you want to make.
///
- /// Required parameter: the resource type to which the metafields belong.
+ /// Required parameter: The resource type to which the metafields belong..
/// Optional parameter: .
/// cancellationToken.
/// Returns the List of Models.Metafield response from the API call.
@@ -159,10 +175,9 @@ public Models.ListMetafieldsResponse ListMetafields(
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
///
- /// Use the following method to delete a metafield. This will remove the metafield from the Site.
- /// Additionally, this will remove the metafield and associated metadata with all Subscriptions on the Site.
+ /// Deletes a metafield from your Site. Removes the metafield and associated metadata from all Subscriptions or Customers resources on the Site.
///
- /// Required parameter: the resource type to which the metafields belong.
+ /// Required parameter: The resource type to which the metafields belong..
/// Optional parameter: The name of the metafield to be deleted.
public void DeleteMetafield(
Models.ResourceType resourceType,
@@ -170,10 +185,9 @@ public void DeleteMetafield(
=> CoreHelper.RunVoidTask(DeleteMetafieldAsync(resourceType, name));
///
- /// Use the following method to delete a metafield. This will remove the metafield from the Site.
- /// Additionally, this will remove the metafield and associated metadata with all Subscriptions on the Site.
+ /// Deletes a metafield from your Site. Removes the metafield and associated metadata from all Subscriptions or Customers resources on the Site.
///
- /// Required parameter: the resource type to which the metafields belong.
+ /// Required parameter: The resource type to which the metafields belong..
/// Optional parameter: The name of the metafield to be deleted.
/// cancellationToken.
/// Returns the void response from the API call.
@@ -193,20 +207,11 @@ public async Task DeleteMetafieldAsync(
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
///
- /// ## Custom Fields: Metadata Intro.
- /// **Advanced Billing refers to Custom Fields in the API documentation as metafields and metadata.** Within the Advanced Billing UI, metadata and metafields are grouped together under the umbrella of "Custom Fields." All of our UI-based documentation that references custom fields will not cite the terminology metafields or metadata.
- /// + **Metafield is the custom field**.
- /// + **Metadata is the data populating the custom field.**.
- /// Advanced Billing Metafields are used to add meaningful attributes to subscription and customer resources. Full documentation on how to create Custom Fields in the Advanced Billing UI can be located [here](https://maxio.zendesk.com/hc/en-us/articles/24266164865677-Custom-Fields-Overview). For additional documentation on how to record data within custom fields, please see our subscription-based documentation [here.](https://maxio.zendesk.com/hc/en-us/articles/24251701302925-Subscription-Summary-Custom-Fields-Tab).
- /// Metadata is associated to a customer or subscription, and corresponds to a Metafield. When creating a new metadata object for a given record, **if the metafield is not present it will be created**.
- /// ## Metadata limits.
- /// Metadata values are limited to 2kB in size. Additonally, there are limits on the number of unique metafields available per resource.
- /// ## Create Metadata.
- /// This method will create a metafield for the site on the fly if it does not already exist, and populate the metadata value.
- /// ### Subscription or Customer Resource.
- /// Please pay special attention to the resource you use when creating metadata.
+ /// Creates metadata and metafields for a specific subscription or customer, or updates metadata values of existing metafields for a subscription or customer. Metadata values are limited to 2 KB in size.
+ /// If you create metadata on a subscription or customer with a metafield that does not already exist, the metafield is created with the metadata you specify and it is always added as a text field. You can update the input_type for the metafield with the [Update Metafield]($e/Custom%20Fields/updateMetafield) endpoint. .
+ /// >Note: Each site is limited to 100 unique metafields per resource. This means you can have 100 metafields for Subscriptions and another 100 for Customers.
///
- /// Required parameter: the resource type to which the metafields belong.
+ /// Required parameter: The resource type to which the metafields belong..
/// Required parameter: The Advanced Billing id of the customer or the subscription for which the metadata applies.
/// Optional parameter: .
/// Returns the List of Models.Metadata response from the API call.
@@ -217,20 +222,11 @@ public async Task DeleteMetafieldAsync(
=> CoreHelper.RunTask(CreateMetadataAsync(resourceType, resourceId, body));
///
- /// ## Custom Fields: Metadata Intro.
- /// **Advanced Billing refers to Custom Fields in the API documentation as metafields and metadata.** Within the Advanced Billing UI, metadata and metafields are grouped together under the umbrella of "Custom Fields." All of our UI-based documentation that references custom fields will not cite the terminology metafields or metadata.
- /// + **Metafield is the custom field**.
- /// + **Metadata is the data populating the custom field.**.
- /// Advanced Billing Metafields are used to add meaningful attributes to subscription and customer resources. Full documentation on how to create Custom Fields in the Advanced Billing UI can be located [here](https://maxio.zendesk.com/hc/en-us/articles/24266164865677-Custom-Fields-Overview). For additional documentation on how to record data within custom fields, please see our subscription-based documentation [here.](https://maxio.zendesk.com/hc/en-us/articles/24251701302925-Subscription-Summary-Custom-Fields-Tab).
- /// Metadata is associated to a customer or subscription, and corresponds to a Metafield. When creating a new metadata object for a given record, **if the metafield is not present it will be created**.
- /// ## Metadata limits.
- /// Metadata values are limited to 2kB in size. Additonally, there are limits on the number of unique metafields available per resource.
- /// ## Create Metadata.
- /// This method will create a metafield for the site on the fly if it does not already exist, and populate the metadata value.
- /// ### Subscription or Customer Resource.
- /// Please pay special attention to the resource you use when creating metadata.
+ /// Creates metadata and metafields for a specific subscription or customer, or updates metadata values of existing metafields for a subscription or customer. Metadata values are limited to 2 KB in size.
+ /// If you create metadata on a subscription or customer with a metafield that does not already exist, the metafield is created with the metadata you specify and it is always added as a text field. You can update the input_type for the metafield with the [Update Metafield]($e/Custom%20Fields/updateMetafield) endpoint. .
+ /// >Note: Each site is limited to 100 unique metafields per resource. This means you can have 100 metafields for Subscriptions and another 100 for Customers.
///
- /// Required parameter: the resource type to which the metafields belong.
+ /// Required parameter: The resource type to which the metafields belong..
/// Required parameter: The Advanced Billing id of the customer or the subscription for which the metadata applies.
/// Optional parameter: .
/// cancellationToken.
@@ -254,9 +250,7 @@ public async Task DeleteMetafieldAsync(
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
///
- /// This request will list all of the metadata belonging to a particular resource (ie. subscription, customer) that is specified.
- /// ## Metadata Data.
- /// This endpoint will also display the current stats of your metadata to use as a tool for pagination.
+ /// Lists metadata and metafields for a specific customer or subscription.
///
/// Object containing request parameters.
/// Returns the Models.PaginatedMetadata response from the API call.
@@ -265,9 +259,7 @@ public Models.PaginatedMetadata ListMetadata(
=> CoreHelper.RunTask(ListMetadataAsync(input));
///
- /// This request will list all of the metadata belonging to a particular resource (ie. subscription, customer) that is specified.
- /// ## Metadata Data.
- /// This endpoint will also display the current stats of your metadata to use as a tool for pagination.
+ /// Lists metadata and metafields for a specific customer or subscription.
///
/// Object containing request parameters.
/// cancellationToken.
@@ -287,9 +279,11 @@ public Models.PaginatedMetadata ListMetadata(
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
///
- /// This method allows you to update the existing metadata associated with a subscription or customer.
+ /// Updates metadata and metafields on the Site and the customer or subscription specified, and updates the metadata value on a subscription or customer.
+ /// If you update metadata on a subscription or customer with a metafield that does not already exist, the metafield is created with the metadata you specify and it is always added as a text field to the Site and to the subscription or customer you specify. You can update the input_type for the metafield with the Update Metafield endpoint. .
+ /// Each site is limited to 100 unique metafields per resource. This means you can have 100 metafields for Subscription and another 100 for Customer.
///
- /// Required parameter: the resource type to which the metafields belong.
+ /// Required parameter: The resource type to which the metafields belong..
/// Required parameter: The Advanced Billing id of the customer or the subscription for which the metadata applies.
/// Optional parameter: .
/// Returns the List of Models.Metadata response from the API call.
@@ -300,9 +294,11 @@ public Models.PaginatedMetadata ListMetadata(
=> CoreHelper.RunTask(UpdateMetadataAsync(resourceType, resourceId, body));
///
- /// This method allows you to update the existing metadata associated with a subscription or customer.
+ /// Updates metadata and metafields on the Site and the customer or subscription specified, and updates the metadata value on a subscription or customer.
+ /// If you update metadata on a subscription or customer with a metafield that does not already exist, the metafield is created with the metadata you specify and it is always added as a text field to the Site and to the subscription or customer you specify. You can update the input_type for the metafield with the Update Metafield endpoint. .
+ /// Each site is limited to 100 unique metafields per resource. This means you can have 100 metafields for Subscription and another 100 for Customer.
///
- /// Required parameter: the resource type to which the metafields belong.
+ /// Required parameter: The resource type to which the metafields belong..
/// Required parameter: The Advanced Billing id of the customer or the subscription for which the metadata applies.
/// Optional parameter: .
/// cancellationToken.
@@ -326,24 +322,9 @@ public Models.PaginatedMetadata ListMetadata(
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
///
- ///
+ /// Deletes one or more metafields (and associated metadata) from the specified subscription or customer.
///
- /// Required parameter: the resource type to which the metafields belong.
+ /// Required parameter: The resource type to which the metafields belong..
/// Required parameter: The Advanced Billing id of the customer or the subscription for which the metadata applies.
/// Optional parameter: Name of field to be removed..
///
@@ -355,24 +336,9 @@ public void DeleteMetadata(
=> CoreHelper.RunVoidTask(DeleteMetadataAsync(resourceType, resourceId, name, names));
///
- ///
+ /// Deletes one or more metafields (and associated metadata) from the specified subscription or customer.
///
- /// Required parameter: the resource type to which the metafields belong.
+ /// Required parameter: The resource type to which the metafields belong..
/// Required parameter: The Advanced Billing id of the customer or the subscription for which the metadata applies.
/// Optional parameter: Name of field to be removed..
///
@@ -398,15 +364,7 @@ public async Task DeleteMetadataAsync(
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
///
- ///
+ /// Lists metadata for a specified array of subscriptions or customers.
///
/// Object containing request parameters.
/// Returns the Models.PaginatedMetadata response from the API call.
@@ -415,15 +373,7 @@ public Models.PaginatedMetadata ListMetadataForResourceType(
=> CoreHelper.RunTask(ListMetadataForResourceTypeAsync(input));
///
- ///
+ /// Lists metadata for a specified array of subscriptions or customers.
///
/// Object containing request parameters.
/// cancellationToken.
diff --git a/AdvancedBilling.Standard/Controllers/CustomersController.cs b/AdvancedBilling.Standard/Controllers/CustomersController.cs
index 64bd725d..11da4f44 100644
--- a/AdvancedBilling.Standard/Controllers/CustomersController.cs
+++ b/AdvancedBilling.Standard/Controllers/CustomersController.cs
@@ -41,11 +41,11 @@ internal CustomersController(GlobalConfiguration globalConfiguration) : base(glo
/// Full documentation on how to locate, create and edit Customers in the Advanced Billing UI can be located [here](https://maxio.zendesk.com/hc/en-us/articles/24252190590093-Customer-Details).
/// ## Required Country Format.
/// Advanced Billing requires that you use the ISO Standard Country codes when formatting country attribute of the customer.
- /// Countries should be formatted as 2 characters. For more information, please see the following wikipedia article on [ISO_3166-1.](http://en.wikipedia.org/wiki/ISO_3166-1#Current_codes).
+ /// Countries should be formatted as 2 characters. For more information, see the following wikipedia article on [ISO_3166-1.](http://en.wikipedia.org/wiki/ISO_3166-1#Current_codes).
/// ## Required State Format.
/// Advanced Billing requires that you use the ISO Standard State codes when formatting state attribute of the customer.
/// + US States (2 characters): [ISO_3166-2](https://en.wikipedia.org/wiki/ISO_3166-2:US).
- /// + States Outside the US (2-3 characters): To find the correct state codes outside of the US, please go to [ISO_3166-1](http://en.wikipedia.org/wiki/ISO_3166-1#Current_codes) and click on the link in the “ISO 3166-2 codes” column next to country you wish to populate.
+ /// + States Outside the US (2-3 characters): To find the correct state codes outside of the US, go to [ISO_3166-1](http://en.wikipedia.org/wiki/ISO_3166-1#Current_codes) and click on the link in the “ISO 3166-2 codes” column next to country you wish to populate.
/// ## Locale.
/// Advanced Billing allows you to attribute a language/region to your customer to deliver invoices in any required language.
/// For more: [Customer Locale](https://maxio.zendesk.com/hc/en-us/articles/24286672013709-Customer-Locale).
@@ -62,11 +62,11 @@ public Models.CustomerResponse CreateCustomer(
/// Full documentation on how to locate, create and edit Customers in the Advanced Billing UI can be located [here](https://maxio.zendesk.com/hc/en-us/articles/24252190590093-Customer-Details).
/// ## Required Country Format.
/// Advanced Billing requires that you use the ISO Standard Country codes when formatting country attribute of the customer.
- /// Countries should be formatted as 2 characters. For more information, please see the following wikipedia article on [ISO_3166-1.](http://en.wikipedia.org/wiki/ISO_3166-1#Current_codes).
+ /// Countries should be formatted as 2 characters. For more information, see the following wikipedia article on [ISO_3166-1.](http://en.wikipedia.org/wiki/ISO_3166-1#Current_codes).
/// ## Required State Format.
/// Advanced Billing requires that you use the ISO Standard State codes when formatting state attribute of the customer.
/// + US States (2 characters): [ISO_3166-2](https://en.wikipedia.org/wiki/ISO_3166-2:US).
- /// + States Outside the US (2-3 characters): To find the correct state codes outside of the US, please go to [ISO_3166-1](http://en.wikipedia.org/wiki/ISO_3166-1#Current_codes) and click on the link in the “ISO 3166-2 codes” column next to country you wish to populate.
+ /// + States Outside the US (2-3 characters): To find the correct state codes outside of the US, go to [ISO_3166-1](http://en.wikipedia.org/wiki/ISO_3166-1#Current_codes) and click on the link in the “ISO 3166-2 codes” column next to country you wish to populate.
/// ## Locale.
/// Advanced Billing allows you to attribute a language/region to your customer to deliver invoices in any required language.
/// For more: [Customer Locale](https://maxio.zendesk.com/hc/en-us/articles/24286672013709-Customer-Locale).
@@ -98,7 +98,7 @@ public Models.CustomerResponse CreateCustomer(
/// + Search by an organization.
/// + Search by a reference value from your application.
/// + Search by a first or last name.
- /// To retrieve a single, exact match by reference, please use the [lookup endpoint](https://developers.chargify.com/docs/api-docs/b710d8fbef104-read-customer-by-reference).
+ /// To retrieve a single, exact match by reference, use the [lookup endpoint](https://developers.chargify.com/docs/api-docs/b710d8fbef104-read-customer-by-reference).
///
/// Object containing request parameters.
/// Returns the List of Models.CustomerResponse response from the API call.
@@ -116,7 +116,7 @@ public Models.CustomerResponse CreateCustomer(
/// + Search by an organization.
/// + Search by a reference value from your application.
/// + Search by a first or last name.
- /// To retrieve a single, exact match by reference, please use the [lookup endpoint](https://developers.chargify.com/docs/api-docs/b710d8fbef104-read-customer-by-reference).
+ /// To retrieve a single, exact match by reference, use the [lookup endpoint](https://developers.chargify.com/docs/api-docs/b710d8fbef104-read-customer-by-reference).
///
/// Object containing request parameters.
/// cancellationToken.
diff --git a/AdvancedBilling.Standard/Controllers/InvoicesController.cs b/AdvancedBilling.Standard/Controllers/InvoicesController.cs
index 76f24dc2..8d6fb3aa 100644
--- a/AdvancedBilling.Standard/Controllers/InvoicesController.cs
+++ b/AdvancedBilling.Standard/Controllers/InvoicesController.cs
@@ -625,11 +625,42 @@ public Models.ConsolidatedInvoice ListConsolidatedInvoiceSegments(
/// ].
/// .
/// ```.
+ /// #### Using Coupon Subcodes.
+ /// You can also use coupon subcodes to apply existing coupons with specific subcodes:.
+ /// ```json.
+ /// .
+ /// "coupons": [.
+ /// {.
+ /// "subcode": "SUB1",.
+ /// "product_family_id": 1.
+ /// }.
+ /// ].
+ /// .
+ /// ```.
+ /// **Important:** You cannot specify both `code` and `subcode` for the same coupon. Use either:.
+ /// - `code` to apply a main coupon.
+ /// - `subcode` to apply a specific coupon subcode.
+ /// The API response will include both the main coupon code and the subcode used:.
+ /// ```json.
+ /// .
+ /// "coupons": [.
+ /// {.
+ /// "code": "MAIN123",.
+ /// "subcode": "SUB1",.
+ /// "product_family_id": 1,.
+ /// "percentage": 10,.
+ /// "description": "Special discount".
+ /// }.
+ /// ].
+ /// .
+ /// ```.
/// ### Coupon options.
/// #### Code.
/// Coupon `code` will be displayed on invoice discount section.
/// Coupon code can only contain uppercase letters, numbers, and allowed special characters.
/// Lowercase letters will be converted to uppercase. It can be used to select an existing coupon from the catalog, or as an ad hoc coupon when passed with `percentage` or `amount`.
+ /// #### Subcode.
+ /// Coupon `subcode` allows you to apply existing coupons using their subcodes. When a subcode is used, the API response will include both the main coupon code and the specific subcode that was applied. Subcodes are case-insensitive and will be converted to uppercase automatically.
/// #### Percentage.
/// Coupon `percentage` can take values from 0 to 100 and up to 4 decimal places. It cannot be used with `amount`. Only for ad hoc coupons, will be ignored if `code` is used to select an existing coupon from the catalog.
/// #### Amount.
@@ -661,7 +692,7 @@ public Models.ConsolidatedInvoice ListConsolidatedInvoiceSegments(
/// #### Net Terms.
/// By default, invoices will be created with a due date matching the date of invoice creation. If a different due date is desired, the `net_terms` parameter can be sent indicating the number of days in advance the due date should be.
/// #### Addresses.
- /// The seller, shipping and billing addresses can be sent to override the site's defaults. Each address requires to send a `first_name` at a minimum in order to work. Please see below for the details on which parameters can be sent for each address object.
+ /// The seller, shipping and billing addresses can be sent to override the site's defaults. Each address requires to send a `first_name` at a minimum in order to work. See below for the details on which parameters can be sent for each address object.
/// #### Memo and Payment Instructions.
/// A custom memo can be sent with the `memo` parameter to override the site's default. Likewise, custom payment instructions can be sent with the `payment_instrucions` parameter.
/// #### Status.
@@ -746,11 +777,42 @@ public Models.InvoiceResponse CreateInvoice(
/// ].
/// .
/// ```.
+ /// #### Using Coupon Subcodes.
+ /// You can also use coupon subcodes to apply existing coupons with specific subcodes:.
+ /// ```json.
+ /// .
+ /// "coupons": [.
+ /// {.
+ /// "subcode": "SUB1",.
+ /// "product_family_id": 1.
+ /// }.
+ /// ].
+ /// .
+ /// ```.
+ /// **Important:** You cannot specify both `code` and `subcode` for the same coupon. Use either:.
+ /// - `code` to apply a main coupon.
+ /// - `subcode` to apply a specific coupon subcode.
+ /// The API response will include both the main coupon code and the subcode used:.
+ /// ```json.
+ /// .
+ /// "coupons": [.
+ /// {.
+ /// "code": "MAIN123",.
+ /// "subcode": "SUB1",.
+ /// "product_family_id": 1,.
+ /// "percentage": 10,.
+ /// "description": "Special discount".
+ /// }.
+ /// ].
+ /// .
+ /// ```.
/// ### Coupon options.
/// #### Code.
/// Coupon `code` will be displayed on invoice discount section.
/// Coupon code can only contain uppercase letters, numbers, and allowed special characters.
/// Lowercase letters will be converted to uppercase. It can be used to select an existing coupon from the catalog, or as an ad hoc coupon when passed with `percentage` or `amount`.
+ /// #### Subcode.
+ /// Coupon `subcode` allows you to apply existing coupons using their subcodes. When a subcode is used, the API response will include both the main coupon code and the specific subcode that was applied. Subcodes are case-insensitive and will be converted to uppercase automatically.
/// #### Percentage.
/// Coupon `percentage` can take values from 0 to 100 and up to 4 decimal places. It cannot be used with `amount`. Only for ad hoc coupons, will be ignored if `code` is used to select an existing coupon from the catalog.
/// #### Amount.
@@ -782,7 +844,7 @@ public Models.InvoiceResponse CreateInvoice(
/// #### Net Terms.
/// By default, invoices will be created with a due date matching the date of invoice creation. If a different due date is desired, the `net_terms` parameter can be sent indicating the number of days in advance the due date should be.
/// #### Addresses.
- /// The seller, shipping and billing addresses can be sent to override the site's defaults. Each address requires to send a `first_name` at a minimum in order to work. Please see below for the details on which parameters can be sent for each address object.
+ /// The seller, shipping and billing addresses can be sent to override the site's defaults. Each address requires to send a `first_name` at a minimum in order to work. See below for the details on which parameters can be sent for each address object.
/// #### Memo and Payment Instructions.
/// A custom memo can be sent with the `memo` parameter to override the site's default. Likewise, custom payment instructions can be sent with the `payment_instrucions` parameter.
/// #### Status.
@@ -810,8 +872,8 @@ public Models.InvoiceResponse CreateInvoice(
///
/// This endpoint allows for invoices to be programmatically delivered via email. This endpoint supports the delivery of both ad-hoc and automatically generated invoices. Additionally, this endpoint supports email delivery to direct recipients, carbon-copy (cc) recipients, and blind carbon-copy (bcc) recipients.
- /// Please note that if no recipient email addresses are specified in the request, then the subscription's default email configuration will be used. For example, if `recipient_emails` is left blank, then the invoice will be delivered to the subscription's customer email address.
- /// On success, a 204 no-content response will be returned. Please note that this does not indicate that email(s) have been delivered, but instead indicates that emails have been successfully queued for delivery. If _any_ invalid or malformed email address is found in the request body, the entire request will be rejected and a 422 response will be returned.
+ /// If no recipient email addresses are specified in the request, then the subscription's default email configuration will be used. For example, if `recipient_emails` is left blank, then the invoice will be delivered to the subscription's customer email address.
+ /// On success, a 204 no-content response will be returned. The response does not indicate that email(s) have been delivered, but instead indicates that emails have been successfully queued for delivery. If _any_ invalid or malformed email address is found in the request body, the entire request will be rejected and a 422 response will be returned.
///
/// Required parameter: The unique identifier for the invoice, this does not refer to the public facing invoice number..
/// Optional parameter: .
@@ -822,8 +884,8 @@ public void SendInvoice(
///
/// This endpoint allows for invoices to be programmatically delivered via email. This endpoint supports the delivery of both ad-hoc and automatically generated invoices. Additionally, this endpoint supports email delivery to direct recipients, carbon-copy (cc) recipients, and blind carbon-copy (bcc) recipients.
- /// Please note that if no recipient email addresses are specified in the request, then the subscription's default email configuration will be used. For example, if `recipient_emails` is left blank, then the invoice will be delivered to the subscription's customer email address.
- /// On success, a 204 no-content response will be returned. Please note that this does not indicate that email(s) have been delivered, but instead indicates that emails have been successfully queued for delivery. If _any_ invalid or malformed email address is found in the request body, the entire request will be rejected and a 422 response will be returned.
+ /// If no recipient email addresses are specified in the request, then the subscription's default email configuration will be used. For example, if `recipient_emails` is left blank, then the invoice will be delivered to the subscription's customer email address.
+ /// On success, a 204 no-content response will be returned. The response does not indicate that email(s) have been delivered, but instead indicates that emails have been successfully queued for delivery. If _any_ invalid or malformed email address is found in the request body, the entire request will be rejected and a 422 response will be returned.
///
/// Required parameter: The unique identifier for the invoice, this does not refer to the public facing invoice number..
/// Optional parameter: .
diff --git a/AdvancedBilling.Standard/Controllers/PaymentProfilesController.cs b/AdvancedBilling.Standard/Controllers/PaymentProfilesController.cs
index 6d082dfc..cb3893ec 100644
--- a/AdvancedBilling.Standard/Controllers/PaymentProfilesController.cs
+++ b/AdvancedBilling.Standard/Controllers/PaymentProfilesController.cs
@@ -37,179 +37,29 @@ internal PaymentProfilesController(GlobalConfiguration globalConfiguration) : ba
///
///
///
/// Optional parameter: When following the IBAN or the Local Bank details examples, a customer, bank account and mandate will be created in your current vault. If the customer, bank account, and mandate already exist in your vault, follow the Import example to link the payment profile into Advanced Billing..
@@ -253,179 +105,29 @@ public Models.PaymentProfileResponse CreatePaymentProfile(
///
///
///
/// Optional parameter: When following the IBAN or the Local Bank details examples, a customer, bank account and mandate will be created in your current vault. If the customer, bank account, and mandate already exist in your vault, follow the Import example to link the payment profile into Advanced Billing..
@@ -509,7 +213,7 @@ public Models.PaymentProfileResponse CreatePaymentProfile(
///
/// Using the GET method you can retrieve a Payment Profile identified by its unique ID.
- /// Please note that a different JSON object will be returned if the card method on file is a bank account.
+ /// Note that a different JSON object will be returned if the card method on file is a bank account.
/// ### Response for Bank Account.
/// Example response for Bank Account:.
/// ```.
@@ -550,7 +254,7 @@ public Models.PaymentProfileResponse ReadPaymentProfile(
///
/// Using the GET method you can retrieve a Payment Profile identified by its unique ID.
- /// Please note that a different JSON object will be returned if the card method on file is a bank account.
+ /// Note that a different JSON object will be returned if the card method on file is a bank account.
/// ### Response for Bank Account.
/// Example response for Bank Account:.
/// ```.
diff --git a/AdvancedBilling.Standard/Controllers/ProductFamiliesController.cs b/AdvancedBilling.Standard/Controllers/ProductFamiliesController.cs
index 7704012c..813382f0 100644
--- a/AdvancedBilling.Standard/Controllers/ProductFamiliesController.cs
+++ b/AdvancedBilling.Standard/Controllers/ProductFamiliesController.cs
@@ -36,7 +36,7 @@ public class ProductFamiliesController : BaseController
internal ProductFamiliesController(GlobalConfiguration globalConfiguration) : base(globalConfiguration) { }
///
- /// This method allows to retrieve a list of Products belonging to a Product Family.
+ /// Retrieves a list of Products belonging to a Product Family.
///
/// Object containing request parameters.
/// Returns the List of Models.ProductResponse response from the API call.
@@ -45,7 +45,7 @@ internal ProductFamiliesController(GlobalConfiguration globalConfiguration) : ba
=> CoreHelper.RunTask(ListProductsForProductFamilyAsync(input));
///
- /// This method allows to retrieve a list of Products belonging to a Product Family.
+ /// Retrieves a list of Products belonging to a Product Family.
///
/// Object containing request parameters.
/// cancellationToken.
@@ -74,7 +74,7 @@ internal ProductFamiliesController(GlobalConfiguration globalConfiguration) : ba
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
///
- /// This method will create a Product Family within your Advanced Billing site. Create a Product Family to act as a container for your products, components and coupons.
+ /// Creates a Product Family within your Advanced Billing site. Create a Product Family to act as a container for your products, components and coupons.
/// Full documentation on how Product Families operate within the Advanced Billing UI can be located [here](https://maxio.zendesk.com/hc/en-us/articles/24261098936205-Product-Families).
///
/// Optional parameter: .
@@ -84,7 +84,7 @@ public Models.ProductFamilyResponse CreateProductFamily(
=> CoreHelper.RunTask(CreateProductFamilyAsync(body));
///
- /// This method will create a Product Family within your Advanced Billing site. Create a Product Family to act as a container for your products, components and coupons.
+ /// Creates a Product Family within your Advanced Billing site. Create a Product Family to act as a container for your products, components and coupons.
/// Full documentation on how Product Families operate within the Advanced Billing UI can be located [here](https://maxio.zendesk.com/hc/en-us/articles/24261098936205-Product-Families).
///
/// Optional parameter: .
@@ -105,7 +105,7 @@ public Models.ProductFamilyResponse CreateProductFamily(
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
///
- /// This method allows to retrieve a list of Product Families for a site.
+ /// Retrieve a list of Product Families for a site.
///
/// Object containing request parameters.
/// Returns the List of Models.ProductFamilyResponse response from the API call.
@@ -114,7 +114,7 @@ public Models.ProductFamilyResponse CreateProductFamily(
=> CoreHelper.RunTask(ListProductFamiliesAsync(input));
///
- /// This method allows to retrieve a list of Product Families for a site.
+ /// Retrieve a list of Product Families for a site.
///
/// Object containing request parameters.
/// cancellationToken.
@@ -135,7 +135,7 @@ public Models.ProductFamilyResponse CreateProductFamily(
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
///
- /// This method allows to retrieve a Product Family via the `product_family_id`. The response will contain a Product Family object.
+ /// Retrieves a Product Family via the `product_family_id`. The response will contain a Product Family object.
/// The product family can be specified either with the id number, or with the `handle:my-family` format.
///
/// Required parameter: The Advanced Billing id of the product family.
@@ -145,7 +145,7 @@ public Models.ProductFamilyResponse ReadProductFamily(
=> CoreHelper.RunTask(ReadProductFamilyAsync(id));
///
- /// This method allows to retrieve a Product Family via the `product_family_id`. The response will contain a Product Family object.
+ /// Retrieves a Product Family via the `product_family_id`. The response will contain a Product Family object.
/// The product family can be specified either with the id number, or with the `handle:my-family` format.
///
/// Required parameter: The Advanced Billing id of the product family.
diff --git a/AdvancedBilling.Standard/Controllers/ProductPricePointsController.cs b/AdvancedBilling.Standard/Controllers/ProductPricePointsController.cs
index 771dd316..b1e18c6e 100644
--- a/AdvancedBilling.Standard/Controllers/ProductPricePointsController.cs
+++ b/AdvancedBilling.Standard/Controllers/ProductPricePointsController.cs
@@ -37,7 +37,7 @@ public class ProductPricePointsController : BaseController
internal ProductPricePointsController(GlobalConfiguration globalConfiguration) : base(globalConfiguration) { }
///
- /// [Product Price Point Documentation](https://maxio.zendesk.com/hc/en-us/articles/24261111947789-Product-Price-Points).
+ /// Creates a Product Price Point. See the [Product Price Point](https://maxio.zendesk.com/hc/en-us/articles/24261111947789-Product-Price-Points) documentation for details.
///
/// Required parameter: The id or handle of the product. When using the handle, it must be prefixed with `handle:`.
/// Optional parameter: .
@@ -48,7 +48,7 @@ public Models.ProductPricePointResponse CreateProductPricePoint(
=> CoreHelper.RunTask(CreateProductPricePointAsync(productId, body));
///
- /// [Product Price Point Documentation](https://maxio.zendesk.com/hc/en-us/articles/24261111947789-Product-Price-Points).
+ /// Creates a Product Price Point. See the [Product Price Point](https://maxio.zendesk.com/hc/en-us/articles/24261111947789-Product-Price-Points) documentation for details.
///
/// Required parameter: The id or handle of the product. When using the handle, it must be prefixed with `handle:`.
/// Optional parameter: .
@@ -71,7 +71,7 @@ public Models.ProductPricePointResponse CreateProductPricePoint(
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
///
- /// Use this endpoint to retrieve a list of product price points.
+ /// Retrieves a list of product price points.
///
/// Object containing request parameters.
/// Returns the Models.ListProductPricePointsResponse response from the API call.
@@ -80,7 +80,7 @@ public Models.ListProductPricePointsResponse ListProductPricePoints(
=> CoreHelper.RunTask(ListProductPricePointsAsync(input));
///
- /// Use this endpoint to retrieve a list of product price points.
+ /// Retrieves a list of product price points.
///
/// Object containing request parameters.
/// cancellationToken.
@@ -102,8 +102,8 @@ public Models.ListProductPricePointsResponse ListProductPricePoints(
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
///
- /// Use this endpoint to update a product price point.
- /// Note: Custom product price points are not able to be updated.
+ /// Updates a product price point.
+ /// Note: Custom product price points cannot be updated.
///
/// Required parameter: The id or handle of the product. When using the handle, it must be prefixed with `handle:`. Example: `123` for an integer ID, or `handle:example-product-handle` for a string handle..
/// Required parameter: The id or handle of the price point. When using the handle, it must be prefixed with `handle:`. Example: `123` for an integer ID, or `handle:example-product-price-point-handle` for a string handle..
@@ -116,8 +116,8 @@ public Models.ProductPricePointResponse UpdateProductPricePoint(
=> CoreHelper.RunTask(UpdateProductPricePointAsync(productId, pricePointId, body));
///
- /// Use this endpoint to update a product price point.
- /// Note: Custom product price points are not able to be updated.
+ /// Updates a product price point.
+ /// Note: Custom product price points cannot be updated.
///
/// Required parameter: The id or handle of the product. When using the handle, it must be prefixed with `handle:`. Example: `123` for an integer ID, or `handle:example-product-handle` for a string handle..
/// Required parameter: The id or handle of the price point. When using the handle, it must be prefixed with `handle:`. Example: `123` for an integer ID, or `handle:example-product-price-point-handle` for a string handle..
@@ -177,7 +177,7 @@ public Models.ProductPricePointResponse ReadProductPricePoint(
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
///
- /// Use this endpoint to archive a product price point.
+ /// Archives a product price point.
///
/// Required parameter: The id or handle of the product. When using the handle, it must be prefixed with `handle:`. Example: `123` for an integer ID, or `handle:example-product-handle` for a string handle..
/// Required parameter: The id or handle of the price point. When using the handle, it must be prefixed with `handle:`. Example: `123` for an integer ID, or `handle:example-product-price-point-handle` for a string handle..
@@ -188,7 +188,7 @@ public Models.ProductPricePointResponse ArchiveProductPricePoint(
=> CoreHelper.RunTask(ArchiveProductPricePointAsync(productId, pricePointId));
///
- /// Use this endpoint to archive a product price point.
+ /// Archives a product price point.
///
/// Required parameter: The id or handle of the product. When using the handle, it must be prefixed with `handle:`. Example: `123` for an integer ID, or `handle:example-product-handle` for a string handle..
/// Required parameter: The id or handle of the price point. When using the handle, it must be prefixed with `handle:`. Example: `123` for an integer ID, or `handle:example-product-price-point-handle` for a string handle..
@@ -241,8 +241,8 @@ public Models.ProductPricePointResponse UnarchiveProductPricePoint(
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
///
- /// Use this endpoint to make a product price point the default for the product.
- /// Note: Custom product price points are not able to be set as the default for a product.
+ /// Sets a product price point as the default for the product.
+ /// Note: Custom product price points cannot be set as the default for a product.
///
/// Required parameter: The Advanced Billing id of the product to which the price point belongs.
/// Required parameter: The Advanced Billing id of the product price point.
@@ -253,8 +253,8 @@ public Models.ProductResponse PromoteProductPricePointToDefault(
=> CoreHelper.RunTask(PromoteProductPricePointToDefaultAsync(productId, pricePointId));
///
- /// Use this endpoint to make a product price point the default for the product.
- /// Note: Custom product price points are not able to be set as the default for a product.
+ /// Sets a product price point as the default for the product.
+ /// Note: Custom product price points cannot be set as the default for a product.
///
/// Required parameter: The Advanced Billing id of the product to which the price point belongs.
/// Required parameter: The Advanced Billing id of the product price point.
@@ -274,7 +274,7 @@ public Models.ProductResponse PromoteProductPricePointToDefault(
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
///
- /// Use this endpoint to create multiple product price points in one request.
+ /// Creates multiple product price points in one request.
///
/// Required parameter: The Advanced Billing id of the product to which the price points belong.
/// Optional parameter: .
@@ -285,7 +285,7 @@ public Models.BulkCreateProductPricePointsResponse BulkCreateProductPricePoints(
=> CoreHelper.RunTask(BulkCreateProductPricePointsAsync(productId, body));
///
- /// Use this endpoint to create multiple product price points in one request.
+ /// Creates multiple product price points in one request.
///
/// Required parameter: The Advanced Billing id of the product to which the price points belong.
/// Optional parameter: .
@@ -308,7 +308,7 @@ public Models.BulkCreateProductPricePointsResponse BulkCreateProductPricePoints(
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
///
- /// This endpoint allows you to create currency prices for a given currency that has been defined on the site level in your settings.
+ /// Creates currency prices for a given currency that has been defined on the site level in your settings.
/// When creating currency prices, they need to mirror the structure of your primary pricing. If the product price point defines a trial and/or setup fee, each currency must also define a trial and/or setup fee.
/// Note: Currency Prices are not able to be created for custom product price points.
///
@@ -321,7 +321,7 @@ public Models.CurrencyPricesResponse CreateProductCurrencyPrices(
=> CoreHelper.RunTask(CreateProductCurrencyPricesAsync(productPricePointId, body));
///
- /// This endpoint allows you to create currency prices for a given currency that has been defined on the site level in your settings.
+ /// Creates currency prices for a given currency that has been defined on the site level in your settings.
/// When creating currency prices, they need to mirror the structure of your primary pricing. If the product price point defines a trial and/or setup fee, each currency must also define a trial and/or setup fee.
/// Note: Currency Prices are not able to be created for custom product price points.
///
@@ -346,9 +346,9 @@ public Models.CurrencyPricesResponse CreateProductCurrencyPrices(
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
///
- /// This endpoint allows you to update the `price`s of currency prices for a given currency that exists on the product price point.
+ /// Updates the `price`s of currency prices for a given currency that exists on the product price point.
/// When updating the pricing, it needs to mirror the structure of your primary pricing. If the product price point defines a trial and/or setup fee, each currency must also define a trial and/or setup fee.
- /// Note: Currency Prices are not able to be updated for custom product price points.
+ /// Note: Currency Prices cannot be updated for custom product price points.
///
/// Required parameter: The Advanced Billing id of the product price point.
/// Optional parameter: .
@@ -359,9 +359,9 @@ public Models.CurrencyPricesResponse UpdateProductCurrencyPrices(
=> CoreHelper.RunTask(UpdateProductCurrencyPricesAsync(productPricePointId, body));
///
- /// This endpoint allows you to update the `price`s of currency prices for a given currency that exists on the product price point.
+ /// Updates the `price`s of currency prices for a given currency that exists on the product price point.
/// When updating the pricing, it needs to mirror the structure of your primary pricing. If the product price point defines a trial and/or setup fee, each currency must also define a trial and/or setup fee.
- /// Note: Currency Prices are not able to be updated for custom product price points.
+ /// Note: Currency Prices cannot be updated for custom product price points.
///
/// Required parameter: The Advanced Billing id of the product price point.
/// Optional parameter: .
diff --git a/AdvancedBilling.Standard/Controllers/ProductsController.cs b/AdvancedBilling.Standard/Controllers/ProductsController.cs
index db50f474..a8f9c6e2 100644
--- a/AdvancedBilling.Standard/Controllers/ProductsController.cs
+++ b/AdvancedBilling.Standard/Controllers/ProductsController.cs
@@ -36,7 +36,8 @@ public class ProductsController : BaseController
internal ProductsController(GlobalConfiguration globalConfiguration) : base(globalConfiguration) { }
///
- /// Use this method to create a product within your Advanced Billing site.
+ /// Creates a product in your Advanced Billing site.
+ /// See the following product docuemation for more information:.
/// + [Products Documentation](https://maxio.zendesk.com/hc/en-us/articles/24261090117645-Products-Overview).
/// + [Changing a Subscription's Product](https://maxio.zendesk.com/hc/en-us/articles/24252069837581-Product-Changes-and-Migrations).
///
@@ -49,7 +50,8 @@ public Models.ProductResponse CreateProduct(
=> CoreHelper.RunTask(CreateProductAsync(productFamilyId, body));
///
- /// Use this method to create a product within your Advanced Billing site.
+ /// Creates a product in your Advanced Billing site.
+ /// See the following product docuemation for more information:.
/// + [Products Documentation](https://maxio.zendesk.com/hc/en-us/articles/24261090117645-Products-Overview).
/// + [Changing a Subscription's Product](https://maxio.zendesk.com/hc/en-us/articles/24252069837581-Product-Changes-and-Migrations).
///
@@ -74,7 +76,7 @@ public Models.ProductResponse CreateProduct(
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
///
- /// This endpoint allows you to read the current details of a product that you've created in Advanced Billing.
+ /// Reads the current details of a product.
///
/// Required parameter: The Advanced Billing id of the product.
/// Returns the Models.ProductResponse response from the API call.
@@ -83,7 +85,7 @@ public Models.ProductResponse ReadProduct(
=> CoreHelper.RunTask(ReadProductAsync(productId));
///
- /// This endpoint allows you to read the current details of a product that you've created in Advanced Billing.
+ /// Reads the current details of a product.
///
/// Required parameter: The Advanced Billing id of the product.
/// cancellationToken.
@@ -100,7 +102,7 @@ public Models.ProductResponse ReadProduct(
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
///
- /// Use this method to change aspects of an existing product.
+ /// Updates aspects of an existing product.
/// ### Input Attributes Update Notes.
/// + `update_return_params` The parameters we will append to your `update_return_url`. See Return URLs and Parameters.
/// ### Product Price Point.
@@ -115,7 +117,7 @@ public Models.ProductResponse UpdateProduct(
=> CoreHelper.RunTask(UpdateProductAsync(productId, body));
///
- /// Use this method to change aspects of an existing product.
+ /// Updates aspects of an existing product.
/// ### Input Attributes Update Notes.
/// + `update_return_params` The parameters we will append to your `update_return_url`. See Return URLs and Parameters.
/// ### Product Price Point.
@@ -142,7 +144,7 @@ public Models.ProductResponse UpdateProduct(
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
///
- /// Sending a DELETE request to this endpoint will archive the product. All current subscribers will be unffected; their subscription/purchase will continue to be charged monthly.
+ /// Archives the product. All current subscribers will be unffected; their subscription/purchase will continue to be charged monthly.
/// This will restrict the option to chose the product for purchase via the Billing Portal, as well as disable Public Signup Pages for the product.
///
/// Required parameter: The Advanced Billing id of the product.
@@ -152,7 +154,7 @@ public Models.ProductResponse ArchiveProduct(
=> CoreHelper.RunTask(ArchiveProductAsync(productId));
///
- /// Sending a DELETE request to this endpoint will archive the product. All current subscribers will be unffected; their subscription/purchase will continue to be charged monthly.
+ /// Archives the product. All current subscribers will be unffected; their subscription/purchase will continue to be charged monthly.
/// This will restrict the option to chose the product for purchase via the Billing Portal, as well as disable Public Signup Pages for the product.
///
/// Required parameter: The Advanced Billing id of the product.
@@ -172,7 +174,7 @@ public Models.ProductResponse ArchiveProduct(
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
///
- /// This method allows to retrieve a Product object by its `api_handle`.
+ /// Retrieves a Product object by its `api_handle`.
///
/// Required parameter: The handle of the product.
/// Returns the Models.ProductResponse response from the API call.
@@ -181,7 +183,7 @@ public Models.ProductResponse ReadProductByHandle(
=> CoreHelper.RunTask(ReadProductByHandleAsync(apiHandle));
///
- /// This method allows to retrieve a Product object by its `api_handle`.
+ /// Retrieves a Product object by its `api_handle`.
///
/// Required parameter: The handle of the product.
/// cancellationToken.
diff --git a/AdvancedBilling.Standard/Controllers/ProformaInvoicesController.cs b/AdvancedBilling.Standard/Controllers/ProformaInvoicesController.cs
index 5c22a567..54bc2248 100644
--- a/AdvancedBilling.Standard/Controllers/ProformaInvoicesController.cs
+++ b/AdvancedBilling.Standard/Controllers/ProformaInvoicesController.cs
@@ -138,7 +138,7 @@ public Models.ProformaInvoice ReadProformaInvoice(
///
/// This endpoint will create a proforma invoice and return it as a response. If the information becomes outdated, simply void the old proforma invoice and generate a new one.
- /// If you would like to preview the next billing amounts without generating a full proforma invoice, please use the renewal preview endpoint.
+ /// If you would like to preview the next billing amounts without generating a full proforma invoice, use the renewal preview endpoint.
/// ## Restrictions.
/// Proforma invoices are only available on Relationship Invoicing sites. To create a proforma invoice, the subscription must not be in a group, must not be prepaid, and must be in a live state.
///
@@ -150,7 +150,7 @@ public Models.ProformaInvoice CreateProformaInvoice(
///
/// This endpoint will create a proforma invoice and return it as a response. If the information becomes outdated, simply void the old proforma invoice and generate a new one.
- /// If you would like to preview the next billing amounts without generating a full proforma invoice, please use the renewal preview endpoint.
+ /// If you would like to preview the next billing amounts without generating a full proforma invoice, use the renewal preview endpoint.
/// ## Restrictions.
/// Proforma invoices are only available on Relationship Invoicing sites. To create a proforma invoice, the subscription must not be in a group, must not be prepaid, and must be in a live state.
///
diff --git a/AdvancedBilling.Standard/Controllers/SalesCommissionsController.cs b/AdvancedBilling.Standard/Controllers/SalesCommissionsController.cs
index 7d8ba291..947ac1de 100644
--- a/AdvancedBilling.Standard/Controllers/SalesCommissionsController.cs
+++ b/AdvancedBilling.Standard/Controllers/SalesCommissionsController.cs
@@ -39,7 +39,7 @@ internal SalesCommissionsController(GlobalConfiguration globalConfiguration) : b
/// Endpoint returns subscriptions with associated sales reps.
/// ## Modified Authentication Process.
/// The Sales Commission API differs from other Chargify API endpoints. This resource is associated with the seller itself. Up to now all available resources were at the level of the site, therefore creating the API Key per site was a sufficient solution. To share resources at the seller level, a new authentication method was introduced, which is user authentication. Creating an API Key for a user is a required step to correctly use the Sales Commission API, more details [here](https://developers.chargify.com/docs/developer-docs/ZG9jOjMyNzk5NTg0-2020-04-20-new-api-authentication).
- /// Access to the Sales Commission API endpoints is available to users with financial access, where the seller has the Advanced Analytics component enabled. For further information on getting access to Advanced Analytics please contact Maxio support.
+ /// Access to the Sales Commission API endpoints is available to users with financial access, where the seller has the Advanced Analytics component enabled. For further information on getting access to Advanced Analytics contact Maxio support.
/// > Note: The request is at seller level, it means `<>` variable will be replaced by `app`.
/// ]]>
///
@@ -54,7 +54,7 @@ internal SalesCommissionsController(GlobalConfiguration globalConfiguration) : b
/// Endpoint returns subscriptions with associated sales reps.
/// ## Modified Authentication Process.
/// The Sales Commission API differs from other Chargify API endpoints. This resource is associated with the seller itself. Up to now all available resources were at the level of the site, therefore creating the API Key per site was a sufficient solution. To share resources at the seller level, a new authentication method was introduced, which is user authentication. Creating an API Key for a user is a required step to correctly use the Sales Commission API, more details [here](https://developers.chargify.com/docs/developer-docs/ZG9jOjMyNzk5NTg0-2020-04-20-new-api-authentication).
- /// Access to the Sales Commission API endpoints is available to users with financial access, where the seller has the Advanced Analytics component enabled. For further information on getting access to Advanced Analytics please contact Maxio support.
+ /// Access to the Sales Commission API endpoints is available to users with financial access, where the seller has the Advanced Analytics component enabled. For further information on getting access to Advanced Analytics contact Maxio support.
/// > Note: The request is at seller level, it means `<>` variable will be replaced by `app`.
/// ]]>
///
@@ -81,7 +81,7 @@ internal SalesCommissionsController(GlobalConfiguration globalConfiguration) : b
/// Endpoint returns sales rep list with details.
/// ## Modified Authentication Process.
/// The Sales Commission API differs from other Chargify API endpoints. This resource is associated with the seller itself. Up to now all available resources were at the level of the site, therefore creating the API Key per site was a sufficient solution. To share resources at the seller level, a new authentication method was introduced, which is user authentication. Creating an API Key for a user is a required step to correctly use the Sales Commission API, more details [here](https://developers.chargify.com/docs/developer-docs/ZG9jOjMyNzk5NTg0-2020-04-20-new-api-authentication).
- /// Access to the Sales Commission API endpoints is available to users with financial access, where the seller has the Advanced Analytics component enabled. For further information on getting access to Advanced Analytics please contact Maxio support.
+ /// Access to the Sales Commission API endpoints is available to users with financial access, where the seller has the Advanced Analytics component enabled. For further information on getting access to Advanced Analytics contact Maxio support.
/// > Note: The request is at seller level, it means `<>` variable will be replaced by `app`.
/// ]]>
///
@@ -96,7 +96,7 @@ internal SalesCommissionsController(GlobalConfiguration globalConfiguration) : b
/// Endpoint returns sales rep list with details.
/// ## Modified Authentication Process.
/// The Sales Commission API differs from other Chargify API endpoints. This resource is associated with the seller itself. Up to now all available resources were at the level of the site, therefore creating the API Key per site was a sufficient solution. To share resources at the seller level, a new authentication method was introduced, which is user authentication. Creating an API Key for a user is a required step to correctly use the Sales Commission API, more details [here](https://developers.chargify.com/docs/developer-docs/ZG9jOjMyNzk5NTg0-2020-04-20-new-api-authentication).
- /// Access to the Sales Commission API endpoints is available to users with financial access, where the seller has the Advanced Analytics component enabled. For further information on getting access to Advanced Analytics please contact Maxio support.
+ /// Access to the Sales Commission API endpoints is available to users with financial access, where the seller has the Advanced Analytics component enabled. For further information on getting access to Advanced Analytics contact Maxio support.
/// > Note: The request is at seller level, it means `<>` variable will be replaced by `app`.
/// ]]>
///
@@ -123,7 +123,7 @@ internal SalesCommissionsController(GlobalConfiguration globalConfiguration) : b
/// Endpoint returns sales rep and attached subscriptions details.
/// ## Modified Authentication Process.
/// The Sales Commission API differs from other Chargify API endpoints. This resource is associated with the seller itself. Up to now all available resources were at the level of the site, therefore creating the API Key per site was a sufficient solution. To share resources at the seller level, a new authentication method was introduced, which is user authentication. Creating an API Key for a user is a required step to correctly use the Sales Commission API, more details [here](https://developers.chargify.com/docs/developer-docs/ZG9jOjMyNzk5NTg0-2020-04-20-new-api-authentication).
- /// Access to the Sales Commission API endpoints is available to users with financial access, where the seller has the Advanced Analytics component enabled. For further information on getting access to Advanced Analytics please contact Maxio support.
+ /// Access to the Sales Commission API endpoints is available to users with financial access, where the seller has the Advanced Analytics component enabled. For further information on getting access to Advanced Analytics contact Maxio support.
/// > Note: The request is at seller level, it means `<>` variable will be replaced by `app`.
/// ]]>
///
@@ -148,7 +148,7 @@ public Models.SaleRep ReadSalesRep(
/// Endpoint returns sales rep and attached subscriptions details.
/// ## Modified Authentication Process.
/// The Sales Commission API differs from other Chargify API endpoints. This resource is associated with the seller itself. Up to now all available resources were at the level of the site, therefore creating the API Key per site was a sufficient solution. To share resources at the seller level, a new authentication method was introduced, which is user authentication. Creating an API Key for a user is a required step to correctly use the Sales Commission API, more details [here](https://developers.chargify.com/docs/developer-docs/ZG9jOjMyNzk5NTg0-2020-04-20-new-api-authentication).
- /// Access to the Sales Commission API endpoints is available to users with financial access, where the seller has the Advanced Analytics component enabled. For further information on getting access to Advanced Analytics please contact Maxio support.
+ /// Access to the Sales Commission API endpoints is available to users with financial access, where the seller has the Advanced Analytics component enabled. For further information on getting access to Advanced Analytics contact Maxio support.
/// > Note: The request is at seller level, it means `<>` variable will be replaced by `app`.
/// ]]>
///
diff --git a/AdvancedBilling.Standard/Controllers/SubscriptionComponentsController.cs b/AdvancedBilling.Standard/Controllers/SubscriptionComponentsController.cs
index 8bf19579..f35f38ac 100644
--- a/AdvancedBilling.Standard/Controllers/SubscriptionComponentsController.cs
+++ b/AdvancedBilling.Standard/Controllers/SubscriptionComponentsController.cs
@@ -539,21 +539,22 @@ public async Task DeletePrepaidUsageAllocationAsync(
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
///
- /// ## Documentation.
- /// Full documentation on how to create Components in the Advanced Billing UI can be located [here](https://maxio.zendesk.com/hc/en-us/articles/24261149711501-Create-Edit-and-Archive-Components). Additionally, for information on how to record component usage against a subscription, please see the following resources:.
- /// + [Recording Metered Component Usage](https://maxio.zendesk.com/hc/en-us/articles/24251890500109-Reporting-Component-Allocations#reporting-metered-component-usage).
- /// + [Reporting Prepaid Component Status](https://maxio.zendesk.com/hc/en-us/articles/24251890500109-Reporting-Component-Allocations#reporting-prepaid-component-status).
- /// You may choose to report metered or prepaid usage to Advanced Billing as often as you wish. You may report usage as it happens. You may also report usage periodically, such as each night or once per billing period. If usage events occur in your system very frequently (on the order of thousands of times an hour), it is best to accumulate usage into batches on your side, and then report those batches less frequently, such as daily. This will ensure you remain below any API throttling limits. If your use case requires higher rates of usage reporting, we recommend utilizing Events Based Components.
- /// ## Create Usage for Subscription.
- /// This endpoint allows you to record an instance of metered or prepaid usage for a subscription. The `quantity` from usage for each component is accumulated to the `unit_balance` on the [Component Line Item](./b3A6MTQxMDgzNzQ-read-subscription-component) for the subscription.
+ /// Records an instance of metered or prepaid usage for a subscription.
+ /// You can report metered or prepaid usage to Advanced Billing as often as you wish. You can report usage as it happens or periodically, such as each night or once per billing period. .
+ /// Full documentation on how to create Components in the Advanced Billing UI can be located [here](https://maxio.zendesk.com/hc/en-us/articles/24261149711501-Create-Edit-and-Archive-Components). Additionally, for information on how to record component usage against a subscription, see the following resources:.
+ /// It is not possible to record metered usage for more than one component at a time Usage should be reported as one API call per component on a single subscription. For example, to record that a subscriber has sent both an SMS Message and an Email, send an API call for each. .
+ /// See the following product documention articles for more information:.
+ /// - [Create and Manage Components](https://maxio.zendesk.com/hc/en-us/articles/24261149711501-Create-Edit-and-Archive-Components). A.
+ /// - [Recording Metered Component Usage](https://maxio.zendesk.com/hc/en-us/articles/24251890500109-Reporting-Component-Allocations#reporting-metered-component-usage).
+ /// - [Reporting Prepaid Component Status](https://maxio.zendesk.com/hc/en-us/articles/24251890500109-Reporting-Component-Allocations#reporting-prepaid-component-status).
+ /// The `quantity` from usage for each component is accumulated to the `unit_balance` on the [Component Line Item]($e/Subscription%20Components/readSubscriptionComponent) for the subscription.
/// ## Price Point ID usage.
- /// If you are using price points, for metered and prepaid usage components, Advanced Billing gives you the option to specify a price point in your request.
+ /// If you are using price points, for metered and prepaid usage components Advanced Billing gives you the option to specify a price point in your request.
/// You do not need to specify a price point ID. If a price point is not included, the default price point for the component will be used when the usage is recorded.
- /// If an invalid `price_point_id` is submitted, the endpoint will return an error.
/// ## Deducting Usage.
- /// In the event that you need to reverse a previous usage report or otherwise deduct from the current usage balance, you may provide a negative quantity.
+ /// If you need to reverse a previous usage report or otherwise deduct from the current usage balance, you can provide a negative quantity.
/// Example:.
- /// Previously recorded:.
+ /// Previously recorded quantity was 5000:.
/// ```json.
/// {.
/// "usage": {.
@@ -562,7 +563,7 @@ public async Task DeletePrepaidUsageAllocationAsync(
/// }.
/// }.
/// ```.
- /// At this point, `unit_balance` would be `5000`. To reduce the balance to `0`, POST the following payload:.
+ /// To reduce the quantity to `0`, POST the following payload:.
/// ```json.
/// {.
/// "usage": {.
@@ -572,9 +573,6 @@ public async Task DeletePrepaidUsageAllocationAsync(
/// }.
/// ```.
/// The `unit_balance` has a floor of `0`; negative unit balances are never allowed. For example, if the usage balance is 100 and you deduct 200 units, the unit balance would then be `0`, not `-100`.
- /// ## FAQ.
- /// Q. Is it possible to record metered usage for more than one component at a time?.
- /// A. No. Usage should be reported as one API call per component on a single subscription. For example, to record that a subscriber has sent both an SMS Message and an Email, send an API call for each.
///
/// Required parameter: Either the Advanced Billing subscription ID (integer) or the subscription reference (string). Important: In cases where a numeric string value matches both an existing subscription ID and an existing subscription reference, the system will prioritize the subscription ID lookup. For example, if both subscription ID 123 and subscription reference "123" exist, passing "123" will return the subscription with ID 123..
/// Required parameter: Either the Advanced Billing id for the component or the component's handle prefixed by `handle:`.
@@ -587,21 +585,22 @@ public Models.UsageResponse CreateUsage(
=> CoreHelper.RunTask(CreateUsageAsync(subscriptionIdOrReference, componentId, body));
///
- /// ## Documentation.
- /// Full documentation on how to create Components in the Advanced Billing UI can be located [here](https://maxio.zendesk.com/hc/en-us/articles/24261149711501-Create-Edit-and-Archive-Components). Additionally, for information on how to record component usage against a subscription, please see the following resources:.
- /// + [Recording Metered Component Usage](https://maxio.zendesk.com/hc/en-us/articles/24251890500109-Reporting-Component-Allocations#reporting-metered-component-usage).
- /// + [Reporting Prepaid Component Status](https://maxio.zendesk.com/hc/en-us/articles/24251890500109-Reporting-Component-Allocations#reporting-prepaid-component-status).
- /// You may choose to report metered or prepaid usage to Advanced Billing as often as you wish. You may report usage as it happens. You may also report usage periodically, such as each night or once per billing period. If usage events occur in your system very frequently (on the order of thousands of times an hour), it is best to accumulate usage into batches on your side, and then report those batches less frequently, such as daily. This will ensure you remain below any API throttling limits. If your use case requires higher rates of usage reporting, we recommend utilizing Events Based Components.
- /// ## Create Usage for Subscription.
- /// This endpoint allows you to record an instance of metered or prepaid usage for a subscription. The `quantity` from usage for each component is accumulated to the `unit_balance` on the [Component Line Item](./b3A6MTQxMDgzNzQ-read-subscription-component) for the subscription.
+ /// Records an instance of metered or prepaid usage for a subscription.
+ /// You can report metered or prepaid usage to Advanced Billing as often as you wish. You can report usage as it happens or periodically, such as each night or once per billing period. .
+ /// Full documentation on how to create Components in the Advanced Billing UI can be located [here](https://maxio.zendesk.com/hc/en-us/articles/24261149711501-Create-Edit-and-Archive-Components). Additionally, for information on how to record component usage against a subscription, see the following resources:.
+ /// It is not possible to record metered usage for more than one component at a time Usage should be reported as one API call per component on a single subscription. For example, to record that a subscriber has sent both an SMS Message and an Email, send an API call for each. .
+ /// See the following product documention articles for more information:.
+ /// - [Create and Manage Components](https://maxio.zendesk.com/hc/en-us/articles/24261149711501-Create-Edit-and-Archive-Components). A.
+ /// - [Recording Metered Component Usage](https://maxio.zendesk.com/hc/en-us/articles/24251890500109-Reporting-Component-Allocations#reporting-metered-component-usage).
+ /// - [Reporting Prepaid Component Status](https://maxio.zendesk.com/hc/en-us/articles/24251890500109-Reporting-Component-Allocations#reporting-prepaid-component-status).
+ /// The `quantity` from usage for each component is accumulated to the `unit_balance` on the [Component Line Item]($e/Subscription%20Components/readSubscriptionComponent) for the subscription.
/// ## Price Point ID usage.
- /// If you are using price points, for metered and prepaid usage components, Advanced Billing gives you the option to specify a price point in your request.
+ /// If you are using price points, for metered and prepaid usage components Advanced Billing gives you the option to specify a price point in your request.
/// You do not need to specify a price point ID. If a price point is not included, the default price point for the component will be used when the usage is recorded.
- /// If an invalid `price_point_id` is submitted, the endpoint will return an error.
/// ## Deducting Usage.
- /// In the event that you need to reverse a previous usage report or otherwise deduct from the current usage balance, you may provide a negative quantity.
+ /// If you need to reverse a previous usage report or otherwise deduct from the current usage balance, you can provide a negative quantity.
/// Example:.
- /// Previously recorded:.
+ /// Previously recorded quantity was 5000:.
/// ```json.
/// {.
/// "usage": {.
@@ -610,7 +609,7 @@ public Models.UsageResponse CreateUsage(
/// }.
/// }.
/// ```.
- /// At this point, `unit_balance` would be `5000`. To reduce the balance to `0`, POST the following payload:.
+ /// To reduce the quantity to `0`, POST the following payload:.
/// ```json.
/// {.
/// "usage": {.
@@ -620,9 +619,6 @@ public Models.UsageResponse CreateUsage(
/// }.
/// ```.
/// The `unit_balance` has a floor of `0`; negative unit balances are never allowed. For example, if the usage balance is 100 and you deduct 200 units, the unit balance would then be `0`, not `-100`.
- /// ## FAQ.
- /// Q. Is it possible to record metered usage for more than one component at a time?.
- /// A. No. Usage should be reported as one API call per component on a single subscription. For example, to record that a subscriber has sent both an SMS Message and an Email, send an API call for each.
///
/// Required parameter: Either the Advanced Billing subscription ID (integer) or the subscription reference (string). Important: In cases where a numeric string value matches both an existing subscription ID and an existing subscription reference, the system will prioritize the subscription ID lookup. For example, if both subscription ID 123 and subscription reference "123" exist, passing "123" will return the subscription with ID 123..
/// Required parameter: Either the Advanced Billing id for the component or the component's handle prefixed by `handle:`.
diff --git a/AdvancedBilling.Standard/Controllers/SubscriptionGroupStatusController.cs b/AdvancedBilling.Standard/Controllers/SubscriptionGroupStatusController.cs
index f80ae0cf..fdab6f55 100644
--- a/AdvancedBilling.Standard/Controllers/SubscriptionGroupStatusController.cs
+++ b/AdvancedBilling.Standard/Controllers/SubscriptionGroupStatusController.cs
@@ -36,8 +36,8 @@ public class SubscriptionGroupStatusController : BaseController
internal SubscriptionGroupStatusController(GlobalConfiguration globalConfiguration) : base(globalConfiguration) { }
///
- /// This endpoint will immediately cancel all subscriptions within the specified group. The group is identified by it's `uid` passed in the URL. To successfully cancel the group, the primary subscription must be on automatic billing. The group members as well must be on automatic billing or they must be prepaid.
- /// In order to cancel a subscription group while also charging for any unbilled usage on metered or prepaid components, the `charge_unbilled_usage=true` parameter must be included in the request.
+ /// Cancels all subscriptions within the specified group immediately. The group is identified by the `uid` that is passed in the URL. To successfully cancel the group, the primary subscription must be on automatic billing. The group members must be on automatic billing or prepaid.
+ /// To cancel a subscription group while also charging for any unbilled usage on metered or prepaid components, the `charge_unbilled_usage=true` parameter must be included in the request.
///
/// Required parameter: The uid of the subscription group.
/// Optional parameter: .
@@ -47,8 +47,8 @@ public void CancelSubscriptionsInGroup(
=> CoreHelper.RunVoidTask(CancelSubscriptionsInGroupAsync(uid, body));
///
- /// This endpoint will immediately cancel all subscriptions within the specified group. The group is identified by it's `uid` passed in the URL. To successfully cancel the group, the primary subscription must be on automatic billing. The group members as well must be on automatic billing or they must be prepaid.
- /// In order to cancel a subscription group while also charging for any unbilled usage on metered or prepaid components, the `charge_unbilled_usage=true` parameter must be included in the request.
+ /// Cancels all subscriptions within the specified group immediately. The group is identified by the `uid` that is passed in the URL. To successfully cancel the group, the primary subscription must be on automatic billing. The group members must be on automatic billing or prepaid.
+ /// To cancel a subscription group while also charging for any unbilled usage on metered or prepaid components, the `charge_unbilled_usage=true` parameter must be included in the request.
///
/// Required parameter: The uid of the subscription group.
/// Optional parameter: .
@@ -71,7 +71,7 @@ public async Task CancelSubscriptionsInGroupAsync(
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
///
- /// This endpoint will schedule all subscriptions within the specified group to be canceled at the end of their billing period. The group is identified by it's uid passed in the URL.
+ /// This endpoint will schedule all subscriptions within the specified group to be canceled at the end of their billing period. The group is identified by its uid passed in the URL.
/// All subscriptions in the group must be on automatic billing in order to successfully cancel them, and the group must not be in a "past_due" state.
///
/// Required parameter: The uid of the subscription group.
@@ -80,7 +80,7 @@ public void InitiateDelayedCancellationForGroup(
=> CoreHelper.RunVoidTask(InitiateDelayedCancellationForGroupAsync(uid));
///
- /// This endpoint will schedule all subscriptions within the specified group to be canceled at the end of their billing period. The group is identified by it's uid passed in the URL.
+ /// This endpoint will schedule all subscriptions within the specified group to be canceled at the end of their billing period. The group is identified by its uid passed in the URL.
/// All subscriptions in the group must be on automatic billing in order to successfully cancel them, and the group must not be in a "past_due" state.
///
/// Required parameter: The uid of the subscription group.
diff --git a/AdvancedBilling.Standard/Controllers/SubscriptionGroupsController.cs b/AdvancedBilling.Standard/Controllers/SubscriptionGroupsController.cs
index f8626081..ed666cce 100644
--- a/AdvancedBilling.Standard/Controllers/SubscriptionGroupsController.cs
+++ b/AdvancedBilling.Standard/Controllers/SubscriptionGroupsController.cs
@@ -42,6 +42,8 @@ internal SubscriptionGroupsController(GlobalConfiguration globalConfiguration) :
/// You must provide one and only one of the `payment_profile_id`/`credit_card_attributes`/`bank_account_attributes` for the payment profile attached to the group.
/// Only one of the `subscriptions` can have `"primary": true` attribute set.
/// When passing product to a subscription you can use either `product_id` or `product_handle` or `offer_id`. You can also use `custom_price` instead.
+ /// The subscription request examples below will be split into two sections.
+ /// The first section, "Subscription Customization", will focus on passing different information with a subscription, such as components, calendar billing, and custom fields. These examples will presume you are using a secure chargify_token generated by Chargify.js.
///
/// Optional parameter: .
/// Returns the Models.SubscriptionGroupSignupResponse response from the API call.
@@ -55,6 +57,8 @@ public Models.SubscriptionGroupSignupResponse SignupWithSubscriptionGroup(
/// You must provide one and only one of the `payment_profile_id`/`credit_card_attributes`/`bank_account_attributes` for the payment profile attached to the group.
/// Only one of the `subscriptions` can have `"primary": true` attribute set.
/// When passing product to a subscription you can use either `product_id` or `product_handle` or `offer_id`. You can also use `custom_price` instead.
+ /// The subscription request examples below will be split into two sections.
+ /// The first section, "Subscription Customization", will focus on passing different information with a subscription, such as components, calendar billing, and custom fields. These examples will presume you are using a secure chargify_token generated by Chargify.js.
///
/// Optional parameter: .
/// cancellationToken.
@@ -268,12 +272,12 @@ public Models.FullSubscriptionGroupResponse FindSubscriptionGroup(
///
/// For sites making use of the [Relationship Billing](https://maxio.zendesk.com/hc/en-us/articles/24252287829645-Advanced-Billing-Invoices-Overview) and [Customer Hierarchy](https://maxio.zendesk.com/hc/en-us/articles/24252185211533-Customer-Hierarchies-WhoPays#customer-hierarchies) features, it is possible to add existing subscriptions to subscription groups.
/// Passing `group` parameters with a `target` containing a `type` and optional `id` is all that's needed. When the `target` parameter specifies a `"customer"` or `"subscription"` that is already part of a hierarchy, the subscription will become a member of the customer's subscription group. If the target customer or subscription is not part of a subscription group, a new group will be created and the subscription will become part of the group with the specified target customer set as the responsible payer for the group's subscriptions.
- /// **Please Note:** In order to add an existing subscription to a subscription group, it must belong to either the same customer record as the target, or be within the same customer hierarchy.
+ /// **Note:** In order to add an existing subscription to a subscription group, it must belong to either the same customer record as the target, or be within the same customer hierarchy.
/// Rather than specifying a customer, the `target` parameter could instead simply have a value of.
/// * `"self"` which indicates the subscription will be paid for not by some other customer, but by the subscribing customer,.
/// * `"parent"` which indicates the subscription will be paid for by the subscribing customer's parent within a customer hierarchy, or.
/// * `"eldest"` which indicates the subscription will be paid for by the root-level customer in the subscribing customer's hierarchy.
- /// To create a new subscription into a subscription group, please reference the following:.
+ /// To create a new subscription into a subscription group, reference the following:.
/// [Create Subscription in a Subscription Group](https://developers.chargify.com/docs/api-docs/d571659cf0f24-create-subscription#subscription-in-a-subscription-group).
///
/// Required parameter: The Chargify id of the subscription.
@@ -287,12 +291,12 @@ public Models.SubscriptionGroupResponse AddSubscriptionToGroup(
///
/// For sites making use of the [Relationship Billing](https://maxio.zendesk.com/hc/en-us/articles/24252287829645-Advanced-Billing-Invoices-Overview) and [Customer Hierarchy](https://maxio.zendesk.com/hc/en-us/articles/24252185211533-Customer-Hierarchies-WhoPays#customer-hierarchies) features, it is possible to add existing subscriptions to subscription groups.
/// Passing `group` parameters with a `target` containing a `type` and optional `id` is all that's needed. When the `target` parameter specifies a `"customer"` or `"subscription"` that is already part of a hierarchy, the subscription will become a member of the customer's subscription group. If the target customer or subscription is not part of a subscription group, a new group will be created and the subscription will become part of the group with the specified target customer set as the responsible payer for the group's subscriptions.
- /// **Please Note:** In order to add an existing subscription to a subscription group, it must belong to either the same customer record as the target, or be within the same customer hierarchy.
+ /// **Note:** In order to add an existing subscription to a subscription group, it must belong to either the same customer record as the target, or be within the same customer hierarchy.
/// Rather than specifying a customer, the `target` parameter could instead simply have a value of.
/// * `"self"` which indicates the subscription will be paid for not by some other customer, but by the subscribing customer,.
/// * `"parent"` which indicates the subscription will be paid for by the subscribing customer's parent within a customer hierarchy, or.
/// * `"eldest"` which indicates the subscription will be paid for by the root-level customer in the subscribing customer's hierarchy.
- /// To create a new subscription into a subscription group, please reference the following:.
+ /// To create a new subscription into a subscription group, reference the following:.
/// [Create Subscription in a Subscription Group](https://developers.chargify.com/docs/api-docs/d571659cf0f24-create-subscription#subscription-in-a-subscription-group).
///
/// Required parameter: The Chargify id of the subscription.
diff --git a/AdvancedBilling.Standard/Controllers/SubscriptionInvoiceAccountController.cs b/AdvancedBilling.Standard/Controllers/SubscriptionInvoiceAccountController.cs
index 129a105a..be1edf50 100644
--- a/AdvancedBilling.Standard/Controllers/SubscriptionInvoiceAccountController.cs
+++ b/AdvancedBilling.Standard/Controllers/SubscriptionInvoiceAccountController.cs
@@ -65,7 +65,7 @@ public Models.AccountBalances ReadAccountBalances(
/// ## Create Prepayment.
/// In order to specify a prepayment made against a subscription, specify the `amount, memo, details, method`.
/// When the `method` specified is `"credit_card_on_file"`, the prepayment amount will be collected using the default credit card payment profile and applied to the prepayment account balance. This is especially useful for manual replenishment of prepaid subscriptions.
- /// Please note that you **can't** pass `amount_in_cents`.
+ /// Note that passing `amount_in_cents` is now allowed.
///
/// Required parameter: The Chargify id of the subscription.
/// Optional parameter: .
@@ -79,7 +79,7 @@ public Models.CreatePrepaymentResponse CreatePrepayment(
/// ## Create Prepayment.
/// In order to specify a prepayment made against a subscription, specify the `amount, memo, details, method`.
/// When the `method` specified is `"credit_card_on_file"`, the prepayment amount will be collected using the default credit card payment profile and applied to the prepayment account balance. This is especially useful for manual replenishment of prepaid subscriptions.
- /// Please note that you **can't** pass `amount_in_cents`.
+ /// Note that passing `amount_in_cents` is now allowed.
///
/// Required parameter: The Chargify id of the subscription.
/// Optional parameter: .
diff --git a/AdvancedBilling.Standard/Controllers/SubscriptionProductsController.cs b/AdvancedBilling.Standard/Controllers/SubscriptionProductsController.cs
index 5c1eb548..cd26b4d8 100644
--- a/AdvancedBilling.Standard/Controllers/SubscriptionProductsController.cs
+++ b/AdvancedBilling.Standard/Controllers/SubscriptionProductsController.cs
@@ -44,9 +44,9 @@ internal SubscriptionProductsController(GlobalConfiguration globalConfiguration)
/// ## Migrations Documentation.
/// Full documentation on how to record Migrations in the Advanced Billing UI can be located [here](https://maxio.zendesk.com/hc/en-us/articles/24181589372429-Data-Migration-to-Advanced-Billing).
/// ## Failed Migrations.
- /// One of the most common ways that a migration can fail is when the attempt is made to migrate a subscription to it's current product. Please be aware of this issue!.
+ /// Importaint note: One of the most common ways that a migration can fail is when the attempt is made to migrate a subscription to its current product.
/// ## Migration 3D Secure - Stripe.
- /// It may happen that a payment needs 3D Secure Authentication when the subscription is migrated to a new product; this is referred to in our help docs as a [post-authentication flow](https://maxio.zendesk.com/hc/en-us/articles/24176278996493-Testing-Implementing-3D-Secure#psd2-flows-pre-authentication-and-post-authentication). The server returns `422 Unprocessable Entity` in this case with the following response:.
+ /// When a payment requires 3D Secure Authentication to adhear to Strong Customer Authentication (SCA) when the subscription is migrated to a new product, the request enters a [post-authentication flow](https://maxio.zendesk.com/hc/en-us/articles/24176278996493-Testing-Implementing-3D-Secure#psd2-flows-pre-authentication-and-post-authentication). The server returns `422 Unprocessable Entity` in this case with the following response:.
/// ```json.
/// {.
/// "errors": [.
@@ -66,7 +66,7 @@ internal SubscriptionProductsController(GlobalConfiguration globalConfiguration)
/// It is not possible to use `action_link` in an iframe inside a custom application. You have to redirect the customer directly to the `action_link`, then, to be notified about the result, use `redirect_url` or `callback_url`.
/// The final URL that you send a customer to to complete 3D Secure may resemble the following, where the first half is the `action_link` and the second half contains a `redirect_url` and `callback_url`: `https://mysite.chargify.com/3d-secure/pi_1FCm4RKDeye4C0XfbqquXRYm?one_time_token_id=128&callback_url=https://localhost:4000&redirect_url=https://yourpage.com`.
/// ### Example Redirect Flow.
- /// You may wish to redirect customers to different pages depending on whether their SCA was performed successfully. Here's an example flow to use as a reference:.
+ /// You may wish to redirect customers to different pages depending on whether SCA was performed successfully. Here's an example flow to use as a reference:.
/// 1. Create a migration via API; it requires 3DS.
/// 2. You receive a `gateway_payment_id` in the `action_link` along other params in the response.
/// 3. Use this `gateway_payment_id` to, for example, connect with your internal resources or generate a session_id.
@@ -94,9 +94,9 @@ public Models.SubscriptionResponse MigrateSubscriptionProduct(
/// ## Migrations Documentation.
/// Full documentation on how to record Migrations in the Advanced Billing UI can be located [here](https://maxio.zendesk.com/hc/en-us/articles/24181589372429-Data-Migration-to-Advanced-Billing).
/// ## Failed Migrations.
- /// One of the most common ways that a migration can fail is when the attempt is made to migrate a subscription to it's current product. Please be aware of this issue!.
+ /// Importaint note: One of the most common ways that a migration can fail is when the attempt is made to migrate a subscription to its current product.
/// ## Migration 3D Secure - Stripe.
- /// It may happen that a payment needs 3D Secure Authentication when the subscription is migrated to a new product; this is referred to in our help docs as a [post-authentication flow](https://maxio.zendesk.com/hc/en-us/articles/24176278996493-Testing-Implementing-3D-Secure#psd2-flows-pre-authentication-and-post-authentication). The server returns `422 Unprocessable Entity` in this case with the following response:.
+ /// When a payment requires 3D Secure Authentication to adhear to Strong Customer Authentication (SCA) when the subscription is migrated to a new product, the request enters a [post-authentication flow](https://maxio.zendesk.com/hc/en-us/articles/24176278996493-Testing-Implementing-3D-Secure#psd2-flows-pre-authentication-and-post-authentication). The server returns `422 Unprocessable Entity` in this case with the following response:.
/// ```json.
/// {.
/// "errors": [.
@@ -116,7 +116,7 @@ public Models.SubscriptionResponse MigrateSubscriptionProduct(
/// It is not possible to use `action_link` in an iframe inside a custom application. You have to redirect the customer directly to the `action_link`, then, to be notified about the result, use `redirect_url` or `callback_url`.
/// The final URL that you send a customer to to complete 3D Secure may resemble the following, where the first half is the `action_link` and the second half contains a `redirect_url` and `callback_url`: `https://mysite.chargify.com/3d-secure/pi_1FCm4RKDeye4C0XfbqquXRYm?one_time_token_id=128&callback_url=https://localhost:4000&redirect_url=https://yourpage.com`.
/// ### Example Redirect Flow.
- /// You may wish to redirect customers to different pages depending on whether their SCA was performed successfully. Here's an example flow to use as a reference:.
+ /// You may wish to redirect customers to different pages depending on whether SCA was performed successfully. Here's an example flow to use as a reference:.
/// 1. Create a migration via API; it requires 3DS.
/// 2. You receive a `gateway_payment_id` in the `action_link` along other params in the response.
/// 3. Use this `gateway_payment_id` to, for example, connect with your internal resources or generate a session_id.
diff --git a/AdvancedBilling.Standard/Controllers/SubscriptionStatusController.cs b/AdvancedBilling.Standard/Controllers/SubscriptionStatusController.cs
index bd959ceb..bd6afda8 100644
--- a/AdvancedBilling.Standard/Controllers/SubscriptionStatusController.cs
+++ b/AdvancedBilling.Standard/Controllers/SubscriptionStatusController.cs
@@ -142,7 +142,7 @@ public Models.SubscriptionResponse ResumeSubscription(
///
/// This will place the subscription in the on_hold state and it will not renew.
/// ## Limitations.
- /// You may not place a subscription on hold if the `next_billing` date is within 24 hours.
+ /// You may not place a subscription on hold if the `next_billing_at` date is within 24 hours.
///
/// Required parameter: The Chargify id of the subscription.
/// Optional parameter: .
@@ -155,7 +155,7 @@ public Models.SubscriptionResponse PauseSubscription(
///
/// This will place the subscription in the on_hold state and it will not renew.
/// ## Limitations.
- /// You may not place a subscription on hold if the `next_billing` date is within 24 hours.
+ /// You may not place a subscription on hold if the `next_billing_at` date is within 24 hours.
///
/// Required parameter: The Chargify id of the subscription.
/// Optional parameter: .
@@ -219,8 +219,7 @@ public Models.SubscriptionResponse UpdateAutomaticSubscriptionResumption(
///
/// Advanced Billing offers the ability to reactivate a previously canceled subscription. For details on how the reactivation works, and how to reactivate subscriptions through the application, see [reactivation](https://maxio.zendesk.com/hc/en-us/articles/24252109503629-Reactivating-and-Resuming).
- /// **Please note: The term.
- /// "resume" is used also during another process in Advanced Billing. This occurs when an on-hold subscription is "resumed". This returns the subscription to an active state.**.
+ /// **Note: The term "resume" is used also during another process in Advanced Billing. This occurs when an on-hold subscription is "resumed". This returns the subscription to an active state.**.
/// + The response returns the subscription object in the `active` or `trialing` state.
/// + The `canceled_at` and `cancellation_message` fields do not have values.
/// + The method works for "Canceled" or "Trial Ended" subscriptions.
@@ -327,8 +326,7 @@ public Models.SubscriptionResponse ReactivateSubscription(
///
/// Advanced Billing offers the ability to reactivate a previously canceled subscription. For details on how the reactivation works, and how to reactivate subscriptions through the application, see [reactivation](https://maxio.zendesk.com/hc/en-us/articles/24252109503629-Reactivating-and-Resuming).
- /// **Please note: The term.
- /// "resume" is used also during another process in Advanced Billing. This occurs when an on-hold subscription is "resumed". This returns the subscription to an active state.**.
+ /// **Note: The term "resume" is used also during another process in Advanced Billing. This occurs when an on-hold subscription is "resumed". This returns the subscription to an active state.**.
/// + The response returns the subscription object in the `active` or `trialing` state.
/// + The `canceled_at` and `cancellation_message` fields do not have values.
/// + The method works for "Canceled" or "Trial Ended" subscriptions.
@@ -544,7 +542,7 @@ public Models.SubscriptionResponse CancelDunning(
///
/// The Chargify API allows you to preview a renewal by posting to the renewals endpoint. Renewal Preview is an object representing a subscription’s next assessment. You can retrieve it to see a snapshot of how much your customer will be charged on their next renewal.
- /// The "Next Billing" amount and "Next Billing" date are already represented in the UI on each Subscriber's Summary. For more information, please see our documentation [here](https://maxio.zendesk.com/hc/en-us/articles/24252493695757-Subscriber-Interface-Overview).
+ /// The "Next Billing" amount and "Next Billing" date are already represented in the UI on each Subscriber's Summary. For more information, see our documentation [here](https://maxio.zendesk.com/hc/en-us/articles/24252493695757-Subscriber-Interface-Overview).
/// ## Optional Component Fields.
/// This endpoint is particularly useful due to the fact that it will return the computed billing amount for the base product and the components which are in use by a subscriber.
/// By default, the preview will include billing details for all components _at their **current** quantities_. This means:.
@@ -567,7 +565,7 @@ public Models.RenewalPreviewResponse PreviewRenewal(
///
/// The Chargify API allows you to preview a renewal by posting to the renewals endpoint. Renewal Preview is an object representing a subscription’s next assessment. You can retrieve it to see a snapshot of how much your customer will be charged on their next renewal.
- /// The "Next Billing" amount and "Next Billing" date are already represented in the UI on each Subscriber's Summary. For more information, please see our documentation [here](https://maxio.zendesk.com/hc/en-us/articles/24252493695757-Subscriber-Interface-Overview).
+ /// The "Next Billing" amount and "Next Billing" date are already represented in the UI on each Subscriber's Summary. For more information, see our documentation [here](https://maxio.zendesk.com/hc/en-us/articles/24252493695757-Subscriber-Interface-Overview).
/// ## Optional Component Fields.
/// This endpoint is particularly useful due to the fact that it will return the computed billing amount for the base product and the components which are in use by a subscriber.
/// By default, the preview will include billing details for all components _at their **current** quantities_. This means:.
diff --git a/AdvancedBilling.Standard/Controllers/SubscriptionsController.cs b/AdvancedBilling.Standard/Controllers/SubscriptionsController.cs
index b41fbb3a..59a65212 100644
--- a/AdvancedBilling.Standard/Controllers/SubscriptionsController.cs
+++ b/AdvancedBilling.Standard/Controllers/SubscriptionsController.cs
@@ -37,466 +37,14 @@ public class SubscriptionsController : BaseController
internal SubscriptionsController(GlobalConfiguration globalConfiguration) : base(globalConfiguration) { }
///
- /// collecting and sending Advanced Billing raw card details requires PCI compliance on your end; these examples are provided as guidance. If your business is not PCI compliant, we recommend using Chargify.js to collect credit cards or bank accounts.
- /// # Subscription Customization.
- /// ## With Components.
- /// Different components require slightly different data. For example, quantity-based and on/off components accept `allocated_quantity`, while metered components accept `unit_balance`.
- /// When creating a subscription with a component, a `price_point_id` can be passed in along with the `component_id` to specify which price point to use. If not passed in, the default price point will be used.
- /// Note: if an invalid `price_point_id` is used, the subscription will still proceed but will use the component's default price point.
- /// Components and their price points may be added by ID or by handle. See the example request body labeled "Components By Handle (Quantity-Based)"; the format will be the same for other component types.
- /// ## With Coupon(s).
- /// Pass an array of `coupon_codes`. See the example request body "With Coupon".
- /// ## With Manual Invoice Collection.
- /// The `invoice` collection method works only on legacy Statement Architecture.
- /// On Relationship Invoicing Architecture use the `remittance` collection method.
- /// ## Prepaid Subscription.
- /// A prepaid subscription can be created with the usual subscription creation parameters, specifying `prepaid` as the `payment_collection_method` and including a nested `prepaid_configuration`.
- /// After a prepaid subscription has been created, additional funds can be manually added to the prepayment account through the [Create Prepayment Endpoint](https://developers.chargify.com/docs/api-docs/7ec482de77ba7-create-prepayment).
- /// Prepaid subscriptions do not work on legacy Statement Architecture.
- /// ## With Metafields.
- /// Metafields can either attach to subscriptions or customers. Metafields are popuplated with the supplied metadata to the resource specified.
- /// If the metafield doesn't exist yet, it will be created on-the-fly.
- /// ## With Custom Pricing.
- /// Custom pricing is pricing specific to the subscription in question.
- /// Create a subscription with custom pricing by passing pricing information instead of a price point.
- /// For a custom priced product, pass the custom_price object in place of `product_price_point_id`. For a custom priced component, pass the `custom_price` object within the component object.
- /// Custom prices and price points can exist in harmony on a subscription.
- /// # Passing Payment Information.
- /// ## Subscription with Chargify.js token.
- /// The `chargify_token` can be obtained using [Chargify.js](https://docs.maxio.com/hc/en-us/articles/38163190843789-Chargify-js-Overview#chargify-js-overview-0-0). The token represents payment profile attributes that were provided by the customer in their browser and stored at the payment gateway.
- /// The `payment_type` attribute may either be `credit_card` or `bank_account`, depending on the type of payment method being added. If a bank account is being passed, the payment attributes should be changed to `bank_account_attributes`.
- /// ```json.
- /// {.
- /// "subscription": {.
- /// "product_handle": "pro-plan",.
- /// "customer_attributes": {.
- /// "first_name": "Joe",.
- /// "last_name": "Smith",.
- /// "email": "j.smith@example.com".
- /// },.
- /// "credit_card_attributes": {.
- /// "chargify_token": "tok_cwhvpfcnbtgkd8nfkzf9dnjn",.
- /// "payment_type": "credit_card".
- /// }.
- /// }.
- /// }.
- /// ```.
- /// ## Subscription with vault token.
- /// If you already have a customer and card stored in your payment gateway, you may create a subscription with a `vault_token`. Providing the last_four, card type and expiration date will allow the card to be displayed properly in the Advanced Billing UI.
- /// ```json.
- /// {.
- /// "subscription": {.
- /// "product_handle": "pro-plan",.
- /// "customer_attributes": {.
- /// "first_name": "Joe",.
- /// "last_name": "Smith",.
- /// "email": "j.smith@example.com".
- /// },.
- /// "credit_card_attributes": {.
- /// first_name: "Joe,.
- /// last_name: "Smith",.
- /// card_type: "visa",.
- /// expiration_month: "05",.
- /// expiration_year: "2025",.
- /// last_four: "1234",.
- /// vault_token: "12345abc",.
- /// current_vault: "braintree_blue".
- /// }.
- /// }.
- /// ```.
- /// ## Subscription with ACH as Payment Profile.
- /// ```json.
- /// {.
- /// "subscription": {.
- /// "product_handle": "gold-product",.
- /// "customer_attributes": {.
- /// "first_name": "Joe",.
- /// "last_name": "Blow",.
- /// "email": "joe@example.com",.
- /// "zip": "02120",.
- /// "state": "MA",.
- /// "reference": "XYZ",.
- /// "phone": "(617) 111 - 0000",.
- /// "organization": "Acme",.
- /// "country": "US",.
- /// "city": "Boston",.
- /// "address_2": null,.
- /// "address": "123 Mass Ave.".
- /// },.
- /// "bank_account_attributes": {.
- /// "bank_name": "Best Bank",.
- /// "bank_routing_number": "021000089",.
- /// "bank_account_number": "111111111111",.
- /// "bank_account_type": "checking",.
- /// "bank_account_holder_type": "business",.
- /// "payment_type": "bank_account".
- /// }.
- /// }.
- /// }.
- /// ```.
- /// ## Subscription with PayPal payment profile.
- /// ### With the nonce from Braintree JS.
- /// ```json.
- /// { "subscription": {.
- /// "product_handle":"test-product-b",.
- /// "customer_attributes": {.
- /// "first_name":"Amelia",.
- /// "last_name":"Johnson",.
- /// "email":"amelia@example.com",.
- /// "organization":"My Awesome Company".
- /// },.
- /// "payment_profile_attributes":{.
- /// "paypal_email": "amelia@example.com",.
- /// "current_vault": "braintree_blue",.
- /// "payment_method_nonce":"abc123",.
- /// "payment_type":"paypal_account".
- /// }.
- /// }.
- /// ```.
- /// ### With the Braintree Customer ID as the vault token:.
- /// ```json.
- /// { "subscription": {.
- /// "product_handle":"test-product-b",.
- /// "customer_attributes": {.
- /// "first_name":"Amelia",.
- /// "last_name":"Johnson",.
- /// "email":"amelia@example.com",.
- /// "organization":"My Awesome Company".
- /// },.
- /// "payment_profile_attributes":{.
- /// "paypal_email": "amelia@example.com",.
- /// "current_vault": "braintree_blue",.
- /// "vault_token":"58271347",.
- /// "payment_type":"paypal_account".
- /// }.
- /// }.
- /// ```.
- /// ## Subscription using GoCardless Bank Number.
- /// These examples creates a customer, bank account and mandate in GoCardless.
- /// For more information on GoCardless, please view the following two resources:.
- /// + [Payment Profiles via API for GoCardless](https://developers.chargify.com/docs/api-docs/1f10a4f170405-create-payment-profile#gocardless).
- /// + [Full documentation on GoCardless](https://maxio.zendesk.com/hc/en-us/articles/24176159136909-GoCardless).
- /// + [Using Chargify.js with GoCardless - minimal example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QQZKCER8CFK40MR6XJ).
- /// + [Using Chargify.js with GoCardless - full example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QR09JVHWW0MCA7HVJV).
- /// ```json.
- /// {.
- /// "subscription": {.
- /// "product_handle": "gold-product",.
- /// "customer_attributes": {.
- /// "first_name": "Jane",.
- /// "last_name": "Doe",.
- /// "email": "jd@chargify.test".
- /// },.
- /// "bank_account_attributes": {.
- /// "bank_name": "Royal Bank of France",.
- /// "bank_account_number": "0000000",.
- /// "bank_routing_number": "0003",.
- /// "bank_branch_code": "00006",.
- /// "payment_type": "bank_account",.
- /// "billing_address": "20 Place de la Gare",.
- /// "billing_city": "Colombes",.
- /// "billing_state": "Île-de-France",.
- /// "billing_zip": "92700",.
- /// "billing_country": "FR".
- /// }.
- /// }.
- /// }.
- /// ```.
- /// ## Subscription using GoCardless IBAN Number.
- /// ```json.
- /// {.
- /// "subscription": {.
- /// "product_handle": "gold-product",.
- /// "customer_attributes": {.
- /// "first_name": "Jane",.
- /// "last_name": "Doe",.
- /// "email": "jd@chargify.test".
- /// },.
- /// "bank_account_attributes": {.
- /// "bank_name": "French Bank",.
- /// "bank_iban": "FR1420041010050500013M02606",.
- /// "payment_type": "bank_account",.
- /// "billing_address": "20 Place de la Gare",.
- /// "billing_city": "Colombes",.
- /// "billing_state": "Île-de-France",.
- /// "billing_zip": "92700",.
- /// "billing_country": "FR".
- /// }.
- /// }.
- /// }.
- /// ```.
- /// ## Subscription using Stripe SEPA Direct Debit.
- /// For more information on Stripe Direct Debit, please view the following two resources:.
- /// + [Payment Profiles via API for Stripe SEPA Direct Debit](https://developers.chargify.com/docs/api-docs/1f10a4f170405-create-payment-profile#sepa-direct-debit).
- /// + [Full documentation on Stripe Direct Debit](https://maxio.zendesk.com/hc/en-us/articles/24176170430093-Stripe-SEPA-and-BECS-Direct-Debit).
- /// + [Using Chargify.js with Stripe SEPA or BECS Direct Debit - minimal example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QQFKKN8Z7B7DZ9AJS5).
- /// + [Using Chargify.js with Stripe SEPA Direct Debit - full example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QR09JVHWW0MCA7HVJV).
- /// ```json.
- /// {.
- /// "subscription": {.
- /// "product_handle": "gold-product",.
- /// "customer_attributes": {.
- /// "first_name": "Jane",.
- /// "last_name": "Doe",.
- /// "email": "jd@chargify.test".
- /// },.
- /// "bank_account_attributes": {.
- /// "bank_name": "Test Bank",.
- /// "bank_iban": "DE89370400440532013000",.
- /// "payment_type": "bank_account".
- /// }.
- /// }.
- /// }.
- /// ```.
- /// ## Subscription using Stripe BECS Direct Debit.
- /// For more information on Stripe Direct Debit, please view the following two resources:.
- /// + [Payment Profiles via API for Stripe BECS Direct Debit]($e/Payment%20Profiles/createPaymentProfile).
- /// + [Full documentation on Stripe Direct Debit](https://maxio.zendesk.com/hc/en-us/articles/24176170430093-Stripe-SEPA-and-BECS-Direct-Debit).
- /// + [Using Chargify.js with Stripe SEPA, BECS or BACS Direct Debit - minimal example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QQFKKN8Z7B7DZ9AJS5).
- /// + [Using Chargify.js with Stripe BECS Direct Debit - full example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QRX4B1TYZKZD8ZND6D).
- /// ```json.
- /// {.
- /// "subscription": {.
- /// "product_handle": "gold-product",.
- /// "customer_attributes": {.
- /// "first_name": "Jane",.
- /// "last_name": "Doe",.
- /// "email": "jd@chargify.test".
- /// },.
- /// "bank_account_attributes": {.
- /// "bank_name": "Test Bank",.
- /// "bank_branch_code": "000000",.
- /// "bank_account_number": "000123456",.
- /// "payment_type": "bank_account".
- /// }.
- /// }.
- /// }.
- /// ```.
- /// ## Subscription using Stripe BACS Direct Debit.
- /// For more information on Stripe Direct Debit, please view the following two resources:.
- /// + [Payment Profiles via API for Stripe BACS Direct Debit]($e/Payment%20Profiles/createPaymentProfile).
- /// + [Full documentation on Stripe Direct Debit](https://maxio.zendesk.com/hc/en-us/articles/24176170430093-Stripe-SEPA-and-BECS-Direct-Debit).
- /// + [Using Chargify.js with Stripe SEPA, BECS or BACS Direct Debit - minimal example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QQFKKN8Z7B7DZ9AJS5).
- /// + [Using Chargify.js with Stripe BACS Direct Debit - full example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QR7PA1DJ3XE9MD05FM).
- /// ```json.
- /// {.
- /// "subscription": {.
- /// "product_handle": "gold-product",.
- /// "customer_attributes": {.
- /// "first_name": "Jane",.
- /// "last_name": "Doe",.
- /// "email": "jd@chargify.test".
- /// },.
- /// "bank_account_attributes": {.
- /// "bank_name": "Test Bank",.
- /// "bank_branch_code": "108800",.
- /// "bank_account_number": "00012345",.
- /// "payment_type": "bank_account",.
- /// "billing_address": "123 Main St.",.
- /// "billing_city": "London",.
- /// "billing_state": "LND",.
- /// "billing_zip": "W1A 1AA",.
- /// "billing_country": "GB".
- /// }.
- /// }.
- /// }.
- /// ```.
- /// ## 3D Secure - Stripe.
- /// It may happen that a payment needs 3D Secure Authentication when the subscription is created; this is referred to in our help docs as a [post-authentication flow](https://maxio.zendesk.com/hc/en-us/articles/24176278996493-Testing-Implementing-3D-Secure#psd2-flows-pre-authentication-and-post-authentication). The server returns `422 Unprocessable Entity` in this case with the following response:.
- /// ```json.
- /// {.
- /// "errors": [.
- /// "Your card was declined. This transaction requires 3D secure authentication.".
- /// ],.
- /// "gateway_payment_id": "pi_1F0aGoJ2UDb3Q4av7zU3sHPh",.
- /// "description": "This card requires 3D secure authentication. Redirect the customer to the URL from the action_link attribute to authenticate. Attach callback_url param to this URL if you want to be notified about the result of 3D Secure authentication. Attach redirect_url param to this URL if you want to redirect a customer back to your page after 3D Secure authentication. Example: https://mysite.chargify.com/3d-secure/pi_1FCm4RKDeye4C0XfbqquXRYm?one_time_token_id=128&callback_url=https://localhost:4000&redirect_url=https://yourpage.com will do a POST request to https://localhost:4000 after payment is authenticated and will redirect a customer to https://yourpage.com after 3DS authentication.",.
- /// "action_link": "http://acme.chargify.com/3d-secure/pi_1F0aGoJ2UDb3Q4av7zU3sHPh?one_time_token_id=242".
- /// }.
- /// ```.
- /// To let the customer go through 3D Secure Authentication, they need to be redirected to the URL specified in `action_link`.
- /// Optionally, you can specify `callback_url` parameter in the `action_link` URL if you’d like to be notified about the result of 3D Secure Authentication. The `callback_url` will return the following information:.
- /// - whether the authentication was successful (`success`).
- /// - the gateway ID for the payment (`gateway_payment_id`).
- /// - the subscription ID (`subscription_id`).
- /// Lastly, you can also specify a `redirect_url` within the `action_link` URL if you’d like to redirect a customer back to your site.
- /// It is not possible to use `action_link` in an iframe inside a custom application. You have to redirect the customer directly to the `action_link`, then, to be notified about the result, use `redirect_url` or `callback_url`.
- /// The final URL that you send a customer to to complete 3D Secure may resemble the following, where the first half is the `action_link` and the second half contains a `redirect_url` and `callback_url`: `https://mysite.chargify.com/3d-secure/pi_1FCm4RKDeye4C0XfbqquXRYm?one_time_token_id=128&callback_url=https://localhost:4000&redirect_url=https://yourpage.com`.
- /// ## 3D Secure - Checkout.
- /// It may happen that a payment needs 3D Secure Authentication when the subscription is created; this is referred to in our help docs as a [post-authentication flow](https://maxio.zendesk.com/hc/en-us/articles/24176278996493-Testing-Implementing-3D-Secure#psd2-flows-pre-authentication-and-post-authentication). The server returns `422 Unprocessable Entity` in this case with the following response:.
- /// ```json.
- /// {.
- /// "errors": [.
- /// "Your card was declined. This transaction requires 3D secure authentication.".
- /// ],.
- /// "gateway_payment_id": "pay_6gjofv7dlyrkpizlolsuspvtiu",.
- /// "description": "This card requires 3D secure authentication. Redirect the customer to the URL from the action_link attribute to authenticate. Attach callback_url param to this URL if you want to be notified about the result of 3D Secure authentication. Attach redirect_url param to this URL if you want to redirect a customer back to your page after 3D Secure authentication. Example: https://mysite.chargify.com/3d-secure/pay_6gjofv7dlyrkpizlolsuspvtiu?one_time_token_id=123&callback_url=https://localhost:4000&redirect_url=https://yourpage.com will do a POST request to https://localhost:4000 after payment is authenticated and will redirect a customer to https://yourpage.com after 3DS authentication.",.
- /// "action_link": "http://mysite.chargify.com/3d-secure/pay_6gjofv7dlyrkpizlolsuspvtiu?one_time_token_id=123".
- /// }.
- /// ```.
- /// To let the customer go through 3D Secure Authentication, they need to be redirected to the URL specified in `action_link`.
- /// Optionally, you can specify `callback_url` parameter in the `action_link` URL if you’d like to be notified about the result of 3D Secure Authentication. The `callback_url` will return the following information:.
- /// - whether the authentication was successful (`success`).
- /// - the gateway ID for the payment (`gateway_payment_id`).
- /// - the subscription ID (`subscription_id`).
- /// Lastly, you can also specify a `redirect_url` parameter within the `action_link` URL if you’d like to redirect a customer back to your site.
- /// It is not possible to use `action_link` in an iframe inside a custom application. You have to redirect the customer directly to the `action_link`, then, to be notified about the result, use `redirect_url` or `callback_url`.
- /// The final URL that you send a customer to complete 3D Secure may resemble the following, where the first half is the `action_link` and the second half contains a `redirect_url` and `callback_url`: `https://mysite.chargify.com/3d-secure/pay_6gjofv7dlyrkpizlolsuspvtiu?one_time_token_id=123&callback_url=https://localhost:4000&redirect_url=https://yourpage.com`.
- /// ### Example Redirect Flow.
- /// You may wish to redirect customers to different pages depending on whether their SCA was performed successfully. Here's an example flow to use as a reference:.
- /// 1. Create a subscription via API; it requires 3DS.
- /// 2. You receive a `gateway_payment_id` in the `action_link` along other params in the response.
- /// 3. Use this `gateway_payment_id` to, for example, connect with your internal resources or generate a session_id.
- /// 4. Include 1 of those attributes inside the `callback_url` and `redirect_url` to be aware which “session” this applies to.
- /// 5. Redirect the customer to the `action_link` with `callback_url` and `redirect_url` applied.
- /// 6. After the customer finishes 3DS authentication, we let you know the result by making a request to applied `callback_url`.
- /// 7. After that, we redirect the customer to the `redirect_url`; at this point the result of authentication is known.
- /// 8. Optionally, you can use the applied "msg" param in the `redirect_url` to determine whether it was successful or not.
- /// ## Subscriptions Import.
- /// Subscriptions can be “imported” via the API to handle the following scenarios:.
- /// + You already have existing subscriptions with specific start and renewal dates that you would like to import to Advanced Billing.
- /// + You already have credit cards stored in your provider’s vault and you would like to create subscriptions using those tokens.
- /// Before importing, you should have already set up your products to match your offerings. Then, you can create Subscriptions via the API just like you normally would, but using a few special attributes.
- /// Full documentation on how import Subscriptions using the **import tool** in the Advanced Billing UI can be located [here](https://maxio.zendesk.com/hc/en-us/articles/24251489107213-Imports).
- /// ### Important Notices and Disclaimers regarding Imports.
- /// Before performing a bulk import of subscriptions via the API, we suggest reading the [Subscriptions Import](https://maxio.zendesk.com/hc/en-us/articles/24251489107213-Imports) instructions to understand the repurcussions of a large import.
- /// ### Subscription Input Attributes.
- /// The following _additional_ attributes to the subscription input attributes make imports possible: `next_billing_at`, `previous_billing_at`, and `import_mrr`.
- /// ### Current Vault.
- /// If you are using a Legacy gateway such as "eWAY Rapid (Legacy)" or "Stripe (Legacy)" then please contact Support for further instructions on subscription imports.
- /// ### Braintree Blue (Braintree v2) Imports.
- /// Braintree Blue is Braintree’s newer (version 2) API. For this gateway, please provide the `vault_token` parameter with the value from Braintree’s “Customer ID” rather than the “Payment Profile Token”. At this time we do not use `current_vault_token` with the Braintree Blue gateway, and we only support a single payment profile per Braintree Customer.
- /// When importing PayPal type payment profiles, please set `payment_type` to `paypal_account`.
- /// ### Stripe ACH Imports.
- /// If the bank account has already been verified, currently you will need to create the customer, create the payment profile in Advanced Billing - setting verified=true, then create a subscription using the customer_id and payment_profile_id.
- /// ### Webhooks During Import.
- /// If no `next_billing_at` is provided, webhooks will be fired as normal. If you do set a future `next_billing_at`, only a subset of the webhooks are fired when the subscription is created. Keep reading for more information as to what webhooks will be fired under which scenarios.
- /// #### Successful creation with Billing Date.
- /// Scenario: If `next_billing_at` provided.
- /// + `signup_success`.
- /// + `billing_date_change`.
- /// #### Successful creation without Billing Date.
- /// Scenario: If no `next_billing_at` provided.
- /// + `signup_success`.
- /// + `payment_success`.
- /// #### Unsuccessful creation.
- /// Scenario: If card can’t be charged, and no `next_billing_at` provided.
- /// + signup_failure.
- /// #### Webhooks fired when next_billing_at is reached:.
- /// + `renewal_success or renewal_failure`.
- /// + `payment_success or payment_failure`.
- /// ### Date and Time Formats.
- /// We will attempt to parse any string you send as the value of next_billing_at in to a date or time. For best results, use a known format like described in “Date and Time Specification” of RFC 2822 or ISO 8601 .
- /// The following are all equivalent and will work as input to `next_billing_at`:.
- /// ```.
- /// Aug 06 2030 11:34:00 -0400.
- /// Aug 06 2030 11:34 -0400.
- /// 2030-08-06T11:34:00-04:00.
- /// 8/6/2030 11:34:00 EDT.
- /// 8/6/2030 8:34:00 PDT.
- /// 2030-08-06T15:34:00Z.
- /// ```.
- /// You may also pass just a date, in which case we will assume the time to be noon.
- /// ```.
- /// 2010-08-06.
- /// ```.
- /// ## Subscription Hierarchies & WhoPays.
- /// When subscription groups were first added to our Relationship Invoicing architecture, to group together invoices for related subscriptions and allow for complex customer hierarchies and WhoPays scenarios, they were designed to consist of a primary and a collection of group members. The primary would control many aspects of the group, such as when the consolidated invoice is generated. As of today, groups still function this way.
- /// In the future, the concept of a "primary" will be removed in order to offer more flexibility into group management and reduce confusion concerning what actions must be done on a primary level, rather than a member level.
- /// We have introduced a two scheme system as a bridge between these two group organizations. Scheme 1, which is relevant to all subscription groups today, marks the group as being "ruled" by a primary.
- /// When reading a subscription via API, they will return a top-level attribute called `group`, which will denote which scheme is being used. At this time, the `scheme` attribute will always be 1.
- /// ### Subscription in a Customer Hierarchy.
- /// For sites making use of the [Relationship Billing](https://maxio.zendesk.com/hc/en-us/articles/24252287829645-Advanced-Billing-Invoices-Overview) and [Customer Hierarchy](https://maxio.zendesk.com/hc/en-us/articles/24252185211533-Customer-Hierarchies-WhoPays) features, it is possible to create subscriptions within a customer hierarchy. This can be achieved through the API by passing group parameters in the **Create Subscription** request.
- /// + The `group` parameters are optional and consist of the required `target` and optional `billing` parameters.
- /// When the `target` parameter specifies a customer that is already part of a hierarchy, the new subscription will become a member of the customer hierarchy as well. If the target customer is not part of a hierarchy, a new customer hierarchy will be created and both the target customer and the new subscription will become part of the hierarchy with the specified target customer set as the responsible payer for the hierarchy's subscriptions.
- /// Rather than specifying a customer, the `target` parameter could instead simply have a value of `self` which indicates the subscription will be paid for not by some other customer, but by the subscribing customer. This will be true whether the customer is being created new, is already part of a hierarchy, or already exists outside a hierarchy. A valid payment method must also be specified in the subscription parameters.
- /// Note that when creating subscriptions in a customer hierarchy, if the customer hierarchy does not already have a payment method, passing valid credit card attributes in the subscription parameters will also result in the payment method being established as the default payment method for the customer hierarchy irrespective of the responsible payer.
- /// The optional `billing` parameters specify how some aspects of the billing for the new subscription should be handled. Rather than capturing payment immediately, the `accrue` parameter can be included so that the new subscription charges accrue until the next assessment date. Regarding the date, the `align_date` parameter can be included so that the billing date of the new subscription matches up with the default subscription group in the customer hierarchy. When choosing to align the dates, the `prorate` parameter can also be specified so that the new subscription charges are prorated based on the billing period of the default subscription group in the customer hierarchy also.
- /// ### Subscription in a Subscription Group.
- /// For sites making use of [Relationship Billing](https://maxio.zendesk.com/hc/en-us/articles/24252287829645-Advanced-Billing-Invoices-Overview) it may be desireable to create a subscription as part of a [subscription group](https://maxio.zendesk.com/hc/en-us/articles/24252172565005-Subscription-Groups-Overview) in order to rely on [invoice consolidation](https://maxio.zendesk.com/hc/en-us/articles/24252269909389-Invoice-Consolidation). This can be achieved through the API by passing group parameters in the Create Subscription request. The `group` parameters are optional and consist of the required `target` and optional `billing` parameters.
- /// The `target` parameters specify an existing subscription with which the newly created subscription should be grouped. If the target subscription is already part of a group, the new subscription will become a member of the group as well. If the target subscription is not part of a group, a new group will be created and both the target and the new subscription will become part of the group with the target as the group's primary subscription.
- /// The optional `billing` parameters specify how some aspects of the billing for the new subscription should be handled. Rather than capturing payment immediately, the `accrue` parameter can be included so that the new subscription charges accrue until the next assessment date. Regarding the date, the `align_date` parameter can be included so that the billing date of the new subscription matches up with the target subscription. When choosing to align the dates, the `prorate` parameter can also be specified so that the new subscription charges are prorated based on the billing period of the target subscription also.
- /// ## Providing Agreement Acceptance Params.
- /// It is possible to provide a proof of customer's acceptance of terms and policies.
- /// We will be storing this proof in case it might be required (i.e. chargeback).
- /// Currently, we already keep it for subscriptions created via Public Signup Pages.
- /// In order to create a subscription with the proof of agreement acceptance, you must provide additional parameters `agreement acceptance` with `ip_address` and at least one url to the policy that was accepted: `terms_url` or `privacy_policy_url`. Additional urls that can be provided: `return_refund_policy_url`, `delivery_policy_url` and.
- /// `secure_checkout_policy_url`.
- /// ```json.
- /// "subscription": {.
- /// "product_handle": "gold-product",.
- /// "customer_attributes": {.
- /// "first_name": "Jane",.
- /// "last_name": "Doe",.
- /// "email": "jd@chargify.test".
- /// },.
- /// "agreement_acceptance": {.
- /// "ip_address": "1.2.3.4",.
- /// "terms_url": "https://terms.url",.
- /// "privacy_policy_url": "https://privacy_policy.url",.
- /// "return_refund_policy_url": "https://return_refund_policy.url",.
- /// "delivery_policy_url": "https://delivery_policy.url",.
- /// "secure_checkout_policy_url": "https://secure_checkout_policy.url".
- /// }.
- /// }.
- /// }.
- /// ```.
- /// **For Maxio Payments subscriptions, the agreement acceptance params are required, with at least terms_url provided.**.
- /// ## Providing ACH Agreement params.
- /// It is also possible to provide a proof that a customer authorized ACH agreement terms.
- /// The proof will be stored and the email will be sent to the customer with a copy of the terms (if enabled).
- /// In order to create a subscription with the proof of authorized ACH agreement terms, you must provide the additional parameter `ach_agreement` with the following nested parameters: `agreement_terms`, `authorizer_first_name`, `authorizer_last_name` and `ip_address`.
- /// Each of them is required.
- /// ```json.
- /// "subscription": {.
- /// "product_handle": "gold-product",.
- /// "customer_attributes": {.
- /// "first_name": "Jane",.
- /// "last_name": "Doe",.
- /// "email": "jd@chargify.test".
- /// },.
- /// "bank_account_attributes": {.
- /// "bank_name": "Test Bank",.
- /// "bank_routing_number": "021000089",.
- /// "bank_account_number": "111111111111",.
- /// "bank_account_type": "checking",.
- /// "bank_account_holder_type": "business",.
- /// "payment_type": "bank_account".
- /// },.
- /// "ach_agreement": {.
- /// "agreement_terms": "ACH agreement terms",.
- /// "authorizer_first_name": "Jane",.
- /// "authorizer_last_name": "Doe",.
- /// "ip_address": "1.2.3.4".
- /// }.
- /// }.
- /// ```.
- /// ]]>
+ /// Creates a Subscription for a customer and product.
+ /// Specify the product with `product_id` or `product_handle`. To set a specific product pricepPoint, use `product_price_point_handle` or `product_price_point_id`.
+ /// Identify an existing customer with `customer_id` or `customer_reference`. Optionally, include an existing payment profile using `payment_profile_id`. To create a new customer, pass customer_attributes. .
+ /// Select an option from the **Request Examples** drop-down on the right side of the portal to see examples of common scenarios for creating subscriptions. .
+ /// Payment information may be required to create a subscription, depending on the options for the Product being subscribed. See [product options](https://docs.maxio.com/hc/en-us/articles/24261076617869-Edit-Products) for more information. See the [Payments Profile]($e/Payment%20Profiles/createPaymentProfile) endpoint for details on payment parameters.
+ /// Do not use real card information for testing. See the Sites articles that cover [testing your site setup](https://docs.maxio.com/hc/en-us/articles/24250712113165-Testing-Overview#testing-overview-0-0) for more details on testing in your sandbox.
+ /// Note that collecting and sending raw card details in production requires [PCI compliance](https://docs.maxio.com/hc/en-us/articles/24183956938381-PCI-Compliance#pci-compliance-0-0) on your end. If your business is not PCI compliant, use [Chargify.js](https://docs.maxio.com/hc/en-us/articles/38163190843789-Chargify-js-Overview#chargify-js-overview-0-0) to collect credit card or bank account information.
+ /// See the [Subscription Signups](page:introduction/basic-concepts/subscription-signup) article for more information on working with subscriptions in Advanced Billing.
///
/// Optional parameter: .
/// Returns the Models.SubscriptionResponse response from the API call.
@@ -505,466 +53,14 @@ public Models.SubscriptionResponse CreateSubscription(
=> CoreHelper.RunTask(CreateSubscriptionAsync(body));
///
- /// collecting and sending Advanced Billing raw card details requires PCI compliance on your end; these examples are provided as guidance. If your business is not PCI compliant, we recommend using Chargify.js to collect credit cards or bank accounts.
- /// # Subscription Customization.
- /// ## With Components.
- /// Different components require slightly different data. For example, quantity-based and on/off components accept `allocated_quantity`, while metered components accept `unit_balance`.
- /// When creating a subscription with a component, a `price_point_id` can be passed in along with the `component_id` to specify which price point to use. If not passed in, the default price point will be used.
- /// Note: if an invalid `price_point_id` is used, the subscription will still proceed but will use the component's default price point.
- /// Components and their price points may be added by ID or by handle. See the example request body labeled "Components By Handle (Quantity-Based)"; the format will be the same for other component types.
- /// ## With Coupon(s).
- /// Pass an array of `coupon_codes`. See the example request body "With Coupon".
- /// ## With Manual Invoice Collection.
- /// The `invoice` collection method works only on legacy Statement Architecture.
- /// On Relationship Invoicing Architecture use the `remittance` collection method.
- /// ## Prepaid Subscription.
- /// A prepaid subscription can be created with the usual subscription creation parameters, specifying `prepaid` as the `payment_collection_method` and including a nested `prepaid_configuration`.
- /// After a prepaid subscription has been created, additional funds can be manually added to the prepayment account through the [Create Prepayment Endpoint](https://developers.chargify.com/docs/api-docs/7ec482de77ba7-create-prepayment).
- /// Prepaid subscriptions do not work on legacy Statement Architecture.
- /// ## With Metafields.
- /// Metafields can either attach to subscriptions or customers. Metafields are popuplated with the supplied metadata to the resource specified.
- /// If the metafield doesn't exist yet, it will be created on-the-fly.
- /// ## With Custom Pricing.
- /// Custom pricing is pricing specific to the subscription in question.
- /// Create a subscription with custom pricing by passing pricing information instead of a price point.
- /// For a custom priced product, pass the custom_price object in place of `product_price_point_id`. For a custom priced component, pass the `custom_price` object within the component object.
- /// Custom prices and price points can exist in harmony on a subscription.
- /// # Passing Payment Information.
- /// ## Subscription with Chargify.js token.
- /// The `chargify_token` can be obtained using [Chargify.js](https://docs.maxio.com/hc/en-us/articles/38163190843789-Chargify-js-Overview#chargify-js-overview-0-0). The token represents payment profile attributes that were provided by the customer in their browser and stored at the payment gateway.
- /// The `payment_type` attribute may either be `credit_card` or `bank_account`, depending on the type of payment method being added. If a bank account is being passed, the payment attributes should be changed to `bank_account_attributes`.
- /// ```json.
- /// {.
- /// "subscription": {.
- /// "product_handle": "pro-plan",.
- /// "customer_attributes": {.
- /// "first_name": "Joe",.
- /// "last_name": "Smith",.
- /// "email": "j.smith@example.com".
- /// },.
- /// "credit_card_attributes": {.
- /// "chargify_token": "tok_cwhvpfcnbtgkd8nfkzf9dnjn",.
- /// "payment_type": "credit_card".
- /// }.
- /// }.
- /// }.
- /// ```.
- /// ## Subscription with vault token.
- /// If you already have a customer and card stored in your payment gateway, you may create a subscription with a `vault_token`. Providing the last_four, card type and expiration date will allow the card to be displayed properly in the Advanced Billing UI.
- /// ```json.
- /// {.
- /// "subscription": {.
- /// "product_handle": "pro-plan",.
- /// "customer_attributes": {.
- /// "first_name": "Joe",.
- /// "last_name": "Smith",.
- /// "email": "j.smith@example.com".
- /// },.
- /// "credit_card_attributes": {.
- /// first_name: "Joe,.
- /// last_name: "Smith",.
- /// card_type: "visa",.
- /// expiration_month: "05",.
- /// expiration_year: "2025",.
- /// last_four: "1234",.
- /// vault_token: "12345abc",.
- /// current_vault: "braintree_blue".
- /// }.
- /// }.
- /// ```.
- /// ## Subscription with ACH as Payment Profile.
- /// ```json.
- /// {.
- /// "subscription": {.
- /// "product_handle": "gold-product",.
- /// "customer_attributes": {.
- /// "first_name": "Joe",.
- /// "last_name": "Blow",.
- /// "email": "joe@example.com",.
- /// "zip": "02120",.
- /// "state": "MA",.
- /// "reference": "XYZ",.
- /// "phone": "(617) 111 - 0000",.
- /// "organization": "Acme",.
- /// "country": "US",.
- /// "city": "Boston",.
- /// "address_2": null,.
- /// "address": "123 Mass Ave.".
- /// },.
- /// "bank_account_attributes": {.
- /// "bank_name": "Best Bank",.
- /// "bank_routing_number": "021000089",.
- /// "bank_account_number": "111111111111",.
- /// "bank_account_type": "checking",.
- /// "bank_account_holder_type": "business",.
- /// "payment_type": "bank_account".
- /// }.
- /// }.
- /// }.
- /// ```.
- /// ## Subscription with PayPal payment profile.
- /// ### With the nonce from Braintree JS.
- /// ```json.
- /// { "subscription": {.
- /// "product_handle":"test-product-b",.
- /// "customer_attributes": {.
- /// "first_name":"Amelia",.
- /// "last_name":"Johnson",.
- /// "email":"amelia@example.com",.
- /// "organization":"My Awesome Company".
- /// },.
- /// "payment_profile_attributes":{.
- /// "paypal_email": "amelia@example.com",.
- /// "current_vault": "braintree_blue",.
- /// "payment_method_nonce":"abc123",.
- /// "payment_type":"paypal_account".
- /// }.
- /// }.
- /// ```.
- /// ### With the Braintree Customer ID as the vault token:.
- /// ```json.
- /// { "subscription": {.
- /// "product_handle":"test-product-b",.
- /// "customer_attributes": {.
- /// "first_name":"Amelia",.
- /// "last_name":"Johnson",.
- /// "email":"amelia@example.com",.
- /// "organization":"My Awesome Company".
- /// },.
- /// "payment_profile_attributes":{.
- /// "paypal_email": "amelia@example.com",.
- /// "current_vault": "braintree_blue",.
- /// "vault_token":"58271347",.
- /// "payment_type":"paypal_account".
- /// }.
- /// }.
- /// ```.
- /// ## Subscription using GoCardless Bank Number.
- /// These examples creates a customer, bank account and mandate in GoCardless.
- /// For more information on GoCardless, please view the following two resources:.
- /// + [Payment Profiles via API for GoCardless](https://developers.chargify.com/docs/api-docs/1f10a4f170405-create-payment-profile#gocardless).
- /// + [Full documentation on GoCardless](https://maxio.zendesk.com/hc/en-us/articles/24176159136909-GoCardless).
- /// + [Using Chargify.js with GoCardless - minimal example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QQZKCER8CFK40MR6XJ).
- /// + [Using Chargify.js with GoCardless - full example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QR09JVHWW0MCA7HVJV).
- /// ```json.
- /// {.
- /// "subscription": {.
- /// "product_handle": "gold-product",.
- /// "customer_attributes": {.
- /// "first_name": "Jane",.
- /// "last_name": "Doe",.
- /// "email": "jd@chargify.test".
- /// },.
- /// "bank_account_attributes": {.
- /// "bank_name": "Royal Bank of France",.
- /// "bank_account_number": "0000000",.
- /// "bank_routing_number": "0003",.
- /// "bank_branch_code": "00006",.
- /// "payment_type": "bank_account",.
- /// "billing_address": "20 Place de la Gare",.
- /// "billing_city": "Colombes",.
- /// "billing_state": "Île-de-France",.
- /// "billing_zip": "92700",.
- /// "billing_country": "FR".
- /// }.
- /// }.
- /// }.
- /// ```.
- /// ## Subscription using GoCardless IBAN Number.
- /// ```json.
- /// {.
- /// "subscription": {.
- /// "product_handle": "gold-product",.
- /// "customer_attributes": {.
- /// "first_name": "Jane",.
- /// "last_name": "Doe",.
- /// "email": "jd@chargify.test".
- /// },.
- /// "bank_account_attributes": {.
- /// "bank_name": "French Bank",.
- /// "bank_iban": "FR1420041010050500013M02606",.
- /// "payment_type": "bank_account",.
- /// "billing_address": "20 Place de la Gare",.
- /// "billing_city": "Colombes",.
- /// "billing_state": "Île-de-France",.
- /// "billing_zip": "92700",.
- /// "billing_country": "FR".
- /// }.
- /// }.
- /// }.
- /// ```.
- /// ## Subscription using Stripe SEPA Direct Debit.
- /// For more information on Stripe Direct Debit, please view the following two resources:.
- /// + [Payment Profiles via API for Stripe SEPA Direct Debit](https://developers.chargify.com/docs/api-docs/1f10a4f170405-create-payment-profile#sepa-direct-debit).
- /// + [Full documentation on Stripe Direct Debit](https://maxio.zendesk.com/hc/en-us/articles/24176170430093-Stripe-SEPA-and-BECS-Direct-Debit).
- /// + [Using Chargify.js with Stripe SEPA or BECS Direct Debit - minimal example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QQFKKN8Z7B7DZ9AJS5).
- /// + [Using Chargify.js with Stripe SEPA Direct Debit - full example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QR09JVHWW0MCA7HVJV).
- /// ```json.
- /// {.
- /// "subscription": {.
- /// "product_handle": "gold-product",.
- /// "customer_attributes": {.
- /// "first_name": "Jane",.
- /// "last_name": "Doe",.
- /// "email": "jd@chargify.test".
- /// },.
- /// "bank_account_attributes": {.
- /// "bank_name": "Test Bank",.
- /// "bank_iban": "DE89370400440532013000",.
- /// "payment_type": "bank_account".
- /// }.
- /// }.
- /// }.
- /// ```.
- /// ## Subscription using Stripe BECS Direct Debit.
- /// For more information on Stripe Direct Debit, please view the following two resources:.
- /// + [Payment Profiles via API for Stripe BECS Direct Debit]($e/Payment%20Profiles/createPaymentProfile).
- /// + [Full documentation on Stripe Direct Debit](https://maxio.zendesk.com/hc/en-us/articles/24176170430093-Stripe-SEPA-and-BECS-Direct-Debit).
- /// + [Using Chargify.js with Stripe SEPA, BECS or BACS Direct Debit - minimal example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QQFKKN8Z7B7DZ9AJS5).
- /// + [Using Chargify.js with Stripe BECS Direct Debit - full example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QRX4B1TYZKZD8ZND6D).
- /// ```json.
- /// {.
- /// "subscription": {.
- /// "product_handle": "gold-product",.
- /// "customer_attributes": {.
- /// "first_name": "Jane",.
- /// "last_name": "Doe",.
- /// "email": "jd@chargify.test".
- /// },.
- /// "bank_account_attributes": {.
- /// "bank_name": "Test Bank",.
- /// "bank_branch_code": "000000",.
- /// "bank_account_number": "000123456",.
- /// "payment_type": "bank_account".
- /// }.
- /// }.
- /// }.
- /// ```.
- /// ## Subscription using Stripe BACS Direct Debit.
- /// For more information on Stripe Direct Debit, please view the following two resources:.
- /// + [Payment Profiles via API for Stripe BACS Direct Debit]($e/Payment%20Profiles/createPaymentProfile).
- /// + [Full documentation on Stripe Direct Debit](https://maxio.zendesk.com/hc/en-us/articles/24176170430093-Stripe-SEPA-and-BECS-Direct-Debit).
- /// + [Using Chargify.js with Stripe SEPA, BECS or BACS Direct Debit - minimal example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QQFKKN8Z7B7DZ9AJS5).
- /// + [Using Chargify.js with Stripe BACS Direct Debit - full example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QR7PA1DJ3XE9MD05FM).
- /// ```json.
- /// {.
- /// "subscription": {.
- /// "product_handle": "gold-product",.
- /// "customer_attributes": {.
- /// "first_name": "Jane",.
- /// "last_name": "Doe",.
- /// "email": "jd@chargify.test".
- /// },.
- /// "bank_account_attributes": {.
- /// "bank_name": "Test Bank",.
- /// "bank_branch_code": "108800",.
- /// "bank_account_number": "00012345",.
- /// "payment_type": "bank_account",.
- /// "billing_address": "123 Main St.",.
- /// "billing_city": "London",.
- /// "billing_state": "LND",.
- /// "billing_zip": "W1A 1AA",.
- /// "billing_country": "GB".
- /// }.
- /// }.
- /// }.
- /// ```.
- /// ## 3D Secure - Stripe.
- /// It may happen that a payment needs 3D Secure Authentication when the subscription is created; this is referred to in our help docs as a [post-authentication flow](https://maxio.zendesk.com/hc/en-us/articles/24176278996493-Testing-Implementing-3D-Secure#psd2-flows-pre-authentication-and-post-authentication). The server returns `422 Unprocessable Entity` in this case with the following response:.
- /// ```json.
- /// {.
- /// "errors": [.
- /// "Your card was declined. This transaction requires 3D secure authentication.".
- /// ],.
- /// "gateway_payment_id": "pi_1F0aGoJ2UDb3Q4av7zU3sHPh",.
- /// "description": "This card requires 3D secure authentication. Redirect the customer to the URL from the action_link attribute to authenticate. Attach callback_url param to this URL if you want to be notified about the result of 3D Secure authentication. Attach redirect_url param to this URL if you want to redirect a customer back to your page after 3D Secure authentication. Example: https://mysite.chargify.com/3d-secure/pi_1FCm4RKDeye4C0XfbqquXRYm?one_time_token_id=128&callback_url=https://localhost:4000&redirect_url=https://yourpage.com will do a POST request to https://localhost:4000 after payment is authenticated and will redirect a customer to https://yourpage.com after 3DS authentication.",.
- /// "action_link": "http://acme.chargify.com/3d-secure/pi_1F0aGoJ2UDb3Q4av7zU3sHPh?one_time_token_id=242".
- /// }.
- /// ```.
- /// To let the customer go through 3D Secure Authentication, they need to be redirected to the URL specified in `action_link`.
- /// Optionally, you can specify `callback_url` parameter in the `action_link` URL if you’d like to be notified about the result of 3D Secure Authentication. The `callback_url` will return the following information:.
- /// - whether the authentication was successful (`success`).
- /// - the gateway ID for the payment (`gateway_payment_id`).
- /// - the subscription ID (`subscription_id`).
- /// Lastly, you can also specify a `redirect_url` within the `action_link` URL if you’d like to redirect a customer back to your site.
- /// It is not possible to use `action_link` in an iframe inside a custom application. You have to redirect the customer directly to the `action_link`, then, to be notified about the result, use `redirect_url` or `callback_url`.
- /// The final URL that you send a customer to to complete 3D Secure may resemble the following, where the first half is the `action_link` and the second half contains a `redirect_url` and `callback_url`: `https://mysite.chargify.com/3d-secure/pi_1FCm4RKDeye4C0XfbqquXRYm?one_time_token_id=128&callback_url=https://localhost:4000&redirect_url=https://yourpage.com`.
- /// ## 3D Secure - Checkout.
- /// It may happen that a payment needs 3D Secure Authentication when the subscription is created; this is referred to in our help docs as a [post-authentication flow](https://maxio.zendesk.com/hc/en-us/articles/24176278996493-Testing-Implementing-3D-Secure#psd2-flows-pre-authentication-and-post-authentication). The server returns `422 Unprocessable Entity` in this case with the following response:.
- /// ```json.
- /// {.
- /// "errors": [.
- /// "Your card was declined. This transaction requires 3D secure authentication.".
- /// ],.
- /// "gateway_payment_id": "pay_6gjofv7dlyrkpizlolsuspvtiu",.
- /// "description": "This card requires 3D secure authentication. Redirect the customer to the URL from the action_link attribute to authenticate. Attach callback_url param to this URL if you want to be notified about the result of 3D Secure authentication. Attach redirect_url param to this URL if you want to redirect a customer back to your page after 3D Secure authentication. Example: https://mysite.chargify.com/3d-secure/pay_6gjofv7dlyrkpizlolsuspvtiu?one_time_token_id=123&callback_url=https://localhost:4000&redirect_url=https://yourpage.com will do a POST request to https://localhost:4000 after payment is authenticated and will redirect a customer to https://yourpage.com after 3DS authentication.",.
- /// "action_link": "http://mysite.chargify.com/3d-secure/pay_6gjofv7dlyrkpizlolsuspvtiu?one_time_token_id=123".
- /// }.
- /// ```.
- /// To let the customer go through 3D Secure Authentication, they need to be redirected to the URL specified in `action_link`.
- /// Optionally, you can specify `callback_url` parameter in the `action_link` URL if you’d like to be notified about the result of 3D Secure Authentication. The `callback_url` will return the following information:.
- /// - whether the authentication was successful (`success`).
- /// - the gateway ID for the payment (`gateway_payment_id`).
- /// - the subscription ID (`subscription_id`).
- /// Lastly, you can also specify a `redirect_url` parameter within the `action_link` URL if you’d like to redirect a customer back to your site.
- /// It is not possible to use `action_link` in an iframe inside a custom application. You have to redirect the customer directly to the `action_link`, then, to be notified about the result, use `redirect_url` or `callback_url`.
- /// The final URL that you send a customer to complete 3D Secure may resemble the following, where the first half is the `action_link` and the second half contains a `redirect_url` and `callback_url`: `https://mysite.chargify.com/3d-secure/pay_6gjofv7dlyrkpizlolsuspvtiu?one_time_token_id=123&callback_url=https://localhost:4000&redirect_url=https://yourpage.com`.
- /// ### Example Redirect Flow.
- /// You may wish to redirect customers to different pages depending on whether their SCA was performed successfully. Here's an example flow to use as a reference:.
- /// 1. Create a subscription via API; it requires 3DS.
- /// 2. You receive a `gateway_payment_id` in the `action_link` along other params in the response.
- /// 3. Use this `gateway_payment_id` to, for example, connect with your internal resources or generate a session_id.
- /// 4. Include 1 of those attributes inside the `callback_url` and `redirect_url` to be aware which “session” this applies to.
- /// 5. Redirect the customer to the `action_link` with `callback_url` and `redirect_url` applied.
- /// 6. After the customer finishes 3DS authentication, we let you know the result by making a request to applied `callback_url`.
- /// 7. After that, we redirect the customer to the `redirect_url`; at this point the result of authentication is known.
- /// 8. Optionally, you can use the applied "msg" param in the `redirect_url` to determine whether it was successful or not.
- /// ## Subscriptions Import.
- /// Subscriptions can be “imported” via the API to handle the following scenarios:.
- /// + You already have existing subscriptions with specific start and renewal dates that you would like to import to Advanced Billing.
- /// + You already have credit cards stored in your provider’s vault and you would like to create subscriptions using those tokens.
- /// Before importing, you should have already set up your products to match your offerings. Then, you can create Subscriptions via the API just like you normally would, but using a few special attributes.
- /// Full documentation on how import Subscriptions using the **import tool** in the Advanced Billing UI can be located [here](https://maxio.zendesk.com/hc/en-us/articles/24251489107213-Imports).
- /// ### Important Notices and Disclaimers regarding Imports.
- /// Before performing a bulk import of subscriptions via the API, we suggest reading the [Subscriptions Import](https://maxio.zendesk.com/hc/en-us/articles/24251489107213-Imports) instructions to understand the repurcussions of a large import.
- /// ### Subscription Input Attributes.
- /// The following _additional_ attributes to the subscription input attributes make imports possible: `next_billing_at`, `previous_billing_at`, and `import_mrr`.
- /// ### Current Vault.
- /// If you are using a Legacy gateway such as "eWAY Rapid (Legacy)" or "Stripe (Legacy)" then please contact Support for further instructions on subscription imports.
- /// ### Braintree Blue (Braintree v2) Imports.
- /// Braintree Blue is Braintree’s newer (version 2) API. For this gateway, please provide the `vault_token` parameter with the value from Braintree’s “Customer ID” rather than the “Payment Profile Token”. At this time we do not use `current_vault_token` with the Braintree Blue gateway, and we only support a single payment profile per Braintree Customer.
- /// When importing PayPal type payment profiles, please set `payment_type` to `paypal_account`.
- /// ### Stripe ACH Imports.
- /// If the bank account has already been verified, currently you will need to create the customer, create the payment profile in Advanced Billing - setting verified=true, then create a subscription using the customer_id and payment_profile_id.
- /// ### Webhooks During Import.
- /// If no `next_billing_at` is provided, webhooks will be fired as normal. If you do set a future `next_billing_at`, only a subset of the webhooks are fired when the subscription is created. Keep reading for more information as to what webhooks will be fired under which scenarios.
- /// #### Successful creation with Billing Date.
- /// Scenario: If `next_billing_at` provided.
- /// + `signup_success`.
- /// + `billing_date_change`.
- /// #### Successful creation without Billing Date.
- /// Scenario: If no `next_billing_at` provided.
- /// + `signup_success`.
- /// + `payment_success`.
- /// #### Unsuccessful creation.
- /// Scenario: If card can’t be charged, and no `next_billing_at` provided.
- /// + signup_failure.
- /// #### Webhooks fired when next_billing_at is reached:.
- /// + `renewal_success or renewal_failure`.
- /// + `payment_success or payment_failure`.
- /// ### Date and Time Formats.
- /// We will attempt to parse any string you send as the value of next_billing_at in to a date or time. For best results, use a known format like described in “Date and Time Specification” of RFC 2822 or ISO 8601 .
- /// The following are all equivalent and will work as input to `next_billing_at`:.
- /// ```.
- /// Aug 06 2030 11:34:00 -0400.
- /// Aug 06 2030 11:34 -0400.
- /// 2030-08-06T11:34:00-04:00.
- /// 8/6/2030 11:34:00 EDT.
- /// 8/6/2030 8:34:00 PDT.
- /// 2030-08-06T15:34:00Z.
- /// ```.
- /// You may also pass just a date, in which case we will assume the time to be noon.
- /// ```.
- /// 2010-08-06.
- /// ```.
- /// ## Subscription Hierarchies & WhoPays.
- /// When subscription groups were first added to our Relationship Invoicing architecture, to group together invoices for related subscriptions and allow for complex customer hierarchies and WhoPays scenarios, they were designed to consist of a primary and a collection of group members. The primary would control many aspects of the group, such as when the consolidated invoice is generated. As of today, groups still function this way.
- /// In the future, the concept of a "primary" will be removed in order to offer more flexibility into group management and reduce confusion concerning what actions must be done on a primary level, rather than a member level.
- /// We have introduced a two scheme system as a bridge between these two group organizations. Scheme 1, which is relevant to all subscription groups today, marks the group as being "ruled" by a primary.
- /// When reading a subscription via API, they will return a top-level attribute called `group`, which will denote which scheme is being used. At this time, the `scheme` attribute will always be 1.
- /// ### Subscription in a Customer Hierarchy.
- /// For sites making use of the [Relationship Billing](https://maxio.zendesk.com/hc/en-us/articles/24252287829645-Advanced-Billing-Invoices-Overview) and [Customer Hierarchy](https://maxio.zendesk.com/hc/en-us/articles/24252185211533-Customer-Hierarchies-WhoPays) features, it is possible to create subscriptions within a customer hierarchy. This can be achieved through the API by passing group parameters in the **Create Subscription** request.
- /// + The `group` parameters are optional and consist of the required `target` and optional `billing` parameters.
- /// When the `target` parameter specifies a customer that is already part of a hierarchy, the new subscription will become a member of the customer hierarchy as well. If the target customer is not part of a hierarchy, a new customer hierarchy will be created and both the target customer and the new subscription will become part of the hierarchy with the specified target customer set as the responsible payer for the hierarchy's subscriptions.
- /// Rather than specifying a customer, the `target` parameter could instead simply have a value of `self` which indicates the subscription will be paid for not by some other customer, but by the subscribing customer. This will be true whether the customer is being created new, is already part of a hierarchy, or already exists outside a hierarchy. A valid payment method must also be specified in the subscription parameters.
- /// Note that when creating subscriptions in a customer hierarchy, if the customer hierarchy does not already have a payment method, passing valid credit card attributes in the subscription parameters will also result in the payment method being established as the default payment method for the customer hierarchy irrespective of the responsible payer.
- /// The optional `billing` parameters specify how some aspects of the billing for the new subscription should be handled. Rather than capturing payment immediately, the `accrue` parameter can be included so that the new subscription charges accrue until the next assessment date. Regarding the date, the `align_date` parameter can be included so that the billing date of the new subscription matches up with the default subscription group in the customer hierarchy. When choosing to align the dates, the `prorate` parameter can also be specified so that the new subscription charges are prorated based on the billing period of the default subscription group in the customer hierarchy also.
- /// ### Subscription in a Subscription Group.
- /// For sites making use of [Relationship Billing](https://maxio.zendesk.com/hc/en-us/articles/24252287829645-Advanced-Billing-Invoices-Overview) it may be desireable to create a subscription as part of a [subscription group](https://maxio.zendesk.com/hc/en-us/articles/24252172565005-Subscription-Groups-Overview) in order to rely on [invoice consolidation](https://maxio.zendesk.com/hc/en-us/articles/24252269909389-Invoice-Consolidation). This can be achieved through the API by passing group parameters in the Create Subscription request. The `group` parameters are optional and consist of the required `target` and optional `billing` parameters.
- /// The `target` parameters specify an existing subscription with which the newly created subscription should be grouped. If the target subscription is already part of a group, the new subscription will become a member of the group as well. If the target subscription is not part of a group, a new group will be created and both the target and the new subscription will become part of the group with the target as the group's primary subscription.
- /// The optional `billing` parameters specify how some aspects of the billing for the new subscription should be handled. Rather than capturing payment immediately, the `accrue` parameter can be included so that the new subscription charges accrue until the next assessment date. Regarding the date, the `align_date` parameter can be included so that the billing date of the new subscription matches up with the target subscription. When choosing to align the dates, the `prorate` parameter can also be specified so that the new subscription charges are prorated based on the billing period of the target subscription also.
- /// ## Providing Agreement Acceptance Params.
- /// It is possible to provide a proof of customer's acceptance of terms and policies.
- /// We will be storing this proof in case it might be required (i.e. chargeback).
- /// Currently, we already keep it for subscriptions created via Public Signup Pages.
- /// In order to create a subscription with the proof of agreement acceptance, you must provide additional parameters `agreement acceptance` with `ip_address` and at least one url to the policy that was accepted: `terms_url` or `privacy_policy_url`. Additional urls that can be provided: `return_refund_policy_url`, `delivery_policy_url` and.
- /// `secure_checkout_policy_url`.
- /// ```json.
- /// "subscription": {.
- /// "product_handle": "gold-product",.
- /// "customer_attributes": {.
- /// "first_name": "Jane",.
- /// "last_name": "Doe",.
- /// "email": "jd@chargify.test".
- /// },.
- /// "agreement_acceptance": {.
- /// "ip_address": "1.2.3.4",.
- /// "terms_url": "https://terms.url",.
- /// "privacy_policy_url": "https://privacy_policy.url",.
- /// "return_refund_policy_url": "https://return_refund_policy.url",.
- /// "delivery_policy_url": "https://delivery_policy.url",.
- /// "secure_checkout_policy_url": "https://secure_checkout_policy.url".
- /// }.
- /// }.
- /// }.
- /// ```.
- /// **For Maxio Payments subscriptions, the agreement acceptance params are required, with at least terms_url provided.**.
- /// ## Providing ACH Agreement params.
- /// It is also possible to provide a proof that a customer authorized ACH agreement terms.
- /// The proof will be stored and the email will be sent to the customer with a copy of the terms (if enabled).
- /// In order to create a subscription with the proof of authorized ACH agreement terms, you must provide the additional parameter `ach_agreement` with the following nested parameters: `agreement_terms`, `authorizer_first_name`, `authorizer_last_name` and `ip_address`.
- /// Each of them is required.
- /// ```json.
- /// "subscription": {.
- /// "product_handle": "gold-product",.
- /// "customer_attributes": {.
- /// "first_name": "Jane",.
- /// "last_name": "Doe",.
- /// "email": "jd@chargify.test".
- /// },.
- /// "bank_account_attributes": {.
- /// "bank_name": "Test Bank",.
- /// "bank_routing_number": "021000089",.
- /// "bank_account_number": "111111111111",.
- /// "bank_account_type": "checking",.
- /// "bank_account_holder_type": "business",.
- /// "payment_type": "bank_account".
- /// },.
- /// "ach_agreement": {.
- /// "agreement_terms": "ACH agreement terms",.
- /// "authorizer_first_name": "Jane",.
- /// "authorizer_last_name": "Doe",.
- /// "ip_address": "1.2.3.4".
- /// }.
- /// }.
- /// ```.
- /// ]]>
+ /// Creates a Subscription for a customer and product.
+ /// Specify the product with `product_id` or `product_handle`. To set a specific product pricepPoint, use `product_price_point_handle` or `product_price_point_id`.
+ /// Identify an existing customer with `customer_id` or `customer_reference`. Optionally, include an existing payment profile using `payment_profile_id`. To create a new customer, pass customer_attributes. .
+ /// Select an option from the **Request Examples** drop-down on the right side of the portal to see examples of common scenarios for creating subscriptions. .
+ /// Payment information may be required to create a subscription, depending on the options for the Product being subscribed. See [product options](https://docs.maxio.com/hc/en-us/articles/24261076617869-Edit-Products) for more information. See the [Payments Profile]($e/Payment%20Profiles/createPaymentProfile) endpoint for details on payment parameters.
+ /// Do not use real card information for testing. See the Sites articles that cover [testing your site setup](https://docs.maxio.com/hc/en-us/articles/24250712113165-Testing-Overview#testing-overview-0-0) for more details on testing in your sandbox.
+ /// Note that collecting and sending raw card details in production requires [PCI compliance](https://docs.maxio.com/hc/en-us/articles/24183956938381-PCI-Compliance#pci-compliance-0-0) on your end. If your business is not PCI compliant, use [Chargify.js](https://docs.maxio.com/hc/en-us/articles/38163190843789-Chargify-js-Overview#chargify-js-overview-0-0) to collect credit card or bank account information.
+ /// See the [Subscription Signups](page:introduction/basic-concepts/subscription-signup) article for more information on working with subscriptions in Advanced Billing.
///
/// Optional parameter: .
/// cancellationToken.
@@ -1033,27 +129,31 @@ public Models.SubscriptionResponse CreateSubscription(
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
///
- /// The subscription endpoint allows you to instantly update one or many attributes about a subscription in a single call.
+ /// Updates one or more attributes of a subscription.
/// ## Update Subscription Payment Method.
- /// Change the card that your Subscriber uses for their subscription. You can also use this method to simply change the expiration date of the card **if your gateway allows**.
- /// Note that partial card updates for **Authorize.Net** are not allowed via this endpoint. The existing Payment Profile must be directly updated instead.
+ /// Change the card that your subscriber uses for their subscription. You can also use this method to change the expiration date of the card **if your gateway allows**.
+ /// Do not use real card information for testing. See the Sites articles that cover [testing your site setup](https://docs.maxio.com/hc/en-us/articles/24250712113165-Testing-Overview#testing-overview-0-0) for more details on testing in your sandbox.
+ /// Note that collecting and sending raw card details in production requires [PCI compliance](https://docs.maxio.com/hc/en-us/articles/24183956938381-PCI-Compliance#pci-compliance-0-0) on your end. If your business is not PCI compliant, use [Chargify.js](https://docs.maxio.com/hc/en-us/articles/38163190843789-Chargify-js-Overview#chargify-js-overview-0-0) to collect credit card or bank account information.
+ /// > Note: Partial card updates for **Authorize.Net** are not allowed via this endpoint. The existing Payment Profile must be directly updated instead.
+ /// ## Update Product.
/// You also use this method to change the subscription to a different product by setting a new value for product_handle. A product change can be done in two different ways, **product change** or **delayed product change**.
- /// ## Product Change.
- /// This endpoint may be used to change a subscription's product. The new payment amount is calculated and charged at the normal start of the next period. If you desire complex product changes or prorated upgrades and downgrades instead, please see the documentation on Migrating Subscription Products.
- /// To perform a product change, simply set either the `product_handle` or `product_id` attribute to that of a different product from the same site as the subscription. You can also change the price point by passing in either `product_price_point_id` or `product_price_point_handle` - otherwise the new product's default price point will be used.
+ /// ### Product Change.
+ /// You can change a subscription's product. The new payment amount is calculated and charged at the normal start of the next period. If you require complex product changes or prorated upgrades and downgrades instead, please see the documentation on [Migrating Subscription Products](https://docs.maxio.com/hc/en-us/articles/24252069837581-Product-Changes-and-Migrations#product-changes-and-migrations-0-0).
+ /// To perform a product change, set either the `product_handle` or `product_id` attribute to that of a different product from the same site as the subscription. You can also change the price point by passing in either `product_price_point_id` or `product_price_point_handle` - otherwise the new product's default price point is used.
/// ### Delayed Product Change.
/// This method also changes the product and/or price point, and the new payment amount is calculated and charged at the normal start of the next period.
- /// This method schedules the product change to happen automatically at the subscription’s next renewal date. To perform a Delayed Product Change, set the `product_handle` attribute as you would in a regular product change, but also set the `product_change_delayed` attribute to `true`. No proration applies in this case.
+ /// This method schedules the product change to happen automatically at the subscription’s next renewal date. To perform a delayed product change, set the `product_handle` attribute as you would in a regular product change, but also set the `product_change_delayed` attribute to `true`. No proration applies in this case.
/// You can also perform a delayed change to the price point by passing in either `product_price_point_id` or `product_price_point_handle`.
- /// **Note: To cancel a delayed product change, set `next_product_id` to an empty string.**.
+ /// > **Note:** To cancel a delayed product change, set `next_product_id` to an empty string.
/// ## Billing Date Changes.
+ /// You can update dates for a subscrption. .
/// ### Regular Billing Date Changes.
/// Send the `next_billing_at` to set the next billing date for the subscription. After that date passes and the subscription is processed, the following billing date will be set according to the subscription's product period.
- /// Note that if you pass an invalid date, we will automatically interpret and set the correct date. For example, when February 30 is entered, the next billing will be set to March 2nd in a non-leap year.
- /// The server response will not return data under the key/value pair of `next_billing`. Please view the key/value pair of `current_period_ends_at` to verify that the `next_billing` date has been changed successfully.
- /// ### Snap Day Changes.
+ /// > Note: If you pass an invalid date, the correct date is automatically set to he correct date. For example, if February 30 is passed, the next billing would be set to March 2nd in a non-leap year.
+ /// The server response will not return data under the key/value pair of `next_billing_at`. View the key/value pair of `current_period_ends_at` to verify that the `next_billing_at` date has been changed successfully.
+ /// ### Calendar Billing and Snap Day Changes.
/// For a subscription using Calendar Billing, setting the next billing date is a bit different. Send the `snap_day` attribute to change the calendar billing date for **a subscription using a product eligible for calendar billing**.
- /// Note: If you change the product associated with a subscription that contains a `snap_date` and immediately `READ/GET` the subscription data, it will still contain evidence of the existing `snap_date`. This is due to the fact that a product change is instantanous and only affects the product associated with a subscription. After the `next_billing` date arrives, the `snap_day` associated with the subscription will return to `null.` Another way of looking at this is that you willl have to wait for the next billing cycle to arrive before the `snap_date` will reset to `null`.
+ /// > Note: If you change the product associated with a subscription that contains a `snap_day` and immediately `READ/GET` the subscription data, it will still contain original `snap_day`. The `snap_day`will will reset to 'null on the next billing cycle. This is because a product change is instantanous and only affects the product associated with a subscription.
///
/// Required parameter: The Chargify id of the subscription.
/// Optional parameter: .
@@ -1064,27 +164,31 @@ public Models.SubscriptionResponse UpdateSubscription(
=> CoreHelper.RunTask(UpdateSubscriptionAsync(subscriptionId, body));
///
- /// The subscription endpoint allows you to instantly update one or many attributes about a subscription in a single call.
+ /// Updates one or more attributes of a subscription.
/// ## Update Subscription Payment Method.
- /// Change the card that your Subscriber uses for their subscription. You can also use this method to simply change the expiration date of the card **if your gateway allows**.
- /// Note that partial card updates for **Authorize.Net** are not allowed via this endpoint. The existing Payment Profile must be directly updated instead.
+ /// Change the card that your subscriber uses for their subscription. You can also use this method to change the expiration date of the card **if your gateway allows**.
+ /// Do not use real card information for testing. See the Sites articles that cover [testing your site setup](https://docs.maxio.com/hc/en-us/articles/24250712113165-Testing-Overview#testing-overview-0-0) for more details on testing in your sandbox.
+ /// Note that collecting and sending raw card details in production requires [PCI compliance](https://docs.maxio.com/hc/en-us/articles/24183956938381-PCI-Compliance#pci-compliance-0-0) on your end. If your business is not PCI compliant, use [Chargify.js](https://docs.maxio.com/hc/en-us/articles/38163190843789-Chargify-js-Overview#chargify-js-overview-0-0) to collect credit card or bank account information.
+ /// > Note: Partial card updates for **Authorize.Net** are not allowed via this endpoint. The existing Payment Profile must be directly updated instead.
+ /// ## Update Product.
/// You also use this method to change the subscription to a different product by setting a new value for product_handle. A product change can be done in two different ways, **product change** or **delayed product change**.
- /// ## Product Change.
- /// This endpoint may be used to change a subscription's product. The new payment amount is calculated and charged at the normal start of the next period. If you desire complex product changes or prorated upgrades and downgrades instead, please see the documentation on Migrating Subscription Products.
- /// To perform a product change, simply set either the `product_handle` or `product_id` attribute to that of a different product from the same site as the subscription. You can also change the price point by passing in either `product_price_point_id` or `product_price_point_handle` - otherwise the new product's default price point will be used.
+ /// ### Product Change.
+ /// You can change a subscription's product. The new payment amount is calculated and charged at the normal start of the next period. If you require complex product changes or prorated upgrades and downgrades instead, please see the documentation on [Migrating Subscription Products](https://docs.maxio.com/hc/en-us/articles/24252069837581-Product-Changes-and-Migrations#product-changes-and-migrations-0-0).
+ /// To perform a product change, set either the `product_handle` or `product_id` attribute to that of a different product from the same site as the subscription. You can also change the price point by passing in either `product_price_point_id` or `product_price_point_handle` - otherwise the new product's default price point is used.
/// ### Delayed Product Change.
/// This method also changes the product and/or price point, and the new payment amount is calculated and charged at the normal start of the next period.
- /// This method schedules the product change to happen automatically at the subscription’s next renewal date. To perform a Delayed Product Change, set the `product_handle` attribute as you would in a regular product change, but also set the `product_change_delayed` attribute to `true`. No proration applies in this case.
+ /// This method schedules the product change to happen automatically at the subscription’s next renewal date. To perform a delayed product change, set the `product_handle` attribute as you would in a regular product change, but also set the `product_change_delayed` attribute to `true`. No proration applies in this case.
/// You can also perform a delayed change to the price point by passing in either `product_price_point_id` or `product_price_point_handle`.
- /// **Note: To cancel a delayed product change, set `next_product_id` to an empty string.**.
+ /// > **Note:** To cancel a delayed product change, set `next_product_id` to an empty string.
/// ## Billing Date Changes.
+ /// You can update dates for a subscrption. .
/// ### Regular Billing Date Changes.
/// Send the `next_billing_at` to set the next billing date for the subscription. After that date passes and the subscription is processed, the following billing date will be set according to the subscription's product period.
- /// Note that if you pass an invalid date, we will automatically interpret and set the correct date. For example, when February 30 is entered, the next billing will be set to March 2nd in a non-leap year.
- /// The server response will not return data under the key/value pair of `next_billing`. Please view the key/value pair of `current_period_ends_at` to verify that the `next_billing` date has been changed successfully.
- /// ### Snap Day Changes.
+ /// > Note: If you pass an invalid date, the correct date is automatically set to he correct date. For example, if February 30 is passed, the next billing would be set to March 2nd in a non-leap year.
+ /// The server response will not return data under the key/value pair of `next_billing_at`. View the key/value pair of `current_period_ends_at` to verify that the `next_billing_at` date has been changed successfully.
+ /// ### Calendar Billing and Snap Day Changes.
/// For a subscription using Calendar Billing, setting the next billing date is a bit different. Send the `snap_day` attribute to change the calendar billing date for **a subscription using a product eligible for calendar billing**.
- /// Note: If you change the product associated with a subscription that contains a `snap_date` and immediately `READ/GET` the subscription data, it will still contain evidence of the existing `snap_date`. This is due to the fact that a product change is instantanous and only affects the product associated with a subscription. After the `next_billing` date arrives, the `snap_day` associated with the subscription will return to `null.` Another way of looking at this is that you willl have to wait for the next billing cycle to arrive before the `snap_date` will reset to `null`.
+ /// > Note: If you change the product associated with a subscription that contains a `snap_day` and immediately `READ/GET` the subscription data, it will still contain original `snap_day`. The `snap_day`will will reset to 'null on the next billing cycle. This is because a product change is instantanous and only affects the product associated with a subscription.
///
/// Required parameter: The Chargify id of the subscription.
/// Optional parameter: .
@@ -1226,7 +330,7 @@ public Models.SubscriptionResponse FindSubscription(
///
@@ -1245,7 +349,7 @@ public Models.SubscriptionResponse PurgeSubscription(
///
@@ -1310,17 +414,17 @@ public Models.PrepaidConfigurationResponse UpdatePrepaidSubscriptionConfiguratio
/// The Chargify API allows you to preview a subscription by POSTing the same JSON or XML as for a subscription creation.
/// The "Next Billing" amount and "Next Billing" date are represented in each Subscriber's Summary.
/// A subscription will not be created by utilizing this endpoint; it is meant to serve as a prediction.
- /// For more information, please see our documentation [here](https://maxio.zendesk.com/hc/en-us/articles/24252493695757-Subscriber-Interface-Overview).
+ /// For more information, see our documentation [here](https://maxio.zendesk.com/hc/en-us/articles/24252493695757-Subscriber-Interface-Overview).
/// ## Taxable Subscriptions.
/// This endpoint will preview taxes applicable to a purchase. In order for taxes to be previewed, the following conditions must be met:.
/// + Taxes must be configured on the subscription.
/// + The preview must be for the purchase of a taxable product or component, or combination of the two.
/// + The subscription payload must contain a full billing or shipping address in order to calculate tax.
- /// For more information about creating taxable previews, please see our documentation guide on how to create [taxable subscriptions.](https://maxio.zendesk.com/hc/en-us/sections/24287012349325-Taxes).
- /// You do **not** need to include a card number to generate tax information when you are previewing a subscription. However, please note that when you actually want to create the subscription, you must include the credit card information if you want the billing address to be stored in Advanced Billing. The billing address and the credit card information are stored together within the payment profile object. Also, you may not send a billing address to Advanced Billing without payment profile information, as the address is stored on the card.
+ /// For more information about creating taxable previews, see our documentation guide on how to create [taxable subscriptions.](https://maxio.zendesk.com/hc/en-us/sections/24287012349325-Taxes).
+ /// You do **not** need to include a card number to generate tax information when you are previewing a subscription. However, when you actually want to create the subscription, you must include the credit card information if you want the billing address to be stored in Advanced Billing. The billing address and the credit card information are stored together within the payment profile object. Also, you may not send a billing address to Advanced Billing without payment profile information, as the address is stored on the card.
/// You can pass shipping and billing addresses and still decide not to calculate taxes. To do that, pass `skip_billing_manifest_taxes: true` attribute.
/// ## Non-taxable Subscriptions.
- /// If you'd like to calculate subscriptions that do not include tax, please feel free to leave off the billing information.
+ /// If you'd like to calculate subscriptions that do not include tax you may leave off the billing information.
///
/// Optional parameter: .
/// Returns the Models.SubscriptionPreviewResponse response from the API call.
@@ -1332,17 +436,17 @@ public Models.SubscriptionPreviewResponse PreviewSubscription(
/// The Chargify API allows you to preview a subscription by POSTing the same JSON or XML as for a subscription creation.
/// The "Next Billing" amount and "Next Billing" date are represented in each Subscriber's Summary.
/// A subscription will not be created by utilizing this endpoint; it is meant to serve as a prediction.
- /// For more information, please see our documentation [here](https://maxio.zendesk.com/hc/en-us/articles/24252493695757-Subscriber-Interface-Overview).
+ /// For more information, see our documentation [here](https://maxio.zendesk.com/hc/en-us/articles/24252493695757-Subscriber-Interface-Overview).
/// ## Taxable Subscriptions.
/// This endpoint will preview taxes applicable to a purchase. In order for taxes to be previewed, the following conditions must be met:.
/// + Taxes must be configured on the subscription.
/// + The preview must be for the purchase of a taxable product or component, or combination of the two.
/// + The subscription payload must contain a full billing or shipping address in order to calculate tax.
- /// For more information about creating taxable previews, please see our documentation guide on how to create [taxable subscriptions.](https://maxio.zendesk.com/hc/en-us/sections/24287012349325-Taxes).
- /// You do **not** need to include a card number to generate tax information when you are previewing a subscription. However, please note that when you actually want to create the subscription, you must include the credit card information if you want the billing address to be stored in Advanced Billing. The billing address and the credit card information are stored together within the payment profile object. Also, you may not send a billing address to Advanced Billing without payment profile information, as the address is stored on the card.
+ /// For more information about creating taxable previews, see our documentation guide on how to create [taxable subscriptions.](https://maxio.zendesk.com/hc/en-us/sections/24287012349325-Taxes).
+ /// You do **not** need to include a card number to generate tax information when you are previewing a subscription. However, when you actually want to create the subscription, you must include the credit card information if you want the billing address to be stored in Advanced Billing. The billing address and the credit card information are stored together within the payment profile object. Also, you may not send a billing address to Advanced Billing without payment profile information, as the address is stored on the card.
/// You can pass shipping and billing addresses and still decide not to calculate taxes. To do that, pass `skip_billing_manifest_taxes: true` attribute.
/// ## Non-taxable Subscriptions.
- /// If you'd like to calculate subscriptions that do not include tax, please feel free to leave off the billing information.
+ /// If you'd like to calculate subscriptions that do not include tax you may leave off the billing information.
///
/// Optional parameter: .
/// cancellationToken.
@@ -1406,7 +510,7 @@ public Models.SubscriptionResponse ApplyCouponsToSubscription(
///
/// Use this endpoint to remove a coupon from an existing subscription.
- /// For more information on the expected behaviour of removing a coupon from a subscription, please see our documentation [here.](https://maxio.zendesk.com/hc/en-us/articles/24261259337101-Coupons-and-Subscriptions#removing-a-coupon).
+ /// For more information on the expected behaviour of removing a coupon from a subscription, See our documentation [here.](https://maxio.zendesk.com/hc/en-us/articles/24261259337101-Coupons-and-Subscriptions#removing-a-coupon).
///
/// Required parameter: The Chargify id of the subscription.
/// Optional parameter: The coupon code.
@@ -1418,7 +522,7 @@ public string RemoveCouponFromSubscription(
///
/// Use this endpoint to remove a coupon from an existing subscription.
- /// For more information on the expected behaviour of removing a coupon from a subscription, please see our documentation [here.](https://maxio.zendesk.com/hc/en-us/articles/24261259337101-Coupons-and-Subscriptions#removing-a-coupon).
+ /// For more information on the expected behaviour of removing a coupon from a subscription, See our documentation [here.](https://maxio.zendesk.com/hc/en-us/articles/24261259337101-Coupons-and-Subscriptions#removing-a-coupon).
///
/// Required parameter: The Chargify id of the subscription.
/// Optional parameter: The coupon code.
diff --git a/AdvancedBilling.Standard/Exceptions/ApiException.cs b/AdvancedBilling.Standard/Exceptions/ApiException.cs
index 5813b7e6..70a86bb7 100644
--- a/AdvancedBilling.Standard/Exceptions/ApiException.cs
+++ b/AdvancedBilling.Standard/Exceptions/ApiException.cs
@@ -29,6 +29,7 @@ public override string ToString()
{
var toStringOutput = new List();
ToString(toStringOutput);
+ toStringOutput.Add($"StackTrace = {(StackTrace != null ? $"\n{StackTrace}" : "null")}");
return $"ApiException : ({string.Join(", ", toStringOutput)})";
}
diff --git a/AdvancedBilling.Standard/Exceptions/ComponentAllocationErrorException.cs b/AdvancedBilling.Standard/Exceptions/ComponentAllocationErrorException.cs
index c0707135..f3a3f8f1 100644
--- a/AdvancedBilling.Standard/Exceptions/ComponentAllocationErrorException.cs
+++ b/AdvancedBilling.Standard/Exceptions/ComponentAllocationErrorException.cs
@@ -57,6 +57,7 @@ public override string ToString()
{
base.ToString(toStringOutput);
toStringOutput.Add($"Errors = {(this.Errors == null ? "null" : $"[{string.Join(", ", this.Errors)} ]")}");
+ toStringOutput.Add($"StackTrace = {(StackTrace != null ? $"\n{StackTrace}" : "null")}");
}
}
}
\ No newline at end of file
diff --git a/AdvancedBilling.Standard/Exceptions/ComponentPricePointErrorException.cs b/AdvancedBilling.Standard/Exceptions/ComponentPricePointErrorException.cs
index 2a54e357..a5dfcbaf 100644
--- a/AdvancedBilling.Standard/Exceptions/ComponentPricePointErrorException.cs
+++ b/AdvancedBilling.Standard/Exceptions/ComponentPricePointErrorException.cs
@@ -57,6 +57,7 @@ public override string ToString()
{
base.ToString(toStringOutput);
toStringOutput.Add($"Errors = {(this.Errors == null ? "null" : $"[{string.Join(", ", this.Errors)} ]")}");
+ toStringOutput.Add($"StackTrace = {(StackTrace != null ? $"\n{StackTrace}" : "null")}");
}
}
}
\ No newline at end of file
diff --git a/AdvancedBilling.Standard/Exceptions/CustomerErrorResponseException.cs b/AdvancedBilling.Standard/Exceptions/CustomerErrorResponseException.cs
index 278dc174..06368e92 100644
--- a/AdvancedBilling.Standard/Exceptions/CustomerErrorResponseException.cs
+++ b/AdvancedBilling.Standard/Exceptions/CustomerErrorResponseException.cs
@@ -58,6 +58,7 @@ public override string ToString()
{
base.ToString(toStringOutput);
toStringOutput.Add($"Errors = {(this.Errors == null ? "null" : this.Errors.ToString())}");
+ toStringOutput.Add($"StackTrace = {(StackTrace != null ? $"\n{StackTrace}" : "null")}");
}
}
}
\ No newline at end of file
diff --git a/AdvancedBilling.Standard/Exceptions/ErrorArrayMapResponseException.cs b/AdvancedBilling.Standard/Exceptions/ErrorArrayMapResponseException.cs
index 5ea019bc..c96d50ca 100644
--- a/AdvancedBilling.Standard/Exceptions/ErrorArrayMapResponseException.cs
+++ b/AdvancedBilling.Standard/Exceptions/ErrorArrayMapResponseException.cs
@@ -57,6 +57,7 @@ public override string ToString()
{
base.ToString(toStringOutput);
toStringOutput.Add($"Errors = {(this.Errors == null ? "null" : this.Errors.ToString())}");
+ toStringOutput.Add($"StackTrace = {(StackTrace != null ? $"\n{StackTrace}" : "null")}");
}
}
}
\ No newline at end of file
diff --git a/AdvancedBilling.Standard/Exceptions/ErrorListResponseException.cs b/AdvancedBilling.Standard/Exceptions/ErrorListResponseException.cs
index 2a9b80ae..72a4872f 100644
--- a/AdvancedBilling.Standard/Exceptions/ErrorListResponseException.cs
+++ b/AdvancedBilling.Standard/Exceptions/ErrorListResponseException.cs
@@ -57,6 +57,7 @@ public override string ToString()
{
base.ToString(toStringOutput);
toStringOutput.Add($"Errors = {(this.Errors == null ? "null" : $"[{string.Join(", ", this.Errors)} ]")}");
+ toStringOutput.Add($"StackTrace = {(StackTrace != null ? $"\n{StackTrace}" : "null")}");
}
}
}
\ No newline at end of file
diff --git a/AdvancedBilling.Standard/Exceptions/ErrorStringMapResponseException.cs b/AdvancedBilling.Standard/Exceptions/ErrorStringMapResponseException.cs
index 67a16cb1..0683b16f 100644
--- a/AdvancedBilling.Standard/Exceptions/ErrorStringMapResponseException.cs
+++ b/AdvancedBilling.Standard/Exceptions/ErrorStringMapResponseException.cs
@@ -57,6 +57,7 @@ public override string ToString()
{
base.ToString(toStringOutput);
toStringOutput.Add($"Errors = {(this.Errors == null ? "null" : this.Errors.ToString())}");
+ toStringOutput.Add($"StackTrace = {(StackTrace != null ? $"\n{StackTrace}" : "null")}");
}
}
}
\ No newline at end of file
diff --git a/AdvancedBilling.Standard/Exceptions/EventBasedBillingListSegmentsErrorsException.cs b/AdvancedBilling.Standard/Exceptions/EventBasedBillingListSegmentsErrorsException.cs
index 2ce011b3..cdaf4da8 100644
--- a/AdvancedBilling.Standard/Exceptions/EventBasedBillingListSegmentsErrorsException.cs
+++ b/AdvancedBilling.Standard/Exceptions/EventBasedBillingListSegmentsErrorsException.cs
@@ -57,6 +57,7 @@ public override string ToString()
{
base.ToString(toStringOutput);
toStringOutput.Add($"Errors = {(this.Errors == null ? "null" : this.Errors.ToString())}");
+ toStringOutput.Add($"StackTrace = {(StackTrace != null ? $"\n{StackTrace}" : "null")}");
}
}
}
\ No newline at end of file
diff --git a/AdvancedBilling.Standard/Exceptions/EventBasedBillingSegmentErrorsException.cs b/AdvancedBilling.Standard/Exceptions/EventBasedBillingSegmentErrorsException.cs
index 8e58bd33..c92ca6aa 100644
--- a/AdvancedBilling.Standard/Exceptions/EventBasedBillingSegmentErrorsException.cs
+++ b/AdvancedBilling.Standard/Exceptions/EventBasedBillingSegmentErrorsException.cs
@@ -57,6 +57,7 @@ public override string ToString()
{
base.ToString(toStringOutput);
toStringOutput.Add($"Errors = {(this.Errors == null ? "null" : this.Errors.ToString())}");
+ toStringOutput.Add($"StackTrace = {(StackTrace != null ? $"\n{StackTrace}" : "null")}");
}
}
}
\ No newline at end of file
diff --git a/AdvancedBilling.Standard/Exceptions/EventBasedBillingSegmentException.cs b/AdvancedBilling.Standard/Exceptions/EventBasedBillingSegmentException.cs
index b04b264e..77db8a5f 100644
--- a/AdvancedBilling.Standard/Exceptions/EventBasedBillingSegmentException.cs
+++ b/AdvancedBilling.Standard/Exceptions/EventBasedBillingSegmentException.cs
@@ -57,6 +57,7 @@ public override string ToString()
{
base.ToString(toStringOutput);
toStringOutput.Add($"Errors = {(this.Errors == null ? "null" : this.Errors.ToString())}");
+ toStringOutput.Add($"StackTrace = {(StackTrace != null ? $"\n{StackTrace}" : "null")}");
}
}
}
\ No newline at end of file
diff --git a/AdvancedBilling.Standard/Exceptions/ProductPricePointErrorResponseException.cs b/AdvancedBilling.Standard/Exceptions/ProductPricePointErrorResponseException.cs
index 56d7c5b3..bd4871ff 100644
--- a/AdvancedBilling.Standard/Exceptions/ProductPricePointErrorResponseException.cs
+++ b/AdvancedBilling.Standard/Exceptions/ProductPricePointErrorResponseException.cs
@@ -57,6 +57,7 @@ public override string ToString()
{
base.ToString(toStringOutput);
toStringOutput.Add($"Errors = {(this.Errors == null ? "null" : this.Errors.ToString())}");
+ toStringOutput.Add($"StackTrace = {(StackTrace != null ? $"\n{StackTrace}" : "null")}");
}
}
}
\ No newline at end of file
diff --git a/AdvancedBilling.Standard/Exceptions/ProformaBadRequestErrorResponseException.cs b/AdvancedBilling.Standard/Exceptions/ProformaBadRequestErrorResponseException.cs
index 2dce7894..1775222d 100644
--- a/AdvancedBilling.Standard/Exceptions/ProformaBadRequestErrorResponseException.cs
+++ b/AdvancedBilling.Standard/Exceptions/ProformaBadRequestErrorResponseException.cs
@@ -57,6 +57,7 @@ public override string ToString()
{
base.ToString(toStringOutput);
toStringOutput.Add($"Errors = {(this.Errors == null ? "null" : this.Errors.ToString())}");
+ toStringOutput.Add($"StackTrace = {(StackTrace != null ? $"\n{StackTrace}" : "null")}");
}
}
}
\ No newline at end of file
diff --git a/AdvancedBilling.Standard/Exceptions/RefundPrepaymentBaseErrorsResponseException.cs b/AdvancedBilling.Standard/Exceptions/RefundPrepaymentBaseErrorsResponseException.cs
index 42750eb1..8a6e973b 100644
--- a/AdvancedBilling.Standard/Exceptions/RefundPrepaymentBaseErrorsResponseException.cs
+++ b/AdvancedBilling.Standard/Exceptions/RefundPrepaymentBaseErrorsResponseException.cs
@@ -57,6 +57,7 @@ public override string ToString()
{
base.ToString(toStringOutput);
toStringOutput.Add($"Errors = {(this.Errors == null ? "null" : this.Errors.ToString())}");
+ toStringOutput.Add($"StackTrace = {(StackTrace != null ? $"\n{StackTrace}" : "null")}");
}
}
}
\ No newline at end of file
diff --git a/AdvancedBilling.Standard/Exceptions/SingleErrorResponseException.cs b/AdvancedBilling.Standard/Exceptions/SingleErrorResponseException.cs
index 7c331f9f..277911e1 100644
--- a/AdvancedBilling.Standard/Exceptions/SingleErrorResponseException.cs
+++ b/AdvancedBilling.Standard/Exceptions/SingleErrorResponseException.cs
@@ -57,6 +57,7 @@ public override string ToString()
{
base.ToString(toStringOutput);
toStringOutput.Add($"Error = {this.Error ?? "null"}");
+ toStringOutput.Add($"StackTrace = {(StackTrace != null ? $"\n{StackTrace}" : "null")}");
}
}
}
\ No newline at end of file
diff --git a/AdvancedBilling.Standard/Exceptions/SingleStringErrorResponseException.cs b/AdvancedBilling.Standard/Exceptions/SingleStringErrorResponseException.cs
index e5c847ee..dc4d7204 100644
--- a/AdvancedBilling.Standard/Exceptions/SingleStringErrorResponseException.cs
+++ b/AdvancedBilling.Standard/Exceptions/SingleStringErrorResponseException.cs
@@ -57,6 +57,7 @@ public override string ToString()
{
base.ToString(toStringOutput);
toStringOutput.Add($"Errors = {this.Errors ?? "null"}");
+ toStringOutput.Add($"StackTrace = {(StackTrace != null ? $"\n{StackTrace}" : "null")}");
}
}
}
\ No newline at end of file
diff --git a/AdvancedBilling.Standard/Exceptions/SubscriptionAddCouponErrorException.cs b/AdvancedBilling.Standard/Exceptions/SubscriptionAddCouponErrorException.cs
index 9ba61470..8b1a7e2d 100644
--- a/AdvancedBilling.Standard/Exceptions/SubscriptionAddCouponErrorException.cs
+++ b/AdvancedBilling.Standard/Exceptions/SubscriptionAddCouponErrorException.cs
@@ -78,6 +78,7 @@ public override string ToString()
toStringOutput.Add($"CouponCode = {(this.CouponCode == null ? "null" : $"[{string.Join(", ", this.CouponCode)} ]")}");
toStringOutput.Add($"CouponCodes = {(this.CouponCodes == null ? "null" : $"[{string.Join(", ", this.CouponCodes)} ]")}");
toStringOutput.Add($"Subscription = {(this.Subscription == null ? "null" : $"[{string.Join(", ", this.Subscription)} ]")}");
+ toStringOutput.Add($"StackTrace = {(StackTrace != null ? $"\n{StackTrace}" : "null")}");
}
}
}
\ No newline at end of file
diff --git a/AdvancedBilling.Standard/Exceptions/SubscriptionComponentAllocationErrorException.cs b/AdvancedBilling.Standard/Exceptions/SubscriptionComponentAllocationErrorException.cs
index c1485f75..e54d41ab 100644
--- a/AdvancedBilling.Standard/Exceptions/SubscriptionComponentAllocationErrorException.cs
+++ b/AdvancedBilling.Standard/Exceptions/SubscriptionComponentAllocationErrorException.cs
@@ -57,6 +57,7 @@ public override string ToString()
{
base.ToString(toStringOutput);
toStringOutput.Add($"Errors = {(this.Errors == null ? "null" : $"[{string.Join(", ", this.Errors)} ]")}");
+ toStringOutput.Add($"StackTrace = {(StackTrace != null ? $"\n{StackTrace}" : "null")}");
}
}
}
\ No newline at end of file
diff --git a/AdvancedBilling.Standard/Exceptions/SubscriptionGroupCreateErrorResponseException.cs b/AdvancedBilling.Standard/Exceptions/SubscriptionGroupCreateErrorResponseException.cs
index 8cf98989..39a68b59 100644
--- a/AdvancedBilling.Standard/Exceptions/SubscriptionGroupCreateErrorResponseException.cs
+++ b/AdvancedBilling.Standard/Exceptions/SubscriptionGroupCreateErrorResponseException.cs
@@ -58,6 +58,7 @@ public override string ToString()
{
base.ToString(toStringOutput);
toStringOutput.Add($"Errors = {(this.Errors == null ? "null" : this.Errors.ToString())}");
+ toStringOutput.Add($"StackTrace = {(StackTrace != null ? $"\n{StackTrace}" : "null")}");
}
}
}
\ No newline at end of file
diff --git a/AdvancedBilling.Standard/Exceptions/SubscriptionGroupSignupErrorResponseException.cs b/AdvancedBilling.Standard/Exceptions/SubscriptionGroupSignupErrorResponseException.cs
index 20c7168f..a9c1cd09 100644
--- a/AdvancedBilling.Standard/Exceptions/SubscriptionGroupSignupErrorResponseException.cs
+++ b/AdvancedBilling.Standard/Exceptions/SubscriptionGroupSignupErrorResponseException.cs
@@ -57,6 +57,7 @@ public override string ToString()
{
base.ToString(toStringOutput);
toStringOutput.Add($"Errors = {(this.Errors == null ? "null" : this.Errors.ToString())}");
+ toStringOutput.Add($"StackTrace = {(StackTrace != null ? $"\n{StackTrace}" : "null")}");
}
}
}
\ No newline at end of file
diff --git a/AdvancedBilling.Standard/Exceptions/SubscriptionGroupUpdateErrorResponseException.cs b/AdvancedBilling.Standard/Exceptions/SubscriptionGroupUpdateErrorResponseException.cs
index c687ac2d..edd0adca 100644
--- a/AdvancedBilling.Standard/Exceptions/SubscriptionGroupUpdateErrorResponseException.cs
+++ b/AdvancedBilling.Standard/Exceptions/SubscriptionGroupUpdateErrorResponseException.cs
@@ -57,6 +57,7 @@ public override string ToString()
{
base.ToString(toStringOutput);
toStringOutput.Add($"Errors = {(this.Errors == null ? "null" : this.Errors.ToString())}");
+ toStringOutput.Add($"StackTrace = {(StackTrace != null ? $"\n{StackTrace}" : "null")}");
}
}
}
\ No newline at end of file
diff --git a/AdvancedBilling.Standard/Exceptions/SubscriptionRemoveCouponErrorsException.cs b/AdvancedBilling.Standard/Exceptions/SubscriptionRemoveCouponErrorsException.cs
index 590c8b36..85ddaa4f 100644
--- a/AdvancedBilling.Standard/Exceptions/SubscriptionRemoveCouponErrorsException.cs
+++ b/AdvancedBilling.Standard/Exceptions/SubscriptionRemoveCouponErrorsException.cs
@@ -57,6 +57,7 @@ public override string ToString()
{
base.ToString(toStringOutput);
toStringOutput.Add($"Subscription = {(this.Subscription == null ? "null" : $"[{string.Join(", ", this.Subscription)} ]")}");
+ toStringOutput.Add($"StackTrace = {(StackTrace != null ? $"\n{StackTrace}" : "null")}");
}
}
}
\ No newline at end of file
diff --git a/AdvancedBilling.Standard/Exceptions/SubscriptionResponseErrorException.cs b/AdvancedBilling.Standard/Exceptions/SubscriptionResponseErrorException.cs
index 9fe01922..0cf2057c 100644
--- a/AdvancedBilling.Standard/Exceptions/SubscriptionResponseErrorException.cs
+++ b/AdvancedBilling.Standard/Exceptions/SubscriptionResponseErrorException.cs
@@ -57,6 +57,7 @@ public override string ToString()
{
base.ToString(toStringOutput);
toStringOutput.Add($"Subscription = {(this.Subscription == null ? "null" : this.Subscription.ToString())}");
+ toStringOutput.Add($"StackTrace = {(StackTrace != null ? $"\n{StackTrace}" : "null")}");
}
}
}
\ No newline at end of file
diff --git a/AdvancedBilling.Standard/Exceptions/SubscriptionsMrrErrorResponseException.cs b/AdvancedBilling.Standard/Exceptions/SubscriptionsMrrErrorResponseException.cs
index 218a5f4b..4938b38f 100644
--- a/AdvancedBilling.Standard/Exceptions/SubscriptionsMrrErrorResponseException.cs
+++ b/AdvancedBilling.Standard/Exceptions/SubscriptionsMrrErrorResponseException.cs
@@ -57,6 +57,7 @@ public override string ToString()
{
base.ToString(toStringOutput);
toStringOutput.Add($"Errors = {(this.Errors == null ? "null" : this.Errors.ToString())}");
+ toStringOutput.Add($"StackTrace = {(StackTrace != null ? $"\n{StackTrace}" : "null")}");
}
}
}
\ No newline at end of file
diff --git a/AdvancedBilling.Standard/Exceptions/TooManyManagementLinkRequestsErrorException.cs b/AdvancedBilling.Standard/Exceptions/TooManyManagementLinkRequestsErrorException.cs
index dd9800a9..5fc52b51 100644
--- a/AdvancedBilling.Standard/Exceptions/TooManyManagementLinkRequestsErrorException.cs
+++ b/AdvancedBilling.Standard/Exceptions/TooManyManagementLinkRequestsErrorException.cs
@@ -57,6 +57,7 @@ public override string ToString()
{
base.ToString(toStringOutput);
toStringOutput.Add($"Errors = {(this.Errors == null ? "null" : this.Errors.ToString())}");
+ toStringOutput.Add($"StackTrace = {(StackTrace != null ? $"\n{StackTrace}" : "null")}");
}
}
}
\ No newline at end of file
diff --git a/AdvancedBilling.Standard/Http/Client/HttpClientConfiguration.cs b/AdvancedBilling.Standard/Http/Client/HttpClientConfiguration.cs
index a27f735f..16c8e87c 100644
--- a/AdvancedBilling.Standard/Http/Client/HttpClientConfiguration.cs
+++ b/AdvancedBilling.Standard/Http/Client/HttpClientConfiguration.cs
@@ -3,12 +3,12 @@
//
// This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).
//
+using APIMatic.Core.Http.Configuration;
+using AdvancedBilling.Standard.Http.Client.Proxy;
using System;
using System.Collections.Generic;
+using System.Linq;
using System.Net.Http;
-using APIMatic.Core.Http.Configuration;
-using APIMatic.Core.Proxy;
-using AdvancedBilling.Standard.Http.Client.Proxy;
namespace AdvancedBilling.Standard.Http.Client
{
@@ -18,17 +18,11 @@ namespace AdvancedBilling.Standard.Http.Client
public class HttpClientConfiguration : IHttpClientConfiguration
{
private readonly CoreHttpClientConfiguration coreHttpClientConfiguration;
- ///
- /// Initializes a new instance of the
- /// class.
- ///
- private readonly CoreProxyConfiguration coreProxyConfiguration;
+
private HttpClientConfiguration(
- CoreHttpClientConfiguration.Builder coreHttpClientConfigurationBuilder,
- CoreProxyConfiguration coreProxyConfiguration)
+ CoreHttpClientConfiguration.Builder coreHttpClientConfigurationBuilder)
{
coreHttpClientConfiguration = coreHttpClientConfigurationBuilder.Build();
- this.coreProxyConfiguration = coreProxyConfiguration;
}
///
@@ -98,8 +92,7 @@ public override string ToString()
public Builder ToBuilder()
=> new Builder()
{
- CoreHttpClientConfigurationBuilder = coreHttpClientConfiguration.ToBuilder(),
- CoreProxyConfiguration = this.coreProxyConfiguration
+ CoreHttpClientConfigurationBuilder = coreHttpClientConfiguration.ToBuilder()
};
///
@@ -108,7 +101,6 @@ public Builder ToBuilder()
public class Builder
{
internal CoreHttpClientConfiguration.Builder CoreHttpClientConfigurationBuilder { private get; set; } = new CoreHttpClientConfiguration.Builder();
- internal CoreProxyConfiguration CoreProxyConfiguration { private get; set; }
///
/// Sets the Timeout.
@@ -199,7 +191,12 @@ public Builder HttpClientInstance(HttpClient httpClientInstance, bool overrideHt
return this;
}
- ///
+ internal Builder RequestMethodsToRetry(IList requestMethodsToRetry)
+ {
+ CoreHttpClientConfigurationBuilder =
+ CoreHttpClientConfigurationBuilder.RequestMethodsToRetry(requestMethodsToRetry.ToHttpMethods());
+ return this;
+ } ///
/// Sets the Proxy.
///
/// ProxyConfigurationBuilder.
@@ -207,7 +204,6 @@ public Builder HttpClientInstance(HttpClient httpClientInstance, bool overrideHt
public Builder Proxy(ProxyConfigurationBuilder proxyConfigurationBuilder)
{
var proxyConfiguration = proxyConfigurationBuilder?.Build();
- CoreProxyConfiguration = proxyConfiguration;
CoreHttpClientConfigurationBuilder.ProxyConfiguration(proxyConfiguration);
return this;
}
@@ -218,8 +214,70 @@ public Builder Proxy(ProxyConfigurationBuilder proxyConfigurationBuilder)
/// HttpClientConfiguration.
public HttpClientConfiguration Build()
{
- return new HttpClientConfiguration(CoreHttpClientConfigurationBuilder, CoreProxyConfiguration);
+ return new HttpClientConfiguration(CoreHttpClientConfigurationBuilder);
}
}
+
+ internal static Builder FromOptions(HttpClientConfigurationOptions options)
+ {
+ var builder = new Builder();
+ if (options.Timeout != null)
+ builder.Timeout(options.Timeout.Value);
+ if (options.NumberOfRetries != null)
+ builder.NumberOfRetries(options.NumberOfRetries.Value);
+ if (options.BackoffFactor != null)
+ builder.BackoffFactor(options.BackoffFactor.Value);
+ if (options.RetryInterval != null)
+ builder.RetryInterval(options.RetryInterval.Value);
+ if (options.MaximumRetryWaitTime != null)
+ builder.MaximumRetryWaitTime(options.MaximumRetryWaitTime.Value);
+ if (options.StatusCodesToRetry != null)
+ builder.StatusCodesToRetry(options.StatusCodesToRetry);
+ if (options.RequestMethodsToRetry != null)
+ builder.RequestMethodsToRetry(options.RequestMethodsToRetry);
+ if (options.Proxy != null)
+ builder.Proxy(ProxyConfigurationBuilder.FromOptions(options.Proxy));
+ return builder;
+ }
+ }
+
+ public class HttpClientConfigurationOptions
+ {
+ public TimeSpan? Timeout { get; set; }
+ public int? NumberOfRetries { get; set; }
+ public int? BackoffFactor { get; set; }
+ public double? RetryInterval { get; set; }
+ public TimeSpan? MaximumRetryWaitTime { get; set; }
+ public IList StatusCodesToRetry { get; set; }
+ public IList RequestMethodsToRetry { get; set; }
+ public ProxyOptions Proxy { get; set; }
+ }
+
+ internal static class HttpClientConfigurationExtensions
+ {
+ public static IList ToHttpMethods(this IList methodStrings)
+ {
+ return methodStrings == null
+ ? new List()
+ : methodStrings
+ .Select(m =>
+ {
+ var method = m.ToUpperInvariant();
+ switch (method)
+ {
+ case "GET": return HttpMethod.Get;
+ case "POST": return HttpMethod.Post;
+ case "PUT": return HttpMethod.Put;
+ case "DELETE": return HttpMethod.Delete;
+ case "HEAD": return HttpMethod.Head;
+ case "OPTIONS": return HttpMethod.Options;
+ case "TRACE": return HttpMethod.Trace;
+ case "PATCH": return new HttpMethod("PATCH");
+ default: return null; // Return null for unknown methods
+ }
+ })
+ .Where(m => m != null) // Filter out nulls
+ .ToList();
+ }
}
}
diff --git a/AdvancedBilling.Standard/Http/Client/Proxy/ProxyConfigurationBuilder.cs b/AdvancedBilling.Standard/Http/Client/Proxy/ProxyConfigurationBuilder.cs
index 54a9da5f..321dfe94 100644
--- a/AdvancedBilling.Standard/Http/Client/Proxy/ProxyConfigurationBuilder.cs
+++ b/AdvancedBilling.Standard/Http/Client/Proxy/ProxyConfigurationBuilder.cs
@@ -12,7 +12,7 @@ namespace AdvancedBilling.Standard.Http.Client.Proxy
///
public class ProxyConfigurationBuilder
{
- private string _address;
+ private readonly string _address;
private int _port = 8080;
private string _user;
private string _pass;
@@ -27,6 +27,22 @@ public ProxyConfigurationBuilder(string address)
_address = address;
}
+ internal static ProxyConfigurationBuilder FromOptions(ProxyOptions options)
+ {
+ if (options == null || string.IsNullOrEmpty(options.Address))
+ return null;
+
+ var builder = new ProxyConfigurationBuilder(options.Address);
+ if (options.Port != null)
+ builder.Port(options.Port.Value);
+ if (!string.IsNullOrEmpty(options.User) && !string.IsNullOrEmpty(options.Pass))
+ builder.Auth(options.User, options.Pass);
+
+ builder.Tunnel(options.Tunnel);
+
+ return builder;
+ }
+
///
/// Sets the Port.
///
@@ -67,4 +83,13 @@ internal CoreProxyConfiguration Build()
return new CoreProxyConfiguration(_address, _port, _user, _pass, _tunnel);
}
}
-}
+
+ public class ProxyOptions
+ {
+ public string Address { get; set; }
+ public int? Port { get; set; }
+ public bool Tunnel { get; set; }
+ public string User { get; set; }
+ public string Pass { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/AdvancedBilling.Standard/Models/ActivateEventBasedComponent.cs b/AdvancedBilling.Standard/Models/ActivateEventBasedComponent.cs
index d2ddfea1..10a15398 100644
--- a/AdvancedBilling.Standard/Models/ActivateEventBasedComponent.cs
+++ b/AdvancedBilling.Standard/Models/ActivateEventBasedComponent.cs
@@ -53,7 +53,7 @@ public ActivateEventBasedComponent(
public int? PricePointId { get; set; }
///
- /// This attribute is particularly useful when you need to align billing events for different components on distinct schedules within a subscription. Please note this only works for site with Multifrequency enabled
+ /// This attribute is particularly useful when you need to align billing events for different components on distinct schedules within a subscription. This only works for site with Multifrequency enabled.
///
[JsonProperty("billing_schedule", NullValueHandling = NullValueHandling.Ignore)]
public Models.BillingSchedule BillingSchedule { get; set; }
diff --git a/AdvancedBilling.Standard/Models/CalendarBilling.cs b/AdvancedBilling.Standard/Models/CalendarBilling.cs
index d9093f7a..c8cbba8c 100644
--- a/AdvancedBilling.Standard/Models/CalendarBilling.cs
+++ b/AdvancedBilling.Standard/Models/CalendarBilling.cs
@@ -24,6 +24,12 @@ namespace AdvancedBilling.Standard.Models
///
public class CalendarBilling : BaseModel
{
+ private CalendarBillingSnapDay snapDay;
+ private Dictionary shouldSerialize = new Dictionary
+ {
+ { "snap_day", false },
+ };
+
///
/// Initializes a new instance of the class.
///
@@ -40,15 +46,31 @@ public CalendarBilling(
CalendarBillingSnapDay snapDay = null,
Models.FirstChargeType? calendarBillingFirstCharge = null)
{
- this.SnapDay = snapDay;
+
+ if (snapDay != null)
+ {
+ this.SnapDay = snapDay;
+ }
this.CalendarBillingFirstCharge = calendarBillingFirstCharge;
}
///
/// A day of month that subscription will be processed on. Can be 1 up to 28 or 'end'.
///
- [JsonProperty("snap_day", NullValueHandling = NullValueHandling.Ignore)]
- public CalendarBillingSnapDay SnapDay { get; set; }
+ [JsonProperty("snap_day")]
+ public CalendarBillingSnapDay SnapDay
+ {
+ get
+ {
+ return this.snapDay;
+ }
+
+ set
+ {
+ this.shouldSerialize["snap_day"] = true;
+ this.snapDay = value;
+ }
+ }
///
/// Gets or sets CalendarBillingFirstCharge.
@@ -64,6 +86,23 @@ public override string ToString()
return $"CalendarBilling : ({string.Join(", ", toStringOutput)})";
}
+ ///
+ /// Marks the field to not be serialized.
+ ///
+ public void UnsetSnapDay()
+ {
+ this.shouldSerialize["snap_day"] = false;
+ }
+
+ ///
+ /// Checks if the field should be serialized or not.
+ ///
+ /// A boolean weather the field should be serialized or not.
+ public bool ShouldSerializeSnapDay()
+ {
+ return this.shouldSerialize["snap_day"];
+ }
+
///
public override bool Equals(object obj)
{
diff --git a/AdvancedBilling.Standard/Models/ChargifyEBB.cs b/AdvancedBilling.Standard/Models/ChargifyEBB.cs
index 1697f3d2..00268eae 100644
--- a/AdvancedBilling.Standard/Models/ChargifyEBB.cs
+++ b/AdvancedBilling.Standard/Models/ChargifyEBB.cs
@@ -63,13 +63,13 @@ public ChargifyEBB(
public DateTimeOffset? Timestamp { get; set; }
///
- /// A unique ID set by Chargify. Please note that this field is reserved. If `chargify.id` is present in the request payload, it will be overwritten.
+ /// A unique ID set by Chargify. This field is reserved. If `chargify.id` is present in the request payload, it will be overwritten.
///
[JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)]
public string Id { get; set; }
///
- /// An ISO-8601 timestamp, set by Chargify at the time each event is recorded. Please note that this field is reserved. If `chargify.created_at` is present in the request payload, it will be overwritten.
+ /// An ISO-8601 timestamp, set by Chargify at the time each event is recorded. This field is reserved. If `chargify.created_at` is present in the request payload, it will be overwritten.
///
[JsonConverter(typeof(IsoDateTimeConverter))]
[JsonProperty("created_at", NullValueHandling = NullValueHandling.Ignore)]
diff --git a/AdvancedBilling.Standard/Models/Component.cs b/AdvancedBilling.Standard/Models/Component.cs
index 0e54b813..a87bde3a 100644
--- a/AdvancedBilling.Standard/Models/Component.cs
+++ b/AdvancedBilling.Standard/Models/Component.cs
@@ -83,7 +83,6 @@ public Component()
/// price_per_unit_in_cents.
/// kind.
/// archived.
- /// taxable.
/// description.
/// default_price_point_id.
/// overage_prices.
@@ -91,6 +90,7 @@ public Component()
/// price_point_count.
/// price_points_url.
/// default_price_point_name.
+ /// taxable.
/// tax_code.
/// recurring.
/// upgrade_charge.
@@ -119,7 +119,6 @@ public Component(
long? pricePerUnitInCents = null,
Models.ComponentKind? kind = null,
bool? archived = null,
- bool? taxable = null,
string description = null,
int? defaultPricePointId = null,
List overagePrices = null,
@@ -127,6 +126,7 @@ public Component(
int? pricePointCount = null,
string pricePointsUrl = null,
string defaultPricePointName = null,
+ bool? taxable = null,
string taxCode = null,
bool? recurring = null,
Models.CreditType? upgradeCharge = null,
@@ -171,7 +171,6 @@ public Component(
}
this.Kind = kind;
this.Archived = archived;
- this.Taxable = taxable;
if (description != null)
{
@@ -199,6 +198,7 @@ public Component(
this.PricePointsUrl = pricePointsUrl;
}
this.DefaultPricePointName = defaultPricePointName;
+ this.Taxable = taxable;
if (taxCode != null)
{
@@ -368,12 +368,6 @@ public long? PricePerUnitInCents
[JsonProperty("archived", NullValueHandling = NullValueHandling.Ignore)]
public bool? Archived { get; set; }
- ///
- /// Boolean flag describing whether a component is taxable or not.
- ///
- [JsonProperty("taxable", NullValueHandling = NullValueHandling.Ignore)]
- public bool? Taxable { get; set; }
-
///
/// The description of the component.
///
@@ -477,7 +471,13 @@ public string PricePointsUrl
public string DefaultPricePointName { get; set; }
///
- /// A string representing the tax code related to the component type. This is especially important when using the Avalara service to tax based on locale. This attribute has a max length of 10 characters.
+ /// Boolean flag describing whether a component is taxable or not.
+ ///
+ [JsonProperty("taxable", NullValueHandling = NullValueHandling.Ignore)]
+ public bool? Taxable { get; set; }
+
+ ///
+ /// A string representing the tax code related to the component type. This is especially important when using AvaTax to tax based on locale. This attribute has a max length of 25 characters.
///
[JsonProperty("tax_code")]
public string TaxCode
@@ -995,8 +995,6 @@ public override bool Equals(object obj)
this.Kind?.Equals(other.Kind) == true) &&
(this.Archived == null && other.Archived == null ||
this.Archived?.Equals(other.Archived) == true) &&
- (this.Taxable == null && other.Taxable == null ||
- this.Taxable?.Equals(other.Taxable) == true) &&
(this.Description == null && other.Description == null ||
this.Description?.Equals(other.Description) == true) &&
(this.DefaultPricePointId == null && other.DefaultPricePointId == null ||
@@ -1011,6 +1009,8 @@ public override bool Equals(object obj)
this.PricePointsUrl?.Equals(other.PricePointsUrl) == true) &&
(this.DefaultPricePointName == null && other.DefaultPricePointName == null ||
this.DefaultPricePointName?.Equals(other.DefaultPricePointName) == true) &&
+ (this.Taxable == null && other.Taxable == null ||
+ this.Taxable?.Equals(other.Taxable) == true) &&
(this.TaxCode == null && other.TaxCode == null ||
this.TaxCode?.Equals(other.TaxCode) == true) &&
(this.Recurring == null && other.Recurring == null ||
@@ -1062,7 +1062,6 @@ public override bool Equals(object obj)
toStringOutput.Add($"PricePerUnitInCents = {(this.PricePerUnitInCents == null ? "null" : this.PricePerUnitInCents.ToString())}");
toStringOutput.Add($"Kind = {(this.Kind == null ? "null" : this.Kind.ToString())}");
toStringOutput.Add($"Archived = {(this.Archived == null ? "null" : this.Archived.ToString())}");
- toStringOutput.Add($"Taxable = {(this.Taxable == null ? "null" : this.Taxable.ToString())}");
toStringOutput.Add($"Description = {this.Description ?? "null"}");
toStringOutput.Add($"DefaultPricePointId = {(this.DefaultPricePointId == null ? "null" : this.DefaultPricePointId.ToString())}");
toStringOutput.Add($"OveragePrices = {(this.OveragePrices == null ? "null" : $"[{string.Join(", ", this.OveragePrices)} ]")}");
@@ -1070,6 +1069,7 @@ public override bool Equals(object obj)
toStringOutput.Add($"PricePointCount = {(this.PricePointCount == null ? "null" : this.PricePointCount.ToString())}");
toStringOutput.Add($"PricePointsUrl = {this.PricePointsUrl ?? "null"}");
toStringOutput.Add($"DefaultPricePointName = {this.DefaultPricePointName ?? "null"}");
+ toStringOutput.Add($"Taxable = {(this.Taxable == null ? "null" : this.Taxable.ToString())}");
toStringOutput.Add($"TaxCode = {this.TaxCode ?? "null"}");
toStringOutput.Add($"Recurring = {(this.Recurring == null ? "null" : this.Recurring.ToString())}");
toStringOutput.Add($"UpgradeCharge = {(this.UpgradeCharge == null ? "null" : this.UpgradeCharge.ToString())}");
diff --git a/AdvancedBilling.Standard/Models/ComponentCustomPrice.cs b/AdvancedBilling.Standard/Models/ComponentCustomPrice.cs
index 729dcf47..5f27c9ee 100644
--- a/AdvancedBilling.Standard/Models/ComponentCustomPrice.cs
+++ b/AdvancedBilling.Standard/Models/ComponentCustomPrice.cs
@@ -24,9 +24,13 @@ namespace AdvancedBilling.Standard.Models
public class ComponentCustomPrice : BaseModel
{
private Models.IntervalUnit? intervalUnit;
+ private int? expirationInterval;
+ private Models.ExpirationIntervalUnit? expirationIntervalUnit;
private Dictionary shouldSerialize = new Dictionary
{
{ "interval_unit", false },
+ { "expiration_interval", false },
+ { "expiration_interval_unit", false },
};
///
@@ -44,12 +48,20 @@ public ComponentCustomPrice()
/// pricing_scheme.
/// interval.
/// interval_unit.
+ /// renew_prepaid_allocation.
+ /// rollover_prepaid_remainder.
+ /// expiration_interval.
+ /// expiration_interval_unit.
public ComponentCustomPrice(
List prices,
bool? taxIncluded = null,
Models.PricingScheme? pricingScheme = null,
int? interval = null,
- Models.IntervalUnit? intervalUnit = null)
+ Models.IntervalUnit? intervalUnit = null,
+ bool? renewPrepaidAllocation = null,
+ bool? rolloverPrepaidRemainder = null,
+ int? expirationInterval = null,
+ Models.ExpirationIntervalUnit? expirationIntervalUnit = null)
{
this.TaxIncluded = taxIncluded;
this.PricingScheme = pricingScheme;
@@ -60,6 +72,18 @@ public ComponentCustomPrice(
this.IntervalUnit = intervalUnit;
}
this.Prices = prices;
+ this.RenewPrepaidAllocation = renewPrepaidAllocation;
+ this.RolloverPrepaidRemainder = rolloverPrepaidRemainder;
+
+ if (expirationInterval != null)
+ {
+ this.ExpirationInterval = expirationInterval;
+ }
+
+ if (expirationIntervalUnit != null)
+ {
+ this.ExpirationIntervalUnit = expirationIntervalUnit;
+ }
}
///
@@ -104,6 +128,54 @@ public Models.IntervalUnit? IntervalUnit
[JsonProperty("prices")]
public List Prices { get; set; }
+ ///
+ /// Applicable only to prepaid usage components. Controls whether the allocated quantity renews each period.
+ ///
+ [JsonProperty("renew_prepaid_allocation", NullValueHandling = NullValueHandling.Ignore)]
+ public bool? RenewPrepaidAllocation { get; set; }
+
+ ///
+ /// Applicable only to prepaid usage components. Controls whether remaining units roll over to the next period.
+ ///
+ [JsonProperty("rollover_prepaid_remainder", NullValueHandling = NullValueHandling.Ignore)]
+ public bool? RolloverPrepaidRemainder { get; set; }
+
+ ///
+ /// Applicable only when rollover is enabled. Number of `expiration_interval_unit`s after which rollover amounts expire.
+ ///
+ [JsonProperty("expiration_interval")]
+ public int? ExpirationInterval
+ {
+ get
+ {
+ return this.expirationInterval;
+ }
+
+ set
+ {
+ this.shouldSerialize["expiration_interval"] = true;
+ this.expirationInterval = value;
+ }
+ }
+
+ ///
+ /// Applicable only when rollover is enabled. Interval unit for rollover expiration (month or day).
+ ///
+ [JsonProperty("expiration_interval_unit")]
+ public Models.ExpirationIntervalUnit? ExpirationIntervalUnit
+ {
+ get
+ {
+ return this.expirationIntervalUnit;
+ }
+
+ set
+ {
+ this.shouldSerialize["expiration_interval_unit"] = true;
+ this.expirationIntervalUnit = value;
+ }
+ }
+
///
public override string ToString()
{
@@ -120,6 +192,22 @@ public void UnsetIntervalUnit()
this.shouldSerialize["interval_unit"] = false;
}
+ ///
+ /// Marks the field to not be serialized.
+ ///
+ public void UnsetExpirationInterval()
+ {
+ this.shouldSerialize["expiration_interval"] = false;
+ }
+
+ ///
+ /// Marks the field to not be serialized.
+ ///
+ public void UnsetExpirationIntervalUnit()
+ {
+ this.shouldSerialize["expiration_interval_unit"] = false;
+ }
+
///
/// Checks if the field should be serialized or not.
///
@@ -129,6 +217,24 @@ public bool ShouldSerializeIntervalUnit()
return this.shouldSerialize["interval_unit"];
}
+ ///
+ /// Checks if the field should be serialized or not.
+ ///
+ /// A boolean weather the field should be serialized or not.
+ public bool ShouldSerializeExpirationInterval()
+ {
+ return this.shouldSerialize["expiration_interval"];
+ }
+
+ ///
+ /// Checks if the field should be serialized or not.
+ ///
+ /// A boolean weather the field should be serialized or not.
+ public bool ShouldSerializeExpirationIntervalUnit()
+ {
+ return this.shouldSerialize["expiration_interval_unit"];
+ }
+
///
public override bool Equals(object obj)
{
@@ -146,6 +252,14 @@ public override bool Equals(object obj)
this.IntervalUnit?.Equals(other.IntervalUnit) == true) &&
(this.Prices == null && other.Prices == null ||
this.Prices?.Equals(other.Prices) == true) &&
+ (this.RenewPrepaidAllocation == null && other.RenewPrepaidAllocation == null ||
+ this.RenewPrepaidAllocation?.Equals(other.RenewPrepaidAllocation) == true) &&
+ (this.RolloverPrepaidRemainder == null && other.RolloverPrepaidRemainder == null ||
+ this.RolloverPrepaidRemainder?.Equals(other.RolloverPrepaidRemainder) == true) &&
+ (this.ExpirationInterval == null && other.ExpirationInterval == null ||
+ this.ExpirationInterval?.Equals(other.ExpirationInterval) == true) &&
+ (this.ExpirationIntervalUnit == null && other.ExpirationIntervalUnit == null ||
+ this.ExpirationIntervalUnit?.Equals(other.ExpirationIntervalUnit) == true) &&
base.Equals(obj);
}
@@ -160,6 +274,10 @@ public override bool Equals(object obj)
toStringOutput.Add($"Interval = {(this.Interval == null ? "null" : this.Interval.ToString())}");
toStringOutput.Add($"IntervalUnit = {(this.IntervalUnit == null ? "null" : this.IntervalUnit.ToString())}");
toStringOutput.Add($"Prices = {(this.Prices == null ? "null" : $"[{string.Join(", ", this.Prices)} ]")}");
+ toStringOutput.Add($"RenewPrepaidAllocation = {(this.RenewPrepaidAllocation == null ? "null" : this.RenewPrepaidAllocation.ToString())}");
+ toStringOutput.Add($"RolloverPrepaidRemainder = {(this.RolloverPrepaidRemainder == null ? "null" : this.RolloverPrepaidRemainder.ToString())}");
+ toStringOutput.Add($"ExpirationInterval = {(this.ExpirationInterval == null ? "null" : this.ExpirationInterval.ToString())}");
+ toStringOutput.Add($"ExpirationIntervalUnit = {(this.ExpirationIntervalUnit == null ? "null" : this.ExpirationIntervalUnit.ToString())}");
base.ToString(toStringOutput);
}
diff --git a/AdvancedBilling.Standard/Models/Containers/AllocationPreviewItemPreviousQuantity.cs b/AdvancedBilling.Standard/Models/Containers/AllocationPreviewItemPreviousQuantity.cs
index 1877439b..c6d361a7 100644
--- a/AdvancedBilling.Standard/Models/Containers/AllocationPreviewItemPreviousQuantity.cs
+++ b/AdvancedBilling.Standard/Models/Containers/AllocationPreviewItemPreviousQuantity.cs
@@ -15,7 +15,7 @@ namespace AdvancedBilling.Standard.Models.Containers
///
[JsonConverter(
typeof(UnionTypeConverter),
- new Type[] {
+ new[] {
typeof(NumberCase),
typeof(MStringCase)
},
@@ -55,71 +55,79 @@ public static AllocationPreviewItemPreviousQuantity FromString(string mString)
///
public abstract T Match(Func number, Func mString);
+ ///
+ /// Method to match from the provided one-of cases. The parameters represent
+ /// optional callback functions for one-of type cases. You may provide only
+ /// the callbacks you are interested in; others can be left as null. All
+ /// callback functions must have the same return type T. This typeparam T
+ /// represents the type that will be returned after applying the selected
+ /// callback function, or the default value if no callback is provided for the matched case.
+ ///
+ ///
+ public T MatchSome(Func number = null, Func mString = null) =>
+ Match(number, mString);
+
[JsonConverter(typeof(UnionTypeCaseConverter), JTokenType.Integer)]
private sealed class NumberCase : AllocationPreviewItemPreviousQuantity, ICaseValue
{
- public int _value;
+ public int Value;
- public override T Match(Func number, Func mString)
- {
- return number(_value);
- }
+ public override T Match(Func number, Func mString) =>
+ number != null ? number(Value) : default;
public NumberCase Set(int value)
{
- _value = value;
+ Value = value;
return this;
}
public int Get()
{
- return _value;
+ return Value;
}
public override string ToString()
{
- return _value.ToString();
+ return Value.ToString();
}
public override bool Equals(object obj)
{
if (!(obj is NumberCase other)) return false;
if (ReferenceEquals(this, other)) return true;
- return _value == null ? other._value == null : _value.Equals(other._value);
+ return Value == null ? other.Value == null : Value.Equals(other.Value);
}
}
[JsonConverter(typeof(UnionTypeCaseConverter), JTokenType.String, JTokenType.Null)]
private sealed class MStringCase : AllocationPreviewItemPreviousQuantity, ICaseValue
{
- public string _value;
+ public string Value;
- public override T Match(Func number, Func mString)
- {
- return mString(_value);
- }
+ public override T Match(Func number, Func mString) =>
+ mString != null ? mString(Value) : default;
public MStringCase Set(string value)
{
- _value = value;
+ Value = value;
return this;
}
public string Get()
{
- return _value;
+ return Value;
}
public override string ToString()
{
- return _value?.ToString();
+ return Value?.ToString();
}
public override bool Equals(object obj)
{
if (!(obj is MStringCase other)) return false;
if (ReferenceEquals(this, other)) return true;
- return _value == null ? other._value == null : _value?.Equals(other._value) == true;
+ return Value == null ? other.Value == null : Value?.Equals(other.Value) == true;
}
}
}
diff --git a/AdvancedBilling.Standard/Models/Containers/AllocationPreviewItemQuantity.cs b/AdvancedBilling.Standard/Models/Containers/AllocationPreviewItemQuantity.cs
index 63013c26..ad24e14b 100644
--- a/AdvancedBilling.Standard/Models/Containers/AllocationPreviewItemQuantity.cs
+++ b/AdvancedBilling.Standard/Models/Containers/AllocationPreviewItemQuantity.cs
@@ -15,7 +15,7 @@ namespace AdvancedBilling.Standard.Models.Containers
///
[JsonConverter(
typeof(UnionTypeConverter),
- new Type[] {
+ new[] {
typeof(NumberCase),
typeof(MStringCase)
},
@@ -55,71 +55,79 @@ public static AllocationPreviewItemQuantity FromString(string mString)
///
public abstract T Match(Func number, Func mString);
+ ///
+ /// Method to match from the provided one-of cases. The parameters represent
+ /// optional callback functions for one-of type cases. You may provide only
+ /// the callbacks you are interested in; others can be left as null. All
+ /// callback functions must have the same return type T. This typeparam T
+ /// represents the type that will be returned after applying the selected
+ /// callback function, or the default value if no callback is provided for the matched case.
+ ///
+ ///
+ public T MatchSome(Func number = null, Func mString = null) =>
+ Match(number, mString);
+
[JsonConverter(typeof(UnionTypeCaseConverter), JTokenType.Integer)]
private sealed class NumberCase : AllocationPreviewItemQuantity, ICaseValue
{
- public int _value;
+ public int Value;
- public override T Match(Func number, Func mString)
- {
- return number(_value);
- }
+ public override T Match(Func number, Func mString) =>
+ number != null ? number(Value) : default;
public NumberCase Set(int value)
{
- _value = value;
+ Value = value;
return this;
}
public int Get()
{
- return _value;
+ return Value;
}
public override string ToString()
{
- return _value.ToString();
+ return Value.ToString();
}
public override bool Equals(object obj)
{
if (!(obj is NumberCase other)) return false;
if (ReferenceEquals(this, other)) return true;
- return _value == null ? other._value == null : _value.Equals(other._value);
+ return Value == null ? other.Value == null : Value.Equals(other.Value);
}
}
[JsonConverter(typeof(UnionTypeCaseConverter), JTokenType.String, JTokenType.Null)]
private sealed class MStringCase : AllocationPreviewItemQuantity, ICaseValue
{
- public string _value;
+ public string Value;
- public override T Match(Func number, Func mString)
- {
- return mString(_value);
- }
+ public override T Match(Func number, Func mString) =>
+ mString != null ? mString(Value) : default;
public MStringCase Set(string value)
{
- _value = value;
+ Value = value;
return this;
}
public string Get()
{
- return _value;
+ return Value;
}
public override string ToString()
{
- return _value?.ToString();
+ return Value?.ToString();
}
public override bool Equals(object obj)
{
if (!(obj is MStringCase other)) return false;
if (ReferenceEquals(this, other)) return true;
- return _value == null ? other._value == null : _value?.Equals(other._value) == true;
+ return Value == null ? other.Value == null : Value?.Equals(other.Value) == true;
}
}
}
diff --git a/AdvancedBilling.Standard/Models/Containers/AllocationPreviousQuantity.cs b/AdvancedBilling.Standard/Models/Containers/AllocationPreviousQuantity.cs
index 99f3ebfb..ecf90662 100644
--- a/AdvancedBilling.Standard/Models/Containers/AllocationPreviousQuantity.cs
+++ b/AdvancedBilling.Standard/Models/Containers/AllocationPreviousQuantity.cs
@@ -15,7 +15,7 @@ namespace AdvancedBilling.Standard.Models.Containers
///
[JsonConverter(
typeof(UnionTypeConverter),
- new Type[] {
+ new[] {
typeof(NumberCase),
typeof(MStringCase)
},
@@ -55,71 +55,79 @@ public static AllocationPreviousQuantity FromString(string mString)
///
public abstract T Match(Func number, Func mString);
+ ///
+ /// Method to match from the provided one-of cases. The parameters represent
+ /// optional callback functions for one-of type cases. You may provide only
+ /// the callbacks you are interested in; others can be left as null. All
+ /// callback functions must have the same return type T. This typeparam T
+ /// represents the type that will be returned after applying the selected
+ /// callback function, or the default value if no callback is provided for the matched case.
+ ///
+ ///
+ public T MatchSome(Func number = null, Func mString = null) =>
+ Match(number, mString);
+
[JsonConverter(typeof(UnionTypeCaseConverter), JTokenType.Integer)]
private sealed class NumberCase : AllocationPreviousQuantity, ICaseValue
{
- public int _value;
+ public int Value;
- public override T Match(Func number, Func mString)
- {
- return number(_value);
- }
+ public override T Match(Func number, Func mString) =>
+ number != null ? number(Value) : default;
public NumberCase Set(int value)
{
- _value = value;
+ Value = value;
return this;
}
public int Get()
{
- return _value;
+ return Value;
}
public override string ToString()
{
- return _value.ToString();
+ return Value.ToString();
}
public override bool Equals(object obj)
{
if (!(obj is NumberCase other)) return false;
if (ReferenceEquals(this, other)) return true;
- return _value == null ? other._value == null : _value.Equals(other._value);
+ return Value == null ? other.Value == null : Value.Equals(other.Value);
}
}
[JsonConverter(typeof(UnionTypeCaseConverter), JTokenType.String, JTokenType.Null)]
private sealed class MStringCase : AllocationPreviousQuantity, ICaseValue
{
- public string _value;
+ public string Value;
- public override T Match(Func number, Func mString)
- {
- return mString(_value);
- }
+ public override T Match(Func number, Func mString) =>
+ mString != null ? mString(Value) : default;
public MStringCase Set(string value)
{
- _value = value;
+ Value = value;
return this;
}
public string Get()
{
- return _value;
+ return Value;
}
public override string ToString()
{
- return _value?.ToString();
+ return Value?.ToString();
}
public override bool Equals(object obj)
{
if (!(obj is MStringCase other)) return false;
if (ReferenceEquals(this, other)) return true;
- return _value == null ? other._value == null : _value?.Equals(other._value) == true;
+ return Value == null ? other.Value == null : Value?.Equals(other.Value) == true;
}
}
}
diff --git a/AdvancedBilling.Standard/Models/Containers/AllocationQuantity.cs b/AdvancedBilling.Standard/Models/Containers/AllocationQuantity.cs
index 6a9b2ae2..19151e6a 100644
--- a/AdvancedBilling.Standard/Models/Containers/AllocationQuantity.cs
+++ b/AdvancedBilling.Standard/Models/Containers/AllocationQuantity.cs
@@ -15,7 +15,7 @@ namespace AdvancedBilling.Standard.Models.Containers
///
[JsonConverter(
typeof(UnionTypeConverter),
- new Type[] {
+ new[] {
typeof(NumberCase),
typeof(MStringCase)
},
@@ -55,71 +55,79 @@ public static AllocationQuantity FromString(string mString)
///
public abstract T Match(Func number, Func mString);
+ ///
+ /// Method to match from the provided one-of cases. The parameters represent
+ /// optional callback functions for one-of type cases. You may provide only
+ /// the callbacks you are interested in; others can be left as null. All
+ /// callback functions must have the same return type T. This typeparam T
+ /// represents the type that will be returned after applying the selected
+ /// callback function, or the default value if no callback is provided for the matched case.
+ ///
+ ///
+ public T MatchSome(Func number = null, Func mString = null) =>
+ Match(number, mString);
+
[JsonConverter(typeof(UnionTypeCaseConverter), JTokenType.Integer)]
private sealed class NumberCase : AllocationQuantity, ICaseValue
{
- public int _value;
+ public int Value;
- public override T Match(Func number, Func mString)
- {
- return number(_value);
- }
+ public override T Match(Func number, Func mString) =>
+ number != null ? number(Value) : default;
public NumberCase Set(int value)
{
- _value = value;
+ Value = value;
return this;
}
public int Get()
{
- return _value;
+ return Value;
}
public override string ToString()
{
- return _value.ToString();
+ return Value.ToString();
}
public override bool Equals(object obj)
{
if (!(obj is NumberCase other)) return false;
if (ReferenceEquals(this, other)) return true;
- return _value == null ? other._value == null : _value.Equals(other._value);
+ return Value == null ? other.Value == null : Value.Equals(other.Value);
}
}
[JsonConverter(typeof(UnionTypeCaseConverter), JTokenType.String, JTokenType.Null)]
private sealed class MStringCase : AllocationQuantity, ICaseValue
{
- public string _value;
+ public string Value;
- public override T Match(Func number, Func mString)
- {
- return mString(_value);
- }
+ public override T Match(Func number, Func mString) =>
+ mString != null ? mString(Value) : default;
public MStringCase Set(string value)
{
- _value = value;
+ Value = value;
return this;
}
public string Get()
{
- return _value;
+ return Value;
}
public override string ToString()
{
- return _value?.ToString();
+ return Value?.ToString();
}
public override bool Equals(object obj)
{
if (!(obj is MStringCase other)) return false;
if (ReferenceEquals(this, other)) return true;
- return _value == null ? other._value == null : _value?.Equals(other._value) == true;
+ return Value == null ? other.Value == null : Value?.Equals(other.Value) == true;
}
}
}
diff --git a/AdvancedBilling.Standard/Models/Containers/ArchiveComponentPricePointComponentId.cs b/AdvancedBilling.Standard/Models/Containers/ArchiveComponentPricePointComponentId.cs
index 6281ed0e..8c794ca1 100644
--- a/AdvancedBilling.Standard/Models/Containers/ArchiveComponentPricePointComponentId.cs
+++ b/AdvancedBilling.Standard/Models/Containers/ArchiveComponentPricePointComponentId.cs
@@ -15,7 +15,7 @@ namespace AdvancedBilling.Standard.Models.Containers
///
[JsonConverter(
typeof(UnionTypeConverter),
- new Type[] {
+ new[] {
typeof(NumberCase),
typeof(MStringCase)
},
@@ -55,71 +55,79 @@ public static ArchiveComponentPricePointComponentId FromString(string mString)
///
public abstract T Match(Func number, Func mString);
+ ///
+ /// Method to match from the provided one-of cases. The parameters represent
+ /// optional callback functions for one-of type cases. You may provide only
+ /// the callbacks you are interested in; others can be left as null. All
+ /// callback functions must have the same return type T. This typeparam T
+ /// represents the type that will be returned after applying the selected
+ /// callback function, or the default value if no callback is provided for the matched case.
+ ///
+ ///
+ public T MatchSome(Func number = null, Func mString = null) =>
+ Match(number, mString);
+
[JsonConverter(typeof(UnionTypeCaseConverter), JTokenType.Integer)]
private sealed class NumberCase : ArchiveComponentPricePointComponentId, ICaseValue
{
- public int _value;
+ public int Value;
- public override T Match(Func number, Func mString)
- {
- return number(_value);
- }
+ public override T Match(Func number, Func mString) =>
+ number != null ? number(Value) : default;
public NumberCase Set(int value)
{
- _value = value;
+ Value = value;
return this;
}
public int Get()
{
- return _value;
+ return Value;
}
public override string ToString()
{
- return _value.ToString();
+ return Value.ToString();
}
public override bool Equals(object obj)
{
if (!(obj is NumberCase other)) return false;
if (ReferenceEquals(this, other)) return true;
- return _value == null ? other._value == null : _value.Equals(other._value);
+ return Value == null ? other.Value == null : Value.Equals(other.Value);
}
}
[JsonConverter(typeof(UnionTypeCaseConverter), JTokenType.String, JTokenType.Null)]
private sealed class MStringCase : ArchiveComponentPricePointComponentId, ICaseValue
{
- public string _value;
+ public string Value;
- public override T Match(Func number, Func mString)
- {
- return mString(_value);
- }
+ public override T Match(Func number, Func mString) =>
+ mString != null ? mString(Value) : default;
public MStringCase Set(string value)
{
- _value = value;
+ Value = value;
return this;
}
public string Get()
{
- return _value;
+ return Value;
}
public override string ToString()
{
- return _value?.ToString();
+ return Value?.ToString();
}
public override bool Equals(object obj)
{
if (!(obj is MStringCase other)) return false;
if (ReferenceEquals(this, other)) return true;
- return _value == null ? other._value == null : _value?.Equals(other._value) == true;
+ return Value == null ? other.Value == null : Value?.Equals(other.Value) == true;
}
}
}
diff --git a/AdvancedBilling.Standard/Models/Containers/ArchiveComponentPricePointPricePointId.cs b/AdvancedBilling.Standard/Models/Containers/ArchiveComponentPricePointPricePointId.cs
index 3e6d09bc..25c36fe2 100644
--- a/AdvancedBilling.Standard/Models/Containers/ArchiveComponentPricePointPricePointId.cs
+++ b/AdvancedBilling.Standard/Models/Containers/ArchiveComponentPricePointPricePointId.cs
@@ -15,7 +15,7 @@ namespace AdvancedBilling.Standard.Models.Containers
///
[JsonConverter(
typeof(UnionTypeConverter),
- new Type[] {
+ new[] {
typeof(NumberCase),
typeof(MStringCase)
},
@@ -55,71 +55,79 @@ public static ArchiveComponentPricePointPricePointId FromString(string mString)
///
public abstract T Match(Func number, Func mString);
+ ///
+ /// Method to match from the provided one-of cases. The parameters represent
+ /// optional callback functions for one-of type cases. You may provide only
+ /// the callbacks you are interested in; others can be left as null. All
+ /// callback functions must have the same return type T. This typeparam T
+ /// represents the type that will be returned after applying the selected
+ /// callback function, or the default value if no callback is provided for the matched case.
+ ///
+ ///
+ public T MatchSome(Func number = null, Func mString = null) =>
+ Match(number, mString);
+
[JsonConverter(typeof(UnionTypeCaseConverter), JTokenType.Integer)]
private sealed class NumberCase : ArchiveComponentPricePointPricePointId, ICaseValue
{
- public int _value;
+ public int Value;
- public override T Match(Func number, Func mString)
- {
- return number(_value);
- }
+ public override T Match(Func number, Func mString) =>
+ number != null ? number(Value) : default;
public NumberCase Set(int value)
{
- _value = value;
+ Value = value;
return this;
}
public int Get()
{
- return _value;
+ return Value;
}
public override string ToString()
{
- return _value.ToString();
+ return Value.ToString();
}
public override bool Equals(object obj)
{
if (!(obj is NumberCase other)) return false;
if (ReferenceEquals(this, other)) return true;
- return _value == null ? other._value == null : _value.Equals(other._value);
+ return Value == null ? other.Value == null : Value.Equals(other.Value);
}
}
[JsonConverter(typeof(UnionTypeCaseConverter), JTokenType.String, JTokenType.Null)]
private sealed class MStringCase : ArchiveComponentPricePointPricePointId, ICaseValue
{
- public string _value;
+ public string Value;
- public override T Match(Func number, Func mString)
- {
- return mString(_value);
- }
+ public override T Match(Func number, Func mString) =>
+ mString != null ? mString(Value) : default;
public MStringCase Set(string value)
{
- _value = value;
+ Value = value;
return this;
}
public string Get()
{
- return _value;
+ return Value;
}
public override string ToString()
{
- return _value?.ToString();
+ return Value?.ToString();
}
public override bool Equals(object obj)
{
if (!(obj is MStringCase other)) return false;
if (ReferenceEquals(this, other)) return true;
- return _value == null ? other._value == null : _value?.Equals(other._value) == true;
+ return Value == null ? other.Value == null : Value?.Equals(other.Value) == true;
}
}
}
diff --git a/AdvancedBilling.Standard/Models/Containers/ArchiveProductPricePointPricePointId.cs b/AdvancedBilling.Standard/Models/Containers/ArchiveProductPricePointPricePointId.cs
index d71a6fea..200f302f 100644
--- a/AdvancedBilling.Standard/Models/Containers/ArchiveProductPricePointPricePointId.cs
+++ b/AdvancedBilling.Standard/Models/Containers/ArchiveProductPricePointPricePointId.cs
@@ -15,7 +15,7 @@ namespace AdvancedBilling.Standard.Models.Containers
///
[JsonConverter(
typeof(UnionTypeConverter),
- new Type[] {
+ new[] {
typeof(NumberCase),
typeof(MStringCase)
},
@@ -55,71 +55,79 @@ public static ArchiveProductPricePointPricePointId FromString(string mString)
///
public abstract T Match(Func number, Func mString);
+ ///
+ /// Method to match from the provided one-of cases. The parameters represent
+ /// optional callback functions for one-of type cases. You may provide only
+ /// the callbacks you are interested in; others can be left as null. All
+ /// callback functions must have the same return type T. This typeparam T
+ /// represents the type that will be returned after applying the selected
+ /// callback function, or the default value if no callback is provided for the matched case.
+ ///
+ ///
+ public T MatchSome(Func number = null, Func mString = null) =>
+ Match(number, mString);
+
[JsonConverter(typeof(UnionTypeCaseConverter), JTokenType.Integer)]
private sealed class NumberCase : ArchiveProductPricePointPricePointId, ICaseValue
{
- public int _value;
+ public int Value;
- public override T Match(Func number, Func mString)
- {
- return number(_value);
- }
+ public override T Match(Func number, Func mString) =>
+ number != null ? number(Value) : default;
public NumberCase Set(int value)
{
- _value = value;
+ Value = value;
return this;
}
public int Get()
{
- return _value;
+ return Value;
}
public override string ToString()
{
- return _value.ToString();
+ return Value.ToString();
}
public override bool Equals(object obj)
{
if (!(obj is NumberCase other)) return false;
if (ReferenceEquals(this, other)) return true;
- return _value == null ? other._value == null : _value.Equals(other._value);
+ return Value == null ? other.Value == null : Value.Equals(other.Value);
}
}
[JsonConverter(typeof(UnionTypeCaseConverter), JTokenType.String, JTokenType.Null)]
private sealed class MStringCase : ArchiveProductPricePointPricePointId, ICaseValue
{
- public string _value;
+ public string Value;
- public override T Match(Func number, Func mString)
- {
- return mString(_value);
- }
+ public override T Match(Func number, Func mString) =>
+ mString != null ? mString(Value) : default;
public MStringCase Set(string value)
{
- _value = value;
+ Value = value;
return this;
}
public string Get()
{
- return _value;
+ return Value;
}
public override string ToString()
{
- return _value?.ToString();
+ return Value?.ToString();
}
public override bool Equals(object obj)
{
if (!(obj is MStringCase other)) return false;
if (ReferenceEquals(this, other)) return true;
- return _value == null ? other._value == null : _value?.Equals(other._value) == true;
+ return Value == null ? other.Value == null : Value?.Equals(other.Value) == true;
}
}
}
diff --git a/AdvancedBilling.Standard/Models/Containers/ArchiveProductPricePointProductId.cs b/AdvancedBilling.Standard/Models/Containers/ArchiveProductPricePointProductId.cs
index 283a48cc..0fb4a7b8 100644
--- a/AdvancedBilling.Standard/Models/Containers/ArchiveProductPricePointProductId.cs
+++ b/AdvancedBilling.Standard/Models/Containers/ArchiveProductPricePointProductId.cs
@@ -15,7 +15,7 @@ namespace AdvancedBilling.Standard.Models.Containers
///
[JsonConverter(
typeof(UnionTypeConverter),
- new Type[] {
+ new[] {
typeof(NumberCase),
typeof(MStringCase)
},
@@ -55,71 +55,79 @@ public static ArchiveProductPricePointProductId FromString(string mString)
///
public abstract T Match(Func number, Func mString);
+ ///
+ /// Method to match from the provided one-of cases. The parameters represent
+ /// optional callback functions for one-of type cases. You may provide only
+ /// the callbacks you are interested in; others can be left as null. All
+ /// callback functions must have the same return type T. This typeparam T
+ /// represents the type that will be returned after applying the selected
+ /// callback function, or the default value if no callback is provided for the matched case.
+ ///
+ ///
+ public T MatchSome(Func number = null, Func mString = null) =>
+ Match(number, mString);
+
[JsonConverter(typeof(UnionTypeCaseConverter), JTokenType.Integer)]
private sealed class NumberCase : ArchiveProductPricePointProductId, ICaseValue
{
- public int _value;
+ public int Value;
- public override T Match(Func number, Func mString)
- {
- return number(_value);
- }
+ public override T Match(Func number, Func mString) =>
+ number != null ? number(Value) : default;
public NumberCase Set(int value)
{
- _value = value;
+ Value = value;
return this;
}
public int Get()
{
- return _value;
+ return Value;
}
public override string ToString()
{
- return _value.ToString();
+ return Value.ToString();
}
public override bool Equals(object obj)
{
if (!(obj is NumberCase other)) return false;
if (ReferenceEquals(this, other)) return true;
- return _value == null ? other._value == null : _value.Equals(other._value);
+ return Value == null ? other.Value == null : Value.Equals(other.Value);
}
}
[JsonConverter(typeof(UnionTypeCaseConverter), JTokenType.String, JTokenType.Null)]
private sealed class MStringCase : ArchiveProductPricePointProductId, ICaseValue
{
- public string _value;
+ public string Value;
- public override T Match(Func number, Func mString)
- {
- return mString(_value);
- }
+ public override T Match(Func number, Func mString) =>
+ mString != null ? mString(Value) : default;
public MStringCase Set(string value)
{
- _value = value;
+ Value = value;
return this;
}
public string Get()
{
- return _value;
+ return Value;
}
public override string ToString()
{
- return _value?.ToString();
+ return Value?.ToString();
}
public override bool Equals(object obj)
{
if (!(obj is MStringCase other)) return false;
if (ReferenceEquals(this, other)) return true;
- return _value == null ? other._value == null : _value?.Equals(other._value) == true;
+ return Value == null ? other.Value == null : Value?.Equals(other.Value) == true;
}
}
}
diff --git a/AdvancedBilling.Standard/Models/Containers/CalendarBillingSnapDay.cs b/AdvancedBilling.Standard/Models/Containers/CalendarBillingSnapDay.cs
index 05b3b607..04b92f49 100644
--- a/AdvancedBilling.Standard/Models/Containers/CalendarBillingSnapDay.cs
+++ b/AdvancedBilling.Standard/Models/Containers/CalendarBillingSnapDay.cs
@@ -15,9 +15,9 @@ namespace AdvancedBilling.Standard.Models.Containers
///
[JsonConverter(
typeof(UnionTypeConverter),
- new Type[] {
+ new[] {
typeof(NumberCase),
- typeof(MStringCase)
+ typeof(SnapDayCase)
},
true
)]
@@ -35,14 +35,14 @@ public static CalendarBillingSnapDay FromNumber(int number)
}
///
- /// This is String case.
+ /// This is SnapDay case.
///
///
- /// The CalendarBillingSnapDay instance, wrapping the provided string value.
+ /// The CalendarBillingSnapDay instance, wrapping the provided SnapDay value.
///
- public static CalendarBillingSnapDay FromString(string mString)
+ public static CalendarBillingSnapDay FromSnapDay(SnapDay snapDay)
{
- return new MStringCase().Set(mString);
+ return new SnapDayCase().Set(snapDay);
}
///
@@ -53,73 +53,81 @@ public static CalendarBillingSnapDay FromString(string mString)
/// callback function.
///
///
- public abstract T Match(Func number, Func mString);
+ public abstract T Match(Func number, Func snapDay);
+
+ ///
+ /// Method to match from the provided one-of cases. The parameters represent
+ /// optional callback functions for one-of type cases. You may provide only
+ /// the callbacks you are interested in; others can be left as null. All
+ /// callback functions must have the same return type T. This typeparam T
+ /// represents the type that will be returned after applying the selected
+ /// callback function, or the default value if no callback is provided for the matched case.
+ ///
+ ///
+ public T MatchSome(Func number = null, Func snapDay = null) =>
+ Match(number, snapDay);
[JsonConverter(typeof(UnionTypeCaseConverter), JTokenType.Integer)]
private sealed class NumberCase : CalendarBillingSnapDay, ICaseValue
{
- public int _value;
+ public int Value;
- public override T Match(Func number, Func mString)
- {
- return number(_value);
- }
+ public override T Match(Func number, Func snapDay) =>
+ number != null ? number(Value) : default;
public NumberCase Set(int value)
{
- _value = value;
+ Value = value;
return this;
}
public int Get()
{
- return _value;
+ return Value;
}
public override string ToString()
{
- return _value.ToString();
+ return Value.ToString();
}
public override bool Equals(object obj)
{
if (!(obj is NumberCase other)) return false;
if (ReferenceEquals(this, other)) return true;
- return _value == null ? other._value == null : _value.Equals(other._value);
+ return Value == null ? other.Value == null : Value.Equals(other.Value);
}
}
- [JsonConverter(typeof(UnionTypeCaseConverter), JTokenType.String, JTokenType.Null)]
- private sealed class MStringCase : CalendarBillingSnapDay, ICaseValue
+ [JsonConverter(typeof(UnionTypeCaseConverter))]
+ private sealed class SnapDayCase : CalendarBillingSnapDay, ICaseValue
{
- public string _value;
+ public SnapDay Value;
- public override T Match(Func number, Func mString)
- {
- return mString(_value);
- }
+ public override T Match(Func number, Func snapDay) =>
+ snapDay != null ? snapDay(Value) : default;
- public MStringCase Set(string value)
+ public SnapDayCase Set(SnapDay value)
{
- _value = value;
+ Value = value;
return this;
}
- public string Get()
+ public SnapDay Get()
{
- return _value;
+ return Value;
}
public override string ToString()
{
- return _value?.ToString();
+ return Value.ToString();
}
public override bool Equals(object obj)
{
- if (!(obj is MStringCase other)) return false;
+ if (!(obj is SnapDayCase other)) return false;
if (ReferenceEquals(this, other)) return true;
- return _value == null ? other._value == null : _value?.Equals(other._value) == true;
+ return Value == null ? other.Value == null : Value.Equals(other.Value);
}
}
}
diff --git a/AdvancedBilling.Standard/Models/Containers/ComponentAllocationChangeAllocatedQuantity.cs b/AdvancedBilling.Standard/Models/Containers/ComponentAllocationChangeAllocatedQuantity.cs
index d5a99321..2181ef42 100644
--- a/AdvancedBilling.Standard/Models/Containers/ComponentAllocationChangeAllocatedQuantity.cs
+++ b/AdvancedBilling.Standard/Models/Containers/ComponentAllocationChangeAllocatedQuantity.cs
@@ -15,7 +15,7 @@ namespace AdvancedBilling.Standard.Models.Containers
///
[JsonConverter(
typeof(UnionTypeConverter),
- new Type[] {
+ new[] {
typeof(NumberCase),
typeof(MStringCase)
},
@@ -55,71 +55,79 @@ public static ComponentAllocationChangeAllocatedQuantity FromString(string mStri
///
public abstract T Match(Func number, Func mString);
+ ///
+ /// Method to match from the provided one-of cases. The parameters represent
+ /// optional callback functions for one-of type cases. You may provide only
+ /// the callbacks you are interested in; others can be left as null. All
+ /// callback functions must have the same return type T. This typeparam T
+ /// represents the type that will be returned after applying the selected
+ /// callback function, or the default value if no callback is provided for the matched case.
+ ///
+ ///
+ public T MatchSome(Func number = null, Func mString = null) =>
+ Match(number, mString);
+
[JsonConverter(typeof(UnionTypeCaseConverter), JTokenType.Integer)]
private sealed class NumberCase : ComponentAllocationChangeAllocatedQuantity, ICaseValue
{
- public int _value;
+ public int Value;
- public override T Match(Func number, Func mString)
- {
- return number(_value);
- }
+ public override T Match(Func number, Func mString) =>
+ number != null ? number(Value) : default;
public NumberCase Set(int value)
{
- _value = value;
+ Value = value;
return this;
}
public int Get()
{
- return _value;
+ return Value;
}
public override string ToString()
{
- return _value.ToString();
+ return Value.ToString();
}
public override bool Equals(object obj)
{
if (!(obj is NumberCase other)) return false;
if (ReferenceEquals(this, other)) return true;
- return _value == null ? other._value == null : _value.Equals(other._value);
+ return Value == null ? other.Value == null : Value.Equals(other.Value);
}
}
[JsonConverter(typeof(UnionTypeCaseConverter), JTokenType.String, JTokenType.Null)]
private sealed class MStringCase : ComponentAllocationChangeAllocatedQuantity, ICaseValue
{
- public string _value;
+ public string Value;
- public override T Match(Func number, Func mString)
- {
- return mString(_value);
- }
+ public override T Match(Func number, Func mString) =>
+ mString != null ? mString(Value) : default;
public MStringCase Set(string value)
{
- _value = value;
+ Value = value;
return this;
}
public string Get()
{
- return _value;
+ return Value;
}
public override string ToString()
{
- return _value?.ToString();
+ return Value?.ToString();
}
public override bool Equals(object obj)
{
if (!(obj is MStringCase other)) return false;
if (ReferenceEquals(this, other)) return true;
- return _value == null ? other._value == null : _value?.Equals(other._value) == true;
+ return Value == null ? other.Value == null : Value?.Equals(other.Value) == true;
}
}
}
diff --git a/AdvancedBilling.Standard/Models/Containers/ComponentPricePointAssignmentPricePoint.cs b/AdvancedBilling.Standard/Models/Containers/ComponentPricePointAssignmentPricePoint.cs
index 01e6169c..d77992f2 100644
--- a/AdvancedBilling.Standard/Models/Containers/ComponentPricePointAssignmentPricePoint.cs
+++ b/AdvancedBilling.Standard/Models/Containers/ComponentPricePointAssignmentPricePoint.cs
@@ -15,7 +15,7 @@ namespace AdvancedBilling.Standard.Models.Containers
///
[JsonConverter(
typeof(UnionTypeConverter),
- new Type[] {
+ new[] {
typeof(MStringCase),
typeof(NumberCase)
},
@@ -55,71 +55,79 @@ public static ComponentPricePointAssignmentPricePoint FromNumber(int number)
///
public abstract T Match(Func mString, Func number);
+ ///
+ /// Method to match from the provided one-of cases. The parameters represent
+ /// optional callback functions for one-of type cases. You may provide only
+ /// the callbacks you are interested in; others can be left as null. All
+ /// callback functions must have the same return type T. This typeparam T
+ /// represents the type that will be returned after applying the selected
+ /// callback function, or the default value if no callback is provided for the matched case.
+ ///
+ ///
+ public T MatchSome(Func mString = null, Func number = null) =>
+ Match(mString, number);
+
[JsonConverter(typeof(UnionTypeCaseConverter), JTokenType.String, JTokenType.Null)]
private sealed class MStringCase : ComponentPricePointAssignmentPricePoint, ICaseValue
{
- public string _value;
+ public string Value;
- public override T Match(Func mString, Func number)
- {
- return mString(_value);
- }
+ public override T Match(Func mString, Func number) =>
+ mString != null ? mString(Value) : default;
public MStringCase Set(string value)
{
- _value = value;
+ Value = value;
return this;
}
public string Get()
{
- return _value;
+ return Value;
}
public override string ToString()
{
- return _value?.ToString();
+ return Value?.ToString();
}
public override bool Equals(object obj)
{
if (!(obj is MStringCase other)) return false;
if (ReferenceEquals(this, other)) return true;
- return _value == null ? other._value == null : _value?.Equals(other._value) == true;
+ return Value == null ? other.Value == null : Value?.Equals(other.Value) == true;
}
}
[JsonConverter(typeof(UnionTypeCaseConverter), JTokenType.Integer)]
private sealed class NumberCase : ComponentPricePointAssignmentPricePoint, ICaseValue
{
- public int _value;
+ public int Value;
- public override T Match(Func mString, Func number)
- {
- return number(_value);
- }
+ public override T Match(Func mString, Func number) =>
+ number != null ? number(Value) : default;
public NumberCase Set(int value)
{
- _value = value;
+ Value = value;
return this;
}
public int Get()
{
- return _value;
+ return Value;
}
public override string ToString()
{
- return _value.ToString();
+ return Value.ToString();
}
public override bool Equals(object obj)
{
if (!(obj is NumberCase other)) return false;
if (ReferenceEquals(this, other)) return true;
- return _value == null ? other._value == null : _value.Equals(other._value);
+ return Value == null ? other.Value == null : Value.Equals(other.Value);
}
}
}
diff --git a/AdvancedBilling.Standard/Models/Containers/CouponPayloadPercentage.cs b/AdvancedBilling.Standard/Models/Containers/CouponPayloadPercentage.cs
index 200214c3..ebe6fb1f 100644
--- a/AdvancedBilling.Standard/Models/Containers/CouponPayloadPercentage.cs
+++ b/AdvancedBilling.Standard/Models/Containers/CouponPayloadPercentage.cs
@@ -15,7 +15,7 @@ namespace AdvancedBilling.Standard.Models.Containers
///
[JsonConverter(
typeof(UnionTypeConverter),
- new Type[] {
+ new[] {
typeof(MStringCase),
typeof(PrecisionCase)
},
@@ -55,71 +55,79 @@ public static CouponPayloadPercentage FromPrecision(double precision)
///
public abstract T Match(Func mString, Func precision);
+ ///
+ /// Method to match from the provided one-of cases. The parameters represent
+ /// optional callback functions for one-of type cases. You may provide only
+ /// the callbacks you are interested in; others can be left as null. All
+ /// callback functions must have the same return type T. This typeparam T
+ /// represents the type that will be returned after applying the selected
+ /// callback function, or the default value if no callback is provided for the matched case.
+ ///
+ ///
+ public T MatchSome(Func mString = null, Func precision = null) =>
+ Match(mString, precision);
+
[JsonConverter(typeof(UnionTypeCaseConverter), JTokenType.String, JTokenType.Null)]
private sealed class MStringCase : CouponPayloadPercentage, ICaseValue
{
- public string _value;
+ public string Value;
- public override T Match(Func mString, Func precision)
- {
- return mString(_value);
- }
+ public override T Match(Func mString, Func precision) =>
+ mString != null ? mString(Value) : default;
public MStringCase Set(string value)
{
- _value = value;
+ Value = value;
return this;
}
public string Get()
{
- return _value;
+ return Value;
}
public override string ToString()
{
- return _value?.ToString();
+ return Value?.ToString();
}
public override bool Equals(object obj)
{
if (!(obj is MStringCase other)) return false;
if (ReferenceEquals(this, other)) return true;
- return _value == null ? other._value == null : _value?.Equals(other._value) == true;
+ return Value == null ? other.Value == null : Value?.Equals(other.Value) == true;
}
}
[JsonConverter(typeof(UnionTypeCaseConverter), JTokenType.Float)]
private sealed class PrecisionCase : CouponPayloadPercentage, ICaseValue
{
- public double _value;
+ public double Value;
- public override T Match(Func mString, Func precision)
- {
- return precision(_value);
- }
+ public override T Match(Func mString, Func precision) =>
+ precision != null ? precision(Value) : default;
public PrecisionCase Set(double value)
{
- _value = value;
+ Value = value;
return this;
}
public double Get()
{
- return _value;
+ return Value;
}
public override string ToString()
{
- return _value.ToString();
+ return Value.ToString();
}
public override bool Equals(object obj)
{
if (!(obj is PrecisionCase other)) return false;
if (ReferenceEquals(this, other)) return true;
- return _value == null ? other._value == null : _value.Equals(other._value);
+ return Value == null ? other.Value == null : Value.Equals(other.Value);
}
}
}
diff --git a/AdvancedBilling.Standard/Models/Containers/CreateAllocationPricePointId.cs b/AdvancedBilling.Standard/Models/Containers/CreateAllocationPricePointId.cs
index 78a38aa2..4556ec7b 100644
--- a/AdvancedBilling.Standard/Models/Containers/CreateAllocationPricePointId.cs
+++ b/AdvancedBilling.Standard/Models/Containers/CreateAllocationPricePointId.cs
@@ -15,7 +15,7 @@ namespace AdvancedBilling.Standard.Models.Containers
///
[JsonConverter(
typeof(UnionTypeConverter),
- new Type[] {
+ new[] {
typeof(MStringCase),
typeof(NumberCase)
},
@@ -55,71 +55,79 @@ public static CreateAllocationPricePointId FromNumber(int number)
///
public abstract T Match(Func mString, Func number);
+ ///
+ /// Method to match from the provided one-of cases. The parameters represent
+ /// optional callback functions for one-of type cases. You may provide only
+ /// the callbacks you are interested in; others can be left as null. All
+ /// callback functions must have the same return type T. This typeparam T
+ /// represents the type that will be returned after applying the selected
+ /// callback function, or the default value if no callback is provided for the matched case.
+ ///
+ ///
+ public T MatchSome(Func mString = null, Func number = null) =>
+ Match(mString, number);
+
[JsonConverter(typeof(UnionTypeCaseConverter), JTokenType.String, JTokenType.Null)]
private sealed class MStringCase : CreateAllocationPricePointId, ICaseValue
{
- public string _value;
+ public string Value;
- public override T Match(Func mString, Func number)
- {
- return mString(_value);
- }
+ public override T Match(Func mString, Func number) =>
+ mString != null ? mString(Value) : default;
public MStringCase Set(string value)
{
- _value = value;
+ Value = value;
return this;
}
public string Get()
{
- return _value;
+ return Value;
}
public override string ToString()
{
- return _value?.ToString();
+ return Value?.ToString();
}
public override bool Equals(object obj)
{
if (!(obj is MStringCase other)) return false;
if (ReferenceEquals(this, other)) return true;
- return _value == null ? other._value == null : _value?.Equals(other._value) == true;
+ return Value == null ? other.Value == null : Value?.Equals(other.Value) == true;
}
}
[JsonConverter(typeof(UnionTypeCaseConverter), JTokenType.Integer)]
private sealed class NumberCase : CreateAllocationPricePointId, ICaseValue
{
- public int _value;
+ public int Value;
- public override T Match(Func mString, Func number)
- {
- return number(_value);
- }
+ public override T Match(Func mString, Func number) =>
+ number != null ? number(Value) : default;
public NumberCase Set(int value)
{
- _value = value;
+ Value = value;
return this;
}
public int Get()
{
- return _value;
+ return Value;
}
public override string ToString()
{
- return _value.ToString();
+ return Value.ToString();
}
public override bool Equals(object obj)
{
if (!(obj is NumberCase other)) return false;
if (ReferenceEquals(this, other)) return true;
- return _value == null ? other._value == null : _value.Equals(other._value);
+ return Value == null ? other.Value == null : Value.Equals(other.Value);
}
}
}
diff --git a/AdvancedBilling.Standard/Models/Containers/CreateComponentPricePointRequestPricePoint.cs b/AdvancedBilling.Standard/Models/Containers/CreateComponentPricePointRequestPricePoint.cs
index f766b503..fc77eb84 100644
--- a/AdvancedBilling.Standard/Models/Containers/CreateComponentPricePointRequestPricePoint.cs
+++ b/AdvancedBilling.Standard/Models/Containers/CreateComponentPricePointRequestPricePoint.cs
@@ -14,7 +14,7 @@ namespace AdvancedBilling.Standard.Models.Containers
///
[JsonConverter(
typeof(UnionTypeConverter),
- new Type[] {
+ new[] {
typeof(CreateComponentPricePointCase),
typeof(CreatePrepaidUsageComponentPricePointCase)
},
@@ -54,71 +54,79 @@ public static CreateComponentPricePointRequestPricePoint FromCreatePrepaidUsageC
///
public abstract T Match(Func createComponentPricePoint, Func createPrepaidUsageComponentPricePoint);
+ ///
+ /// Method to match from the provided any-of cases. The parameters represent
+ /// optional callback functions for any-of type cases. You may provide only
+ /// the callbacks you are interested in; others can be left as null. All
+ /// callback functions must have the same return type T. This typeparam T
+ /// represents the type that will be returned after applying the selected
+ /// callback function, or the default value if no callback is provided for the matched case.
+ ///
+ ///
+ public T MatchSome(Func createComponentPricePoint = null, Func createPrepaidUsageComponentPricePoint = null) =>
+ Match(createComponentPricePoint, createPrepaidUsageComponentPricePoint);
+
[JsonConverter(typeof(UnionTypeCaseConverter))]
private sealed class CreateComponentPricePointCase : CreateComponentPricePointRequestPricePoint, ICaseValue
{
- public CreateComponentPricePoint _value;
+ public CreateComponentPricePoint Value;
- public override T Match(Func createComponentPricePoint, Func createPrepaidUsageComponentPricePoint)
- {
- return createComponentPricePoint(_value);
- }
+ public override T Match(Func createComponentPricePoint, Func createPrepaidUsageComponentPricePoint) =>
+ createComponentPricePoint != null ? createComponentPricePoint(Value) : default;
public CreateComponentPricePointCase Set(CreateComponentPricePoint value)
{
- _value = value;
+ Value = value;
return this;
}
public CreateComponentPricePoint Get()
{
- return _value;
+ return Value;
}
public override string ToString()
{
- return _value?.ToString();
+ return Value?.ToString();
}
public override bool Equals(object obj)
{
if (!(obj is CreateComponentPricePointCase other)) return false;
if (ReferenceEquals(this, other)) return true;
- return _value == null ? other._value == null : _value?.Equals(other._value) == true;
+ return Value == null ? other.Value == null : Value?.Equals(other.Value) == true;
}
}
[JsonConverter(typeof(UnionTypeCaseConverter))]
private sealed class CreatePrepaidUsageComponentPricePointCase : CreateComponentPricePointRequestPricePoint, ICaseValue
{
- public CreatePrepaidUsageComponentPricePoint _value;
+ public CreatePrepaidUsageComponentPricePoint Value;
- public override T Match(Func createComponentPricePoint, Func createPrepaidUsageComponentPricePoint)
- {
- return createPrepaidUsageComponentPricePoint(_value);
- }
+ public override T Match(Func createComponentPricePoint, Func createPrepaidUsageComponentPricePoint) =>
+ createPrepaidUsageComponentPricePoint != null ? createPrepaidUsageComponentPricePoint(Value) : default;
public CreatePrepaidUsageComponentPricePointCase Set(CreatePrepaidUsageComponentPricePoint value)
{
- _value = value;
+ Value = value;
return this;
}
public CreatePrepaidUsageComponentPricePoint Get()
{
- return _value;
+ return Value;
}
public override string ToString()
{
- return _value?.ToString();
+ return Value?.ToString();
}
public override bool Equals(object obj)
{
if (!(obj is CreatePrepaidUsageComponentPricePointCase other)) return false;
if (ReferenceEquals(this, other)) return true;
- return _value == null ? other._value == null : _value?.Equals(other._value) == true;
+ return Value == null ? other.Value == null : Value?.Equals(other.Value) == true;
}
}
}
diff --git a/AdvancedBilling.Standard/Models/Containers/CreateComponentPricePointsRequestPricePoints.cs b/AdvancedBilling.Standard/Models/Containers/CreateComponentPricePointsRequestPricePoints.cs
index 28595b3c..e03bef7c 100644
--- a/AdvancedBilling.Standard/Models/Containers/CreateComponentPricePointsRequestPricePoints.cs
+++ b/AdvancedBilling.Standard/Models/Containers/CreateComponentPricePointsRequestPricePoints.cs
@@ -14,7 +14,7 @@ namespace AdvancedBilling.Standard.Models.Containers
///
[JsonConverter(
typeof(UnionTypeConverter),
- new Type[] {
+ new[] {
typeof(CreateComponentPricePointCase),
typeof(CreatePrepaidUsageComponentPricePointCase)
},
@@ -54,71 +54,79 @@ public static CreateComponentPricePointsRequestPricePoints FromCreatePrepaidUsag
///
public abstract T Match(Func createComponentPricePoint, Func createPrepaidUsageComponentPricePoint);
+ ///
+ /// Method to match from the provided any-of cases. The parameters represent
+ /// optional callback functions for any-of type cases. You may provide only
+ /// the callbacks you are interested in; others can be left as null. All
+ /// callback functions must have the same return type T. This typeparam T
+ /// represents the type that will be returned after applying the selected
+ /// callback function, or the default value if no callback is provided for the matched case.
+ ///
+ ///
+ public T MatchSome(Func createComponentPricePoint = null, Func createPrepaidUsageComponentPricePoint = null) =>
+ Match(createComponentPricePoint, createPrepaidUsageComponentPricePoint);
+
[JsonConverter(typeof(UnionTypeCaseConverter))]
private sealed class CreateComponentPricePointCase : CreateComponentPricePointsRequestPricePoints, ICaseValue
{
- public CreateComponentPricePoint _value;
+ public CreateComponentPricePoint Value;
- public override T Match(Func createComponentPricePoint, Func createPrepaidUsageComponentPricePoint)
- {
- return createComponentPricePoint(_value);
- }
+ public override T Match(Func createComponentPricePoint, Func createPrepaidUsageComponentPricePoint) =>
+ createComponentPricePoint != null ? createComponentPricePoint(Value) : default;
public CreateComponentPricePointCase Set(CreateComponentPricePoint value)
{
- _value = value;
+ Value = value;
return this;
}
public CreateComponentPricePoint Get()
{
- return _value;
+ return Value;
}
public override string ToString()
{
- return _value?.ToString();
+ return Value?.ToString();
}
public override bool Equals(object obj)
{
if (!(obj is CreateComponentPricePointCase other)) return false;
if (ReferenceEquals(this, other)) return true;
- return _value == null ? other._value == null : _value?.Equals(other._value) == true;
+ return Value == null ? other.Value == null : Value?.Equals(other.Value) == true;
}
}
[JsonConverter(typeof(UnionTypeCaseConverter))]
private sealed class CreatePrepaidUsageComponentPricePointCase : CreateComponentPricePointsRequestPricePoints, ICaseValue
{
- public CreatePrepaidUsageComponentPricePoint _value;
+ public CreatePrepaidUsageComponentPricePoint Value;
- public override T Match(Func createComponentPricePoint, Func createPrepaidUsageComponentPricePoint)
- {
- return createPrepaidUsageComponentPricePoint(_value);
- }
+ public override T Match(Func createComponentPricePoint, Func createPrepaidUsageComponentPricePoint) =>
+ createPrepaidUsageComponentPricePoint != null ? createPrepaidUsageComponentPricePoint(Value) : default;
public CreatePrepaidUsageComponentPricePointCase Set(CreatePrepaidUsageComponentPricePoint value)
{
- _value = value;
+ Value = value;
return this;
}
public CreatePrepaidUsageComponentPricePoint Get()
{
- return _value;
+ return Value;
}
public override string ToString()
{
- return _value?.ToString();
+ return Value?.ToString();
}
public override bool Equals(object obj)
{
if (!(obj is CreatePrepaidUsageComponentPricePointCase other)) return false;
if (ReferenceEquals(this, other)) return true;
- return _value == null ? other._value == null : _value?.Equals(other._value) == true;
+ return Value == null ? other.Value == null : Value?.Equals(other.Value) == true;
}
}
}
diff --git a/AdvancedBilling.Standard/Models/Containers/CreateInvoiceCouponAmount.cs b/AdvancedBilling.Standard/Models/Containers/CreateInvoiceCouponAmount.cs
index 75e1ec52..ea85092d 100644
--- a/AdvancedBilling.Standard/Models/Containers/CreateInvoiceCouponAmount.cs
+++ b/AdvancedBilling.Standard/Models/Containers/CreateInvoiceCouponAmount.cs
@@ -15,7 +15,7 @@ namespace AdvancedBilling.Standard.Models.Containers
///
[JsonConverter(
typeof(UnionTypeConverter),
- new Type[] {
+ new[] {
typeof(MStringCase),
typeof(PrecisionCase)
},
@@ -55,71 +55,79 @@ public static CreateInvoiceCouponAmount FromPrecision(double precision)
///
public abstract T Match(Func mString, Func precision);
+ ///
+ /// Method to match from the provided one-of cases. The parameters represent
+ /// optional callback functions for one-of type cases. You may provide only
+ /// the callbacks you are interested in; others can be left as null. All
+ /// callback functions must have the same return type T. This typeparam T
+ /// represents the type that will be returned after applying the selected
+ /// callback function, or the default value if no callback is provided for the matched case.
+ ///
+ ///
+ public T MatchSome(Func mString = null, Func precision = null) =>
+ Match(mString, precision);
+
[JsonConverter(typeof(UnionTypeCaseConverter), JTokenType.String, JTokenType.Null)]
private sealed class MStringCase : CreateInvoiceCouponAmount, ICaseValue
{
- public string _value;
+ public string Value;
- public override T Match(Func mString, Func precision)
- {
- return mString(_value);
- }
+ public override T Match(Func mString, Func precision) =>
+ mString != null ? mString(Value) : default;
public MStringCase Set(string value)
{
- _value = value;
+ Value = value;
return this;
}
public string Get()
{
- return _value;
+ return Value;
}
public override string ToString()
{
- return _value?.ToString();
+ return Value?.ToString();
}
public override bool Equals(object obj)
{
if (!(obj is MStringCase other)) return false;
if (ReferenceEquals(this, other)) return true;
- return _value == null ? other._value == null : _value?.Equals(other._value) == true;
+ return Value == null ? other.Value == null : Value?.Equals(other.Value) == true;
}
}
[JsonConverter(typeof(UnionTypeCaseConverter), JTokenType.Float)]
private sealed class PrecisionCase : CreateInvoiceCouponAmount, ICaseValue
{
- public double _value;
+ public double Value;
- public override T Match(Func mString, Func precision)
- {
- return precision(_value);
- }
+ public override T Match(Func mString, Func precision) =>
+ precision != null ? precision(Value) : default;
public PrecisionCase Set(double value)
{
- _value = value;
+ Value = value;
return this;
}
public double Get()
{
- return _value;
+ return Value;
}
public override string ToString()
{
- return _value.ToString();
+ return Value.ToString();
}
public override bool Equals(object obj)
{
if (!(obj is PrecisionCase other)) return false;
if (ReferenceEquals(this, other)) return true;
- return _value == null ? other._value == null : _value.Equals(other._value);
+ return Value == null ? other.Value == null : Value.Equals(other.Value);
}
}
}
diff --git a/AdvancedBilling.Standard/Models/Containers/CreateInvoiceCouponPercentage.cs b/AdvancedBilling.Standard/Models/Containers/CreateInvoiceCouponPercentage.cs
index f504ff64..3ab3d33b 100644
--- a/AdvancedBilling.Standard/Models/Containers/CreateInvoiceCouponPercentage.cs
+++ b/AdvancedBilling.Standard/Models/Containers/CreateInvoiceCouponPercentage.cs
@@ -15,7 +15,7 @@ namespace AdvancedBilling.Standard.Models.Containers
///
[JsonConverter(
typeof(UnionTypeConverter),
- new Type[] {
+ new[] {
typeof(MStringCase),
typeof(PrecisionCase)
},
@@ -55,71 +55,79 @@ public static CreateInvoiceCouponPercentage FromPrecision(double precision)
///
public abstract T Match(Func mString, Func precision);
+ ///
+ /// Method to match from the provided one-of cases. The parameters represent
+ /// optional callback functions for one-of type cases. You may provide only
+ /// the callbacks you are interested in; others can be left as null. All
+ /// callback functions must have the same return type T. This typeparam T
+ /// represents the type that will be returned after applying the selected
+ /// callback function, or the default value if no callback is provided for the matched case.
+ ///
+ ///
+ public T MatchSome(Func mString = null, Func precision = null) =>
+ Match(mString, precision);
+
[JsonConverter(typeof(UnionTypeCaseConverter), JTokenType.String, JTokenType.Null)]
private sealed class MStringCase : CreateInvoiceCouponPercentage, ICaseValue
{
- public string _value;
+ public string Value;
- public override T Match(Func