diff --git a/AdvancedBilling.Standard/AdvancedBilling.Standard.csproj b/AdvancedBilling.Standard/AdvancedBilling.Standard.csproj index 292a2006..bd57b070 100644 --- a/AdvancedBilling.Standard/AdvancedBilling.Standard.csproj +++ b/AdvancedBilling.Standard/AdvancedBilling.Standard.csproj @@ -9,13 +9,13 @@ netstandard2.0 Maxio.AdvancedBillingSdk - 9.1.0.0 + 10.0.0.0 MaxioSdk AdvancedBilling.Standard Copyright © 2019 - 9.1.0.0 - 9.1.0.0 + 10.0.0.0 + 10.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 diff --git a/AdvancedBilling.Standard/AdvancedBillingClient.cs b/AdvancedBilling.Standard/AdvancedBillingClient.cs index c5707044..c46b5af2 100644 --- a/AdvancedBilling.Standard/AdvancedBillingClient.cs +++ b/AdvancedBilling.Standard/AdvancedBillingClient.cs @@ -42,7 +42,7 @@ public sealed class AdvancedBillingClient : IConfiguration }; private readonly GlobalConfiguration globalConfiguration; - private const string userAgent = "AB SDK DotNet:9.1.0 on OS {os-info}"; + private const string userAgent = "AB SDK DotNet:10.0.0 on OS {os-info}"; private readonly HttpCallback httpCallback; private readonly Lazy aPIExports; private readonly Lazy advanceInvoice; diff --git a/AdvancedBilling.Standard/Controllers/APIExportsController.cs b/AdvancedBilling.Standard/Controllers/APIExportsController.cs index 95615380..f7bbf987 100644 --- a/AdvancedBilling.Standard/Controllers/APIExportsController.cs +++ b/AdvancedBilling.Standard/Controllers/APIExportsController.cs @@ -132,16 +132,14 @@ internal APIExportsController(GlobalConfiguration globalConfiguration) : base(gl .ExecuteAsync(cancellationToken).ConfigureAwait(false); /// - /// Creates a proforma invoices export and returns a batch job object. - /// It is only available for Relationship Invoicing architecture. + /// Creates a proforma invoices export and returns a batch job object. Proforma invoices are only available on Relationship Invoicing sites. /// /// Returns the Models.BatchJobResponse response from the API call. public Models.BatchJobResponse ExportProformaInvoices() => CoreHelper.RunTask(ExportProformaInvoicesAsync()); /// - /// Creates a proforma invoices export and returns a batch job object. - /// It is only available for Relationship Invoicing architecture. + /// Creates a proforma invoices export and returns a batch job object. Proforma invoices are only available on Relationship Invoicing sites. /// /// cancellationToken. /// Returns the Models.BatchJobResponse response from the API call. @@ -199,7 +197,7 @@ public Models.BatchJobResponse ExportSubscriptions() .ExecuteAsync(cancellationToken).ConfigureAwait(false); /// - /// Returns a batch job object for a proforma invoices export. + /// Returns a batch job object for a proforma invoices export. Proforma invoices are only available on Relationship Invoicing sites. /// /// Required parameter: Id of a Batch Job.. /// Returns the Models.BatchJobResponse response from the API call. @@ -208,7 +206,7 @@ public Models.BatchJobResponse ReadProformaInvoicesExport( => CoreHelper.RunTask(ReadProformaInvoicesExportAsync(batchId)); /// - /// Returns a batch job object for a proforma invoices export. + /// Returns a batch job object for a proforma invoices export. Proforma invoices are only available on Relationship Invoicing sites. /// /// Required parameter: Id of a Batch Job.. /// cancellationToken. diff --git a/AdvancedBilling.Standard/Controllers/AdvanceInvoiceController.cs b/AdvancedBilling.Standard/Controllers/AdvanceInvoiceController.cs index dd365422..e04f7e3b 100644 --- a/AdvancedBilling.Standard/Controllers/AdvanceInvoiceController.cs +++ b/AdvancedBilling.Standard/Controllers/AdvanceInvoiceController.cs @@ -23,10 +23,10 @@ public class AdvanceInvoiceController : BaseController internal AdvanceInvoiceController(GlobalConfiguration globalConfiguration) : base(globalConfiguration) { } /// - /// 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 for 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. + /// Issues an invoice in advance for a subscription's next renewal date. For the most part, advance invoices function like any other invoice, except they are issued early and have special behavior upon being voided. For more information on advance invoices, including eligibility for generating one, see [Issue Invoice In Advance](https://maxio.zendesk.com/hc/en-us/articles/24252026404749-Issue-Invoice-In-Advance). + /// A subscription can only have one advance invoice per billing period. Attempting to issue an advance invoice when one already exists returns an error. + /// Regeneration of the invoice can be forced with the params `force: true`, which voids an advance invoice if one exists and generates a new one. If no advance invoice exists, a new one is generated. + /// Consider using either the create or preview endpoints for proforma invoices to preview this advance invoice before using this endpoint to generate it. /// /// Required parameter: The Chargify id of the subscription.. /// Optional parameter: . @@ -37,10 +37,10 @@ public Models.Invoice IssueAdvanceInvoice( => CoreHelper.RunTask(IssueAdvanceInvoiceAsync(subscriptionId, body)); /// - /// 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 for 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. + /// Issues an invoice in advance for a subscription's next renewal date. For the most part, advance invoices function like any other invoice, except they are issued early and have special behavior upon being voided. For more information on advance invoices, including eligibility for generating one, see [Issue Invoice In Advance](https://maxio.zendesk.com/hc/en-us/articles/24252026404749-Issue-Invoice-In-Advance). + /// A subscription can only have one advance invoice per billing period. Attempting to issue an advance invoice when one already exists returns an error. + /// Regeneration of the invoice can be forced with the params `force: true`, which voids an advance invoice if one exists and generates a new one. If no advance invoice exists, a new one is generated. + /// Consider using either the create or preview endpoints for proforma invoices to preview this advance invoice before using this endpoint to generate it. /// /// Required parameter: The Chargify id of the subscription.. /// Optional parameter: . @@ -92,8 +92,9 @@ public Models.Invoice ReadAdvanceInvoice( .ExecuteAsync(cancellationToken).ConfigureAwait(false); /// - /// 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, [see our help docs]($m/Invoice). + /// Voids a subscription's existing advance invoice. Once voided, it can later be regenerated if desired. + /// A `reason` is required to void, and the invoice must have an open status. Voiding causes 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 [Invoice]($m/Invoice). /// /// Required parameter: The Chargify id of the subscription.. /// Optional parameter: . @@ -104,8 +105,9 @@ public Models.Invoice VoidAdvanceInvoice( => CoreHelper.RunTask(VoidAdvanceInvoiceAsync(subscriptionId, body)); /// - /// 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, [see our help docs]($m/Invoice). + /// Voids a subscription's existing advance invoice. Once voided, it can later be regenerated if desired. + /// A `reason` is required to void, and the invoice must have an open status. Voiding causes 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 [Invoice]($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 e9f29cf3..eb26b614 100644 --- a/AdvancedBilling.Standard/Controllers/BillingPortalController.cs +++ b/AdvancedBilling.Standard/Controllers/BillingPortalController.cs @@ -23,17 +23,12 @@ public class BillingPortalController : BaseController internal BillingPortalController(GlobalConfiguration globalConfiguration) : base(globalConfiguration) { } /// - /// + /// If your customer has been invited to the Billing Portal, they 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]($e/Billing%20Portal/readBillingPortalLink). Because the URL is cryptographically signed with a timestamp, merchants cannot generate the URL without requesting it through the API. + /// To prevent abuse and overuse, 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 every time. + /// For more information configuring the Billing Portal, see [Billing Portal Overview](https://maxio.zendesk.com/hc/en-us/articles/24252412965133-Billing-Portal-Overview). /// /// Required parameter: The Chargify id of the customer. /// Optional parameter: When set to 1, an Invitation email will be sent to the Customer. When set to 0, or not sent, an email will not be sent. Use in query: `auto_invite=1`.. @@ -44,17 +39,12 @@ public Models.CustomerResponse EnableBillingPortalForCustomer( => CoreHelper.RunTask(EnableBillingPortalForCustomerAsync(customerId, autoInvite)); /// - /// + /// If your customer has been invited to the Billing Portal, they 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]($e/Billing%20Portal/readBillingPortalLink). Because the URL is cryptographically signed with a timestamp, merchants cannot generate the URL without requesting it through the API. + /// To prevent abuse and overuse, 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 every time. + /// For more information configuring the Billing Portal, see [Billing Portal Overview](https://maxio.zendesk.com/hc/en-us/articles/24252412965133-Billing-Portal-Overview). /// /// Required parameter: The Chargify id of the customer. /// Optional parameter: When set to 1, an Invitation email will be sent to the Customer. When set to 0, or not sent, an email will not be sent. Use in query: `auto_invite=1`.. @@ -77,12 +67,12 @@ public Models.CustomerResponse EnableBillingPortalForCustomer( /// /// Returns the exact URL required for a subscriber to access the Billing Portal. - /// ## Rules for Management Link API. - /// + When retrieving a management URL, multiple requests for the same customer in a short period will return the **same** URL. - /// + We will not generate a new URL for 15 days. + /// ## Management Link Request Rules. + /// + When retrieving a management URL, multiple requests for the same customer in a short period return the **same** URL. + /// + A new URL is not generated for 15 days. /// + You must cache and remember this URL if you are going to need it again within 15 days. /// + Only request a new URL after the `new_link_available_at` date. - /// + You are limited to 15 requests for the same URL. If you make more than 15 requests before `new_link_available_at`, you will be blocked from further Management URL requests (with a response code `429`). + /// + You are limited to 15 requests for the same URL. If you make more than 15 requests before `new_link_available_at`, you are blocked from further Management URL requests (with a response code `429`). /// /// Required parameter: The Chargify id of the customer. /// Returns the Models.PortalManagementLink response from the API call. @@ -92,12 +82,12 @@ public Models.PortalManagementLink ReadBillingPortalLink( /// /// Returns the exact URL required for a subscriber to access the Billing Portal. - /// ## Rules for Management Link API. - /// + When retrieving a management URL, multiple requests for the same customer in a short period will return the **same** URL. - /// + We will not generate a new URL for 15 days. + /// ## Management Link Request Rules. + /// + When retrieving a management URL, multiple requests for the same customer in a short period return the **same** URL. + /// + A new URL is not generated for 15 days. /// + You must cache and remember this URL if you are going to need it again within 15 days. /// + Only request a new URL after the `new_link_available_at` date. - /// + You are limited to 15 requests for the same URL. If you make more than 15 requests before `new_link_available_at`, you will be blocked from further Management URL requests (with a response code `429`). + /// + You are limited to 15 requests for the same URL. If you make more than 15 requests before `new_link_available_at`, you are blocked from further Management URL requests (with a response code `429`). /// /// Required parameter: The Chargify id of the customer. /// cancellationToken. diff --git a/AdvancedBilling.Standard/Controllers/ComponentPricePointsController.cs b/AdvancedBilling.Standard/Controllers/ComponentPricePointsController.cs index e09155af..2f2ccd84 100644 --- a/AdvancedBilling.Standard/Controllers/ComponentPricePointsController.cs +++ b/AdvancedBilling.Standard/Controllers/ComponentPricePointsController.cs @@ -96,7 +96,6 @@ public Models.ComponentPricePointResponse CreateComponentPricePoint( /// /// Lists the price points associated with a component. /// You may specify the component by using either the numeric id or the `handle:gold` syntax. - /// When fetching a component's price points, if you have defined multiple currencies at the site level, you can optionally pass the `?currency_prices=true` query param to include an array of currency price data in the response. /// If the price point 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. @@ -108,7 +107,6 @@ public Models.ComponentPricePointsResponse ListComponentPricePoints( /// /// Lists the price points associated with a component. /// You may specify the component by using either the numeric id or the `handle:gold` syntax. - /// When fetching a component's price points, if you have defined multiple currencies at the site level, you can optionally pass the `?currency_prices=true` query param to include an array of currency price data in the response. /// If the price point 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. @@ -267,7 +265,7 @@ public Models.ComponentPricePointResponse UpdateComponentPricePoint( /// /// Required parameter: The id or handle of the component. 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-price_point-handle` for a string handle.. - /// Optional parameter: Include an array of currency price data. + /// Optional parameter: Include an array of currency price data.. /// Returns the Models.ComponentPricePointCurrencyOverageResponse response from the API call. public Models.ComponentPricePointCurrencyOverageResponse ReadComponentPricePoint( ReadComponentPricePointComponentId componentId, @@ -280,7 +278,7 @@ public Models.ComponentPricePointCurrencyOverageResponse ReadComponentPricePoint /// /// Required parameter: The id or handle of the component. 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-price_point-handle` for a string handle.. - /// Optional parameter: Include an array of currency price data. + /// Optional parameter: Include an array of currency price data.. /// cancellationToken. /// Returns the Models.ComponentPricePointCurrencyOverageResponse response from the API call. public async Task ReadComponentPricePointAsync( diff --git a/AdvancedBilling.Standard/Controllers/ComponentsController.cs b/AdvancedBilling.Standard/Controllers/ComponentsController.cs index afaf8820..209e704a 100644 --- a/AdvancedBilling.Standard/Controllers/ComponentsController.cs +++ b/AdvancedBilling.Standard/Controllers/ComponentsController.cs @@ -27,7 +27,10 @@ internal ComponentsController(GlobalConfiguration globalConfiguration) : base(gl /// Creates a metered component definition under the specified product family. A 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 Ads 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. + /// #### Hybrid Pricing. + /// A `volume`, `tiered`, or `stairstep` metered component can combine its primary pricing with a secondary pricing model (the `overage_pricing` parameter) so both bill as a single invoice line item instead of two. This does not apply to metered components configured for event-based billing (metric, meter, or formula). See [Hybrid Pricing](page:introduction/basic-concepts/hybrid-pricing) for requirements and configuration details. /// For more information on components, see our documentation [here](https://maxio.zendesk.com/hc/en-us/articles/24261141522189-Components-Overview). + /// If you have the new [Catalog experience](page:help/announcements/2026-announcements#new-catalog-experience-and-terminology) enabled, taxable components must include a non-blank `tax_code`. Sending `"tax_code": ""` returns `422`. /// /// Required parameter: Either the product family's id or its handle prefixed with `handle:`. /// Optional parameter: . @@ -41,7 +44,10 @@ public Models.ComponentResponse CreateMeteredComponent( /// Creates a metered component definition under the specified product family. A 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 Ads 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. + /// #### Hybrid Pricing. + /// A `volume`, `tiered`, or `stairstep` metered component can combine its primary pricing with a secondary pricing model (the `overage_pricing` parameter) so both bill as a single invoice line item instead of two. This does not apply to metered components configured for event-based billing (metric, meter, or formula). See [Hybrid Pricing](page:introduction/basic-concepts/hybrid-pricing) for requirements and configuration details. /// For more information on components, see our documentation [here](https://maxio.zendesk.com/hc/en-us/articles/24261141522189-Components-Overview). + /// If you have the new [Catalog experience](page:help/announcements/2026-announcements#new-catalog-experience-and-terminology) enabled, taxable components must include a non-blank `tax_code`. Sending `"tax_code": ""` returns `422`. /// /// Required parameter: Either the product family's id or its handle prefixed with `handle:`. /// Optional parameter: . @@ -66,13 +72,17 @@ public Models.ComponentResponse CreateMeteredComponent( /// /// Creates a Quantity Based component definition under the specified product family. A Quantity Based component can then be added and “allocated” for a subscription. - /// When defining a Quantity Based component, you can choose one of 2 types:. + /// When defining a Quantity Based component, you can choose one of two types:. /// #### Recurring. /// Recurring quantity-based components are used to bill for the number of some unit (think monthly software user licenses or the number of pairs of socks in a box-a-month club). This is most commonly associated with billing for user licenses, number of users, number of employees, etc. /// #### 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, see [Components Overview](https://maxio.zendesk.com/hc/en-us/articles/24261141522189-Components-Overview). + /// #### Hybrid Pricing. + /// A `volume`, `tiered`, or `stairstep` component can combine its primary pricing with a secondary pricing model (the `overage_pricing` parameter) so both bill as a single invoice line item instead of two. See [Hybrid Pricing](page:introduction/basic-concepts/hybrid-pricing) for requirements and configuration details. /// For more information on components, see our documentation [here](https://maxio.zendesk.com/hc/en-us/articles/24261141522189-Components-Overview). + /// If you have the new [Catalog experience](page:help/announcements/2026-announcements#new-catalog-experience-and-terminology) enabled, taxable components must include a non-blank `tax_code`. Sending `"tax_code": ""` returns `422`. /// /// Required parameter: Either the product family's id or its handle prefixed with `handle:`. /// Optional parameter: . @@ -84,13 +94,17 @@ public Models.ComponentResponse CreateQuantityBasedComponent( /// /// Creates a Quantity Based component definition under the specified product family. A Quantity Based component can then be added and “allocated” for a subscription. - /// When defining a Quantity Based component, you can choose one of 2 types:. + /// When defining a Quantity Based component, you can choose one of two types:. /// #### Recurring. /// Recurring quantity-based components are used to bill for the number of some unit (think monthly software user licenses or the number of pairs of socks in a box-a-month club). This is most commonly associated with billing for user licenses, number of users, number of employees, etc. /// #### 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, see [Components Overview](https://maxio.zendesk.com/hc/en-us/articles/24261141522189-Components-Overview). + /// #### Hybrid Pricing. + /// A `volume`, `tiered`, or `stairstep` component can combine its primary pricing with a secondary pricing model (the `overage_pricing` parameter) so both bill as a single invoice line item instead of two. See [Hybrid Pricing](page:introduction/basic-concepts/hybrid-pricing) for requirements and configuration details. /// For more information on components, see our documentation [here](https://maxio.zendesk.com/hc/en-us/articles/24261141522189-Components-Overview). + /// If you have the new [Catalog experience](page:help/announcements/2026-announcements#new-catalog-experience-and-terminology) enabled, taxable components must include a non-blank `tax_code`. Sending `"tax_code": ""` returns `422`. /// /// Required parameter: Either the product family's id or its handle prefixed with `handle:`. /// Optional parameter: . @@ -117,6 +131,7 @@ public Models.ComponentResponse CreateQuantityBasedComponent( /// Creates an On/Off component definition under the specified product family. An 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, see our documentation [here](https://maxio.zendesk.com/hc/en-us/articles/24261141522189-Components-Overview). + /// If you have the new [Catalog experience](page:help/announcements/2026-announcements#new-catalog-experience-and-terminology) enabled, taxable components must include a non-blank `tax_code`. Sending `"tax_code": ""` returns `422`. /// /// Required parameter: Either the product family's id or its handle prefixed with `handle:`. /// Optional parameter: . @@ -130,6 +145,7 @@ public Models.ComponentResponse CreateOnOffComponent( /// Creates an On/Off component definition under the specified product family. An 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, see our documentation [here](https://maxio.zendesk.com/hc/en-us/articles/24261141522189-Components-Overview). + /// If you have the new [Catalog experience](page:help/announcements/2026-announcements#new-catalog-experience-and-terminology) enabled, taxable components must include a non-blank `tax_code`. Sending `"tax_code": ""` returns `422`. /// /// Required parameter: Either the product family's id or its handle prefixed with `handle:`. /// Optional parameter: . @@ -154,8 +170,9 @@ public Models.ComponentResponse CreateOnOffComponent( /// /// Creates a prepaid usage component definition under the specified product family. A 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, see our documentation [here](https://maxio.zendesk.com/hc/en-us/articles/24261141522189-Components-Overview). + /// 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 usage is subsequently tracked against the amount purchased. + /// For more information, see [Components Overview](https://maxio.zendesk.com/hc/en-us/articles/24261141522189-Components-Overview). + /// If you have the new [Catalog experience](page:help/announcements/2026-announcements#new-catalog-experience-and-terminology) enabled, taxable components must include a non-blank `tax_code`; sending a blank value results in a validation error. /// /// Required parameter: Either the product family's id or its handle prefixed with `handle:`. /// Optional parameter: . @@ -167,8 +184,9 @@ public Models.ComponentResponse CreatePrepaidUsageComponent( /// /// Creates a prepaid usage component definition under the specified product family. A 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, see our documentation [here](https://maxio.zendesk.com/hc/en-us/articles/24261141522189-Components-Overview). + /// 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 usage is subsequently tracked against the amount purchased. + /// For more information, see [Components Overview](https://maxio.zendesk.com/hc/en-us/articles/24261141522189-Components-Overview). + /// If you have the new [Catalog experience](page:help/announcements/2026-announcements#new-catalog-experience-and-terminology) enabled, taxable components must include a non-blank `tax_code`; sending a blank value results in a validation error. /// /// Required parameter: Either the product family's id or its handle prefixed with `handle:`. /// Optional parameter: . @@ -195,7 +213,8 @@ public Models.ComponentResponse CreatePrepaidUsageComponent( /// Creates an event-based component definition under the specified product family. An 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, see our documentation [here](https://maxio.zendesk.com/hc/en-us/articles/24261141522189-Components-Overview). + /// For more information, see [Components Overview](https://maxio.zendesk.com/hc/en-us/articles/24261141522189-Components-Overview). + /// If you have the new [Catalog experience](page:help/announcements/2026-announcements#new-catalog-experience-and-terminology) enabled, taxable components must include a non-blank `tax_code`; sending a blank value results in a validation error. /// /// Required parameter: Either the product family's id or its handle prefixed with `handle:`. /// Optional parameter: . @@ -209,7 +228,8 @@ public Models.ComponentResponse CreateEventBasedComponent( /// Creates an event-based component definition under the specified product family. An 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, see our documentation [here](https://maxio.zendesk.com/hc/en-us/articles/24261141522189-Components-Overview). + /// For more information, see [Components Overview](https://maxio.zendesk.com/hc/en-us/articles/24261141522189-Components-Overview). + /// If you have the new [Catalog experience](page:help/announcements/2026-announcements#new-catalog-experience-and-terminology) enabled, taxable components must include a non-blank `tax_code`; sending a blank value results in a validation error. /// /// Required parameter: Either the product family's id or its handle prefixed with `handle:`. /// Optional parameter: . @@ -294,6 +314,7 @@ public Models.ComponentResponse ReadComponent( /// /// Updates a component from a specific product family. /// You may read the component by either the component's id or handle. When using the handle, it must be prefixed with `handle:`. + /// If you have the new [Catalog experience](page:help/announcements/2026-announcements#new-catalog-experience-and-terminology) enabled, taxable components must include a non-blank `tax_code`. Sending `"tax_code": ""` returns `422`. /// /// Required parameter: The Advanced Billing id of the product family to which the component belongs. /// Required parameter: Either the Advanced Billing id of the component or the handle for the component prefixed with `handle:`. @@ -308,6 +329,7 @@ public Models.ComponentResponse UpdateProductFamilyComponent( /// /// Updates a component from a specific product family. /// You may read the component by either the component's id or handle. When using the handle, it must be prefixed with `handle:`. + /// If you have the new [Catalog experience](page:help/announcements/2026-announcements#new-catalog-experience-and-terminology) enabled, taxable components must include a non-blank `tax_code`. Sending `"tax_code": ""` returns `422`. /// /// Required parameter: The Advanced Billing id of the product family to which the component belongs. /// Required parameter: Either the Advanced Billing id of the component or the handle for the component prefixed with `handle:`. @@ -402,6 +424,7 @@ public Models.Component ArchiveComponent( /// /// Updates a component. /// You may read the component by either the component's id or handle. When using the handle, it must be prefixed with `handle:`. + /// If you have the new [Catalog experience](page:help/announcements/2026-announcements#new-catalog-experience-and-terminology) enabled, taxable components must include a non-blank `tax_code`. Sending `"tax_code": ""` returns `422`. /// /// Required parameter: The id or handle of the component. /// Optional parameter: . @@ -414,6 +437,7 @@ public Models.ComponentResponse UpdateComponent( /// /// Updates a component. /// You may read the component by either the component's id or handle. When using the handle, it must be prefixed with `handle:`. + /// If you have the new [Catalog experience](page:help/announcements/2026-announcements#new-catalog-experience-and-terminology) enabled, taxable components must include a non-blank `tax_code`. Sending `"tax_code": ""` returns `422`. /// /// Required parameter: The id or handle of the component. /// Optional parameter: . diff --git a/AdvancedBilling.Standard/Controllers/CouponsController.cs b/AdvancedBilling.Standard/Controllers/CouponsController.cs index 4358ca75..c70aa320 100644 --- a/AdvancedBilling.Standard/Controllers/CouponsController.cs +++ b/AdvancedBilling.Standard/Controllers/CouponsController.cs @@ -25,14 +25,9 @@ public class CouponsController : BaseController internal CouponsController(GlobalConfiguration globalConfiguration) : base(globalConfiguration) { } /// - /// ": boolean_value }` . - /// Coupons can be administered in the Advanced Billing application or created via API. See [creating coupons](https://maxio.zendesk.com/hc/en-us/articles/24261212433165-Creating-Editing-Deleting-Coupons) for more information. + /// You can create either a flat amount coupon, by specifying `amount_in_cents`, or percentage coupon by specifying `percentage`. /// See [Apply Coupons to Subscriptions](https://maxio.zendesk.com/hc/en-us/articles/24261259337101-Coupons-and-Subscriptions) for information on applying a coupon to a subscription in the Advanced Billing UI. - /// ]]> /// /// Required parameter: The Advanced Billing id of the product family to which the coupon belongs. /// Optional parameter: . @@ -43,14 +38,9 @@ public Models.CouponResponse CreateCoupon( => CoreHelper.RunTask(CreateCouponAsync(productFamilyId, body)); /// - /// ": boolean_value }` . - /// Coupons can be administered in the Advanced Billing application or created via API. See [creating coupons](https://maxio.zendesk.com/hc/en-us/articles/24261212433165-Creating-Editing-Deleting-Coupons) for more information. + /// You can create either a flat amount coupon, by specifying `amount_in_cents`, or percentage coupon by specifying `percentage`. /// See [Apply Coupons to Subscriptions](https://maxio.zendesk.com/hc/en-us/articles/24261259337101-Coupons-and-Subscriptions) for information on applying a coupon to a subscription in the Advanced Billing UI. - /// ]]> /// /// Required parameter: The Advanced Billing id of the product family to which the coupon belongs. /// Optional parameter: . @@ -103,12 +93,12 @@ public Models.CouponResponse CreateCoupon( .ExecuteAsync(cancellationToken).ConfigureAwait(false); /// - /// Searches for a coupon by code, returning a 404 if no coupon is found. By passing a code parameter, the find will attempt to locate a coupon that matches that code. - /// If you have more than one product family and if the coupon you are trying to find does not belong to the default product family in your site, then you will need to specify (either in the url or as a query string param) the product family id. + /// Searches for a coupon by code. + /// If you have more than one product family and if the coupon you are trying to find does not belong to the default product family in your site, you need to specify (either in the URL or as a query string param) the `product_family_id`. /// /// Optional parameter: The Advanced Billing id of the product family to which the coupon belongs. /// Optional parameter: The code of the coupon. - /// Optional parameter: When fetching coupons, if you have defined multiple currencies at the site level, you can optionally pass the `?currency_prices=true` query param to include an array of currency price data in the response.. + /// Optional parameter: (Optional) If you have defined multiple currencies at the site level, you can pass `?currency_prices=true` to include an array of currency price data in the response.. /// Returns the Models.CouponResponse response from the API call. public Models.CouponResponse FindCoupon( int? productFamilyId = null, @@ -117,12 +107,12 @@ public Models.CouponResponse FindCoupon( => CoreHelper.RunTask(FindCouponAsync(productFamilyId, code, currencyPrices)); /// - /// Searches for a coupon by code, returning a 404 if no coupon is found. By passing a code parameter, the find will attempt to locate a coupon that matches that code. - /// If you have more than one product family and if the coupon you are trying to find does not belong to the default product family in your site, then you will need to specify (either in the url or as a query string param) the product family id. + /// Searches for a coupon by code. + /// If you have more than one product family and if the coupon you are trying to find does not belong to the default product family in your site, you need to specify (either in the URL or as a query string param) the `product_family_id`. /// /// Optional parameter: The Advanced Billing id of the product family to which the coupon belongs. /// Optional parameter: The code of the coupon. - /// Optional parameter: When fetching coupons, if you have defined multiple currencies at the site level, you can optionally pass the `?currency_prices=true` query param to include an array of currency price data in the response.. + /// Optional parameter: (Optional) If you have defined multiple currencies at the site level, you can pass `?currency_prices=true` to include an array of currency price data in the response.. /// cancellationToken. /// Returns the Models.CouponResponse response from the API call. public async Task FindCouponAsync( @@ -141,14 +131,13 @@ public Models.CouponResponse FindCoupon( .ExecuteAsync(cancellationToken).ConfigureAwait(false); /// - /// Returns a coupon by its Advanced Billing-assigned ID. You must identify the Coupon in this call by the ID parameter that Advanced Billing assigns. - /// If instead you would like to find a Coupon using a Coupon code, see the Coupon Find method. - /// When fetching a coupon, if you have defined multiple currencies at the site level, you can optionally pass the `?currency_prices=true` query param to include an array of currency price data in the response. - /// 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. + /// Returns a coupon by its system-assigned ID. You must identify the Coupon in this call by the ID parameter assigned to it. + /// If instead you would like to find a Coupon using a Coupon code, use the [Find Coupon]($e/Coupons/findCoupon) endpoint. + /// If the coupon is set to `use_site_exchange_rate: true`, it returns pricing based on the current exchange rate. If the flag is set to false, it returns all of the defined prices for each currency. /// /// Required parameter: The Advanced Billing id of the product family to which the coupon belongs. /// Required parameter: The Advanced Billing id of the coupon. - /// Optional parameter: When fetching coupons, if you have defined multiple currencies at the site level, you can optionally pass the `?currency_prices=true` query param to include an array of currency price data in the response.. + /// Optional parameter: (Optional) If you have defined multiple currencies at the site level, you can pass `?currency_prices=true` to include an array of currency price data in the response.. /// Returns the Models.CouponResponse response from the API call. public Models.CouponResponse ReadCoupon( int productFamilyId, @@ -157,14 +146,13 @@ public Models.CouponResponse ReadCoupon( => CoreHelper.RunTask(ReadCouponAsync(productFamilyId, couponId, currencyPrices)); /// - /// Returns a coupon by its Advanced Billing-assigned ID. You must identify the Coupon in this call by the ID parameter that Advanced Billing assigns. - /// If instead you would like to find a Coupon using a Coupon code, see the Coupon Find method. - /// When fetching a coupon, if you have defined multiple currencies at the site level, you can optionally pass the `?currency_prices=true` query param to include an array of currency price data in the response. - /// 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. + /// Returns a coupon by its system-assigned ID. You must identify the Coupon in this call by the ID parameter assigned to it. + /// If instead you would like to find a Coupon using a Coupon code, use the [Find Coupon]($e/Coupons/findCoupon) endpoint. + /// If the coupon is set to `use_site_exchange_rate: true`, it returns pricing based on the current exchange rate. If the flag is set to false, it returns all of the defined prices for each currency. /// /// Required parameter: The Advanced Billing id of the product family to which the coupon belongs. /// Required parameter: The Advanced Billing id of the coupon. - /// Optional parameter: When fetching coupons, if you have defined multiple currencies at the site level, you can optionally pass the `?currency_prices=true` query param to include an array of currency price data in the response.. + /// Optional parameter: (Optional) If you have defined multiple currencies at the site level, you can pass `?currency_prices=true` to include an array of currency price data in the response.. /// cancellationToken. /// Returns the Models.CouponResponse response from the API call. public async Task ReadCouponAsync( @@ -326,17 +314,13 @@ public Models.CouponResponse ArchiveCoupon( /// /// .chargify.com/product_families/handle:/coupons/validate.?code=. /// ```. - /// Or:. + /// Supplying the `product_family_id` as a query parameter:. /// ```. /// https://.chargify.com/coupons/validate.?code=&product_family_id=. /// ```. @@ -352,17 +336,13 @@ public Models.CouponResponse ValidateCoupon( /// /// .chargify.com/product_families/handle:/coupons/validate.?code=. /// ```. - /// Or:. + /// Supplying the `product_family_id` as a query parameter:. /// ```. /// https://.chargify.com/coupons/validate.?code=&product_family_id=. /// ```. @@ -426,7 +406,6 @@ public Models.CouponCurrencyResponse CreateOrUpdateCouponCurrencyPrices( /// /// .chargify.com/coupons/567/codes/20%25OFF.`. + /// For more information on coupon codes and applying coupons to subscriptions, see [Coupon Codes](https://maxio.zendesk.com/hc/en-us/articles/24261208729229-Coupon-Codes) and [Coupons and Subscriptions](https://maxio.zendesk.com/hc/en-us/articles/24261259337101-Coupons-and-Subscriptions). /// ]]> /// /// Required parameter: The Advanced Billing id of the coupon. @@ -463,7 +437,6 @@ public Models.CouponSubcodesResponse CreateCouponSubcodes( /// /// .chargify.com/coupons/567/codes/20%25OFF.`. + /// For more information on coupon codes and applying coupons to subscriptions, see [Coupon Codes](https://maxio.zendesk.com/hc/en-us/articles/24261208729229-Coupon-Codes) and [Coupons and Subscriptions](https://maxio.zendesk.com/hc/en-us/articles/24261259337101-Coupons-and-Subscriptions). /// ]]> /// /// Required parameter: The Advanced Billing id of the coupon. diff --git a/AdvancedBilling.Standard/Controllers/CustomersController.cs b/AdvancedBilling.Standard/Controllers/CustomersController.cs index 5c7e5a74..2154b577 100644 --- a/AdvancedBilling.Standard/Controllers/CustomersController.cs +++ b/AdvancedBilling.Standard/Controllers/CustomersController.cs @@ -25,19 +25,18 @@ public class CustomersController : BaseController internal CustomersController(GlobalConfiguration globalConfiguration) : base(globalConfiguration) { } /// - /// Creates a new customer; can also be created alongside a new subscription. The only validation restriction is that you may only create one customer for a given reference value. - /// If provided, the `reference` value must be unique. It represents a unique identifier for the customer from your own app, i.e. the customer’s ID. This allows you to retrieve a given customer via a piece of shared information. Alternatively, you may choose to leave `reference` blank, and store Advanced Billing’s unique ID for the customer, which is in the `id` attribute. - /// 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). + /// Creates a new customer; can also be created alongside a new subscription. The only validation restriction is that you can only create one customer for a given reference value. + /// If provided, the `reference` value must be unique. It represents a unique identifier for the customer from your own app, i.e. the customer’s ID. This allows you to retrieve a given customer via a piece of shared information. Alternatively, you can choose to leave `reference` blank, and store the system-assigned unique ID for the customer, which is in the `id` attribute. + /// For more information, see [Customer Details](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, see the following wikipedia article on [ISO_3166-1.](http://en.wikipedia.org/wiki/ISO_3166-1#Current_codes). + /// Format the country attribute of the customer using the ISO Standard Country codes. + /// Countries should be formatted as two characters. For more information, see [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, 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. + /// Format the state attribute of the customer using the ISO Standard State codes. + /// + US States (two characters): see [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2:US). + /// + States Outside the US (two to three characters): To find the correct state codes outside 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 the 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). + /// You can attribute a language/region to the customer to deliver invoices in any required language. For more information, see [Customer Locale](https://maxio.zendesk.com/hc/en-us/articles/24286672013709-Customer-Locale). /// /// Optional parameter: . /// Returns the Models.CustomerResponse response from the API call. @@ -46,19 +45,18 @@ public Models.CustomerResponse CreateCustomer( => CoreHelper.RunTask(CreateCustomerAsync(body)); /// - /// Creates a new customer; can also be created alongside a new subscription. The only validation restriction is that you may only create one customer for a given reference value. - /// If provided, the `reference` value must be unique. It represents a unique identifier for the customer from your own app, i.e. the customer’s ID. This allows you to retrieve a given customer via a piece of shared information. Alternatively, you may choose to leave `reference` blank, and store Advanced Billing’s unique ID for the customer, which is in the `id` attribute. - /// 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). + /// Creates a new customer; can also be created alongside a new subscription. The only validation restriction is that you can only create one customer for a given reference value. + /// If provided, the `reference` value must be unique. It represents a unique identifier for the customer from your own app, i.e. the customer’s ID. This allows you to retrieve a given customer via a piece of shared information. Alternatively, you can choose to leave `reference` blank, and store the system-assigned unique ID for the customer, which is in the `id` attribute. + /// For more information, see [Customer Details](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, see the following wikipedia article on [ISO_3166-1.](http://en.wikipedia.org/wiki/ISO_3166-1#Current_codes). + /// Format the country attribute of the customer using the ISO Standard Country codes. + /// Countries should be formatted as two characters. For more information, see [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, 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. + /// Format the state attribute of the customer using the ISO Standard State codes. + /// + US States (two characters): see [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2:US). + /// + States Outside the US (two to three characters): To find the correct state codes outside 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 the 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). + /// You can attribute a language/region to the customer to deliver invoices in any required language. For more information, see [Customer Locale](https://maxio.zendesk.com/hc/en-us/articles/24286672013709-Customer-Locale). /// /// Optional parameter: . /// cancellationToken. @@ -243,6 +241,7 @@ public Models.CustomerResponse ReadCustomerByReference( /// /// Lists all subscriptions that belong to a customer. + /// If you have the new [Catalog experience](page:help/announcements/2026-announcements#new-catalog-experience-and-terminology) enabled, subscriptions no longer require an associated product. For subscriptions without an associated product, 'product', 'product_price_point_id', and 'product_price_point_type' are returned as 'null'. /// /// Required parameter: The Chargify id of the customer. /// Returns the List of Models.SubscriptionResponse response from the API call. @@ -252,6 +251,7 @@ public Models.CustomerResponse ReadCustomerByReference( /// /// Lists all subscriptions that belong to a customer. + /// If you have the new [Catalog experience](page:help/announcements/2026-announcements#new-catalog-experience-and-terminology) enabled, subscriptions no longer require an associated product. For subscriptions without an associated product, 'product', 'product_price_point_id', and 'product_price_point_type' are returned as 'null'. /// /// Required parameter: The Chargify id of the customer. /// cancellationToken. diff --git a/AdvancedBilling.Standard/Controllers/EventsBasedBillingSegmentsController.cs b/AdvancedBilling.Standard/Controllers/EventsBasedBillingSegmentsController.cs index 28d82365..05d4e6b4 100644 --- a/AdvancedBilling.Standard/Controllers/EventsBasedBillingSegmentsController.cs +++ b/AdvancedBilling.Standard/Controllers/EventsBasedBillingSegmentsController.cs @@ -103,8 +103,8 @@ public Models.ListSegmentsResponse ListSegmentsForPricePoint( .ExecuteAsync(cancellationToken).ConfigureAwait(false); /// - /// Updates a single segment for a component with a segmented metric. It allows you to update the pricing for the segment. - /// You may specify component and/or price point by using either the numeric ID or the `handle:gold` syntax. + /// Updates a single segment for a component with a segmented metric. You can also update the pricing for the segment. + /// You can specify component and/or price point by using either the numeric ID or the `handle:gold` syntax. /// /// Required parameter: ID or Handle of the Component. /// Required parameter: ID or Handle of the Price Point belonging to the Component. @@ -119,8 +119,8 @@ public Models.SegmentResponse UpdateSegment( => CoreHelper.RunTask(UpdateSegmentAsync(componentId, pricePointId, id, body)); /// - /// Updates a single segment for a component with a segmented metric. It allows you to update the pricing for the segment. - /// You may specify component and/or price point by using either the numeric ID or the `handle:gold` syntax. + /// Updates a single segment for a component with a segmented metric. You can also update the pricing for the segment. + /// You can specify component and/or price point by using either the numeric ID or the `handle:gold` syntax. /// /// Required parameter: ID or Handle of the Component. /// Required parameter: ID or Handle of the Price Point belonging to the Component. diff --git a/AdvancedBilling.Standard/Controllers/EventsController.cs b/AdvancedBilling.Standard/Controllers/EventsController.cs index ea0a3ef3..c8c4ba68 100644 --- a/AdvancedBilling.Standard/Controllers/EventsController.cs +++ b/AdvancedBilling.Standard/Controllers/EventsController.cs @@ -25,11 +25,9 @@ internal EventsController(GlobalConfiguration globalConfiguration) : base(global /// /// Lists events for a site. - /// ## Events Intro. - /// Advanced Billing Events include various activity that happens around a Site. This information is **especially** useful to track down issues that arise when subscriptions are not created due to errors. - /// Within the Advanced Billing UI, "Events" are referred to as "Site Activity". Full documentation on how to view Events / Site Activity in the Advanced Billing UI can be located [here](https://maxio.zendesk.com/hc/en-us/articles/24250671733517-Site-Activity). - /// ## List Events for a Site. - /// This method will retrieve a list of events for a site. Use query string filters to narrow down results. You may use the `key` filter as part of your query string to narrow down results. + /// Events include various activity that happens around a Site. This information is **especially** useful to track down issues that arise when subscriptions are not created due to errors. + /// Within the UI, Events are referred to as Site Activity. For more information, see [Site Activity](https://maxio.zendesk.com/hc/en-us/articles/24250671733517-Site-Activity). + /// Use query string filters to narrow down results. You can use the `filter` parameter to filter by event key. /// ### Legacy Filters. /// The following keys are no longer supported. /// + `payment_failure_recreated`. @@ -39,7 +37,7 @@ internal EventsController(GlobalConfiguration globalConfiguration) : base(global /// + `zferral_revenue_post_failure` - (Specific to the deprecated Zferral integration). /// + `zferral_revenue_post_success` - (Specific to the deprecated Zferral integration). /// ## Event Key. - /// The event type is identified by the key property. You can check supported keys [here]($m/Event%20Key). + /// The event type is identified by the key property. See [Event Key]($m/Event%20Key) for a complete list of supported keys. /// ## Event Specific Data. /// Different event types may include additional data in `event_specific_data` property. /// While some events share the same schema for `event_specific_data`, others may not include it at all. @@ -51,7 +49,7 @@ internal EventsController(GlobalConfiguration globalConfiguration) : base(global /// "event": {. /// "id": 351,. /// "key": "subscription_product_change",. - /// "message": "Product changed on Marky Mark's subscription from 'Basic' to 'Pro'",. + /// "message": "Product changed on Mark Alan's subscription from 'Basic' to 'Pro'",. /// "subscription_id": 205,. /// "event_specific_data": {. /// "new_product_id": 3,. @@ -67,7 +65,7 @@ internal EventsController(GlobalConfiguration globalConfiguration) : base(global /// "event": {. /// "id": 353,. /// "key": "subscription_state_change",. - /// "message": "State changed on Marky Mark's subscription to Pro from trialing to active",. + /// "message": "State changed on Mark Alan's subscription to Pro from trialing to active",. /// "subscription_id": 205,. /// "event_specific_data": {. /// "new_subscription_state": "active",. @@ -77,6 +75,16 @@ internal EventsController(GlobalConfiguration globalConfiguration) : base(global /// }. /// }. /// ```. + /// ## Enhanced Catalog Experience. + /// If you’re using the [enhanced Catalog experience](page:help/announcements/2026-announcements#new-catalog-experience-and-terminology), you’ll see updated naming in webhook events and messages. + /// Event name changes:. + /// - subscription_product_change → subscription_plan_change. + /// - component_allocation_change → allocation_change. + /// - component_billing_date_change → product_billing_date_change. + /// Message updates:. + /// - “Plan changed on Subscription from previous plan to new plan”. + /// - “Successful payment for allocation changes to Product on Subscription”. + /// - “Failed payment for allocation changes to Product on Subscription”. /// /// Object containing request parameters. /// Returns the List of Models.EventResponse response from the API call. @@ -86,11 +94,9 @@ internal EventsController(GlobalConfiguration globalConfiguration) : base(global /// /// Lists events for a site. - /// ## Events Intro. - /// Advanced Billing Events include various activity that happens around a Site. This information is **especially** useful to track down issues that arise when subscriptions are not created due to errors. - /// Within the Advanced Billing UI, "Events" are referred to as "Site Activity". Full documentation on how to view Events / Site Activity in the Advanced Billing UI can be located [here](https://maxio.zendesk.com/hc/en-us/articles/24250671733517-Site-Activity). - /// ## List Events for a Site. - /// This method will retrieve a list of events for a site. Use query string filters to narrow down results. You may use the `key` filter as part of your query string to narrow down results. + /// Events include various activity that happens around a Site. This information is **especially** useful to track down issues that arise when subscriptions are not created due to errors. + /// Within the UI, Events are referred to as Site Activity. For more information, see [Site Activity](https://maxio.zendesk.com/hc/en-us/articles/24250671733517-Site-Activity). + /// Use query string filters to narrow down results. You can use the `filter` parameter to filter by event key. /// ### Legacy Filters. /// The following keys are no longer supported. /// + `payment_failure_recreated`. @@ -100,7 +106,7 @@ internal EventsController(GlobalConfiguration globalConfiguration) : base(global /// + `zferral_revenue_post_failure` - (Specific to the deprecated Zferral integration). /// + `zferral_revenue_post_success` - (Specific to the deprecated Zferral integration). /// ## Event Key. - /// The event type is identified by the key property. You can check supported keys [here]($m/Event%20Key). + /// The event type is identified by the key property. See [Event Key]($m/Event%20Key) for a complete list of supported keys. /// ## Event Specific Data. /// Different event types may include additional data in `event_specific_data` property. /// While some events share the same schema for `event_specific_data`, others may not include it at all. @@ -112,7 +118,7 @@ internal EventsController(GlobalConfiguration globalConfiguration) : base(global /// "event": {. /// "id": 351,. /// "key": "subscription_product_change",. - /// "message": "Product changed on Marky Mark's subscription from 'Basic' to 'Pro'",. + /// "message": "Product changed on Mark Alan's subscription from 'Basic' to 'Pro'",. /// "subscription_id": 205,. /// "event_specific_data": {. /// "new_product_id": 3,. @@ -128,7 +134,7 @@ internal EventsController(GlobalConfiguration globalConfiguration) : base(global /// "event": {. /// "id": 353,. /// "key": "subscription_state_change",. - /// "message": "State changed on Marky Mark's subscription to Pro from trialing to active",. + /// "message": "State changed on Mark Alan's subscription to Pro from trialing to active",. /// "subscription_id": 205,. /// "event_specific_data": {. /// "new_subscription_state": "active",. @@ -138,6 +144,16 @@ internal EventsController(GlobalConfiguration globalConfiguration) : base(global /// }. /// }. /// ```. + /// ## Enhanced Catalog Experience. + /// If you’re using the [enhanced Catalog experience](page:help/announcements/2026-announcements#new-catalog-experience-and-terminology), you’ll see updated naming in webhook events and messages. + /// Event name changes:. + /// - subscription_product_change → subscription_plan_change. + /// - component_allocation_change → allocation_change. + /// - component_billing_date_change → product_billing_date_change. + /// Message updates:. + /// - “Plan changed on Subscription from previous plan to new plan”. + /// - “Successful payment for allocation changes to Product on Subscription”. + /// - “Failed payment for allocation changes to Product on Subscription”. /// /// Object containing request parameters. /// cancellationToken. @@ -166,11 +182,21 @@ internal EventsController(GlobalConfiguration globalConfiguration) : base(global /// /// Lists events for a subscription. /// ## Event Key. - /// The event type is identified by the key property. You can check supported keys [here]($m/Event%20Key). + /// The event type is identified by the key property. See [Event Key]($m/Event%20Key) for a complete list of supported keys. /// ## Event Specific Data. /// Different event types may include additional data in `event_specific_data` property. /// While some events share the same schema for `event_specific_data`, others may not include it at all. /// For precise mappings from key to event_specific_data, refer to [Event]($m/Event). + /// ## Enhanced Catalog Experience. + /// If you’re using the [enhanced Catalog experience](page:help/announcements/2026-announcements#new-catalog-experience-and-terminology), you’ll see updated naming in webhook events and messages. + /// Event name changes:. + /// - subscription_product_change → subscription_plan_change. + /// - component_allocation_change → allocation_change. + /// - component_billing_date_change → product_billing_date_change. + /// Message updates:. + /// - “Successful payment for allocation changes to Product on Subscription”. + /// - “Failed payment for allocation changes to Product on Subscription”. + /// - “Plan changed on Subscription from previous plan to new plan”. /// /// Object containing request parameters. /// Returns the List of Models.EventResponse response from the API call. @@ -181,11 +207,21 @@ internal EventsController(GlobalConfiguration globalConfiguration) : base(global /// /// Lists events for a subscription. /// ## Event Key. - /// The event type is identified by the key property. You can check supported keys [here]($m/Event%20Key). + /// The event type is identified by the key property. See [Event Key]($m/Event%20Key) for a complete list of supported keys. /// ## Event Specific Data. /// Different event types may include additional data in `event_specific_data` property. /// While some events share the same schema for `event_specific_data`, others may not include it at all. /// For precise mappings from key to event_specific_data, refer to [Event]($m/Event). + /// ## Enhanced Catalog Experience. + /// If you’re using the [enhanced Catalog experience](page:help/announcements/2026-announcements#new-catalog-experience-and-terminology), you’ll see updated naming in webhook events and messages. + /// Event name changes:. + /// - subscription_product_change → subscription_plan_change. + /// - component_allocation_change → allocation_change. + /// - component_billing_date_change → product_billing_date_change. + /// Message updates:. + /// - “Successful payment for allocation changes to Product on Subscription”. + /// - “Failed payment for allocation changes to Product on Subscription”. + /// - “Plan changed on Subscription from previous plan to new plan”. /// /// Object containing request parameters. /// cancellationToken. @@ -209,6 +245,15 @@ internal EventsController(GlobalConfiguration globalConfiguration) : base(global /// /// Returns the total count of events for a given site. + /// If you’re using the [enhanced Catalog experience](page:help/announcements/2026-announcements#new-catalog-experience-and-terminology), you’ll see updated naming in webhook events and messages. + /// Event name changes:. + /// - subscription_product_change → subscription_plan_change. + /// - component_allocation_change → allocation_change. + /// - component_billing_date_change → product_billing_date_change. + /// Message updates:. + /// - “Successful payment for allocation changes to Product on Subscription”. + /// - “Failed payment for allocation changes to Product on Subscription”. + /// - “Plan changed on Subscription from previous plan to new plan”. /// /// Object containing request parameters. /// Returns the Models.CountResponse response from the API call. @@ -218,6 +263,15 @@ public Models.CountResponse ReadEventsCount( /// /// Returns the total count of events for a given site. + /// If you’re using the [enhanced Catalog experience](page:help/announcements/2026-announcements#new-catalog-experience-and-terminology), you’ll see updated naming in webhook events and messages. + /// Event name changes:. + /// - subscription_product_change → subscription_plan_change. + /// - component_allocation_change → allocation_change. + /// - component_billing_date_change → product_billing_date_change. + /// Message updates:. + /// - “Successful payment for allocation changes to Product on Subscription”. + /// - “Failed payment for allocation changes to Product on Subscription”. + /// - “Plan changed on Subscription from previous plan to new plan”. /// /// Object containing request parameters. /// cancellationToken. diff --git a/AdvancedBilling.Standard/Controllers/InsightsController.cs b/AdvancedBilling.Standard/Controllers/InsightsController.cs index a96301e4..2498152c 100644 --- a/AdvancedBilling.Standard/Controllers/InsightsController.cs +++ b/AdvancedBilling.Standard/Controllers/InsightsController.cs @@ -55,8 +55,8 @@ public Models.SiteSummary ReadSiteStats() /// /// Returns your site's current MRR, including plan and usage breakouts. /// - /// Optional parameter: submit a timestamp in ISO8601 format to request MRR for a historic time. - /// Optional parameter: submit the id of a subscription in order to limit results. + /// Optional parameter: submit a timestamp in ISO8601 format to request MRR for a historic time.. + /// Optional parameter: submit the id of a subscription in order to limit results.. /// Returns the Models.MRRResponse response from the API call. [Obsolete] public Models.MRRResponse ReadMrr( @@ -67,8 +67,8 @@ public Models.MRRResponse ReadMrr( /// /// Returns your site's current MRR, including plan and usage breakouts. /// - /// Optional parameter: submit a timestamp in ISO8601 format to request MRR for a historic time. - /// Optional parameter: submit the id of a subscription in order to limit results. + /// Optional parameter: submit a timestamp in ISO8601 format to request MRR for a historic time.. + /// Optional parameter: submit the id of a subscription in order to limit results.. /// cancellationToken. /// Returns the Models.MRRResponse response from the API call. [Obsolete] @@ -147,7 +147,7 @@ public Models.ListMRRResponse ListMrrMovements( .ExecuteAsync(cancellationToken).ConfigureAwait(false); /// - /// This endpoint returns your site's current MRR, including plan and usage breakouts split per subscription. + /// Lists your site's current MRR, including plan and usage breakouts split per subscription. /// /// Object containing request parameters. /// Returns the Models.SubscriptionMRRResponse response from the API call. @@ -157,7 +157,7 @@ public Models.SubscriptionMRRResponse ListMrrPerSubscription( => CoreHelper.RunTask(ListMrrPerSubscriptionAsync(input)); /// - /// This endpoint returns your site's current MRR, including plan and usage breakouts split per subscription. + /// Lists your site's current MRR, including plan and usage breakouts split per subscription. /// /// Object containing request parameters. /// cancellationToken. diff --git a/AdvancedBilling.Standard/Controllers/InvoicesController.cs b/AdvancedBilling.Standard/Controllers/InvoicesController.cs index 92e39253..eb114b53 100644 --- a/AdvancedBilling.Standard/Controllers/InvoicesController.cs +++ b/AdvancedBilling.Standard/Controllers/InvoicesController.cs @@ -25,7 +25,7 @@ public class InvoicesController : BaseController internal InvoicesController(GlobalConfiguration globalConfiguration) : base(globalConfiguration) { } /// - /// Refund an invoice, segment, or consolidated invoice. + /// Refunds an invoice, segment, or consolidated invoice. /// ## Partial Refund for Consolidated Invoice. /// A refund less than the total of a consolidated invoice will be split across its segments. /// For a $50.00 refund on a $100.00 consolidated invoice with one $60.00 segment and one $40.00 segment, the refunded amount will be applied as 50% of each ($30.00 and $20.00, respectively). @@ -39,7 +39,7 @@ public Models.Invoice RefundInvoice( => CoreHelper.RunTask(RefundInvoiceAsync(uid, body)); /// - /// Refund an invoice, segment, or consolidated invoice. + /// Refunds an invoice, segment, or consolidated invoice. /// ## Partial Refund for Consolidated Invoice. /// A refund less than the total of a consolidated invoice will be split across its segments. /// For a $50.00 refund on a $100.00 consolidated invoice with one $60.00 segment and one $40.00 segment, the refunded amount will be applied as 50% of each ($30.00 and $20.00, respectively). @@ -65,7 +65,7 @@ public Models.Invoice RefundInvoice( .ExecuteAsync(cancellationToken).ConfigureAwait(false); /// - /// By default, invoices returned on the index will only include totals, not detailed breakdowns for `line_items`, `discounts`, `taxes`, `credits`, `payments`, `custom_fields`, or `refunds`. To include breakdowns, pass the specific field as a key in the query with a value set to `true`. + /// Lists invoices for a site. By default, invoices returned on the index will only include totals, not detailed breakdowns for `line_items`, `discounts`, `taxes`, `credits`, `payments`, `custom_fields`, or `refunds`. To include breakdowns, pass the specific field as a key in the query with a value set to `true`. /// /// Object containing request parameters. /// Returns the Models.ListInvoicesResponse response from the API call. @@ -74,7 +74,7 @@ public Models.ListInvoicesResponse ListInvoices( => CoreHelper.RunTask(ListInvoicesAsync(input)); /// - /// By default, invoices returned on the index will only include totals, not detailed breakdowns for `line_items`, `discounts`, `taxes`, `credits`, `payments`, `custom_fields`, or `refunds`. To include breakdowns, pass the specific field as a key in the query with a value set to `true`. + /// Lists invoices for a site. By default, invoices returned on the index will only include totals, not detailed breakdowns for `line_items`, `discounts`, `taxes`, `credits`, `payments`, `custom_fields`, or `refunds`. To include breakdowns, pass the specific field as a key in the query with a value set to `true`. /// /// Object containing request parameters. /// cancellationToken. @@ -114,7 +114,7 @@ public Models.ListInvoicesResponse ListInvoices( /// /// :x -H. @@ -135,7 +135,7 @@ public Models.Invoice ReadInvoice( /// /// :x -H. @@ -163,7 +163,7 @@ public Models.Invoice ReadInvoice( .ExecuteAsync(cancellationToken).ConfigureAwait(false); /// - /// This endpoint returns a list of invoice events. Each event contains event "data" (such as an applied payment) as well as a snapshot of the `invoice` at the time of event completion. + /// Lists invoice events for a site. Each event contains event "data" (such as an applied payment) as well as a snapshot of the `invoice` at the time of event completion. /// Exposed event types are:. /// + issue_invoice. /// + apply_credit_note. @@ -190,7 +190,7 @@ public Models.ListInvoiceEventsResponse ListInvoiceEvents( => CoreHelper.RunTask(ListInvoiceEventsAsync(input)); /// - /// This endpoint returns a list of invoice events. Each event contains event "data" (such as an applied payment) as well as a snapshot of the `invoice` at the time of event completion. + /// Lists invoice events for a site. Each event contains event "data" (such as an applied payment) as well as a snapshot of the `invoice` at the time of event completion. /// Exposed event types are:. /// + issue_invoice. /// + apply_credit_note. @@ -231,7 +231,7 @@ public Models.ListInvoiceEventsResponse ListInvoiceEvents( .ExecuteAsync(cancellationToken).ConfigureAwait(false); /// - /// Applies a payment of a given type against a specific invoice. If you would like to apply a payment across multiple invoices, you can use the Bulk Payment endpoint. + /// Applies a payment of a given type against a specific invoice. If you would like to apply a payment across multiple invoices, you can use the [Record Payment for Multiple Invoices]($e/Invoices/recordPaymentForMultipleInvoices) endpoint. /// /// Required parameter: The unique identifier for the invoice, this does not refer to the public facing invoice number.. /// Optional parameter: . @@ -242,7 +242,7 @@ public Models.Invoice RecordPaymentForInvoice( => CoreHelper.RunTask(RecordPaymentForInvoiceAsync(uid, body)); /// - /// Applies a payment of a given type against a specific invoice. If you would like to apply a payment across multiple invoices, you can use the Bulk Payment endpoint. + /// Applies a payment of a given type against a specific invoice. If you would like to apply a payment across multiple invoices, you can use the [Record Payment for Multiple Invoices]($e/Invoices/recordPaymentForMultipleInvoices) endpoint. /// /// Required parameter: The unique identifier for the invoice, this does not refer to the public facing invoice number.. /// Optional parameter: . @@ -265,28 +265,8 @@ public Models.Invoice RecordPaymentForInvoice( .ExecuteAsync(cancellationToken).ConfigureAwait(false); /// - /// This API call should be used when you want to record an external payment against multiple invoices. - /// To apply a payment to multiple invoices, at minimum, specify the `amount` and `applications` (i.e., `invoice_uid` and `amount`) details. - /// ```. - /// {. - /// "payment": {. - /// "memo": "to pay the bills",. - /// "details": "check number 8675309",. - /// "method": "check",. - /// "amount": "250.00",. - /// "applications": [. - /// {. - /// "invoice_uid": "inv_8gk5bwkct3gqt",. - /// "amount": "100.00". - /// },. - /// {. - /// "invoice_uid": "inv_7bc6bwkct3lyt",. - /// "amount": "150.00". - /// }. - /// ]. - /// }. - /// }. - /// ```. + /// Records an external payment against multiple invoices. + /// To apply a payment to multiple invoices, at minimum, specify the `amount` and `applications` (i.e., `invoice_uid` and `amount`) details. /// Note that the invoice payment amounts must be greater than 0. Total amount must be greater or equal to invoices payment amount sum. /// /// Optional parameter: . @@ -296,28 +276,8 @@ public Models.MultiInvoicePaymentResponse RecordPaymentForMultipleInvoices( => CoreHelper.RunTask(RecordPaymentForMultipleInvoicesAsync(body)); /// - /// This API call should be used when you want to record an external payment against multiple invoices. - /// To apply a payment to multiple invoices, at minimum, specify the `amount` and `applications` (i.e., `invoice_uid` and `amount`) details. - /// ```. - /// {. - /// "payment": {. - /// "memo": "to pay the bills",. - /// "details": "check number 8675309",. - /// "method": "check",. - /// "amount": "250.00",. - /// "applications": [. - /// {. - /// "invoice_uid": "inv_8gk5bwkct3gqt",. - /// "amount": "100.00". - /// },. - /// {. - /// "invoice_uid": "inv_7bc6bwkct3lyt",. - /// "amount": "150.00". - /// }. - /// ]. - /// }. - /// }. - /// ```. + /// Records an external payment against multiple invoices. + /// To apply a payment to multiple invoices, at minimum, specify the `amount` and `applications` (i.e., `invoice_uid` and `amount`) details. /// Note that the invoice payment amounts must be greater than 0. Total amount must be greater or equal to invoices payment amount sum. /// /// Optional parameter: . @@ -338,7 +298,7 @@ public Models.MultiInvoicePaymentResponse RecordPaymentForMultipleInvoices( .ExecuteAsync(cancellationToken).ConfigureAwait(false); /// - /// Credit Notes are like inverse invoices. They reduce the amount a customer owes. + /// Lists credit notes for a site. Credit Notes are like inverse invoices. They reduce the amount a customer owes. /// By default, the credit notes returned by this endpoint will exclude the arrays of `line_items`, `discounts`, `taxes`, `applications`, or `refunds`. To include these arrays, pass the specific field as a key in the query with a value set to `true`. /// /// Object containing request parameters. @@ -348,7 +308,7 @@ public Models.ListCreditNotesResponse ListCreditNotes( => CoreHelper.RunTask(ListCreditNotesAsync(input)); /// - /// Credit Notes are like inverse invoices. They reduce the amount a customer owes. + /// Lists credit notes for a site. Credit Notes are like inverse invoices. They reduce the amount a customer owes. /// By default, the credit notes returned by this endpoint will exclude the arrays of `line_items`, `discounts`, `taxes`, `applications`, or `refunds`. To include these arrays, pass the specific field as a key in the query with a value set to `true`. /// /// Object containing request parameters. @@ -373,7 +333,7 @@ public Models.ListCreditNotesResponse ListCreditNotes( .ExecuteAsync(cancellationToken).ConfigureAwait(false); /// - /// Use this endpoint to retrieve the details for a credit note. + /// Returns the details for a credit note. /// /// Required parameter: The unique identifier of the credit note. /// Returns the Models.CreditNote response from the API call. @@ -382,7 +342,7 @@ public Models.CreditNote ReadCreditNote( => CoreHelper.RunTask(ReadCreditNoteAsync(uid)); /// - /// Use this endpoint to retrieve the details for a credit note. + /// Returns the details for a credit note. /// /// Required parameter: The unique identifier of the credit note. /// cancellationToken. @@ -399,7 +359,7 @@ public Models.CreditNote ReadCreditNote( .ExecuteAsync(cancellationToken).ConfigureAwait(false); /// - /// Record an external payment made against a subscription that will pay partially or in full one or more invoices. + /// Records an external payment made against a subscription that will pay partially or in full one or more invoices. /// Payment will be applied starting with the oldest open invoice and then next oldest, and so on until the amount of the payment is fully consumed. /// Excess payment will result in the creation of a prepayment on the Invoice Account. /// Only ungrouped or primary subscriptions may be paid using the "bulk" payment request. @@ -413,7 +373,7 @@ public Models.RecordPaymentResponse RecordPaymentForSubscription( => CoreHelper.RunTask(RecordPaymentForSubscriptionAsync(subscriptionId, body)); /// - /// Record an external payment made against a subscription that will pay partially or in full one or more invoices. + /// Records an external payment made against a subscription that will pay partially or in full one or more invoices. /// Payment will be applied starting with the oldest open invoice and then next oldest, and so on until the amount of the payment is fully consumed. /// Excess payment will result in the creation of a prepayment on the Invoice Account. /// Only ungrouped or primary subscriptions may be paid using the "bulk" payment request. @@ -439,7 +399,7 @@ public Models.RecordPaymentResponse RecordPaymentForSubscription( .ExecuteAsync(cancellationToken).ConfigureAwait(false); /// - /// This endpoint allows you to reopen any invoice with the "canceled" status. Invoices enter "canceled" status if they were open at the time the subscription was canceled (whether through dunning or an intentional cancellation). + /// Reopens any invoice with the "canceled" status. Invoices enter "canceled" status if they were open at the time the subscription was canceled (whether through dunning or an intentional cancellation). /// Invoices with "canceled" status are no longer considered to be due. Once reopened, they are considered due for payment. Payment may then be captured in one of the following ways:. /// - Reactivating the subscription, which will capture all open invoices (See note below about automatic reopening of invoices.). /// - Recording a payment directly against the invoice. @@ -454,7 +414,7 @@ public Models.Invoice ReopenInvoice( => CoreHelper.RunTask(ReopenInvoiceAsync(uid)); /// - /// This endpoint allows you to reopen any invoice with the "canceled" status. Invoices enter "canceled" status if they were open at the time the subscription was canceled (whether through dunning or an intentional cancellation). + /// Reopens any invoice with the "canceled" status. Invoices enter "canceled" status if they were open at the time the subscription was canceled (whether through dunning or an intentional cancellation). /// Invoices with "canceled" status are no longer considered to be due. Once reopened, they are considered due for payment. Payment may then be captured in one of the following ways:. /// - Reactivating the subscription, which will capture all open invoices (See note below about automatic reopening of invoices.). /// - Recording a payment directly against the invoice. @@ -480,7 +440,7 @@ public Models.Invoice ReopenInvoice( .ExecuteAsync(cancellationToken).ConfigureAwait(false); /// - /// This endpoint allows you to void any invoice with the "open" or "canceled" status. It will also allow voiding of an invoice with the "pending" status if it is not a consolidated invoice. + /// Voids any invoice with the "open" or "canceled" status. It will also allow voiding of an invoice with the "pending" status if it is not a consolidated invoice. /// /// Required parameter: The unique identifier for the invoice, this does not refer to the public facing invoice number.. /// Optional parameter: . @@ -491,7 +451,7 @@ public Models.Invoice VoidInvoice( => CoreHelper.RunTask(VoidInvoiceAsync(uid, body)); /// - /// This endpoint allows you to void any invoice with the "open" or "canceled" status. It will also allow voiding of an invoice with the "pending" status if it is not a consolidated invoice. + /// Voids any invoice with the "open" or "canceled" status. It will also allow voiding of an invoice with the "pending" status if it is not a consolidated invoice. /// /// Required parameter: The unique identifier for the invoice, this does not refer to the public facing invoice number.. /// Optional parameter: . @@ -515,7 +475,7 @@ public Models.Invoice VoidInvoice( .ExecuteAsync(cancellationToken).ConfigureAwait(false); /// - /// Invoice segments returned on the index will only include totals, not detailed breakdowns for `line_items`, `discounts`, `taxes`, `credits`, `payments`, or `custom_fields`. + /// Lists segments for a consolidated invoice. Invoice segments returned on the index will only include totals, not detailed breakdowns for `line_items`, `discounts`, `taxes`, `credits`, `payments`, or `custom_fields`. /// /// Object containing request parameters. /// Returns the Models.ConsolidatedInvoice response from the API call. @@ -524,7 +484,7 @@ public Models.ConsolidatedInvoice ListConsolidatedInvoiceSegments( => CoreHelper.RunTask(ListConsolidatedInvoiceSegmentsAsync(input)); /// - /// Invoice segments returned on the index will only include totals, not detailed breakdowns for `line_items`, `discounts`, `taxes`, `credits`, `payments`, or `custom_fields`. + /// Lists segments for a consolidated invoice. Invoice segments returned on the index will only include totals, not detailed breakdowns for `line_items`, `discounts`, `taxes`, `credits`, `payments`, or `custom_fields`. /// /// Object containing request parameters. /// cancellationToken. @@ -544,7 +504,7 @@ public Models.ConsolidatedInvoice ListConsolidatedInvoiceSegments( .ExecuteAsync(cancellationToken).ConfigureAwait(false); /// - /// This endpoint will allow you to create an ad hoc invoice. + /// Creates an ad hoc invoice. /// ### Basic Behavior. /// You can create a basic invoice by sending an array of line items to this endpoint. Each line item, at a minimum, must include a title, a quantity and a unit price. Example:. /// ```json. @@ -696,7 +656,7 @@ public Models.InvoiceResponse CreateInvoice( => CoreHelper.RunTask(CreateInvoiceAsync(subscriptionId, body)); /// - /// This endpoint will allow you to create an ad hoc invoice. + /// Creates an ad hoc invoice. /// ### Basic Behavior. /// You can create a basic invoice by sending an array of line items to this endpoint. Each line item, at a minimum, must include a title, a quantity and a unit price. Example:. /// ```json. @@ -860,7 +820,124 @@ public Models.InvoiceResponse CreateInvoice( .ExecuteAsync(cancellationToken).ConfigureAwait(false); /// - /// 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. + /// Updates an ad hoc invoice while it is in the `draft` state. + /// **Important: only invoices with the `adhoc` role and `draft` status can be updated.** Any other invoice — issued, or with a different role (e.g. `renewal`, `signup`) — cannot be updated through this endpoint and the request returns a `422` error. If the invoice does not belong to the provided subscription, a `404` error is returned. + /// Only the attributes submitted in the request are changed — omitted attributes keep their current values. + /// ### Line Items. + /// The `line_items` array describes changes to the invoice's line items. Line items not referenced in the array remain unchanged. + /// #### Adding a line item. + /// A line item without a `uid` is added to the invoice. The same line item types and options as on invoice creation are supported (custom items, `product_id`, `component_id`, price points, period date ranges, taxes). + /// #### Updating a line item. + /// A line item with the `uid` of an existing line item updates that line item with the submitted attributes. Amounts and taxes are recalculated. + /// #### Removing a line item. + /// A line item with a `uid` and `"_destroy": true` is removed from the invoice. Other line items remain unchanged. + /// Referencing a `uid` which does not exist on the invoice returns a `422` error. + /// ### Coupons. + /// When the `coupons` key is present, the submitted coupons replace all discounts currently applied to the invoice. Send an empty array to remove all discounts. Coupon options are the same as on invoice creation. + /// ### Invoice Options. + /// #### Issue Date and Net Terms. + /// The `issue_date` parameter can be sent to change the invoice's issue date. Only today or dates in the past are accepted. The date is interpreted and validated in your site's time zone, using the `YYYY-MM-DD` format. The `net_terms` parameter indicates the number of days after the issue date on which the invoice is due. The due date is recalculated whenever the issue date or net terms change. + /// #### Addresses. + /// The seller, shipping and billing addresses can be sent to replace the addresses on the invoice. Each address requires to send a `first_name` at a minimum in order to work. Taxes are recalculated after an address change. + /// #### Memo and Payment Instructions. + /// A custom memo can be sent with the `memo` parameter. Likewise, custom payment instructions can be sent with the `payment_instructions` parameter. + /// + /// Required parameter: The Chargify id of the subscription.. + /// Required parameter: The unique identifier for the invoice, this does not refer to the public facing invoice number.. + /// Optional parameter: . + /// Returns the Models.InvoiceResponse response from the API call. + public Models.InvoiceResponse UpdateInvoice( + int subscriptionId, + string uid, + Models.UpdateInvoiceRequest body = null) + => CoreHelper.RunTask(UpdateInvoiceAsync(subscriptionId, uid, body)); + + /// + /// Updates an ad hoc invoice while it is in the `draft` state. + /// **Important: only invoices with the `adhoc` role and `draft` status can be updated.** Any other invoice — issued, or with a different role (e.g. `renewal`, `signup`) — cannot be updated through this endpoint and the request returns a `422` error. If the invoice does not belong to the provided subscription, a `404` error is returned. + /// Only the attributes submitted in the request are changed — omitted attributes keep their current values. + /// ### Line Items. + /// The `line_items` array describes changes to the invoice's line items. Line items not referenced in the array remain unchanged. + /// #### Adding a line item. + /// A line item without a `uid` is added to the invoice. The same line item types and options as on invoice creation are supported (custom items, `product_id`, `component_id`, price points, period date ranges, taxes). + /// #### Updating a line item. + /// A line item with the `uid` of an existing line item updates that line item with the submitted attributes. Amounts and taxes are recalculated. + /// #### Removing a line item. + /// A line item with a `uid` and `"_destroy": true` is removed from the invoice. Other line items remain unchanged. + /// Referencing a `uid` which does not exist on the invoice returns a `422` error. + /// ### Coupons. + /// When the `coupons` key is present, the submitted coupons replace all discounts currently applied to the invoice. Send an empty array to remove all discounts. Coupon options are the same as on invoice creation. + /// ### Invoice Options. + /// #### Issue Date and Net Terms. + /// The `issue_date` parameter can be sent to change the invoice's issue date. Only today or dates in the past are accepted. The date is interpreted and validated in your site's time zone, using the `YYYY-MM-DD` format. The `net_terms` parameter indicates the number of days after the issue date on which the invoice is due. The due date is recalculated whenever the issue date or net terms change. + /// #### Addresses. + /// The seller, shipping and billing addresses can be sent to replace the addresses on the invoice. Each address requires to send a `first_name` at a minimum in order to work. Taxes are recalculated after an address change. + /// #### Memo and Payment Instructions. + /// A custom memo can be sent with the `memo` parameter. Likewise, custom payment instructions can be sent with the `payment_instructions` parameter. + /// + /// Required parameter: The Chargify id of the subscription.. + /// Required parameter: The unique identifier for the invoice, this does not refer to the public facing invoice number.. + /// Optional parameter: . + /// cancellationToken. + /// Returns the Models.InvoiceResponse response from the API call. + public async Task UpdateInvoiceAsync( + int subscriptionId, + string uid, + Models.UpdateInvoiceRequest body = null, + CancellationToken cancellationToken = default) + => await CreateApiCall() + .RequestBuilder(requestBuilder => requestBuilder + .Setup(HttpMethod.Put, "/subscriptions/{subscription_id}/invoices/{uid}.json") + .WithAuth("BasicAuth") + .Parameters(parameters => parameters + .Body(b => b.Setup(body)) + .Template(template => template.Setup("subscription_id", subscriptionId)) + .Template(template => template.Setup("uid", uid).Required()) + .Header(header => header.Setup("Content-Type", "application/json")))) + .ResponseHandler(responseHandler => responseHandler + .ErrorCase("404", CreateErrorCase("Not Found:'{$response.body}'", (errorReason, context) => new ErrorListResponseException(errorReason, context), true)) + .ErrorCase("422", CreateErrorCase("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (errorReason, context) => new ErrorArrayMapResponseException(errorReason, context), true))) + .ExecuteAsync(cancellationToken).ConfigureAwait(false); + + /// + /// Deletes an ad hoc invoice while it is in the `draft` state. + /// **Important: only invoices with the `adhoc` role and `draft` status can be deleted.** Any other invoice — issued, or with a different role (e.g. `renewal`, `signup`) — cannot be deleted through this endpoint and the request returns a `422` error. Issued invoices should be voided instead. If the invoice does not belong to the provided subscription, a `404` error is returned. + /// A successful deletion returns a `204 No Content` response and the invoice is permanently removed. + /// + /// Required parameter: The Chargify id of the subscription.. + /// Required parameter: The unique identifier for the invoice, this does not refer to the public facing invoice number.. + public void DeleteInvoice( + int subscriptionId, + string uid) + => CoreHelper.RunVoidTask(DeleteInvoiceAsync(subscriptionId, uid)); + + /// + /// Deletes an ad hoc invoice while it is in the `draft` state. + /// **Important: only invoices with the `adhoc` role and `draft` status can be deleted.** Any other invoice — issued, or with a different role (e.g. `renewal`, `signup`) — cannot be deleted through this endpoint and the request returns a `422` error. Issued invoices should be voided instead. If the invoice does not belong to the provided subscription, a `404` error is returned. + /// A successful deletion returns a `204 No Content` response and the invoice is permanently removed. + /// + /// Required parameter: The Chargify id of the subscription.. + /// Required parameter: The unique identifier for the invoice, this does not refer to the public facing invoice number.. + /// cancellationToken. + /// Returns the void response from the API call. + public async Task DeleteInvoiceAsync( + int subscriptionId, + string uid, + CancellationToken cancellationToken = default) + => await CreateApiCall() + .RequestBuilder(requestBuilder => requestBuilder + .Setup(HttpMethod.Delete, "/subscriptions/{subscription_id}/invoices/{uid}.json") + .WithAuth("BasicAuth") + .Parameters(parameters => parameters + .Template(template => template.Setup("subscription_id", subscriptionId)) + .Template(template => template.Setup("uid", uid).Required()))) + .ResponseHandler(responseHandler => responseHandler + .ErrorCase("404", CreateErrorCase("Not Found:'{$response.body}'", (errorReason, context) => new ErrorListResponseException(errorReason, context), true)) + .ErrorCase("422", CreateErrorCase("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (errorReason, context) => new ErrorListResponseException(errorReason, context), true))) + .ExecuteAsync(cancellationToken).ConfigureAwait(false); + + /// + /// Sends an invoice to the customer 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. /// **File Attachments**: You can attach files to invoice emails using `attachment_urls[]` parameter by providing URLs to the files you want to attach. When using attachments, the request must use `multipart/form-data` content type. Max 10 files, 10MB per file. /// 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. @@ -873,7 +950,7 @@ public void SendInvoice( => CoreHelper.RunVoidTask(SendInvoiceAsync(uid, body)); /// - /// 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. + /// Sends an invoice to the customer 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. /// **File Attachments**: You can attach files to invoice emails using `attachment_urls[]` parameter by providing URLs to the files you want to attach. When using attachments, the request must use `multipart/form-data` content type. Max 10 files, 10MB per file. /// 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. @@ -899,7 +976,7 @@ public async Task SendInvoiceAsync( .ExecuteAsync(cancellationToken).ConfigureAwait(false); /// - /// Customer information may change after an invoice is issued, which may lead to a mismatch between customer information that is present on an open invoice and actual customer information. This endpoint allows you to preview these differences, if any. + /// Previews the effect of customer information changes on an open invoice. Customer information may change after an invoice is issued, which may lead to a mismatch between customer information that is present on an open invoice and actual customer information. This endpoint allows you to preview these differences, if any. /// The endpoint doesn't accept a request body. Customer information differences are calculated on the application side. /// /// Required parameter: The unique identifier for the invoice, this does not refer to the public facing invoice number.. @@ -909,7 +986,7 @@ public Models.CustomerChangesPreviewResponse PreviewCustomerInformationChanges( => CoreHelper.RunTask(PreviewCustomerInformationChangesAsync(uid)); /// - /// Customer information may change after an invoice is issued, which may lead to a mismatch between customer information that is present on an open invoice and actual customer information. This endpoint allows you to preview these differences, if any. + /// Previews the effect of customer information changes on an open invoice. Customer information may change after an invoice is issued, which may lead to a mismatch between customer information that is present on an open invoice and actual customer information. This endpoint allows you to preview these differences, if any. /// The endpoint doesn't accept a request body. Customer information differences are calculated on the application side. /// /// Required parameter: The unique identifier for the invoice, this does not refer to the public facing invoice number.. @@ -930,7 +1007,7 @@ public Models.CustomerChangesPreviewResponse PreviewCustomerInformationChanges( .ExecuteAsync(cancellationToken).ConfigureAwait(false); /// - /// This endpoint updates customer information on an open invoice and returns the updated invoice. If you would like to preview changes that will be applied, use the `/invoices/{uid}/customer_information/preview.json` endpoint first. + /// Updates customer information on an open invoice and returns the updated invoice. If you would like to preview changes that will be applied, use the `/invoices/{uid}/customer_information/preview.json` endpoint first. /// The endpoint doesn't accept a request body. Customer information differences are calculated on the application side. /// /// Required parameter: The unique identifier for the invoice, this does not refer to the public facing invoice number.. @@ -940,7 +1017,7 @@ public Models.Invoice UpdateCustomerInformation( => CoreHelper.RunTask(UpdateCustomerInformationAsync(uid)); /// - /// This endpoint updates customer information on an open invoice and returns the updated invoice. If you would like to preview changes that will be applied, use the `/invoices/{uid}/customer_information/preview.json` endpoint first. + /// Updates customer information on an open invoice and returns the updated invoice. If you would like to preview changes that will be applied, use the `/invoices/{uid}/customer_information/preview.json` endpoint first. /// The endpoint doesn't accept a request body. Customer information differences are calculated on the application side. /// /// Required parameter: The unique identifier for the invoice, this does not refer to the public facing invoice number.. @@ -961,7 +1038,7 @@ public Models.Invoice UpdateCustomerInformation( .ExecuteAsync(cancellationToken).ConfigureAwait(false); /// - /// This endpoint allows you to issue an invoice that is in "pending" or "draft" status. For example, you can issue an invoice that was created when allocating new quantity on a component and using "accrue charges" option. + /// Issues an invoice that is in "pending" or "draft" status. For example, you can issue an invoice that was created when allocating new quantity on a component and using "accrue charges" option. /// You cannot issue a pending child invoice that was created for a member subscription in a group. /// For Remittance subscriptions, the invoice will go into "open" status and payment won't be attempted. The value for `on_failed_payment` would be rejected if sent. Any prepayments or service credits that exist on the subscription will be automatically applied. Additionally, if the setting is enabled, an email will be sent for the issued invoice. /// For Automatic subscriptions, prepayments and service credits will apply to the invoice before payment is attempted. On successful payment, the invoice will go into "paid" status and email will be sent to the customer (if setting applies). When payment fails, the next event depends on the `on_failed_payment` value:. @@ -978,7 +1055,7 @@ public Models.Invoice IssueInvoice( => CoreHelper.RunTask(IssueInvoiceAsync(uid, body)); /// - /// This endpoint allows you to issue an invoice that is in "pending" or "draft" status. For example, you can issue an invoice that was created when allocating new quantity on a component and using "accrue charges" option. + /// Issues an invoice that is in "pending" or "draft" status. For example, you can issue an invoice that was created when allocating new quantity on a component and using "accrue charges" option. /// You cannot issue a pending child invoice that was created for a member subscription in a group. /// For Remittance subscriptions, the invoice will go into "open" status and payment won't be attempted. The value for `on_failed_payment` would be rejected if sent. Any prepayments or service credits that exist on the subscription will be automatically applied. Additionally, if the setting is enabled, an email will be sent for the issued invoice. /// For Automatic subscriptions, prepayments and service credits will apply to the invoice before payment is attempted. On successful payment, the invoice will go into "paid" status and email will be sent to the customer (if setting applies). When payment fails, the next event depends on the `on_failed_payment` value:. diff --git a/AdvancedBilling.Standard/Controllers/OffersController.cs b/AdvancedBilling.Standard/Controllers/OffersController.cs index 74022b46..2cd61d02 100644 --- a/AdvancedBilling.Standard/Controllers/OffersController.cs +++ b/AdvancedBilling.Standard/Controllers/OffersController.cs @@ -24,11 +24,10 @@ public class OffersController : BaseController internal OffersController(GlobalConfiguration globalConfiguration) : base(globalConfiguration) { } /// - /// Creates an offer within your Advanced Billing site. - /// ## Documentation. + /// Creates an offer within your site. /// Offers allow you to package complicated combinations of products, components and coupons into a convenient package which can then be subscribed to just like products. /// Once an offer is defined it can be used as an alternative to the product when creating subscriptions. - /// Full documentation on how to use offers in the Advanced Billing UI can be located [here](https://maxio.zendesk.com/hc/en-us/articles/24261295098637-Offers-Overview). + /// For more information, see [Offers](https://maxio.zendesk.com/hc/en-us/articles/24261295098637-Offers-Overview) in the product documentation. /// ## Using a Product Price Point. /// You can optionally pass in a `product_price_point_id` that corresponds with the `product_id` and the offer will use that price point. If a `product_price_point_id` is not passed in, the product's default price point will be used. /// @@ -39,11 +38,10 @@ public Models.OfferResponse CreateOffer( => CoreHelper.RunTask(CreateOfferAsync(body)); /// - /// Creates an offer within your Advanced Billing site. - /// ## Documentation. + /// Creates an offer within your site. /// Offers allow you to package complicated combinations of products, components and coupons into a convenient package which can then be subscribed to just like products. /// Once an offer is defined it can be used as an alternative to the product when creating subscriptions. - /// Full documentation on how to use offers in the Advanced Billing UI can be located [here](https://maxio.zendesk.com/hc/en-us/articles/24261295098637-Offers-Overview). + /// For more information, see [Offers](https://maxio.zendesk.com/hc/en-us/articles/24261295098637-Offers-Overview) in the product documentation. /// ## Using a Product Price Point. /// You can optionally pass in a `product_price_point_id` that corresponds with the `product_id` and the offer will use that price point. If a `product_price_point_id` is not passed in, the product's default price point will be used. /// diff --git a/AdvancedBilling.Standard/Controllers/PaymentProfilesController.cs b/AdvancedBilling.Standard/Controllers/PaymentProfilesController.cs index 13f9aa82..a4a5d3f8 100644 --- a/AdvancedBilling.Standard/Controllers/PaymentProfilesController.cs +++ b/AdvancedBilling.Standard/Controllers/PaymentProfilesController.cs @@ -101,7 +101,7 @@ public Models.PaymentProfileResponse CreatePaymentProfile( .ExecuteAsync(cancellationToken).ConfigureAwait(false); /// - /// Returns all active payment profiles for a site, or for one customer within a site. If no payment profiles are found, this endpoint will return an empty array, not a 404. + /// Lists all active payment profiles for a site, or for one customer within a site. If no payment profiles are found, this endpoint returns an empty array. /// /// Object containing request parameters. /// Returns the List of Models.PaymentProfileResponse response from the API call. @@ -110,7 +110,7 @@ public Models.PaymentProfileResponse CreatePaymentProfile( => CoreHelper.RunTask(ListPaymentProfilesAsync(input)); /// - /// Returns all active payment profiles for a site, or for one customer within a site. If no payment profiles are found, this endpoint will return an empty array, not a 404. + /// Lists all active payment profiles for a site, or for one customer within a site. If no payment profiles are found, this endpoint returns an empty array. /// /// Object containing request parameters. /// cancellationToken. @@ -305,7 +305,7 @@ public Models.PaymentProfileResponse UpdatePaymentProfile( /// /// Deletes an unused payment profile. - /// If the payment profile is in use by one or more subscriptions or groups, a 422 and error message will be returned. + /// If the payment profile is in use by one or more subscriptions or groups, an error message is returned. /// /// Required parameter: The Chargify id of the payment profile. public void DeleteUnusedPaymentProfile( @@ -314,7 +314,7 @@ public void DeleteUnusedPaymentProfile( /// /// Deletes an unused payment profile. - /// If the payment profile is in use by one or more subscriptions or groups, a 422 and error message will be returned. + /// If the payment profile is in use by one or more subscriptions or groups, an error message is returned. /// /// Required parameter: The Chargify id of the payment profile. /// cancellationToken. @@ -335,8 +335,8 @@ public async Task DeleteUnusedPaymentProfileAsync( /// /// Deletes a payment profile belonging to the customer on the subscription. - /// + If the customer has multiple subscriptions, the payment profile will be removed from all of them. - /// + If you delete the default payment profile for a subscription, you will need to specify another payment profile to be the default through the api, or either prompt the user to enter a card in the billing portal or on the self-service page, or visit the Payment Details tab on the subscription in the Admin UI and use the “Add New Credit Card” or “Make Active Payment Method” link, (depending on whether there are other cards present). + /// If the customer has multiple subscriptions, the payment profile is removed from all of them. + /// If you delete the default payment profile for a subscription, you need to specify another payment profile to be the default through the API, or either prompt the user to enter a card in the billing portal or on the self-service page, or visit the Payment Details tab on the subscription in the Admin UI and use the “Add New Credit Card” or “Make Active Payment Method” link, (depending on whether there are other cards present). /// /// Required parameter: The Chargify id of the subscription.. /// Required parameter: The Chargify id of the payment profile. @@ -347,8 +347,8 @@ public void DeleteSubscriptionsPaymentProfile( /// /// Deletes a payment profile belonging to the customer on the subscription. - /// + If the customer has multiple subscriptions, the payment profile will be removed from all of them. - /// + If you delete the default payment profile for a subscription, you will need to specify another payment profile to be the default through the api, or either prompt the user to enter a card in the billing portal or on the self-service page, or visit the Payment Details tab on the subscription in the Admin UI and use the “Add New Credit Card” or “Make Active Payment Method” link, (depending on whether there are other cards present). + /// If the customer has multiple subscriptions, the payment profile is removed from all of them. + /// If you delete the default payment profile for a subscription, you need to specify another payment profile to be the default through the API, or either prompt the user to enter a card in the billing portal or on the self-service page, or visit the Payment Details tab on the subscription in the Admin UI and use the “Add New Credit Card” or “Make Active Payment Method” link, (depending on whether there are other cards present). /// /// Required parameter: The Chargify id of the subscription.. /// Required parameter: The Chargify id of the payment profile. @@ -471,7 +471,7 @@ public Models.PaymentProfileResponse ChangeSubscriptionDefaultPaymentProfile( .ExecuteAsync(cancellationToken).ConfigureAwait(false); /// - /// This will change the default payment profile on the subscription group to the existing payment profile with the id specified. + /// Changes the default payment profile on the subscription group to the existing payment profile with the specified ID. /// You must elect to change the existing payment profile to a new payment profile ID in order to receive a satisfactory response from this endpoint. /// The new payment profile must belong to the subscription group's customer, otherwise you will receive an error. /// @@ -484,7 +484,7 @@ public Models.PaymentProfileResponse ChangeSubscriptionGroupDefaultPaymentProfil => CoreHelper.RunTask(ChangeSubscriptionGroupDefaultPaymentProfileAsync(uid, paymentProfileId)); /// - /// This will change the default payment profile on the subscription group to the existing payment profile with the id specified. + /// Changes the default payment profile on the subscription group to the existing payment profile with the specified ID. /// You must elect to change the existing payment profile to a new payment profile ID in order to receive a satisfactory response from this endpoint. /// The new payment profile must belong to the subscription group's customer, otherwise you will receive an error. /// @@ -508,7 +508,7 @@ public Models.PaymentProfileResponse ChangeSubscriptionGroupDefaultPaymentProfil .ExecuteAsync(cancellationToken).ConfigureAwait(false); /// - /// One Time Tokens aka Advanced Billing Tokens house the credit card or ACH (Authorize.Net or Stripe only) data for a customer. + /// Returns the one-time token data, including credit card or ACH details, associated with the provided token ID. One Time Tokens aka Advanced Billing Tokens house the credit card or ACH (Authorize.Net or Stripe only) data for a customer. /// You can use One Time Tokens while creating a subscription or payment profile instead of passing all bank account or credit card data directly to a given API endpoint. /// To obtain a One Time Token you have to use [Chargify.js](https://docs.maxio.com/hc/en-us/articles/38163190843789-Chargify-js-Overview#chargify-js-overview-0-0). /// @@ -519,7 +519,7 @@ public Models.GetOneTimeTokenRequest ReadOneTimeToken( => CoreHelper.RunTask(ReadOneTimeTokenAsync(chargifyToken)); /// - /// One Time Tokens aka Advanced Billing Tokens house the credit card or ACH (Authorize.Net or Stripe only) data for a customer. + /// Returns the one-time token data, including credit card or ACH details, associated with the provided token ID. One Time Tokens aka Advanced Billing Tokens house the credit card or ACH (Authorize.Net or Stripe only) data for a customer. /// You can use One Time Tokens while creating a subscription or payment profile instead of passing all bank account or credit card data directly to a given API endpoint. /// To obtain a One Time Token you have to use [Chargify.js](https://docs.maxio.com/hc/en-us/articles/38163190843789-Chargify-js-Overview#chargify-js-overview-0-0). /// @@ -540,7 +540,7 @@ public Models.GetOneTimeTokenRequest ReadOneTimeToken( .ExecuteAsync(cancellationToken).ConfigureAwait(false); /// - /// You can send a "request payment update" email to the customer associated with the subscription. + /// Sends a "request payment update" email to the customer associated with the subscription. /// If you attempt to send a "request payment update" email more than five times within a 30-minute period, you will receive a `422` response with an error message in the body. This error message will indicate that the request has been rejected due to excessive attempts, and will provide instructions on how to resubmit the request. /// Additionally, if you attempt to send a "request payment update" email for a subscription that does not exist, you will receive a `404` error response. This error message will indicate that the subscription could not be found, and will provide instructions on how to correct the error and resubmit the request. /// These error responses are designed to prevent excessive or invalid requests, and to provide clear and helpful information to users who encounter errors during the request process. @@ -551,7 +551,7 @@ public void SendRequestUpdatePaymentEmail( => CoreHelper.RunVoidTask(SendRequestUpdatePaymentEmailAsync(subscriptionId)); /// - /// You can send a "request payment update" email to the customer associated with the subscription. + /// Sends a "request payment update" email to the customer associated with the subscription. /// If you attempt to send a "request payment update" email more than five times within a 30-minute period, you will receive a `422` response with an error message in the body. This error message will indicate that the request has been rejected due to excessive attempts, and will provide instructions on how to resubmit the request. /// Additionally, if you attempt to send a "request payment update" email for a subscription that does not exist, you will receive a `404` error response. This error message will indicate that the subscription could not be found, and will provide instructions on how to correct the error and resubmit the request. /// These error responses are designed to prevent excessive or invalid requests, and to provide clear and helpful information to users who encounter errors during the request process. diff --git a/AdvancedBilling.Standard/Controllers/ProductFamiliesController.cs b/AdvancedBilling.Standard/Controllers/ProductFamiliesController.cs index d0f5c8c5..68e0b22c 100644 --- a/AdvancedBilling.Standard/Controllers/ProductFamiliesController.cs +++ b/AdvancedBilling.Standard/Controllers/ProductFamiliesController.cs @@ -62,7 +62,7 @@ internal ProductFamiliesController(GlobalConfiguration globalConfiguration) : ba .ExecuteAsync(cancellationToken).ConfigureAwait(false); /// - /// Creates 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 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: . @@ -72,7 +72,7 @@ public Models.ProductFamilyResponse CreateProductFamily( => CoreHelper.RunTask(CreateProductFamilyAsync(body)); /// - /// Creates 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 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: . @@ -93,7 +93,7 @@ public Models.ProductFamilyResponse CreateProductFamily( .ExecuteAsync(cancellationToken).ConfigureAwait(false); /// - /// Returns a list of Product Families for a site. + /// Lists Product Families for a site. /// /// Object containing request parameters. /// Returns the List of Models.ProductFamilyResponse response from the API call. @@ -102,7 +102,7 @@ public Models.ProductFamilyResponse CreateProductFamily( => CoreHelper.RunTask(ListProductFamiliesAsync(input)); /// - /// Returns a list of Product Families for a site. + /// Lists Product Families for a site. /// /// Object containing request parameters. /// cancellationToken. diff --git a/AdvancedBilling.Standard/Controllers/ProductPricePointsController.cs b/AdvancedBilling.Standard/Controllers/ProductPricePointsController.cs index e2a0132e..674aa266 100644 --- a/AdvancedBilling.Standard/Controllers/ProductPricePointsController.cs +++ b/AdvancedBilling.Standard/Controllers/ProductPricePointsController.cs @@ -133,7 +133,7 @@ public Models.ProductPricePointResponse UpdateProductPricePoint( /// /// 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.. - /// Optional parameter: When fetching a product's price points, if you have defined multiple currencies at the site level, you can optionally pass the ?currency_prices=true query param to include an array of currency price data in the response. If the product price point 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.. + /// Optional parameter: (Optional) If you have defined multiple currencies at the site level, you can pass ?currency_prices=true to include an array of currency price data in the response. If the product price point 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.. /// Returns the Models.ProductPricePointResponse response from the API call. public Models.ProductPricePointResponse ReadProductPricePoint( ReadProductPricePointProductId productId, @@ -146,7 +146,7 @@ public Models.ProductPricePointResponse ReadProductPricePoint( /// /// 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.. - /// Optional parameter: When fetching a product's price points, if you have defined multiple currencies at the site level, you can optionally pass the ?currency_prices=true query param to include an array of currency price data in the response. If the product price point 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.. + /// Optional parameter: (Optional) If you have defined multiple currencies at the site level, you can pass ?currency_prices=true to include an array of currency price data in the response. If the product price point 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.. /// cancellationToken. /// Returns the Models.ProductPricePointResponse response from the API call. public async Task ReadProductPricePointAsync( diff --git a/AdvancedBilling.Standard/Controllers/ProductsController.cs b/AdvancedBilling.Standard/Controllers/ProductsController.cs index da5be227..631c4430 100644 --- a/AdvancedBilling.Standard/Controllers/ProductsController.cs +++ b/AdvancedBilling.Standard/Controllers/ProductsController.cs @@ -24,9 +24,10 @@ public class ProductsController : BaseController internal ProductsController(GlobalConfiguration globalConfiguration) : base(globalConfiguration) { } /// - /// Creates a product in your Advanced Billing site. - /// See the following product documentation for more information:. - /// + [Products Documentation](https://maxio.zendesk.com/hc/en-us/articles/24261090117645-Products-Overview). + /// Creates a product in your site. + /// If you have the new [Catalog experience](page:help/announcements/2026-announcements#new-catalog-experience-and-terminology) enabled, the `auto_create_signup_page` parameter is not supported. If `auto_create_signup_page` is included (with any value) an error is returned. + /// For more information, see:. + /// + [Products Overview](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). /// /// Required parameter: Either the product family's id or its handle prefixed with `handle:`. @@ -38,9 +39,10 @@ public Models.ProductResponse CreateProduct( => CoreHelper.RunTask(CreateProductAsync(productFamilyId, body)); /// - /// Creates a product in your Advanced Billing site. - /// See the following product documentation for more information:. - /// + [Products Documentation](https://maxio.zendesk.com/hc/en-us/articles/24261090117645-Products-Overview). + /// Creates a product in your site. + /// If you have the new [Catalog experience](page:help/announcements/2026-announcements#new-catalog-experience-and-terminology) enabled, the `auto_create_signup_page` parameter is not supported. If `auto_create_signup_page` is included (with any value) an error is returned. + /// For more information, see:. + /// + [Products Overview](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). /// /// Required parameter: Either the product family's id or its handle prefixed with `handle:`. diff --git a/AdvancedBilling.Standard/Controllers/ProformaInvoicesController.cs b/AdvancedBilling.Standard/Controllers/ProformaInvoicesController.cs index d90828e3..c920f14c 100644 --- a/AdvancedBilling.Standard/Controllers/ProformaInvoicesController.cs +++ b/AdvancedBilling.Standard/Controllers/ProformaInvoicesController.cs @@ -24,7 +24,7 @@ public class ProformaInvoicesController : BaseController internal ProformaInvoicesController(GlobalConfiguration globalConfiguration) : base(globalConfiguration) { } /// - /// Creates a consolidated proforma invoice asynchronously. It will return a 201 with no message, or a 422 with any errors. To find and view the new consolidated proforma invoice, you may poll the subscription group listing for proforma invoices; only one consolidated proforma invoice may be created per group at a time. + /// Creates a consolidated proforma invoice asynchronously. To find and view the new consolidated proforma invoice, you can poll the subscription group listing for proforma invoices; only one consolidated proforma invoice can be created per group at a time. /// If the information becomes outdated, simply void the old consolidated proforma invoice and generate a new one. /// ## Restrictions. /// Proforma invoices are only available on Relationship Invoicing sites. To create a proforma invoice, the subscription must not be prepaid, and must be in a live state. @@ -35,7 +35,7 @@ public void CreateConsolidatedProformaInvoice( => CoreHelper.RunVoidTask(CreateConsolidatedProformaInvoiceAsync(uid)); /// - /// Creates a consolidated proforma invoice asynchronously. It will return a 201 with no message, or a 422 with any errors. To find and view the new consolidated proforma invoice, you may poll the subscription group listing for proforma invoices; only one consolidated proforma invoice may be created per group at a time. + /// Creates a consolidated proforma invoice asynchronously. To find and view the new consolidated proforma invoice, you can poll the subscription group listing for proforma invoices; only one consolidated proforma invoice can be created per group at a time. /// If the information becomes outdated, simply void the old consolidated proforma invoice and generate a new one. /// ## Restrictions. /// Proforma invoices are only available on Relationship Invoicing sites. To create a proforma invoice, the subscription must not be prepaid, and must be in a live state. @@ -283,7 +283,7 @@ public Models.ProformaInvoice VoidProformaInvoice( .ExecuteAsync(cancellationToken).ConfigureAwait(false); /// - /// Returns a preview of the data that will be included on a given subscription's proforma invoice if one were to be generated. It will have similar line items and totals as a renewal preview, but the response will be presented in the format of a proforma invoice. Consequently it will include additional information such as the name and addresses that will appear on the proforma invoice. + /// Previews the data that will be included on a given subscription's proforma invoice if one were to be generated. It will have similar line items and totals as a renewal preview, but the response will be presented in the format of a proforma invoice. Consequently it will include additional information such as the name and addresses that will appear on the proforma invoice. /// The preview endpoint is subject to all the same conditions as the proforma invoice endpoint. For example, previews are only available on the Relationship Invoicing architecture, and previews cannot be made for end-of-life subscriptions. /// If all the data returned in the preview is as expected, you may then create a static proforma invoice and send it to your customer. The data within a preview will not be saved and will not be accessible after the call is made. /// Alternatively, if you have some proforma invoices already, you may make a preview call to determine whether any billing information for the subscription's upcoming renewal has changed. @@ -295,7 +295,7 @@ public Models.ProformaInvoice PreviewProformaInvoice( => CoreHelper.RunTask(PreviewProformaInvoiceAsync(subscriptionId)); /// - /// Returns a preview of the data that will be included on a given subscription's proforma invoice if one were to be generated. It will have similar line items and totals as a renewal preview, but the response will be presented in the format of a proforma invoice. Consequently it will include additional information such as the name and addresses that will appear on the proforma invoice. + /// Previews the data that will be included on a given subscription's proforma invoice if one were to be generated. It will have similar line items and totals as a renewal preview, but the response will be presented in the format of a proforma invoice. Consequently it will include additional information such as the name and addresses that will appear on the proforma invoice. /// The preview endpoint is subject to all the same conditions as the proforma invoice endpoint. For example, previews are only available on the Relationship Invoicing architecture, and previews cannot be made for end-of-life subscriptions. /// If all the data returned in the preview is as expected, you may then create a static proforma invoice and send it to your customer. The data within a preview will not be saved and will not be accessible after the call is made. /// Alternatively, if you have some proforma invoices already, you may make a preview call to determine whether any billing information for the subscription's upcoming renewal has changed. diff --git a/AdvancedBilling.Standard/Controllers/ReasonCodesController.cs b/AdvancedBilling.Standard/Controllers/ReasonCodesController.cs index 27fb28d6..ee2d84ff 100644 --- a/AdvancedBilling.Standard/Controllers/ReasonCodesController.cs +++ b/AdvancedBilling.Standard/Controllers/ReasonCodesController.cs @@ -25,14 +25,9 @@ internal ReasonCodesController(GlobalConfiguration globalConfiguration) : base(g /// /// Creates a reason code for a given site. - /// # Reason Codes Intro. /// Reason Codes are a way to gain a high-level view of why your customers are cancelling the subscription to your product or service. /// Add a set of churn reason codes to be displayed in-app and/or the Maxio Billing Portal. As your subscribers decide to cancel their subscription, learn why they decided to cancel. - /// ## Reason Code Documentation. - /// Full documentation on how Reason Codes operate within Advanced Billing can be located under the following links. - /// [Churn Reason Codes](https://maxio.zendesk.com/hc/en-us/articles/24286647554701-Churn-Reason-Codes). - /// ## Create Reason Code. - /// This method gives a merchant the option to create reason codes for a given site. + /// For more information, see [Churn Reason Codes](https://maxio.zendesk.com/hc/en-us/articles/24286647554701-Churn-Reason-Codes). /// /// Optional parameter: . /// Returns the Models.ReasonCodeResponse response from the API call. @@ -42,14 +37,9 @@ public Models.ReasonCodeResponse CreateReasonCode( /// /// Creates a reason code for a given site. - /// # Reason Codes Intro. /// Reason Codes are a way to gain a high-level view of why your customers are cancelling the subscription to your product or service. /// Add a set of churn reason codes to be displayed in-app and/or the Maxio Billing Portal. As your subscribers decide to cancel their subscription, learn why they decided to cancel. - /// ## Reason Code Documentation. - /// Full documentation on how Reason Codes operate within Advanced Billing can be located under the following links. - /// [Churn Reason Codes](https://maxio.zendesk.com/hc/en-us/articles/24286647554701-Churn-Reason-Codes). - /// ## Create Reason Code. - /// This method gives a merchant the option to create reason codes for a given site. + /// For more information, see [Churn Reason Codes](https://maxio.zendesk.com/hc/en-us/articles/24286647554701-Churn-Reason-Codes). /// /// Optional parameter: . /// cancellationToken. diff --git a/AdvancedBilling.Standard/Controllers/ReferralCodesController.cs b/AdvancedBilling.Standard/Controllers/ReferralCodesController.cs index 21770711..fedd3076 100644 --- a/AdvancedBilling.Standard/Controllers/ReferralCodesController.cs +++ b/AdvancedBilling.Standard/Controllers/ReferralCodesController.cs @@ -24,10 +24,7 @@ internal ReferralCodesController(GlobalConfiguration globalConfiguration) : base /// /// Validates whether a referral code is valid and applicable within your site. This method is useful for validating referral codes that are entered by a customer. - /// ## Referrals Documentation. - /// Full documentation on how to use the referrals feature in the Advanced Billing UI can be located [here](https://maxio.zendesk.com/hc/en-us/sections/24286965611405-Referrals). - /// ## Server Response. - /// If the referral code is valid the status code will be `200` and the referral code will be returned. If the referral code is invalid, a `404` response will be returned. + /// For more information, see [Understanding Referrals](https://docs.maxio.com/hc/en-us/articles/24286981223693-Understanding-Referrals) in the product documentation. /// /// Required parameter: The referral code you are trying to validate. /// Returns the Models.ReferralValidationResponse response from the API call. @@ -37,10 +34,7 @@ public Models.ReferralValidationResponse ValidateReferralCode( /// /// Validates whether a referral code is valid and applicable within your site. This method is useful for validating referral codes that are entered by a customer. - /// ## Referrals Documentation. - /// Full documentation on how to use the referrals feature in the Advanced Billing UI can be located [here](https://maxio.zendesk.com/hc/en-us/sections/24286965611405-Referrals). - /// ## Server Response. - /// If the referral code is valid the status code will be `200` and the referral code will be returned. If the referral code is invalid, a `404` response will be returned. + /// For more information, see [Understanding Referrals](https://docs.maxio.com/hc/en-us/articles/24286981223693-Understanding-Referrals) in the product documentation. /// /// Required parameter: The referral code you are trying to validate. /// cancellationToken. diff --git a/AdvancedBilling.Standard/Controllers/SalesCommissionsController.cs b/AdvancedBilling.Standard/Controllers/SalesCommissionsController.cs index 14f4e883..bd658728 100644 --- a/AdvancedBilling.Standard/Controllers/SalesCommissionsController.cs +++ b/AdvancedBilling.Standard/Controllers/SalesCommissionsController.cs @@ -66,7 +66,7 @@ internal SalesCommissionsController(GlobalConfiguration globalConfiguration) : b /// /// /// /// /// /// Returns the Models.SiteResponse response from the API call. @@ -43,15 +43,15 @@ public Models.SiteResponse ReadSite() /// /// /// /// cancellationToken. @@ -91,7 +91,7 @@ public async Task ClearSiteAsync( .ExecuteAsync(cancellationToken).ConfigureAwait(false); /// - /// Returns public keys used for Maxio.js (formerly Chargify.js). + /// Lists public keys used for Maxio.js (formerly Chargify.js). /// /// Object containing request parameters. /// Returns the Models.ListPublicKeysResponse response from the API call. @@ -100,7 +100,7 @@ public Models.ListPublicKeysResponse ListChargifyJsPublicKeys( => CoreHelper.RunTask(ListChargifyJsPublicKeysAsync(input)); /// - /// Returns public keys used for Maxio.js (formerly Chargify.js). + /// Lists public keys used for Maxio.js (formerly Chargify.js). /// /// Object containing request parameters. /// cancellationToken. diff --git a/AdvancedBilling.Standard/Controllers/SubscriptionComponentsController.cs b/AdvancedBilling.Standard/Controllers/SubscriptionComponentsController.cs index 5d447c4c..47d5869c 100644 --- a/AdvancedBilling.Standard/Controllers/SubscriptionComponentsController.cs +++ b/AdvancedBilling.Standard/Controllers/SubscriptionComponentsController.cs @@ -237,7 +237,7 @@ public Models.AllocationResponse AllocateComponent( .ExecuteAsync(cancellationToken).ConfigureAwait(false); /// - /// Returns the 50 most recent Allocations, ordered by most recent first. + /// Lists the 50 most recent Allocations, ordered by most recent first. /// ## On/Off Components. /// When a subscription's on/off component has been toggled to on (`1`) or off (`0`), usage will be logged in this response. /// @@ -252,7 +252,7 @@ public Models.AllocationResponse AllocateComponent( => CoreHelper.RunTask(ListAllocationsAsync(subscriptionId, componentId, page)); /// - /// Returns the 50 most recent Allocations, ordered by most recent first. + /// Lists the 50 most recent Allocations, ordered by most recent first. /// ## On/Off Components. /// When a subscription's on/off component has been toggled to on (`1`) or off (`0`), usage will be logged in this response. /// @@ -595,7 +595,7 @@ public Models.UsageResponse CreateUsage( /// /// /// /// Activates an event-based component for a single subscription. - /// In order to bill your subscribers on your Events data under the Events-Based Billing feature, the components must be activated for the subscriber. - /// Learn more about the role of activation in the [Events-Based Billing docs](https://maxio.zendesk.com/hc/en-us/articles/24260323329805-Events-Based-Billing-Overview). - /// Use this endpoint to activate an event-based component for a single subscription. Activating an event-based component causes Advanced Billing to bill for events when the subscription is renewed. - /// *Note: it is possible to stream events for a subscription at any time, regardless of component activation status. The activation status only determines if the subscription should be billed for event-based component usage at renewal.*. + /// To bill your subscribers on your Events data under the Events-Based Billing feature, the components must be activated for the subscriber. + /// For more information, see [Design Your Catalog](https://docs.maxio.com/hc/en-us/articles/24181036583053-Design-Your-Catalog?method=componenttypes). + /// Use this endpoint to activate an event-based component for a single subscription. Activating an event-based component causes billing for events when the subscription is renewed. + /// Note: it is possible to stream events for a subscription at any time, regardless of component activation status. The activation status only determines if the subscription should be billed for event-based component usage at renewal. /// /// Required parameter: The Advanced Billing id of the subscription. /// Required parameter: The Advanced Billing id of the component. @@ -664,10 +664,10 @@ public void ActivateEventBasedComponent( /// /// Activates an event-based component for a single subscription. - /// In order to bill your subscribers on your Events data under the Events-Based Billing feature, the components must be activated for the subscriber. - /// Learn more about the role of activation in the [Events-Based Billing docs](https://maxio.zendesk.com/hc/en-us/articles/24260323329805-Events-Based-Billing-Overview). - /// Use this endpoint to activate an event-based component for a single subscription. Activating an event-based component causes Advanced Billing to bill for events when the subscription is renewed. - /// *Note: it is possible to stream events for a subscription at any time, regardless of component activation status. The activation status only determines if the subscription should be billed for event-based component usage at renewal.*. + /// To bill your subscribers on your Events data under the Events-Based Billing feature, the components must be activated for the subscriber. + /// For more information, see [Design Your Catalog](https://docs.maxio.com/hc/en-us/articles/24181036583053-Design-Your-Catalog?method=componenttypes). + /// Use this endpoint to activate an event-based component for a single subscription. Activating an event-based component causes billing for events when the subscription is renewed. + /// Note: it is possible to stream events for a subscription at any time, regardless of component activation status. The activation status only determines if the subscription should be billed for event-based component usage at renewal. /// /// Required parameter: The Advanced Billing id of the subscription. /// Required parameter: The Advanced Billing id of the component. @@ -722,20 +722,17 @@ public async Task DeactivateEventBasedComponentAsync( /// /// Records a single event for Events-Based Billing. - /// ## Documentation. /// Events-Based Billing is an evolved form of metered billing that is based on data-rich events streamed in real-time from your system to Advanced Billing. /// These events can then be transformed, enriched, or analyzed to form the computed totals of usage charges billed to your customers. /// This API allows you to stream events into the Advanced Billing data ingestion engine. - /// Learn more about the feature in general in the [Events-Based Billing help docs](https://maxio.zendesk.com/hc/en-us/articles/24260323329805-Events-Based-Billing-Overview). - /// ## Record Event. - /// Use this endpoint to record a single event. - /// *Note: this endpoint differs from the standard Chargify API endpoints in that the URL subdomain will be `events` and your site subdomain will be included in the URL path. For example:*. + /// For more information, see [Design Your Catalog](https://docs.maxio.com/hc/en-us/articles/24181036583053-Design-Your-Catalog?method=componenttypes). + /// Note: this endpoint differs from the standard URL for this API in that `events` and your site subdomain are included in the path. For example:. /// ```. /// https://events.chargify.com/my-site-subdomain/events/my-stream-api-handle. /// ```. /// /// Required parameter: Identifies the Stream for which the event should be published.. - /// Optional parameter: If you've attached your own Keen project as an Advanced Billing event data-store, use this parameter to indicate the data-store.. + /// Optional parameter: If you've attached your own Keen project as an Advanced Billing event data-store, use this parameter to indicate the data-store. This applies to Legacy Metering sites only — it has no effect on Maxio Metering sites.. /// Optional parameter: . public void RecordEvent( string apiHandle, @@ -745,20 +742,17 @@ public void RecordEvent( /// /// Records a single event for Events-Based Billing. - /// ## Documentation. /// Events-Based Billing is an evolved form of metered billing that is based on data-rich events streamed in real-time from your system to Advanced Billing. /// These events can then be transformed, enriched, or analyzed to form the computed totals of usage charges billed to your customers. /// This API allows you to stream events into the Advanced Billing data ingestion engine. - /// Learn more about the feature in general in the [Events-Based Billing help docs](https://maxio.zendesk.com/hc/en-us/articles/24260323329805-Events-Based-Billing-Overview). - /// ## Record Event. - /// Use this endpoint to record a single event. - /// *Note: this endpoint differs from the standard Chargify API endpoints in that the URL subdomain will be `events` and your site subdomain will be included in the URL path. For example:*. + /// For more information, see [Design Your Catalog](https://docs.maxio.com/hc/en-us/articles/24181036583053-Design-Your-Catalog?method=componenttypes). + /// Note: this endpoint differs from the standard URL for this API in that `events` and your site subdomain are included in the path. For example:. /// ```. /// https://events.chargify.com/my-site-subdomain/events/my-stream-api-handle. /// ```. /// /// Required parameter: Identifies the Stream for which the event should be published.. - /// Optional parameter: If you've attached your own Keen project as an Advanced Billing event data-store, use this parameter to indicate the data-store.. + /// Optional parameter: If you've attached your own Keen project as an Advanced Billing event data-store, use this parameter to indicate the data-store. This applies to Legacy Metering sites only — it has no effect on Maxio Metering sites.. /// Optional parameter: . /// cancellationToken. /// Returns the void response from the API call. @@ -781,11 +775,11 @@ public async Task RecordEventAsync( /// /// Records a collection of events. - /// *Note: this endpoint differs from the standard Chargify API endpoints in that the subdomain will be `events` and your site subdomain will be included in the URL path.*. + /// Note: this endpoint differs from the standard URL for this API in that `events` and your site subdomain are included in the path. /// A maximum of 1000 events can be published in a single request. A 422 will be returned if this limit is exceeded. /// /// Required parameter: Identifies the Stream for which the events should be published.. - /// Optional parameter: If you've attached your own Keen project as an Advanced Billing event data-store, use this parameter to indicate the data-store.. + /// Optional parameter: If you've attached your own Keen project as an Advanced Billing event data-store, use this parameter to indicate the data-store. This applies to Legacy Metering sites only — it has no effect on Maxio Metering sites.. /// Optional parameter: . public void BulkRecordEvents( string apiHandle, @@ -795,11 +789,11 @@ public void BulkRecordEvents( /// /// Records a collection of events. - /// *Note: this endpoint differs from the standard Chargify API endpoints in that the subdomain will be `events` and your site subdomain will be included in the URL path.*. + /// Note: this endpoint differs from the standard URL for this API in that `events` and your site subdomain are included in the path. /// A maximum of 1000 events can be published in a single request. A 422 will be returned if this limit is exceeded. /// /// Required parameter: Identifies the Stream for which the events should be published.. - /// Optional parameter: If you've attached your own Keen project as an Advanced Billing event data-store, use this parameter to indicate the data-store.. + /// Optional parameter: If you've attached your own Keen project as an Advanced Billing event data-store, use this parameter to indicate the data-store. This applies to Legacy Metering sites only — it has no effect on Maxio Metering sites.. /// Optional parameter: . /// cancellationToken. /// Returns the void response from the API call. diff --git a/AdvancedBilling.Standard/Controllers/SubscriptionGroupsController.cs b/AdvancedBilling.Standard/Controllers/SubscriptionGroupsController.cs index 128b44d0..3b649478 100644 --- a/AdvancedBilling.Standard/Controllers/SubscriptionGroupsController.cs +++ b/AdvancedBilling.Standard/Controllers/SubscriptionGroupsController.cs @@ -97,7 +97,7 @@ public Models.SubscriptionGroupResponse CreateSubscriptionGroup( .ExecuteAsync(cancellationToken).ConfigureAwait(false); /// - /// Returns an array of subscription groups for the site. The response is paginated and will return a `meta` key with pagination information. + /// Lists subscription groups for the site. The response is paginated and will return a `meta` key with pagination information. /// #### Account Balance Information. /// Account balance information for the subscription groups is not returned by default. If this information is desired, the `include[]=account_balances` parameter must be provided with the request. /// @@ -108,7 +108,7 @@ public Models.ListSubscriptionGroupsResponse ListSubscriptionGroups( => CoreHelper.RunTask(ListSubscriptionGroupsAsync(input)); /// - /// Returns an array of subscription groups for the site. The response is paginated and will return a `meta` key with pagination information. + /// Lists subscription groups for the site. The response is paginated and will return a `meta` key with pagination information. /// #### Account Balance Information. /// Account balance information for the subscription groups is not returned by default. If this information is desired, the `include[]=account_balances` parameter must be provided with the request. /// @@ -231,7 +231,7 @@ public Models.DeleteSubscriptionGroupResponse DeleteSubscriptionGroup( /// /// Finds the subscription group associated with a subscription. - /// If the subscription is not in a group, the endpoint will return a 404 code. + /// If the subscription is not in a group, this endpoint returns an error. /// /// Required parameter: The Advanced Billing id of the subscription associated with the subscription group. /// Returns the Models.FullSubscriptionGroupResponse response from the API call. @@ -241,7 +241,7 @@ public Models.FullSubscriptionGroupResponse FindSubscriptionGroup( /// /// Finds the subscription group associated with a subscription. - /// If the subscription is not in a group, the endpoint will return a 404 code. + /// If the subscription is not in a group, this endpoint returns an error. /// /// Required parameter: The Advanced Billing id of the subscription associated with the subscription group. /// cancellationToken. @@ -260,7 +260,7 @@ public Models.FullSubscriptionGroupResponse FindSubscriptionGroup( .ExecuteAsync(cancellationToken).ConfigureAwait(false); /// - /// 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. + /// Adds an existing subscription to a subscription group. 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. /// **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. @@ -279,7 +279,7 @@ public Models.SubscriptionGroupResponse AddSubscriptionToGroup( => CoreHelper.RunTask(AddSubscriptionToGroupAsync(subscriptionId, body)); /// - /// 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. + /// Adds an existing subscription to a subscription group. 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. /// **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. @@ -308,7 +308,7 @@ public Models.SubscriptionGroupResponse AddSubscriptionToGroup( .ExecuteAsync(cancellationToken).ConfigureAwait(false); /// - /// 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 remove an existing subscription from a subscription group. + /// Removes an existing subscription from a subscription group. 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 remove an existing subscription from a subscription group. /// /// Required parameter: The Chargify id of the subscription.. public void RemoveSubscriptionFromGroup( @@ -316,7 +316,7 @@ public void RemoveSubscriptionFromGroup( => CoreHelper.RunVoidTask(RemoveSubscriptionFromGroupAsync(subscriptionId)); /// - /// 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 remove an existing subscription from a subscription group. + /// Removes an existing subscription from a subscription group. 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 remove an existing subscription from a subscription group. /// /// Required parameter: The Chargify id of the subscription.. /// cancellationToken. diff --git a/AdvancedBilling.Standard/Controllers/SubscriptionNotesController.cs b/AdvancedBilling.Standard/Controllers/SubscriptionNotesController.cs index 68de2303..3068ab14 100644 --- a/AdvancedBilling.Standard/Controllers/SubscriptionNotesController.cs +++ b/AdvancedBilling.Standard/Controllers/SubscriptionNotesController.cs @@ -26,10 +26,9 @@ internal SubscriptionNotesController(GlobalConfiguration globalConfiguration) : /// /// Creates a note for a subscription. - /// ## How to Use Subscription Notes. /// Notes allow you to record information about a particular Subscription in a free text format. - /// If you have structured data such as birth date, color, etc., consider using Metadata instead. - /// Full documentation on how to use Notes in the Advanced Billing UI can be located [here](https://maxio.zendesk.com/hc/en-us/articles/24251712214413-Subscription-Summary-Overview). + /// If you have structured data such as birth date, color, etc., consider using [Metadata]($e/Custom%20Fields/createMetadata) instead. + /// For more information, see [Adding Notes](https://docs.maxio.com/hc/en-us/articles/24251654953997-Understanding-the-Subscription-Summary-Page#billing-portal-status:~:text=documentation%20for%20more.-,Adding%20Notes,-Notes%20are%20optional) in the product documentation. /// /// Required parameter: The Chargify id of the subscription.. /// Optional parameter: . @@ -41,10 +40,9 @@ public Models.SubscriptionNoteResponse CreateSubscriptionNote( /// /// Creates a note for a subscription. - /// ## How to Use Subscription Notes. /// Notes allow you to record information about a particular Subscription in a free text format. - /// If you have structured data such as birth date, color, etc., consider using Metadata instead. - /// Full documentation on how to use Notes in the Advanced Billing UI can be located [here](https://maxio.zendesk.com/hc/en-us/articles/24251712214413-Subscription-Summary-Overview). + /// If you have structured data such as birth date, color, etc., consider using [Metadata]($e/Custom%20Fields/createMetadata) instead. + /// For more information, see [Adding Notes](https://docs.maxio.com/hc/en-us/articles/24251654953997-Understanding-the-Subscription-Summary-Page#billing-portal-status:~:text=documentation%20for%20more.-,Adding%20Notes,-Notes%20are%20optional) in the product documentation. /// /// 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 1dfa6476..1eb4e7b9 100644 --- a/AdvancedBilling.Standard/Controllers/SubscriptionProductsController.cs +++ b/AdvancedBilling.Standard/Controllers/SubscriptionProductsController.cs @@ -24,12 +24,11 @@ internal SubscriptionProductsController(GlobalConfiguration globalConfiguration) /// /// Migrates a subscription to a different product. - /// In order to create a migration, you must pass the `product_id` or `product_handle` in the object when you send a POST request. You may also pass either a `product_price_point_id` or `product_price_point_handle` to choose which price point the subscription is moved to. If no price point identifier is passed the subscription will be moved to the products default price point. The response will be the updated subscription. + /// To create a migration, you must pass the `product_id` or `product_handle` in the object when you send a POST request. You can also pass either a `product_price_point_id` or `product_price_point_handle` to choose which price point the subscription is moved to. If no price point identifier is passed, the subscription is moved to the product's default price point. The response is the updated subscription. /// ## Valid Subscriptions. - /// Subscriptions should be in the `active` or `trialing` state in order to be migrated. + /// Subscriptions should be in the `active` or `trialing` state to be migrated. /// (For backwards compatibility reasons, it is possible to migrate a subscription that is in the `trial_ended` state via the API, however this is not recommended. Since `trial_ended` is an end-of-life state, the subscription should be canceled, the product changed, and then the subscription can be reactivated.). - /// ## 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). + /// For more information, see [Product Changes and Migrations](https://docs.maxio.com/hc/en-us/articles/24252069837581-Product-Changes-and-Migrations). /// ## Failed Migrations. /// Important 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. . /// ## 3D Secure (3DS) Authentication post-authentication flow. @@ -46,12 +45,11 @@ public Models.SubscriptionResponse MigrateSubscriptionProduct( /// /// Migrates a subscription to a different product. - /// In order to create a migration, you must pass the `product_id` or `product_handle` in the object when you send a POST request. You may also pass either a `product_price_point_id` or `product_price_point_handle` to choose which price point the subscription is moved to. If no price point identifier is passed the subscription will be moved to the products default price point. The response will be the updated subscription. + /// To create a migration, you must pass the `product_id` or `product_handle` in the object when you send a POST request. You can also pass either a `product_price_point_id` or `product_price_point_handle` to choose which price point the subscription is moved to. If no price point identifier is passed, the subscription is moved to the product's default price point. The response is the updated subscription. /// ## Valid Subscriptions. - /// Subscriptions should be in the `active` or `trialing` state in order to be migrated. + /// Subscriptions should be in the `active` or `trialing` state to be migrated. /// (For backwards compatibility reasons, it is possible to migrate a subscription that is in the `trial_ended` state via the API, however this is not recommended. Since `trial_ended` is an end-of-life state, the subscription should be canceled, the product changed, and then the subscription can be reactivated.). - /// ## 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). + /// For more information, see [Product Changes and Migrations](https://docs.maxio.com/hc/en-us/articles/24252069837581-Product-Changes-and-Migrations). /// ## Failed Migrations. /// Important 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. . /// ## 3D Secure (3DS) Authentication post-authentication flow. diff --git a/AdvancedBilling.Standard/Controllers/SubscriptionRenewalsController.cs b/AdvancedBilling.Standard/Controllers/SubscriptionRenewalsController.cs index 74c4454d..782f9135 100644 --- a/AdvancedBilling.Standard/Controllers/SubscriptionRenewalsController.cs +++ b/AdvancedBilling.Standard/Controllers/SubscriptionRenewalsController.cs @@ -231,7 +231,7 @@ public Models.ScheduledRenewalConfigurationResponse LockInScheduledRenewalImmedi .ExecuteAsync(cancellationToken).ConfigureAwait(false); /// - /// Returns a scheduled renewal configuration to an editable state. + /// Restores a scheduled renewal configuration to an editable state. /// /// Required parameter: The Chargify id of the subscription.. /// Required parameter: The renewal id.. @@ -242,7 +242,7 @@ public Models.ScheduledRenewalConfigurationResponse UnpublishScheduledRenewalCon => CoreHelper.RunTask(UnpublishScheduledRenewalConfigurationAsync(subscriptionId, id)); /// - /// Returns a scheduled renewal configuration to an editable state. + /// Restores a scheduled renewal configuration to an editable state. /// /// Required parameter: The Chargify id of the subscription.. /// Required parameter: The renewal id.. @@ -298,6 +298,7 @@ public Models.ScheduledRenewalConfigurationResponse CancelScheduledRenewalConfig /// /// Adds product and component line items to the scheduled renewal. + /// If your site has list vs sales pricing enabled, accepts renewal_configuration_item.custom_price.list_price_point_id, validates and persists it; omitted value follows existing/default behavior; with list vs sales pricing disabled, parameter is ignored (no validation/behavioral impact). This functionality is supported in the API, but is not currently supported in SDKs. /// /// Required parameter: The Chargify id of the subscription.. /// Required parameter: The scheduled renewal configuration id.. @@ -311,6 +312,7 @@ public Models.ScheduledRenewalConfigurationItemResponse CreateScheduledRenewalCo /// /// Adds product and component line items to the scheduled renewal. + /// If your site has list vs sales pricing enabled, accepts renewal_configuration_item.custom_price.list_price_point_id, validates and persists it; omitted value follows existing/default behavior; with list vs sales pricing disabled, parameter is ignored (no validation/behavioral impact). This functionality is supported in the API, but is not currently supported in SDKs. /// /// Required parameter: The Chargify id of the subscription.. /// Required parameter: The scheduled renewal configuration id.. @@ -337,6 +339,7 @@ public Models.ScheduledRenewalConfigurationItemResponse CreateScheduledRenewalCo /// /// Updates an existing configuration item’s pricing and quantity. + /// If you site has list vs sales pricing enabled, accepts renewal_configuration_item.custom_price.list_price_point_id, validates and persists it; omitted value follows existing/default behavior; with list vs sales pricing disabled, parameter is ignored (no validation/behavioral impact). This functionality is supported in the API, but is not currently supported in SDKs. /// /// Required parameter: The Chargify id of the subscription.. /// Required parameter: The scheduled renewal configuration id.. @@ -352,6 +355,7 @@ public Models.ScheduledRenewalConfigurationItemResponse UpdateScheduledRenewalCo /// /// Updates an existing configuration item’s pricing and quantity. + /// If you site has list vs sales pricing enabled, accepts renewal_configuration_item.custom_price.list_price_point_id, validates and persists it; omitted value follows existing/default behavior; with list vs sales pricing disabled, parameter is ignored (no validation/behavioral impact). This functionality is supported in the API, but is not currently supported in SDKs. /// /// Required parameter: The Chargify id of the subscription.. /// Required parameter: The scheduled renewal configuration id.. diff --git a/AdvancedBilling.Standard/Controllers/SubscriptionStatusController.cs b/AdvancedBilling.Standard/Controllers/SubscriptionStatusController.cs index 36defcbd..93a6c6b3 100644 --- a/AdvancedBilling.Standard/Controllers/SubscriptionStatusController.cs +++ b/AdvancedBilling.Standard/Controllers/SubscriptionStatusController.cs @@ -533,18 +533,18 @@ public Models.SubscriptionResponse CancelDunning( /// /// Previews a subscription’s next renewal assessment. 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, 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 [Subscriber Interface Overview](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:. + /// This endpoint is particularly useful because it returns the computed billing amount for the base product and the components which are in use by a subscriber. + /// By default, the preview includes billing details for all components _at their **current** quantities_. This means:. /// * Current `allocated_quantity` for quantity-based components. /// * Current enabled/disabled status for on/off components. /// * Current metered usage `unit_balance` for metered components. /// * Current metric quantity value for events recorded thus far for events-based components. - /// In the above statements, "current" means the quantity or value as of the call to the renewal preview endpoint. We do not predict end-of-period values for components, so metered or events-based usage may be less than it will eventually be at the end of the period. - /// Optionally, **you may provide your own custom quantities** for any component to see a billing preview for non-current quantities. This is accomplished by sending a request body with data under the `components` key. See the request body documentation below. - /// ## Subscription Side Effects. - /// You can request a `POST` to obtain this data from the endpoint without any side effects. This method allows you to preview data, but does not log any changes against a subscription. + /// In the above statements, "current" means the quantity or value as of the call to the renewal preview endpoint. End-of-period values for components are not predicted, so metered or events-based usage may be less than it will eventually be at the end of the period. + /// Optionally, **you can provide your own custom quantities** for any component to see a billing preview for non-current quantities. This is accomplished by sending a request body with data under the `components` key. See the request body documentation below. + /// ## Preview Behavior. + /// Sending a `POST` request to this endpoint returns preview data without modifying the subscription. This method previews data, but does not log any changes against a subscription. /// /// Required parameter: The Chargify id of the subscription.. /// Optional parameter: . @@ -556,18 +556,18 @@ public Models.RenewalPreviewResponse PreviewRenewal( /// /// Previews a subscription’s next renewal assessment. 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, 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 [Subscriber Interface Overview](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:. + /// This endpoint is particularly useful because it returns the computed billing amount for the base product and the components which are in use by a subscriber. + /// By default, the preview includes billing details for all components _at their **current** quantities_. This means:. /// * Current `allocated_quantity` for quantity-based components. /// * Current enabled/disabled status for on/off components. /// * Current metered usage `unit_balance` for metered components. /// * Current metric quantity value for events recorded thus far for events-based components. - /// In the above statements, "current" means the quantity or value as of the call to the renewal preview endpoint. We do not predict end-of-period values for components, so metered or events-based usage may be less than it will eventually be at the end of the period. - /// Optionally, **you may provide your own custom quantities** for any component to see a billing preview for non-current quantities. This is accomplished by sending a request body with data under the `components` key. See the request body documentation below. - /// ## Subscription Side Effects. - /// You can request a `POST` to obtain this data from the endpoint without any side effects. This method allows you to preview data, but does not log any changes against a subscription. + /// In the above statements, "current" means the quantity or value as of the call to the renewal preview endpoint. End-of-period values for components are not predicted, so metered or events-based usage may be less than it will eventually be at the end of the period. + /// Optionally, **you can provide your own custom quantities** for any component to see a billing preview for non-current quantities. This is accomplished by sending a request body with data under the `components` key. See the request body documentation below. + /// ## Preview Behavior. + /// Sending a `POST` request to this endpoint returns preview data without modifying the subscription. This method previews data, but does not log any changes against a subscription. /// /// Required parameter: The Chargify id of the subscription.. /// Optional parameter: . diff --git a/AdvancedBilling.Standard/Controllers/SubscriptionsController.cs b/AdvancedBilling.Standard/Controllers/SubscriptionsController.cs index b69d79d2..0f1ddb15 100644 --- a/AdvancedBilling.Standard/Controllers/SubscriptionsController.cs +++ b/AdvancedBilling.Standard/Controllers/SubscriptionsController.cs @@ -8,6 +8,7 @@ using APIMatic.Core.Types; using APIMatic.Core.Utilities; using AdvancedBilling.Standard.Exceptions; +using AdvancedBilling.Standard.Models.Containers; using System.Collections.Generic; using System.Linq; using System.Net.Http; @@ -31,6 +32,32 @@ internal SubscriptionsController(GlobalConfiguration globalConfiguration) : base /// Specify the product with `product_id` or `product_handle`. To set a specific product price point, 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. . + /// ## List vs Sales Pricing. + /// When a subscription uses custom pricing as the sales price, you can optionally provide a list price for any item. If omitted, the list price defaults to the sales price. The difference between the list price and sales price is used to calculate implicit discounts, which appear on Invoices and in reporting. List price can also support revenue allocations in [Advanced Revenue](https://docs.maxio.com/hc/en-us/articles/24177001342861-Create-and-Configure-RevenueBooks). + /// If your site has list pricing enabled, the API accepts `custom_price.list_price_point_id` for custom pricing, validates and persists it, and returns list price metadata in subscription responses. If list pricing is disabled, this input is ignored and related response fields are omitted. + /// When list pricing is enabled:. + /// - Subscription → Product `product_price_point_list_price_point_id` (integer). + /// - `product_price_point_list_price_point_handle` (string). + /// - Subscription Components (when components are included in the response, such as with subscriptions built from components or component serialization paths) `component_id` (integer). + /// - `price_point_id` (integer). + /// - `list_price_point_id` (integer). + /// When list pricing is disabled:. + /// - Subscription → Product `product_price_point_list_price_point_id`: omitted. + /// - `product_price_point_list_price_point_handle`: omitted. + /// - Subscription Components `list_price_point_id`: omitted. + /// This functionality is supported in the API, but is not currently supported in SDKs. + /// ## Subscriptions can now work independently from the catalog. + /// If you have the new [Catalog experience](page:help/announcements/2026-announcements#new-catalog-experience-and-terminology) enabled, you can create subscriptions without a `product_id` or `product_handle` using POST /subscriptions, building them entirely from components. + /// A valid subscription must include at least one active component with:. + /// - a positive `allocated_quantity`,. + /// - a positive `unit_balance`, or. + /// - 'enabled: true' (for on/off components). + /// - a configured metered component. + /// `component_id` can be provided as a numeric ID or in handle: format. If `trial_interval` and `trial_interval_unit` are included, they are applied at creation. + /// In the response, product and product price point fields are null, and component details are returned instead. + /// This functionality is supported in the API, but is not currently supported in SDKs. + /// ## Payment information. + /// 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. /// See the [Subscription Signups](page:introduction/basic-concepts/subscription-signup) article for more information on working with subscriptions in Advanced Billing. /// ## Payment information . /// 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. . @@ -51,6 +78,32 @@ public Models.SubscriptionResponse CreateSubscription( /// Specify the product with `product_id` or `product_handle`. To set a specific product price point, 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. . + /// ## List vs Sales Pricing. + /// When a subscription uses custom pricing as the sales price, you can optionally provide a list price for any item. If omitted, the list price defaults to the sales price. The difference between the list price and sales price is used to calculate implicit discounts, which appear on Invoices and in reporting. List price can also support revenue allocations in [Advanced Revenue](https://docs.maxio.com/hc/en-us/articles/24177001342861-Create-and-Configure-RevenueBooks). + /// If your site has list pricing enabled, the API accepts `custom_price.list_price_point_id` for custom pricing, validates and persists it, and returns list price metadata in subscription responses. If list pricing is disabled, this input is ignored and related response fields are omitted. + /// When list pricing is enabled:. + /// - Subscription → Product `product_price_point_list_price_point_id` (integer). + /// - `product_price_point_list_price_point_handle` (string). + /// - Subscription Components (when components are included in the response, such as with subscriptions built from components or component serialization paths) `component_id` (integer). + /// - `price_point_id` (integer). + /// - `list_price_point_id` (integer). + /// When list pricing is disabled:. + /// - Subscription → Product `product_price_point_list_price_point_id`: omitted. + /// - `product_price_point_list_price_point_handle`: omitted. + /// - Subscription Components `list_price_point_id`: omitted. + /// This functionality is supported in the API, but is not currently supported in SDKs. + /// ## Subscriptions can now work independently from the catalog. + /// If you have the new [Catalog experience](page:help/announcements/2026-announcements#new-catalog-experience-and-terminology) enabled, you can create subscriptions without a `product_id` or `product_handle` using POST /subscriptions, building them entirely from components. + /// A valid subscription must include at least one active component with:. + /// - a positive `allocated_quantity`,. + /// - a positive `unit_balance`, or. + /// - 'enabled: true' (for on/off components). + /// - a configured metered component. + /// `component_id` can be provided as a numeric ID or in handle: format. If `trial_interval` and `trial_interval_unit` are included, they are applied at creation. + /// In the response, product and product price point fields are null, and component details are returned instead. + /// This functionality is supported in the API, but is not currently supported in SDKs. + /// ## Payment information. + /// 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. /// See the [Subscription Signups](page:introduction/basic-concepts/subscription-signup) article for more information on working with subscriptions in Advanced Billing. /// ## Payment information . /// 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. . @@ -78,7 +131,8 @@ public Models.SubscriptionResponse CreateSubscription( .ExecuteAsync(cancellationToken).ConfigureAwait(false); /// - /// Returns an array of subscriptions from a Site. Pay close attention to query string filters and pagination in order to control responses from the server. + /// Lists subscriptions for a site. Use the query string filters and pagination to control responses from the server. + /// If you have the new [Catalog experience](page:help/announcements/2026-announcements#new-catalog-experience-and-terminology) enabled, some subscriptions may not have an associated product. For subscriptions without an associated product, 'product', 'product_price_point_id', and 'product_price_point_type' are returned as 'null'. /// ## Search for a subscription. /// Use the query strings below to search for a subscription using the criteria available. The return value will be an array. /// ## Self-Service Page token. @@ -91,7 +145,8 @@ public Models.SubscriptionResponse CreateSubscription( => CoreHelper.RunTask(ListSubscriptionsAsync(input)); /// - /// Returns an array of subscriptions from a Site. Pay close attention to query string filters and pagination in order to control responses from the server. + /// Lists subscriptions for a site. Use the query string filters and pagination to control responses from the server. + /// If you have the new [Catalog experience](page:help/announcements/2026-announcements#new-catalog-experience-and-terminology) enabled, some subscriptions may not have an associated product. For subscriptions without an associated product, 'product', 'product_price_point_id', and 'product_price_point_type' are returned as 'null'. /// ## Search for a subscription. /// Use the query strings below to search for a subscription using the criteria available. The return value will be an array. /// ## Self-Service Page token. @@ -110,19 +165,28 @@ public Models.SubscriptionResponse CreateSubscription( .Parameters(parameters => parameters .Query(query => query.Setup("page", input.Page)) .Query(query => query.Setup("per_page", input.PerPage)) + .Query(query => query.Setup("sort", (input.Sort.HasValue) ? CoreHelper.JsonSerialize(input.Sort.Value).Trim('\"') : "signup_date")) + .Query(query => query.Setup("direction", (input.Direction.HasValue) ? CoreHelper.JsonSerialize(input.Direction.Value).Trim('\"') : null)) .Query(query => query.Setup("state", (input.State.HasValue) ? CoreHelper.JsonSerialize(input.State.Value).Trim('\"') : null)) .Query(query => query.Setup("product", input.Product)) + .Query(query => query.Setup("q", input.Q)) + .Query(query => query.Setup("q_scope", (input.QScope.HasValue) ? CoreHelper.JsonSerialize(input.QScope.Value).Trim('\"') : null)) + .Query(query => query.Setup("customer_id", input.CustomerId)) .Query(query => query.Setup("product_price_point_id", input.ProductPricePointId)) .Query(query => query.Setup("coupon", input.Coupon)) .Query(query => query.Setup("coupon_code", input.CouponCode)) + .Query(query => query.Setup("collection_method", (input.CollectionMethod.HasValue) ? CoreHelper.JsonSerialize(input.CollectionMethod.Value).Trim('\"') : null)) + .Query(query => query.Setup("branding_theme_id", input.BrandingThemeId)) .Query(query => query.Setup("date_field", (input.DateField.HasValue) ? CoreHelper.JsonSerialize(input.DateField.Value).Trim('\"') : null)) .Query(query => query.Setup("start_date", input.StartDate.HasValue ? input.StartDate.Value.ToString("yyyy'-'MM'-'dd") : null)) .Query(query => query.Setup("end_date", input.EndDate.HasValue ? input.EndDate.Value.ToString("yyyy'-'MM'-'dd") : null)) .Query(query => query.Setup("start_datetime", input.StartDatetime.HasValue ? input.StartDatetime.Value.ToString("yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK") : null)) .Query(query => query.Setup("end_datetime", input.EndDatetime.HasValue ? input.EndDatetime.Value.ToString("yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK") : null)) .Query(query => query.Setup("metadata", input.Metadata)) - .Query(query => query.Setup("direction", (input.Direction.HasValue) ? CoreHelper.JsonSerialize(input.Direction.Value).Trim('\"') : null)) - .Query(query => query.Setup("sort", (input.Sort.HasValue) ? CoreHelper.JsonSerialize(input.Sort.Value).Trim('\"') : "signup_date")) + .Query(query => query.Setup("group_status", (input.GroupStatus.HasValue) ? CoreHelper.JsonSerialize(input.GroupStatus.Value).Trim('\"') : null)) + .Query(query => query.Setup("dunning_exemption", input.DunningExemption)) + .Query(query => query.Setup("payment_gateways", input.PaymentGateways)) + .Query(query => query.Setup("currencies", input.Currencies)) .Query(query => query.Setup("include", input.Include?.Select(a => CoreHelper.JsonSerialize(a).Trim('\"')).ToList())))) .ExecuteAsync(cancellationToken).ConfigureAwait(false); @@ -151,7 +215,8 @@ public Models.SubscriptionResponse CreateSubscription( /// 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_day` and immediately `READ/GET` the subscription data, it will still contain original `snap_day`. The `snap_day` will reset to null on the next billing cycle. This is because a product change is instantaneous and only affects the product associated with a subscription. + /// > 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 the original `snap_day`. The `snap_day` will be reset to `null` on the next billing cycle. This is because a product change is instantaneous and only affects the product associated with a subscription. + /// If you have the new [Catalog experience](page:help/announcements/2026-announcements#new-catalog-experience-and-terminology) enabled, some subscriptions may not have an associated product. For subscriptions without an associated product, `product`, `product_price_point_id`, and `product_price_point_type` are returned as `null`. /// /// Required parameter: The Chargify id of the subscription.. /// Optional parameter: . @@ -186,7 +251,8 @@ public Models.SubscriptionResponse UpdateSubscription( /// 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_day` and immediately `READ/GET` the subscription data, it will still contain original `snap_day`. The `snap_day` will reset to null on the next billing cycle. This is because a product change is instantaneous and only affects the product associated with a subscription. + /// > 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 the original `snap_day`. The `snap_day` will be reset to `null` on the next billing cycle. This is because a product change is instantaneous and only affects the product associated with a subscription. + /// If you have the new [Catalog experience](page:help/announcements/2026-announcements#new-catalog-experience-and-terminology) enabled, some subscriptions may not have an associated product. For subscriptions without an associated product, `product`, `product_price_point_id`, and `product_price_point_type` are returned as `null`. /// /// Required parameter: The Chargify id of the subscription.. /// Optional parameter: . @@ -210,6 +276,7 @@ public Models.SubscriptionResponse UpdateSubscription( /// /// Retrieves subscription details. + /// If you have the new [Catalog experience](page:help/announcements/2026-announcements#new-catalog-experience-and-terminology) enabled, some subscriptions may not have an associated product. For subscriptions without an associated product, 'product', 'product_price_point_id', and 'product_price_point_type' are returned as 'null'. /// ## Self-Service Page token. /// Self-Service Page token for the subscription is not returned by default. If this information is desired, the include[]=self_service_page_token parameter must be provided with the request. /// @@ -223,6 +290,7 @@ public Models.SubscriptionResponse ReadSubscription( /// /// Retrieves subscription details. + /// If you have the new [Catalog experience](page:help/announcements/2026-announcements#new-catalog-experience-and-terminology) enabled, some subscriptions may not have an associated product. For subscriptions without an associated product, 'product', 'product_price_point_id', and 'product_price_point_type' are returned as 'null'. /// ## Self-Service Page token. /// Self-Service Page token for the subscription is not returned by default. If this information is desired, the include[]=self_service_page_token parameter must be provided with the request. /// @@ -327,7 +395,7 @@ public Models.SubscriptionResponse FindSubscription( /// /// /// /// Previews 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, see our documentation [here](https://maxio.zendesk.com/hc/en-us/articles/24252493695757-Subscriber-Interface-Overview). + /// This endpoint does not create a subscription; it is meant to serve as a prediction. + /// For more information, see [Subscriber Interface Overview](https://maxio.zendesk.com/hc/en-us/articles/24252493695757-Subscriber-Interface-Overview). + /// ## Subscriptions can now work independently from the catalog. + /// If you have the new [Catalog experience](page:help/announcements/2026-announcements#new-catalog-experience-and-terminology) enabled, you can create subscriptions without a `product_id` or `product_handle` using POST /subscriptions, building them entirely from components. + /// A valid subscription must include at least one active component with:. + /// - a positive `allocated_quantity`,. + /// - a positive `unit_balance`, or. + /// - 'enabled: true' (for on/off components). + /// `component_id` can be provided as a numeric ID or in handle: format. If `trial_interval` and `trial_interval_unit` are included, they are applied at creation. + /// In the response, product and product price point fields are null, and component details are returned instead. + /// This functionality is supported in the API, but is not currently supported in SDKs. /// ## Taxable Subscriptions. - /// This endpoint will preview taxes applicable to a purchase. In order for taxes to be previewed, the following conditions must be met:. + /// This endpoint previews taxes applicable to a purchase. 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, 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. + /// + The subscription payload must contain a full billing or shipping address to calculate tax. + /// For more information about creating taxable previews, see [Taxes](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. The billing address and the credit card information are stored together within the payment profile object. Also, you cannot send a billing address 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 you may leave off the billing information. + /// If you'd like to calculate subscriptions that do not include tax, you can leave off the billing information. /// /// Optional parameter: . /// Returns the Models.SubscriptionPreviewResponse response from the API call. @@ -433,18 +510,27 @@ public Models.SubscriptionPreviewResponse PreviewSubscription( /// /// Previews 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, see our documentation [here](https://maxio.zendesk.com/hc/en-us/articles/24252493695757-Subscriber-Interface-Overview). + /// This endpoint does not create a subscription; it is meant to serve as a prediction. + /// For more information, see [Subscriber Interface Overview](https://maxio.zendesk.com/hc/en-us/articles/24252493695757-Subscriber-Interface-Overview). + /// ## Subscriptions can now work independently from the catalog. + /// If you have the new [Catalog experience](page:help/announcements/2026-announcements#new-catalog-experience-and-terminology) enabled, you can create subscriptions without a `product_id` or `product_handle` using POST /subscriptions, building them entirely from components. + /// A valid subscription must include at least one active component with:. + /// - a positive `allocated_quantity`,. + /// - a positive `unit_balance`, or. + /// - 'enabled: true' (for on/off components). + /// `component_id` can be provided as a numeric ID or in handle: format. If `trial_interval` and `trial_interval_unit` are included, they are applied at creation. + /// In the response, product and product price point fields are null, and component details are returned instead. + /// This functionality is supported in the API, but is not currently supported in SDKs. /// ## Taxable Subscriptions. - /// This endpoint will preview taxes applicable to a purchase. In order for taxes to be previewed, the following conditions must be met:. + /// This endpoint previews taxes applicable to a purchase. 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, 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. + /// + The subscription payload must contain a full billing or shipping address to calculate tax. + /// For more information about creating taxable previews, see [Taxes](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. The billing address and the credit card information are stored together within the payment profile object. Also, you cannot send a billing address 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 you may leave off the billing information. + /// If you'd like to calculate subscriptions that do not include tax, you can leave off the billing information. /// /// Optional parameter: . /// cancellationToken. @@ -510,7 +596,7 @@ public Models.SubscriptionResponse ApplyCouponsToSubscription( /// /// Removes a coupon from an existing subscription. - /// For more information on the expected behavior 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). + /// For more information on the expected behavior of removing a coupon from a subscription, see [Coupons and Subscriptions](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. @@ -522,7 +608,7 @@ public string RemoveCouponFromSubscription( /// /// Removes a coupon from an existing subscription. - /// For more information on the expected behavior 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). + /// For more information on the expected behavior of removing a coupon from a subscription, see [Coupons and Subscriptions](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. @@ -544,12 +630,11 @@ public async Task RemoveCouponFromSubscriptionAsync( .ExecuteAsync(cancellationToken).ConfigureAwait(false); /// - /// Activates awaiting signup and trialing subscriptions. This feature is only available on the Relationship Invoicing architecture. Subscriptions in a group may not be activated immediately. - /// For details on how the activation works, and how to activate subscriptions through the application, see [activation](#). + /// Activates awaiting signup and trialing subscriptions. This feature is only available on the Relationship Invoicing architecture. Subscriptions in a group cannot be activated immediately. /// The `revert_on_failure` parameter controls the behavior upon activation failure. - /// - If set to `true` and something goes wrong i.e. payment fails, then Advanced Billing will not change the subscription's state. The subscription’s billing period will also remain the same. - /// - If set to `false` and something goes wrong i.e. payment fails, then Advanced Billing will continue through with the activation and enter an end of life state. For trialing subscriptions, that will either be trial ended (if the trial is no obligation), past due (if the trial has an obligation), or canceled (if the site has no dunning strategy, or has a strategy that says to cancel immediately). For awaiting signup subscriptions, that will always be canceled. - /// The default activation failure behavior can be configured per activation attempt, or you may set a default value under Config > Settings > Subscription Activation Settings. + /// - If set to `true` and something goes wrong i.e. payment fails, the subscription's state does not change. The subscription’s billing period also remains the same. + /// - If set to `false` and something goes wrong i.e. payment fails, the activation continues and enters an end of life state. For trialing subscriptions, that is either trial ended (if the trial is no obligation), past due (if the trial has an obligation), or canceled (if the site has no dunning strategy, or has a strategy that says to cancel immediately). For awaiting signup subscriptions, that is always canceled. + /// The default activation failure behavior can be configured per activation attempt, or you can set a default value under Config > Settings > Subscription Activation Settings. /// ## Activation Scenarios. /// ### Activate Awaiting Signup subscription. /// - Given you have a product without trial. @@ -573,8 +658,8 @@ public async Task RemoveCouponFromSubscriptionAsync( /// ROF -->|false| PD[Past Due]. /// ```. /// ### Activate Trialing subscription. - /// You can read more about the behavior of trialing subscriptions [here](https://maxio.zendesk.com/hc/en-us/articles/24252155721869-Trialing-Subscriptions). - /// When the `revert_on_failure` parameter is set to `true`, the subscription's state will remain as Trialing, we will void the invoice from activation and return any prepayments and credits applied to the invoice back to the subscription. + /// For more information about the behavior of trialing subscriptions, see [Trialing Subscriptions](https://maxio.zendesk.com/hc/en-us/articles/24252155721869-Trialing-Subscriptions). + /// When the `revert_on_failure` parameter is set to `true`, the subscription's state remains Trialing; the invoice from activation is voided, and any prepayments and credits applied to the invoice are returned to the subscription. /// /// Required parameter: The Chargify id of the subscription.. /// Optional parameter: . @@ -585,12 +670,11 @@ public Models.SubscriptionResponse ActivateSubscription( => CoreHelper.RunTask(ActivateSubscriptionAsync(subscriptionId, body)); /// - /// Activates awaiting signup and trialing subscriptions. This feature is only available on the Relationship Invoicing architecture. Subscriptions in a group may not be activated immediately. - /// For details on how the activation works, and how to activate subscriptions through the application, see [activation](#). + /// Activates awaiting signup and trialing subscriptions. This feature is only available on the Relationship Invoicing architecture. Subscriptions in a group cannot be activated immediately. /// The `revert_on_failure` parameter controls the behavior upon activation failure. - /// - If set to `true` and something goes wrong i.e. payment fails, then Advanced Billing will not change the subscription's state. The subscription’s billing period will also remain the same. - /// - If set to `false` and something goes wrong i.e. payment fails, then Advanced Billing will continue through with the activation and enter an end of life state. For trialing subscriptions, that will either be trial ended (if the trial is no obligation), past due (if the trial has an obligation), or canceled (if the site has no dunning strategy, or has a strategy that says to cancel immediately). For awaiting signup subscriptions, that will always be canceled. - /// The default activation failure behavior can be configured per activation attempt, or you may set a default value under Config > Settings > Subscription Activation Settings. + /// - If set to `true` and something goes wrong i.e. payment fails, the subscription's state does not change. The subscription’s billing period also remains the same. + /// - If set to `false` and something goes wrong i.e. payment fails, the activation continues and enters an end of life state. For trialing subscriptions, that is either trial ended (if the trial is no obligation), past due (if the trial has an obligation), or canceled (if the site has no dunning strategy, or has a strategy that says to cancel immediately). For awaiting signup subscriptions, that is always canceled. + /// The default activation failure behavior can be configured per activation attempt, or you can set a default value under Config > Settings > Subscription Activation Settings. /// ## Activation Scenarios. /// ### Activate Awaiting Signup subscription. /// - Given you have a product without trial. @@ -614,8 +698,8 @@ public Models.SubscriptionResponse ActivateSubscription( /// ROF -->|false| PD[Past Due]. /// ```. /// ### Activate Trialing subscription. - /// You can read more about the behavior of trialing subscriptions [here](https://maxio.zendesk.com/hc/en-us/articles/24252155721869-Trialing-Subscriptions). - /// When the `revert_on_failure` parameter is set to `true`, the subscription's state will remain as Trialing, we will void the invoice from activation and return any prepayments and credits applied to the invoice back to the subscription. + /// For more information about the behavior of trialing subscriptions, see [Trialing Subscriptions](https://maxio.zendesk.com/hc/en-us/articles/24252155721869-Trialing-Subscriptions). + /// When the `revert_on_failure` parameter is set to `true`, the subscription's state remains Trialing; the invoice from activation is voided, and any prepayments and credits applied to the invoice are returned to the subscription. /// /// Required parameter: The Chargify id of the subscription.. /// Optional parameter: . diff --git a/AdvancedBilling.Standard/Controllers/WebhooksController.cs b/AdvancedBilling.Standard/Controllers/WebhooksController.cs index 9d149b09..fc82f7a9 100644 --- a/AdvancedBilling.Standard/Controllers/WebhooksController.cs +++ b/AdvancedBilling.Standard/Controllers/WebhooksController.cs @@ -141,14 +141,14 @@ public Models.EndpointResponse CreateEndpoint( .ExecuteAsync(cancellationToken).ConfigureAwait(false); /// - /// Returns created endpoints for a site. + /// Lists endpoints configured for a site. /// /// Returns the List of Models.Endpoint response from the API call. public List ListEndpoints() => CoreHelper.RunTask(ListEndpointsAsync()); /// - /// Returns created endpoints for a site. + /// Lists endpoints configured for a site. /// /// cancellationToken. /// Returns the List of Models.Endpoint response from the API call. diff --git a/AdvancedBilling.Standard/Models/AccountBalances.cs b/AdvancedBilling.Standard/Models/AccountBalances.cs index 2ec070fb..d43780ac 100644 --- a/AdvancedBilling.Standard/Models/AccountBalances.cs +++ b/AdvancedBilling.Standard/Models/AccountBalances.cs @@ -43,13 +43,13 @@ public AccountBalances( } /// - /// The balance, in cents, of the sum of the subscription's open, payable invoices. + /// The balance, in cents, of the sum of the subscription's open, payable invoices. /// [JsonProperty("open_invoices", NullValueHandling = NullValueHandling.Ignore)] public Models.AccountBalance OpenInvoices { get; set; } /// - /// The balance, in cents, of the sum of the subscription's pending, payable invoices. + /// The balance, in cents, of the sum of the subscription's pending, payable invoices. /// [JsonProperty("pending_invoices", NullValueHandling = NullValueHandling.Ignore)] public Models.AccountBalance PendingInvoices { get; set; } diff --git a/AdvancedBilling.Standard/Models/ActivateSubscriptionRequest.cs b/AdvancedBilling.Standard/Models/ActivateSubscriptionRequest.cs index a8856108..8f8fdd7d 100644 --- a/AdvancedBilling.Standard/Models/ActivateSubscriptionRequest.cs +++ b/AdvancedBilling.Standard/Models/ActivateSubscriptionRequest.cs @@ -41,7 +41,7 @@ public ActivateSubscriptionRequest( } /// - /// You may choose how to handle the activation failure. `true` means do not change the subscription’s state and billing period. `false` means to continue through with the activation and enter an end of life state. If this parameter is omitted or `null` is passed it will default to value set in the site settings (default: `true`) + /// You may choose how to handle the activation failure. `true` means do not change the subscription’s state and billing period. `false` means to continue through with the activation and enter an end-of-life state. If this parameter is omitted or `null` is passed it will default to the value set in the site settings (default: `true`). /// [JsonProperty("revert_on_failure")] public bool? RevertOnFailure diff --git a/AdvancedBilling.Standard/Models/AgreementAcceptance.cs b/AdvancedBilling.Standard/Models/AgreementAcceptance.cs index ed95bfc7..e3f19f2f 100644 --- a/AdvancedBilling.Standard/Models/AgreementAcceptance.cs +++ b/AdvancedBilling.Standard/Models/AgreementAcceptance.cs @@ -52,7 +52,7 @@ public AgreementAcceptance( public string IpAddress { get; set; } /// - /// Required when creating a subscription with Maxio Payments. Either terms_url or provacy_policy_url required when providing agreement_acceptance params. + /// Required when creating a subscription with Maxio Payments. Either terms_url or privacy_policy_url is required when providing agreement_acceptance params. /// [JsonProperty("terms_url", NullValueHandling = NullValueHandling.Ignore)] public string TermsUrl { get; set; } diff --git a/AdvancedBilling.Standard/Models/AllocateComponents.cs b/AdvancedBilling.Standard/Models/AllocateComponents.cs index 1ab00691..28995d50 100644 --- a/AdvancedBilling.Standard/Models/AllocateComponents.cs +++ b/AdvancedBilling.Standard/Models/AllocateComponents.cs @@ -128,7 +128,7 @@ public Models.CreditType? DowngradeCredit } /// - /// (Optional) If not passed, the allocation(s) will use the payment collection method on the subscription + /// (Optional) If not passed, the allocation(s) will use the payment collection method on the subscription. /// [JsonProperty("payment_collection_method", NullValueHandling = NullValueHandling.Ignore)] public Models.CollectionMethod? PaymentCollectionMethod { get; set; } diff --git a/AdvancedBilling.Standard/Models/Allocation.cs b/AdvancedBilling.Standard/Models/Allocation.cs index 86555c55..0feb47fd 100644 --- a/AdvancedBilling.Standard/Models/Allocation.cs +++ b/AdvancedBilling.Standard/Models/Allocation.cs @@ -146,19 +146,19 @@ public Allocation( } /// - /// The allocation unique id + /// The allocation unique ID /// [JsonProperty("allocation_id", NullValueHandling = NullValueHandling.Ignore)] public int? AllocationId { get; set; } /// - /// The integer component ID for the allocation. This references a component that you have created in your Product setup + /// The integer component ID for the allocation. This references a component that you have created in your Product setup. /// [JsonProperty("component_id", NullValueHandling = NullValueHandling.Ignore)] public int? ComponentId { get; set; } /// - /// The handle of the component. This references a component that you have created in your Product setup + /// The handle of the component. This references a component that you have created in your Product setup. /// [JsonProperty("component_handle")] public string ComponentHandle @@ -176,13 +176,13 @@ public string ComponentHandle } /// - /// The integer subscription ID for the allocation. This references a unique subscription in your Site + /// The integer subscription ID for the allocation. This references a unique subscription in your Site. /// [JsonProperty("subscription_id", NullValueHandling = NullValueHandling.Ignore)] public int? SubscriptionId { get; set; } /// - /// The allocated quantity set in to effect by the allocation. String for components supporting fractional quantities + /// The allocated quantity set into effect by the allocation. String for components supporting fractional quantities /// [JsonProperty("quantity", NullValueHandling = NullValueHandling.Ignore)] public AllocationQuantity Quantity { get; set; } @@ -212,7 +212,7 @@ public string Memo } /// - /// The time that the allocation was recorded, in format and UTC timezone, i.e. 2012-11-20T22:00:37Z + /// The time that the allocation was recorded, in ISO 8601 format and UTC timezone, e.g., 2012-11-20T22:00:37Z /// [JsonConverter(typeof(IsoDateTimeConverter))] [JsonProperty("timestamp", NullValueHandling = NullValueHandling.Ignore)] @@ -256,7 +256,7 @@ public string Memo public string PricePointHandle { get; set; } /// - /// The numerical interval. i.e. an interval of ‘30’ coupled with an interval_unit of day would mean this component price point would renew every 30 days. This property is only available for sites with Multifrequency enabled. + /// The numerical interval. e.g., an interval of ‘30’ coupled with an interval_unit of day would mean this component price point would renew every 30 days. This property is only available for sites with Multifrequency enabled. /// [JsonProperty("interval", NullValueHandling = NullValueHandling.Ignore)] public int? Interval { get; set; } diff --git a/AdvancedBilling.Standard/Models/AllocationPreviewItem.cs b/AdvancedBilling.Standard/Models/AllocationPreviewItem.cs index eadd46e6..50f02cf6 100644 --- a/AdvancedBilling.Standard/Models/AllocationPreviewItem.cs +++ b/AdvancedBilling.Standard/Models/AllocationPreviewItem.cs @@ -243,7 +243,7 @@ public Models.CreditType? DowngradeCredit public int? PricePointId { get; set; } /// - /// The numerical interval. i.e. an interval of ‘30’ coupled with an interval_unit of day would mean this component price point would renew every 30 days. This property is only available for sites with Multifrequency enabled. + /// The numerical interval. e.g., an interval of ‘30’ coupled with an interval_unit of day would mean this component price point would renew every 30 days. This property is only available for sites with Multifrequency enabled. /// [JsonProperty("interval", NullValueHandling = NullValueHandling.Ignore)] public int? Interval { get; set; } diff --git a/AdvancedBilling.Standard/Models/AllocationPreviewLineItem.cs b/AdvancedBilling.Standard/Models/AllocationPreviewLineItem.cs index b7abd176..6b33e02e 100644 --- a/AdvancedBilling.Standard/Models/AllocationPreviewLineItem.cs +++ b/AdvancedBilling.Standard/Models/AllocationPreviewLineItem.cs @@ -103,7 +103,7 @@ public AllocationPreviewLineItem( public string ComponentHandle { get; set; } /// - /// Visible when using Fine-grained Component Control + /// Visible when using Fine-grained Component Control. /// [JsonProperty("direction", NullValueHandling = NullValueHandling.Ignore)] public Models.AllocationPreviewDirection? Direction { get; set; } diff --git a/AdvancedBilling.Standard/Models/ApplePayPaymentProfile.cs b/AdvancedBilling.Standard/Models/ApplePayPaymentProfile.cs index 64ca7d40..09a22cc6 100644 --- a/AdvancedBilling.Standard/Models/ApplePayPaymentProfile.cs +++ b/AdvancedBilling.Standard/Models/ApplePayPaymentProfile.cs @@ -163,7 +163,7 @@ public ApplePayPaymentProfile( public string LastName { get; set; } /// - /// The Chargify-assigned id for the customer record to which the Apple Pay account belongs + /// The Chargify-assigned ID for the customer record to which the Apple Pay account belongs /// [JsonProperty("customer_id", NullValueHandling = NullValueHandling.Ignore)] public int? CustomerId { get; set; } diff --git a/AdvancedBilling.Standard/Models/ApplyCreditNoteEventData.cs b/AdvancedBilling.Standard/Models/ApplyCreditNoteEventData.cs index a227e95f..90fc1a53 100644 --- a/AdvancedBilling.Standard/Models/ApplyCreditNoteEventData.cs +++ b/AdvancedBilling.Standard/Models/ApplyCreditNoteEventData.cs @@ -131,7 +131,7 @@ public string Memo public string Role { get; set; } /// - /// Shows whether it was applied to consolidated invoice or not + /// Shows whether it was applied to consolidated invoice or not. /// [JsonProperty("consolidated_invoice", NullValueHandling = NullValueHandling.Ignore)] public bool? ConsolidatedInvoice { get; set; } diff --git a/AdvancedBilling.Standard/Models/BankAccountAttributes.cs b/AdvancedBilling.Standard/Models/BankAccountAttributes.cs index 266f0b56..e4056bcd 100644 --- a/AdvancedBilling.Standard/Models/BankAccountAttributes.cs +++ b/AdvancedBilling.Standard/Models/BankAccountAttributes.cs @@ -76,7 +76,7 @@ public BankAccountAttributes( public string BankName { get; set; } /// - /// (Required when creating a subscription with ACH. Optional when creating a subscription with GoCardless). The routing number of the bank. It becomes bank_code while passing via GoCardless API + /// (Required when creating a subscription with ACH; optional when creating a subscription with GoCardless). The routing number of the bank. It becomes bank_code while passing via GoCardless API. /// [JsonProperty("bank_routing_number", NullValueHandling = NullValueHandling.Ignore)] public string BankRoutingNumber { get; set; } @@ -94,13 +94,13 @@ public BankAccountAttributes( public Models.BankAccountType? BankAccountType { get; set; } /// - /// (Optional when creating a subscription with GoCardless) Branch code. Alternatively, an IBAN can be provided + /// (Optional when creating a subscription with GoCardless) Branch code. Alternatively, an IBAN can be provided. /// [JsonProperty("bank_branch_code", NullValueHandling = NullValueHandling.Ignore)] public string BankBranchCode { get; set; } /// - /// (Optional when creating a subscription with GoCardless). International Bank Account Number. Alternatively, local bank details can be provided + /// (Optional when creating a subscription with GoCardless). International Bank Account Number. Alternatively, local bank details can be provided. /// [JsonProperty("bank_iban", NullValueHandling = NullValueHandling.Ignore)] public string BankIban { get; set; } diff --git a/AdvancedBilling.Standard/Models/BankAccountPaymentProfile.cs b/AdvancedBilling.Standard/Models/BankAccountPaymentProfile.cs index 5361e754..7c63a5cf 100644 --- a/AdvancedBilling.Standard/Models/BankAccountPaymentProfile.cs +++ b/AdvancedBilling.Standard/Models/BankAccountPaymentProfile.cs @@ -173,7 +173,7 @@ public BankAccountPaymentProfile( } /// - /// The Chargify-assigned ID of the stored bank account. This value can be used as an input to payment_profile_id when creating a subscription, in order to re-use a stored payment profile for the same customer + /// The Chargify-assigned ID of the stored bank account. This value can be used as an input to payment_profile_id when creating a subscription, in order to re-use a stored payment profile for the same customer. /// [JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)] public int? Id { get; set; } @@ -193,7 +193,7 @@ public BankAccountPaymentProfile( public string LastName { get; set; } /// - /// The Chargify-assigned id for the customer record to which the bank account belongs + /// The Chargify-assigned ID for the customer record to which the bank account belongs /// [JsonProperty("customer_id", NullValueHandling = NullValueHandling.Ignore)] public int? CustomerId { get; set; } @@ -352,7 +352,7 @@ public string BillingAddress2 public string BankName { get; set; } /// - /// A string representation of the stored bank routing number with all but the last 4 digits marked with X's (i.e. 'XXXXXXX1111'). payment_type will be bank_account + /// A string representation of the stored bank routing number with all but the last 4 digits marked with X's (i.e. 'XXXXXXX1111'). payment_type will be bank_account. /// [JsonConverter(typeof(JsonStringConverter))] [JsonProperty("masked_bank_routing_number")] @@ -371,7 +371,7 @@ public string MaskedBankRoutingNumber } /// - /// A string representation of the stored bank account number with all but the last 4 digits marked with X's (i.e. 'XXXXXXX1111') + /// A string representation of the stored bank account number with all but the last 4 digits marked with X's (i.e. 'XXXXXXX1111'). /// [JsonConverter(typeof(JsonStringConverter))] [JsonProperty("masked_bank_account_number")] @@ -409,7 +409,7 @@ public string MaskedBankAccountNumber public Models.PaymentType PaymentType { get; set; } /// - /// denotes whether a bank account has been verified by providing the amounts of two small deposits made into the account + /// Denotes whether a bank account has been verified by providing the amounts of two small deposits made into the account. /// [JsonProperty("verified", NullValueHandling = NullValueHandling.Ignore)] public bool? Verified { get; set; } diff --git a/AdvancedBilling.Standard/Models/CancellationOptions.cs b/AdvancedBilling.Standard/Models/CancellationOptions.cs index 9a95aa01..003f2173 100644 --- a/AdvancedBilling.Standard/Models/CancellationOptions.cs +++ b/AdvancedBilling.Standard/Models/CancellationOptions.cs @@ -73,7 +73,7 @@ public CancellationOptions( public bool? CancelAtEndOfPeriod { get; set; } /// - /// Schedules the cancellation on the provided date. This is option is not applicable for prepaid subscriptions. To use this option, the Schedule Subscription Cancellation feature must be enabled on your site. + /// Schedules the cancellation on the provided date. This option is not applicable for prepaid subscriptions. To use this option, the Schedule Subscription Cancellation feature must be enabled on your site. /// [JsonConverter(typeof(IsoDateTimeConverter))] [JsonProperty("scheduled_cancellation_at")] diff --git a/AdvancedBilling.Standard/Models/CollectionMethod1.cs b/AdvancedBilling.Standard/Models/CollectionMethod1.cs new file mode 100644 index 00000000..ce13ef01 --- /dev/null +++ b/AdvancedBilling.Standard/Models/CollectionMethod1.cs @@ -0,0 +1,37 @@ +// +// AdvancedBilling.Standard +// +// This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). +// +using APIMatic.Core.Utilities.Converters; +using Newtonsoft.Json; +using System.Runtime.Serialization; + +namespace AdvancedBilling.Standard.Models +{ + /// + /// CollectionMethod1. + /// + + [JsonConverter(typeof(StringEnumConverter))] + public enum CollectionMethod1 + { + /// + /// Automatic. + /// + [EnumMember(Value = "automatic")] + Automatic, + + /// + /// Remittance. + /// + [EnumMember(Value = "remittance")] + Remittance, + + /// + /// Prepaid. + /// + [EnumMember(Value = "prepaid")] + Prepaid + } +} \ No newline at end of file diff --git a/AdvancedBilling.Standard/Models/Component.cs b/AdvancedBilling.Standard/Models/Component.cs index 1b6331fb..5ac83c52 100644 --- a/AdvancedBilling.Standard/Models/Component.cs +++ b/AdvancedBilling.Standard/Models/Component.cs @@ -32,6 +32,7 @@ public class Component : BaseModel private bool? useSiteExchangeRate; private string accountingCode; private Models.IntervalUnit? intervalUnit; + private string unspscCode; private Dictionary shouldSerialize = new Dictionary { { "handle", false }, @@ -51,6 +52,7 @@ public class Component : BaseModel { "use_site_exchange_rate", false }, { "accounting_code", false }, { "interval_unit", false }, + { "unspsc_code", false }, }; /// @@ -98,6 +100,7 @@ public Component() /// event_based_billing_metric_id. /// interval. /// interval_unit. + /// unspsc_code. public Component( int? id = null, string name = null, @@ -133,7 +136,8 @@ public Component( string accountingCode = null, int? eventBasedBillingMetricId = null, int? interval = null, - Models.IntervalUnit? intervalUnit = null) + Models.IntervalUnit? intervalUnit = null, + string unspscCode = null) { this.Id = id; this.Name = name; @@ -238,6 +242,11 @@ public Component( { this.IntervalUnit = intervalUnit; } + + if (unspscCode != null) + { + this.UnspscCode = unspscCode; + } } /// @@ -247,7 +256,7 @@ public Component( public int? Id { get; set; } /// - /// The name of the Component, suitable for display on statements. i.e. Text Messages. + /// The name of the Component, suitable for display on statements. e.g., Text Messages. /// [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] public string Name { get; set; } @@ -289,7 +298,7 @@ public Models.PricingScheme? PricingScheme } /// - /// The name of the unit that the component’s usage is measured in. i.e. message + /// The name of the unit that the component’s usage is measured in. e.g., message /// [JsonProperty("unit_name", NullValueHandling = NullValueHandling.Ignore)] public string UnitName { get; set; } @@ -331,7 +340,7 @@ public string UnitPrice public string ProductFamilyHandle { get; set; } /// - /// deprecated - use unit_price instead + /// deprecated - use unit_price instead. /// [JsonProperty("price_per_unit_in_cents")] public long? PricePerUnitInCents @@ -634,7 +643,7 @@ public string AccountingCode public int? EventBasedBillingMetricId { get; set; } /// - /// The numerical interval. i.e. an interval of ‘30’ coupled with an interval_unit of day would mean this component's default price point would renew every 30 days. This property is only available for sites with Multifrequency enabled. + /// The numerical interval. e.g., an interval of ‘30’ coupled with an interval_unit of day would mean this component’s default price point would renew every 30 days. This property is only available for sites with Multifrequency enabled. /// [JsonProperty("interval", NullValueHandling = NullValueHandling.Ignore)] public int? Interval { get; set; } @@ -657,6 +666,24 @@ public Models.IntervalUnit? IntervalUnit } } + /// + /// (Optional) Custom UNSPSC commodity code for Level 3/CEDP payment data. When set, this value is sent as the commodity code on invoice line items for this component instead of the default derived from item_category. + /// + [JsonProperty("unspsc_code")] + public string UnspscCode + { + get + { + return this.unspscCode; + } + + set + { + this.shouldSerialize["unspsc_code"] = true; + this.unspscCode = value; + } + } + /// public override string ToString() { @@ -784,6 +811,13 @@ public void UnsetIntervalUnit() { this.shouldSerialize["interval_unit"] = false; } + /// + /// Marks the field to not be serialized. + /// + public void UnsetUnspscCode() + { + this.shouldSerialize["unspsc_code"] = false; + } /// /// Checks if the field should be serialized or not. @@ -938,6 +972,15 @@ 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 ShouldSerializeUnspscCode() + { + return this.shouldSerialize["unspsc_code"]; + } + /// public override bool Equals(object obj) { @@ -1015,6 +1058,8 @@ public override bool Equals(object obj) this.Interval?.Equals(other.Interval) == true) && (this.IntervalUnit == null && other.IntervalUnit == null || this.IntervalUnit?.Equals(other.IntervalUnit) == true) && + (this.UnspscCode == null && other.UnspscCode == null || + this.UnspscCode?.Equals(other.UnspscCode) == true) && base.Equals(obj); } @@ -1059,6 +1104,7 @@ public override bool Equals(object obj) toStringOutput.Add($"EventBasedBillingMetricId = {(this.EventBasedBillingMetricId == null ? "null" : this.EventBasedBillingMetricId.ToString())}"); toStringOutput.Add($"Interval = {(this.Interval == null ? "null" : this.Interval.ToString())}"); toStringOutput.Add($"IntervalUnit = {(this.IntervalUnit == null ? "null" : this.IntervalUnit.ToString())}"); + toStringOutput.Add($"UnspscCode = {this.UnspscCode ?? "null"}"); base.ToString(toStringOutput); } diff --git a/AdvancedBilling.Standard/Models/ComponentCustomPrice.cs b/AdvancedBilling.Standard/Models/ComponentCustomPrice.cs index ebfd02ec..0b169295 100644 --- a/AdvancedBilling.Standard/Models/ComponentCustomPrice.cs +++ b/AdvancedBilling.Standard/Models/ComponentCustomPrice.cs @@ -95,13 +95,13 @@ public ComponentCustomPrice( public bool? TaxIncluded { get; set; } /// - /// Omit for On/Off components + /// Omit for On/Off components. /// [JsonProperty("pricing_scheme", NullValueHandling = NullValueHandling.Ignore)] public Models.PricingScheme? PricingScheme { get; set; } /// - /// The numerical interval. i.e. an interval of ‘30’ coupled with an interval_unit of day would mean this component price point would renew every 30 days. This property is only available for sites with Multifrequency enabled. + /// The numerical interval. e.g., an interval of ‘30’ coupled with an interval_unit of day would mean this component price point would renew every 30 days. This property is only available for sites with Multifrequency enabled. /// [JsonProperty("interval", NullValueHandling = NullValueHandling.Ignore)] public int? Interval { get; set; } @@ -125,7 +125,7 @@ public Models.IntervalUnit? IntervalUnit } /// - /// Optional id of the price point to use for list price calculations when + /// (Optional) Id of the price point to use for list price calculations when /// overriding the customer price. /// [JsonProperty("list_price_point_id")] diff --git a/AdvancedBilling.Standard/Models/ComponentPricePoint.cs b/AdvancedBilling.Standard/Models/ComponentPricePoint.cs index dfd53f95..6e20165a 100644 --- a/AdvancedBilling.Standard/Models/ComponentPricePoint.cs +++ b/AdvancedBilling.Standard/Models/ComponentPricePoint.cs @@ -154,7 +154,7 @@ public ComponentPricePoint( public Models.PricePointType? Type { get; set; } /// - /// Note: Refer to type attribute instead + /// Note: Refer to type attribute instead. /// [JsonProperty("default", NullValueHandling = NullValueHandling.Ignore)] public bool? MDefault { get; set; } @@ -253,7 +253,7 @@ public DateTimeOffset? ArchivedAt public bool? TaxIncluded { get; set; } /// - /// The numerical interval. i.e. an interval of ‘30’ coupled with an interval_unit of day would mean this component price point would renew every 30 days. This property is only available for sites with Multifrequency enabled. + /// The numerical interval. e.g., an interval of ‘30’ coupled with an interval_unit of day would mean this component price point would renew every 30 days. This property is only available for sites with Multifrequency enabled. /// [JsonProperty("interval")] public int? Interval diff --git a/AdvancedBilling.Standard/Models/ComponentPricePointItem.cs b/AdvancedBilling.Standard/Models/ComponentPricePointItem.cs index 6d9cde03..e9e9f01b 100644 --- a/AdvancedBilling.Standard/Models/ComponentPricePointItem.cs +++ b/AdvancedBilling.Standard/Models/ComponentPricePointItem.cs @@ -74,7 +74,7 @@ public ComponentPricePointItem( public Models.PricingScheme? PricingScheme { get; set; } /// - /// The numerical interval. i.e. an interval of ‘30’ coupled with an interval_unit of day would mean this component price point would renew every 30 days. This property is only available for sites with Multifrequency enabled. + /// The numerical interval. e.g., an interval of ‘30’ coupled with an interval_unit of day would mean this component price point would renew every 30 days. This property is only available for sites with Multifrequency enabled. /// [JsonProperty("interval", NullValueHandling = NullValueHandling.Ignore)] public int? Interval { get; set; } diff --git a/AdvancedBilling.Standard/Models/Containers/CreateSubscriptionComponentUnitBalance.cs b/AdvancedBilling.Standard/Models/Containers/CreateSubscriptionComponentUnitBalance.cs new file mode 100644 index 00000000..5c8e2a39 --- /dev/null +++ b/AdvancedBilling.Standard/Models/Containers/CreateSubscriptionComponentUnitBalance.cs @@ -0,0 +1,134 @@ +// +// AdvancedBilling.Standard +// +// This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). +// +using APIMatic.Core.Utilities.Converters; +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; +using System; + +namespace AdvancedBilling.Standard.Models.Containers +{ + /// + /// This is a container class for one-of types. + /// + [JsonConverter( + typeof(UnionTypeConverter), + new[] { + typeof(NumberCase), + typeof(MStringCase) + }, + true + )] + public abstract class CreateSubscriptionComponentUnitBalance + { + /// + /// This is Number case. + /// + /// + /// The CreateSubscriptionComponentUnitBalance instance, wrapping the provided int value. + /// + public static CreateSubscriptionComponentUnitBalance FromNumber(int number) + { + return new NumberCase().Set(number); + } + + /// + /// This is String case. + /// + /// + /// The CreateSubscriptionComponentUnitBalance instance, wrapping the provided string value. + /// + public static CreateSubscriptionComponentUnitBalance FromString(string mString) + { + return new MStringCase().Set(mString); + } + + /// + /// Method to match from the provided one-of cases. Here parameters + /// represents the callback functions for one-of type cases. 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. + /// + /// + 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 : CreateSubscriptionComponentUnitBalance, ICaseValue + { + public int Value; + + public override T Match(Func number, Func mString) => + number != null ? number(Value) : default; + + public NumberCase Set(int value) + { + Value = value; + return this; + } + + public int Get() + { + return Value; + } + + public override string 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.Equals(other.Value); + } + } + + [JsonConverter(typeof(UnionTypeCaseConverter), JTokenType.String, JTokenType.Null)] + private sealed class MStringCase : CreateSubscriptionComponentUnitBalance, ICaseValue + { + public string Value; + + public override T Match(Func number, Func mString) => + mString != null ? mString(Value) : default; + + public MStringCase Set(string value) + { + Value = value; + return this; + } + + public string Get() + { + return Value; + } + + public override string 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; + } + } + } +} \ No newline at end of file diff --git a/AdvancedBilling.Standard/Models/Containers/GetOneTimeTokenRequestPaymentProfile.cs b/AdvancedBilling.Standard/Models/Containers/GetOneTimeTokenRequestPaymentProfile.cs new file mode 100644 index 00000000..7492a1a5 --- /dev/null +++ b/AdvancedBilling.Standard/Models/Containers/GetOneTimeTokenRequestPaymentProfile.cs @@ -0,0 +1,133 @@ +// +// AdvancedBilling.Standard +// +// This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). +// +using APIMatic.Core.Utilities.Converters; +using Newtonsoft.Json; +using System; + +namespace AdvancedBilling.Standard.Models.Containers +{ + /// + /// This is a container class for any-of types. + /// + [JsonConverter( + typeof(UnionTypeConverter), + new[] { + typeof(GetOneTimeTokenPaymentProfileCase), + typeof(GetOneTimeTokenBankAccountPaymentProfileCase) + }, + false + )] + public abstract class GetOneTimeTokenRequestPaymentProfile + { + /// + /// This is Get One Time Token Payment Profile case. + /// + /// + /// The GetOneTimeTokenRequestPaymentProfile instance, wrapping the provided GetOneTimeTokenPaymentProfile value. + /// + public static GetOneTimeTokenRequestPaymentProfile FromGetOneTimeTokenPaymentProfile(GetOneTimeTokenPaymentProfile getOneTimeTokenPaymentProfile) + { + return new GetOneTimeTokenPaymentProfileCase().Set(getOneTimeTokenPaymentProfile); + } + + /// + /// This is Get One Time Token Bank Account Payment Profile case. + /// + /// + /// The GetOneTimeTokenRequestPaymentProfile instance, wrapping the provided GetOneTimeTokenBankAccountPaymentProfile value. + /// + public static GetOneTimeTokenRequestPaymentProfile FromGetOneTimeTokenBankAccountPaymentProfile(GetOneTimeTokenBankAccountPaymentProfile getOneTimeTokenBankAccountPaymentProfile) + { + return new GetOneTimeTokenBankAccountPaymentProfileCase().Set(getOneTimeTokenBankAccountPaymentProfile); + } + + /// + /// Method to match from the provided any-of cases. Here parameters + /// represents the callback functions for any-of type cases. 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. + /// + /// + public abstract T Match(Func getOneTimeTokenPaymentProfile, Func getOneTimeTokenBankAccountPaymentProfile); + + /// + /// 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 getOneTimeTokenPaymentProfile = null, Func getOneTimeTokenBankAccountPaymentProfile = null) => + Match(getOneTimeTokenPaymentProfile, getOneTimeTokenBankAccountPaymentProfile); + + [JsonConverter(typeof(UnionTypeCaseConverter))] + private sealed class GetOneTimeTokenPaymentProfileCase : GetOneTimeTokenRequestPaymentProfile, ICaseValue + { + public GetOneTimeTokenPaymentProfile Value; + + public override T Match(Func getOneTimeTokenPaymentProfile, Func getOneTimeTokenBankAccountPaymentProfile) => + getOneTimeTokenPaymentProfile != null ? getOneTimeTokenPaymentProfile(Value) : default; + + public GetOneTimeTokenPaymentProfileCase Set(GetOneTimeTokenPaymentProfile value) + { + Value = value; + return this; + } + + public GetOneTimeTokenPaymentProfile Get() + { + return Value; + } + + public override string ToString() + { + return Value?.ToString(); + } + + public override bool Equals(object obj) + { + if (!(obj is GetOneTimeTokenPaymentProfileCase other)) return false; + if (ReferenceEquals(this, other)) return true; + return Value == null ? other.Value == null : Value?.Equals(other.Value) == true; + } + } + + [JsonConverter(typeof(UnionTypeCaseConverter))] + private sealed class GetOneTimeTokenBankAccountPaymentProfileCase : GetOneTimeTokenRequestPaymentProfile, ICaseValue + { + public GetOneTimeTokenBankAccountPaymentProfile Value; + + public override T Match(Func getOneTimeTokenPaymentProfile, Func getOneTimeTokenBankAccountPaymentProfile) => + getOneTimeTokenBankAccountPaymentProfile != null ? getOneTimeTokenBankAccountPaymentProfile(Value) : default; + + public GetOneTimeTokenBankAccountPaymentProfileCase Set(GetOneTimeTokenBankAccountPaymentProfile value) + { + Value = value; + return this; + } + + public GetOneTimeTokenBankAccountPaymentProfile Get() + { + return Value; + } + + public override string ToString() + { + return Value?.ToString(); + } + + public override bool Equals(object obj) + { + if (!(obj is GetOneTimeTokenBankAccountPaymentProfileCase other)) return false; + if (ReferenceEquals(this, other)) return true; + return Value == null ? other.Value == null : Value?.Equals(other.Value) == true; + } + } + } +} \ No newline at end of file diff --git a/AdvancedBilling.Standard/Models/Containers/ListSubscriptionsInputProduct.cs b/AdvancedBilling.Standard/Models/Containers/ListSubscriptionsInputProduct.cs new file mode 100644 index 00000000..5d664814 --- /dev/null +++ b/AdvancedBilling.Standard/Models/Containers/ListSubscriptionsInputProduct.cs @@ -0,0 +1,134 @@ +// +// AdvancedBilling.Standard +// +// This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). +// +using APIMatic.Core.Utilities.Converters; +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; +using System; + +namespace AdvancedBilling.Standard.Models.Containers +{ + /// + /// This is a container class for one-of types. + /// + [JsonConverter( + typeof(UnionTypeConverter), + new[] { + typeof(NumberCase), + typeof(MStringCase) + }, + true + )] + public abstract class ListSubscriptionsInputProduct + { + /// + /// This is Number case. + /// + /// + /// The ListSubscriptionsInputProduct instance, wrapping the provided int value. + /// + public static ListSubscriptionsInputProduct FromNumber(int number) + { + return new NumberCase().Set(number); + } + + /// + /// This is String case. + /// + /// + /// The ListSubscriptionsInputProduct instance, wrapping the provided string value. + /// + public static ListSubscriptionsInputProduct FromString(string mString) + { + return new MStringCase().Set(mString); + } + + /// + /// Method to match from the provided one-of cases. Here parameters + /// represents the callback functions for one-of type cases. 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. + /// + /// + 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 : ListSubscriptionsInputProduct, ICaseValue + { + public int Value; + + public override T Match(Func number, Func mString) => + number != null ? number(Value) : default; + + public NumberCase Set(int value) + { + Value = value; + return this; + } + + public int Get() + { + return Value; + } + + public override string 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.Equals(other.Value); + } + } + + [JsonConverter(typeof(UnionTypeCaseConverter), JTokenType.String, JTokenType.Null)] + private sealed class MStringCase : ListSubscriptionsInputProduct, ICaseValue + { + public string Value; + + public override T Match(Func number, Func mString) => + mString != null ? mString(Value) : default; + + public MStringCase Set(string value) + { + Value = value; + return this; + } + + public string Get() + { + return Value; + } + + public override string 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; + } + } + } +} \ No newline at end of file diff --git a/AdvancedBilling.Standard/Models/Containers/MeteredUsageNewUnitBalance.cs b/AdvancedBilling.Standard/Models/Containers/MeteredUsageNewUnitBalance.cs new file mode 100644 index 00000000..6a343e77 --- /dev/null +++ b/AdvancedBilling.Standard/Models/Containers/MeteredUsageNewUnitBalance.cs @@ -0,0 +1,134 @@ +// +// AdvancedBilling.Standard +// +// This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). +// +using APIMatic.Core.Utilities.Converters; +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; +using System; + +namespace AdvancedBilling.Standard.Models.Containers +{ + /// + /// This is a container class for one-of types. + /// + [JsonConverter( + typeof(UnionTypeConverter), + new[] { + typeof(NumberCase), + typeof(MStringCase) + }, + true + )] + public abstract class MeteredUsageNewUnitBalance + { + /// + /// This is Number case. + /// + /// + /// The MeteredUsageNewUnitBalance instance, wrapping the provided int value. + /// + public static MeteredUsageNewUnitBalance FromNumber(int number) + { + return new NumberCase().Set(number); + } + + /// + /// This is String case. + /// + /// + /// The MeteredUsageNewUnitBalance instance, wrapping the provided string value. + /// + public static MeteredUsageNewUnitBalance FromString(string mString) + { + return new MStringCase().Set(mString); + } + + /// + /// Method to match from the provided one-of cases. Here parameters + /// represents the callback functions for one-of type cases. 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. + /// + /// + 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 : MeteredUsageNewUnitBalance, ICaseValue + { + public int Value; + + public override T Match(Func number, Func mString) => + number != null ? number(Value) : default; + + public NumberCase Set(int value) + { + Value = value; + return this; + } + + public int Get() + { + return Value; + } + + public override string 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.Equals(other.Value); + } + } + + [JsonConverter(typeof(UnionTypeCaseConverter), JTokenType.String, JTokenType.Null)] + private sealed class MStringCase : MeteredUsageNewUnitBalance, ICaseValue + { + public string Value; + + public override T Match(Func number, Func mString) => + mString != null ? mString(Value) : default; + + public MStringCase Set(string value) + { + Value = value; + return this; + } + + public string Get() + { + return Value; + } + + public override string 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; + } + } + } +} \ No newline at end of file diff --git a/AdvancedBilling.Standard/Models/Containers/PrepaidUsageNewOverageUnitBalance.cs b/AdvancedBilling.Standard/Models/Containers/PrepaidUsageNewOverageUnitBalance.cs new file mode 100644 index 00000000..a47ca791 --- /dev/null +++ b/AdvancedBilling.Standard/Models/Containers/PrepaidUsageNewOverageUnitBalance.cs @@ -0,0 +1,134 @@ +// +// AdvancedBilling.Standard +// +// This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). +// +using APIMatic.Core.Utilities.Converters; +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; +using System; + +namespace AdvancedBilling.Standard.Models.Containers +{ + /// + /// This is a container class for one-of types. + /// + [JsonConverter( + typeof(UnionTypeConverter), + new[] { + typeof(NumberCase), + typeof(MStringCase) + }, + true + )] + public abstract class PrepaidUsageNewOverageUnitBalance + { + /// + /// This is Number case. + /// + /// + /// The PrepaidUsageNewOverageUnitBalance instance, wrapping the provided int value. + /// + public static PrepaidUsageNewOverageUnitBalance FromNumber(int number) + { + return new NumberCase().Set(number); + } + + /// + /// This is String case. + /// + /// + /// The PrepaidUsageNewOverageUnitBalance instance, wrapping the provided string value. + /// + public static PrepaidUsageNewOverageUnitBalance FromString(string mString) + { + return new MStringCase().Set(mString); + } + + /// + /// Method to match from the provided one-of cases. Here parameters + /// represents the callback functions for one-of type cases. 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. + /// + /// + 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 : PrepaidUsageNewOverageUnitBalance, ICaseValue + { + public int Value; + + public override T Match(Func number, Func mString) => + number != null ? number(Value) : default; + + public NumberCase Set(int value) + { + Value = value; + return this; + } + + public int Get() + { + return Value; + } + + public override string 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.Equals(other.Value); + } + } + + [JsonConverter(typeof(UnionTypeCaseConverter), JTokenType.String, JTokenType.Null)] + private sealed class MStringCase : PrepaidUsageNewOverageUnitBalance, ICaseValue + { + public string Value; + + public override T Match(Func number, Func mString) => + mString != null ? mString(Value) : default; + + public MStringCase Set(string value) + { + Value = value; + return this; + } + + public string Get() + { + return Value; + } + + public override string 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; + } + } + } +} \ No newline at end of file diff --git a/AdvancedBilling.Standard/Models/Containers/PrepaidUsageNewUnitBalance.cs b/AdvancedBilling.Standard/Models/Containers/PrepaidUsageNewUnitBalance.cs new file mode 100644 index 00000000..4a626847 --- /dev/null +++ b/AdvancedBilling.Standard/Models/Containers/PrepaidUsageNewUnitBalance.cs @@ -0,0 +1,134 @@ +// +// AdvancedBilling.Standard +// +// This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). +// +using APIMatic.Core.Utilities.Converters; +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; +using System; + +namespace AdvancedBilling.Standard.Models.Containers +{ + /// + /// This is a container class for one-of types. + /// + [JsonConverter( + typeof(UnionTypeConverter), + new[] { + typeof(NumberCase), + typeof(MStringCase) + }, + true + )] + public abstract class PrepaidUsageNewUnitBalance + { + /// + /// This is Number case. + /// + /// + /// The PrepaidUsageNewUnitBalance instance, wrapping the provided int value. + /// + public static PrepaidUsageNewUnitBalance FromNumber(int number) + { + return new NumberCase().Set(number); + } + + /// + /// This is String case. + /// + /// + /// The PrepaidUsageNewUnitBalance instance, wrapping the provided string value. + /// + public static PrepaidUsageNewUnitBalance FromString(string mString) + { + return new MStringCase().Set(mString); + } + + /// + /// Method to match from the provided one-of cases. Here parameters + /// represents the callback functions for one-of type cases. 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. + /// + /// + 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 : PrepaidUsageNewUnitBalance, ICaseValue + { + public int Value; + + public override T Match(Func number, Func mString) => + number != null ? number(Value) : default; + + public NumberCase Set(int value) + { + Value = value; + return this; + } + + public int Get() + { + return Value; + } + + public override string 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.Equals(other.Value); + } + } + + [JsonConverter(typeof(UnionTypeCaseConverter), JTokenType.String, JTokenType.Null)] + private sealed class MStringCase : PrepaidUsageNewUnitBalance, ICaseValue + { + public string Value; + + public override T Match(Func number, Func mString) => + mString != null ? mString(Value) : default; + + public MStringCase Set(string value) + { + Value = value; + return this; + } + + public string Get() + { + return Value; + } + + public override string 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; + } + } + } +} \ No newline at end of file diff --git a/AdvancedBilling.Standard/Models/Containers/SubscriptionComponentUnitBalance.cs b/AdvancedBilling.Standard/Models/Containers/SubscriptionComponentUnitBalance.cs new file mode 100644 index 00000000..5759c37c --- /dev/null +++ b/AdvancedBilling.Standard/Models/Containers/SubscriptionComponentUnitBalance.cs @@ -0,0 +1,134 @@ +// +// AdvancedBilling.Standard +// +// This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). +// +using APIMatic.Core.Utilities.Converters; +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; +using System; + +namespace AdvancedBilling.Standard.Models.Containers +{ + /// + /// This is a container class for one-of types. + /// + [JsonConverter( + typeof(UnionTypeConverter), + new[] { + typeof(NumberCase), + typeof(MStringCase) + }, + true + )] + public abstract class SubscriptionComponentUnitBalance + { + /// + /// This is Number case. + /// + /// + /// The SubscriptionComponentUnitBalance instance, wrapping the provided int value. + /// + public static SubscriptionComponentUnitBalance FromNumber(int number) + { + return new NumberCase().Set(number); + } + + /// + /// This is String case. + /// + /// + /// The SubscriptionComponentUnitBalance instance, wrapping the provided string value. + /// + public static SubscriptionComponentUnitBalance FromString(string mString) + { + return new MStringCase().Set(mString); + } + + /// + /// Method to match from the provided one-of cases. Here parameters + /// represents the callback functions for one-of type cases. 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. + /// + /// + 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 : SubscriptionComponentUnitBalance, ICaseValue + { + public int Value; + + public override T Match(Func number, Func mString) => + number != null ? number(Value) : default; + + public NumberCase Set(int value) + { + Value = value; + return this; + } + + public int Get() + { + return Value; + } + + public override string 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.Equals(other.Value); + } + } + + [JsonConverter(typeof(UnionTypeCaseConverter), JTokenType.String, JTokenType.Null)] + private sealed class MStringCase : SubscriptionComponentUnitBalance, ICaseValue + { + public string Value; + + public override T Match(Func number, Func mString) => + mString != null ? mString(Value) : default; + + public MStringCase Set(string value) + { + Value = value; + return this; + } + + public string Get() + { + return Value; + } + + public override string 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; + } + } + } +} \ No newline at end of file diff --git a/AdvancedBilling.Standard/Models/Containers/UpdateInvoiceItemComponentId.cs b/AdvancedBilling.Standard/Models/Containers/UpdateInvoiceItemComponentId.cs new file mode 100644 index 00000000..398c25a9 --- /dev/null +++ b/AdvancedBilling.Standard/Models/Containers/UpdateInvoiceItemComponentId.cs @@ -0,0 +1,134 @@ +// +// AdvancedBilling.Standard +// +// This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). +// +using APIMatic.Core.Utilities.Converters; +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; +using System; + +namespace AdvancedBilling.Standard.Models.Containers +{ + /// + /// This is a container class for one-of types. + /// + [JsonConverter( + typeof(UnionTypeConverter), + new[] { + typeof(MStringCase), + typeof(NumberCase) + }, + true + )] + public abstract class UpdateInvoiceItemComponentId + { + /// + /// This is String case. + /// + /// + /// The UpdateInvoiceItemComponentId instance, wrapping the provided string value. + /// + public static UpdateInvoiceItemComponentId FromString(string mString) + { + return new MStringCase().Set(mString); + } + + /// + /// This is Number case. + /// + /// + /// The UpdateInvoiceItemComponentId instance, wrapping the provided int value. + /// + public static UpdateInvoiceItemComponentId FromNumber(int number) + { + return new NumberCase().Set(number); + } + + /// + /// Method to match from the provided one-of cases. Here parameters + /// represents the callback functions for one-of type cases. 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. + /// + /// + 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 : UpdateInvoiceItemComponentId, ICaseValue + { + public string Value; + + public override T Match(Func mString, Func number) => + mString != null ? mString(Value) : default; + + public MStringCase Set(string value) + { + Value = value; + return this; + } + + public string Get() + { + return Value; + } + + public override string 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; + } + } + + [JsonConverter(typeof(UnionTypeCaseConverter), JTokenType.Integer)] + private sealed class NumberCase : UpdateInvoiceItemComponentId, ICaseValue + { + public int Value; + + public override T Match(Func mString, Func number) => + number != null ? number(Value) : default; + + public NumberCase Set(int value) + { + Value = value; + return this; + } + + public int Get() + { + return Value; + } + + public override string 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.Equals(other.Value); + } + } + } +} \ No newline at end of file diff --git a/AdvancedBilling.Standard/Models/Containers/UpdateInvoiceItemPricePointId.cs b/AdvancedBilling.Standard/Models/Containers/UpdateInvoiceItemPricePointId.cs new file mode 100644 index 00000000..23dd03b6 --- /dev/null +++ b/AdvancedBilling.Standard/Models/Containers/UpdateInvoiceItemPricePointId.cs @@ -0,0 +1,134 @@ +// +// AdvancedBilling.Standard +// +// This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). +// +using APIMatic.Core.Utilities.Converters; +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; +using System; + +namespace AdvancedBilling.Standard.Models.Containers +{ + /// + /// This is a container class for one-of types. + /// + [JsonConverter( + typeof(UnionTypeConverter), + new[] { + typeof(MStringCase), + typeof(NumberCase) + }, + true + )] + public abstract class UpdateInvoiceItemPricePointId + { + /// + /// This is String case. + /// + /// + /// The UpdateInvoiceItemPricePointId instance, wrapping the provided string value. + /// + public static UpdateInvoiceItemPricePointId FromString(string mString) + { + return new MStringCase().Set(mString); + } + + /// + /// This is Number case. + /// + /// + /// The UpdateInvoiceItemPricePointId instance, wrapping the provided int value. + /// + public static UpdateInvoiceItemPricePointId FromNumber(int number) + { + return new NumberCase().Set(number); + } + + /// + /// Method to match from the provided one-of cases. Here parameters + /// represents the callback functions for one-of type cases. 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. + /// + /// + 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 : UpdateInvoiceItemPricePointId, ICaseValue + { + public string Value; + + public override T Match(Func mString, Func number) => + mString != null ? mString(Value) : default; + + public MStringCase Set(string value) + { + Value = value; + return this; + } + + public string Get() + { + return Value; + } + + public override string 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; + } + } + + [JsonConverter(typeof(UnionTypeCaseConverter), JTokenType.Integer)] + private sealed class NumberCase : UpdateInvoiceItemPricePointId, ICaseValue + { + public int Value; + + public override T Match(Func mString, Func number) => + number != null ? number(Value) : default; + + public NumberCase Set(int value) + { + Value = value; + return this; + } + + public int Get() + { + return Value; + } + + public override string 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.Equals(other.Value); + } + } + } +} \ No newline at end of file diff --git a/AdvancedBilling.Standard/Models/Containers/UpdateInvoiceItemProductId.cs b/AdvancedBilling.Standard/Models/Containers/UpdateInvoiceItemProductId.cs new file mode 100644 index 00000000..8131f1e1 --- /dev/null +++ b/AdvancedBilling.Standard/Models/Containers/UpdateInvoiceItemProductId.cs @@ -0,0 +1,134 @@ +// +// AdvancedBilling.Standard +// +// This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). +// +using APIMatic.Core.Utilities.Converters; +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; +using System; + +namespace AdvancedBilling.Standard.Models.Containers +{ + /// + /// This is a container class for one-of types. + /// + [JsonConverter( + typeof(UnionTypeConverter), + new[] { + typeof(MStringCase), + typeof(NumberCase) + }, + true + )] + public abstract class UpdateInvoiceItemProductId + { + /// + /// This is String case. + /// + /// + /// The UpdateInvoiceItemProductId instance, wrapping the provided string value. + /// + public static UpdateInvoiceItemProductId FromString(string mString) + { + return new MStringCase().Set(mString); + } + + /// + /// This is Number case. + /// + /// + /// The UpdateInvoiceItemProductId instance, wrapping the provided int value. + /// + public static UpdateInvoiceItemProductId FromNumber(int number) + { + return new NumberCase().Set(number); + } + + /// + /// Method to match from the provided one-of cases. Here parameters + /// represents the callback functions for one-of type cases. 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. + /// + /// + 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 : UpdateInvoiceItemProductId, ICaseValue + { + public string Value; + + public override T Match(Func mString, Func number) => + mString != null ? mString(Value) : default; + + public MStringCase Set(string value) + { + Value = value; + return this; + } + + public string Get() + { + return Value; + } + + public override string 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; + } + } + + [JsonConverter(typeof(UnionTypeCaseConverter), JTokenType.Integer)] + private sealed class NumberCase : UpdateInvoiceItemProductId, ICaseValue + { + public int Value; + + public override T Match(Func mString, Func number) => + number != null ? number(Value) : default; + + public NumberCase Set(int value) + { + Value = value; + return this; + } + + public int Get() + { + return Value; + } + + public override string 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.Equals(other.Value); + } + } + } +} \ No newline at end of file diff --git a/AdvancedBilling.Standard/Models/Containers/UpdateInvoiceItemProductPricePointId.cs b/AdvancedBilling.Standard/Models/Containers/UpdateInvoiceItemProductPricePointId.cs new file mode 100644 index 00000000..d0a51a27 --- /dev/null +++ b/AdvancedBilling.Standard/Models/Containers/UpdateInvoiceItemProductPricePointId.cs @@ -0,0 +1,134 @@ +// +// AdvancedBilling.Standard +// +// This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). +// +using APIMatic.Core.Utilities.Converters; +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; +using System; + +namespace AdvancedBilling.Standard.Models.Containers +{ + /// + /// This is a container class for one-of types. + /// + [JsonConverter( + typeof(UnionTypeConverter), + new[] { + typeof(MStringCase), + typeof(NumberCase) + }, + true + )] + public abstract class UpdateInvoiceItemProductPricePointId + { + /// + /// This is String case. + /// + /// + /// The UpdateInvoiceItemProductPricePointId instance, wrapping the provided string value. + /// + public static UpdateInvoiceItemProductPricePointId FromString(string mString) + { + return new MStringCase().Set(mString); + } + + /// + /// This is Number case. + /// + /// + /// The UpdateInvoiceItemProductPricePointId instance, wrapping the provided int value. + /// + public static UpdateInvoiceItemProductPricePointId FromNumber(int number) + { + return new NumberCase().Set(number); + } + + /// + /// Method to match from the provided one-of cases. Here parameters + /// represents the callback functions for one-of type cases. 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. + /// + /// + 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 : UpdateInvoiceItemProductPricePointId, ICaseValue + { + public string Value; + + public override T Match(Func mString, Func number) => + mString != null ? mString(Value) : default; + + public MStringCase Set(string value) + { + Value = value; + return this; + } + + public string Get() + { + return Value; + } + + public override string 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; + } + } + + [JsonConverter(typeof(UnionTypeCaseConverter), JTokenType.Integer)] + private sealed class NumberCase : UpdateInvoiceItemProductPricePointId, ICaseValue + { + public int Value; + + public override T Match(Func mString, Func number) => + number != null ? number(Value) : default; + + public NumberCase Set(int value) + { + Value = value; + return this; + } + + public int Get() + { + return Value; + } + + public override string 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.Equals(other.Value); + } + } + } +} \ No newline at end of file diff --git a/AdvancedBilling.Standard/Models/Containers/UpdateInvoiceItemQuantity.cs b/AdvancedBilling.Standard/Models/Containers/UpdateInvoiceItemQuantity.cs new file mode 100644 index 00000000..c9b83973 --- /dev/null +++ b/AdvancedBilling.Standard/Models/Containers/UpdateInvoiceItemQuantity.cs @@ -0,0 +1,134 @@ +// +// AdvancedBilling.Standard +// +// This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). +// +using APIMatic.Core.Utilities.Converters; +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; +using System; + +namespace AdvancedBilling.Standard.Models.Containers +{ + /// + /// This is a container class for one-of types. + /// + [JsonConverter( + typeof(UnionTypeConverter), + new[] { + typeof(PrecisionCase), + typeof(MStringCase) + }, + true + )] + public abstract class UpdateInvoiceItemQuantity + { + /// + /// This is Precision case. + /// + /// + /// The UpdateInvoiceItemQuantity instance, wrapping the provided double value. + /// + public static UpdateInvoiceItemQuantity FromPrecision(double precision) + { + return new PrecisionCase().Set(precision); + } + + /// + /// This is String case. + /// + /// + /// The UpdateInvoiceItemQuantity instance, wrapping the provided string value. + /// + public static UpdateInvoiceItemQuantity FromString(string mString) + { + return new MStringCase().Set(mString); + } + + /// + /// Method to match from the provided one-of cases. Here parameters + /// represents the callback functions for one-of type cases. 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. + /// + /// + public abstract T Match(Func precision, 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 precision = null, Func mString = null) => + Match(precision, mString); + + [JsonConverter(typeof(UnionTypeCaseConverter), JTokenType.Float)] + private sealed class PrecisionCase : UpdateInvoiceItemQuantity, ICaseValue + { + public double Value; + + public override T Match(Func precision, Func mString) => + precision != null ? precision(Value) : default; + + public PrecisionCase Set(double value) + { + Value = value; + return this; + } + + public double Get() + { + return Value; + } + + public override string 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.Equals(other.Value); + } + } + + [JsonConverter(typeof(UnionTypeCaseConverter), JTokenType.String, JTokenType.Null)] + private sealed class MStringCase : UpdateInvoiceItemQuantity, ICaseValue + { + public string Value; + + public override T Match(Func precision, Func mString) => + mString != null ? mString(Value) : default; + + public MStringCase Set(string value) + { + Value = value; + return this; + } + + public string Get() + { + return Value; + } + + public override string 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; + } + } + } +} \ No newline at end of file diff --git a/AdvancedBilling.Standard/Models/Containers/UpdateInvoiceItemUnitPrice.cs b/AdvancedBilling.Standard/Models/Containers/UpdateInvoiceItemUnitPrice.cs new file mode 100644 index 00000000..7e30ee38 --- /dev/null +++ b/AdvancedBilling.Standard/Models/Containers/UpdateInvoiceItemUnitPrice.cs @@ -0,0 +1,134 @@ +// +// AdvancedBilling.Standard +// +// This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). +// +using APIMatic.Core.Utilities.Converters; +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; +using System; + +namespace AdvancedBilling.Standard.Models.Containers +{ + /// + /// This is a container class for one-of types. + /// + [JsonConverter( + typeof(UnionTypeConverter), + new[] { + typeof(PrecisionCase), + typeof(MStringCase) + }, + true + )] + public abstract class UpdateInvoiceItemUnitPrice + { + /// + /// This is Precision case. + /// + /// + /// The UpdateInvoiceItemUnitPrice instance, wrapping the provided double value. + /// + public static UpdateInvoiceItemUnitPrice FromPrecision(double precision) + { + return new PrecisionCase().Set(precision); + } + + /// + /// This is String case. + /// + /// + /// The UpdateInvoiceItemUnitPrice instance, wrapping the provided string value. + /// + public static UpdateInvoiceItemUnitPrice FromString(string mString) + { + return new MStringCase().Set(mString); + } + + /// + /// Method to match from the provided one-of cases. Here parameters + /// represents the callback functions for one-of type cases. 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. + /// + /// + public abstract T Match(Func precision, 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 precision = null, Func mString = null) => + Match(precision, mString); + + [JsonConverter(typeof(UnionTypeCaseConverter), JTokenType.Float)] + private sealed class PrecisionCase : UpdateInvoiceItemUnitPrice, ICaseValue + { + public double Value; + + public override T Match(Func precision, Func mString) => + precision != null ? precision(Value) : default; + + public PrecisionCase Set(double value) + { + Value = value; + return this; + } + + public double Get() + { + return Value; + } + + public override string 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.Equals(other.Value); + } + } + + [JsonConverter(typeof(UnionTypeCaseConverter), JTokenType.String, JTokenType.Null)] + private sealed class MStringCase : UpdateInvoiceItemUnitPrice, ICaseValue + { + public string Value; + + public override T Match(Func precision, Func mString) => + mString != null ? mString(Value) : default; + + public MStringCase Set(string value) + { + Value = value; + return this; + } + + public string Get() + { + return Value; + } + + public override string 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; + } + } + } +} \ No newline at end of file diff --git a/AdvancedBilling.Standard/Models/CouponPayload.cs b/AdvancedBilling.Standard/Models/CouponPayload.cs index a7221aac..a5f59431 100644 --- a/AdvancedBilling.Standard/Models/CouponPayload.cs +++ b/AdvancedBilling.Standard/Models/CouponPayload.cs @@ -79,7 +79,7 @@ public CouponPayload( public string Name { get; set; } /// - /// Required when creating a new coupon. The code is limited to 255 characters. May contain uppercase alphanumeric characters and these special characters (which allow for email addresses to be used): “%”, “@”, “+”, “-”, “_”, and “.” + /// Required when creating a new coupon. The code is limited to 255 characters. May contain uppercase alphanumeric characters and these special characters (which allow for email addresses to be used): “%”, “@”, “+”, “-”, “_”, and “.”. /// [JsonProperty("code", NullValueHandling = NullValueHandling.Ignore)] public string Code { get; set; } @@ -91,13 +91,13 @@ public CouponPayload( public string Description { get; set; } /// - /// Required when creating a new percentage coupon. Can't be used together with amount_in_cents. Percentage discount + /// Required when creating a new percentage coupon. Can't be used together with amount_in_cents. Percentage discount. /// [JsonProperty("percentage", NullValueHandling = NullValueHandling.Ignore)] public CouponPayloadPercentage Percentage { get; set; } /// - /// Required when creating a new flat amount coupon. Can't be used together with percentage. Flat USD discount + /// Required when creating a new flat amount coupon. Can't be used together with percentage. Flat USD discount. /// [JsonProperty("amount_in_cents", NullValueHandling = NullValueHandling.Ignore)] public long? AmountInCents { get; set; } diff --git a/AdvancedBilling.Standard/Models/CouponRequest.cs b/AdvancedBilling.Standard/Models/CouponRequest.cs index 637a3fc4..bd99c939 100644 --- a/AdvancedBilling.Standard/Models/CouponRequest.cs +++ b/AdvancedBilling.Standard/Models/CouponRequest.cs @@ -43,13 +43,13 @@ public CouponRequest( public Models.CouponPayload Coupon { get; set; } /// - /// An object where the keys are product IDs or handles (prefixed with 'handle:'), and the values are booleans indicating if the coupon should be applicable to the product + /// An object where the keys are product IDs or handles (prefixed with 'handle:'), and the values are booleans indicating if the coupon should be applicable to the product. /// [JsonProperty("restricted_products", NullValueHandling = NullValueHandling.Ignore)] public Dictionary RestrictedProducts { get; set; } /// - /// An object where the keys are component IDs or handles (prefixed with 'handle:'), and the values are booleans indicating if the coupon should be applicable to the component + /// An object where the keys are component IDs or handles (prefixed with 'handle:'), and the values are booleans indicating if the coupon should be applicable to the component. /// [JsonProperty("restricted_components", NullValueHandling = NullValueHandling.Ignore)] public Dictionary RestrictedComponents { get; set; } diff --git a/AdvancedBilling.Standard/Models/CouponUsage.cs b/AdvancedBilling.Standard/Models/CouponUsage.cs index 52490bf2..38f6dd56 100644 --- a/AdvancedBilling.Standard/Models/CouponUsage.cs +++ b/AdvancedBilling.Standard/Models/CouponUsage.cs @@ -125,7 +125,7 @@ public long? SavingsInCents } /// - /// Total revenue of the all subscriptions that have received a discount from this coupon. + /// Total revenue of all subscriptions that have received a discount from this coupon. /// [JsonProperty("revenue")] public int? Revenue @@ -143,7 +143,7 @@ public int? Revenue } /// - /// Total revenue of the all subscriptions that have received a discount from this coupon. + /// Total revenue of all subscriptions that have received a discount from this coupon. /// [JsonProperty("revenue_in_cents", NullValueHandling = NullValueHandling.Ignore)] public long? RevenueInCents { get; set; } diff --git a/AdvancedBilling.Standard/Models/CreateAllocation.cs b/AdvancedBilling.Standard/Models/CreateAllocation.cs index d9722b65..a8996151 100644 --- a/AdvancedBilling.Standard/Models/CreateAllocation.cs +++ b/AdvancedBilling.Standard/Models/CreateAllocation.cs @@ -96,7 +96,7 @@ public CreateAllocation( } /// - /// The allocated quantity to which to set the line-items allocated quantity. By default, this is an integer. If decimal allocations are enabled for the component, it will be a decimal number. For On/Off components, use 1for on and 0 for off. + /// The allocated quantity to which to set the line-items allocated quantity. By default, this is an integer. If decimal allocations are enabled for the component, it will be a decimal number. For On/Off components, use 1 for on and 0 for off. /// [JsonProperty("quantity")] public double Quantity { get; set; } diff --git a/AdvancedBilling.Standard/Models/CreateComponentPricePoint.cs b/AdvancedBilling.Standard/Models/CreateComponentPricePoint.cs index 26965cc9..72fb28ce 100644 --- a/AdvancedBilling.Standard/Models/CreateComponentPricePoint.cs +++ b/AdvancedBilling.Standard/Models/CreateComponentPricePoint.cs @@ -104,7 +104,7 @@ public CreateComponentPricePoint( public bool? TaxIncluded { get; set; } /// - /// The numerical interval. i.e. an interval of ‘30’ coupled with an interval_unit of day would mean this price point would renew every 30 days. This property is only available for sites with Multifrequency enabled. + /// The numerical interval. e.g., an interval of ‘30’ coupled with an interval_unit of day would mean this price point would renew every 30 days. This property is only available for sites with Multifrequency enabled. /// [JsonProperty("interval", NullValueHandling = NullValueHandling.Ignore)] public int? Interval { get; set; } diff --git a/AdvancedBilling.Standard/Models/CreateCustomer.cs b/AdvancedBilling.Standard/Models/CreateCustomer.cs index 834bb3e8..32e2f193 100644 --- a/AdvancedBilling.Standard/Models/CreateCustomer.cs +++ b/AdvancedBilling.Standard/Models/CreateCustomer.cs @@ -15,10 +15,12 @@ public class CreateCustomer : BaseModel { private int? parentId; private string salesforceId; + private int? brandingThemeId; private Dictionary shouldSerialize = new Dictionary { { "parent_id", false }, { "salesforce_id", false }, + { "branding_theme_id", false }, }; /// @@ -47,9 +49,11 @@ public CreateCustomer() /// locale. /// vat_number. /// tax_exempt. + /// surcharging. /// tax_exempt_reason. /// parent_id. /// salesforce_id. + /// branding_theme_id. public CreateCustomer( string firstName, string lastName, @@ -67,9 +71,11 @@ public CreateCustomer( string locale = null, string vatNumber = null, bool? taxExempt = null, + bool? surcharging = null, string taxExemptReason = null, int? parentId = null, - string salesforceId = null) + string salesforceId = null, + int? brandingThemeId = null) { this.FirstName = firstName; this.LastName = lastName; @@ -87,6 +93,7 @@ public CreateCustomer( this.Locale = locale; this.VatNumber = vatNumber; this.TaxExempt = taxExempt; + this.Surcharging = surcharging; this.TaxExemptReason = taxExemptReason; if (parentId != null) @@ -98,6 +105,11 @@ public CreateCustomer( { this.SalesforceId = salesforceId; } + + if (brandingThemeId != null) + { + this.BrandingThemeId = brandingThemeId; + } } /// @@ -196,6 +208,12 @@ public CreateCustomer( [JsonProperty("tax_exempt", NullValueHandling = NullValueHandling.Ignore)] public bool? TaxExempt { get; set; } + /// + /// Whether surcharging is enabled for the customer. Defaults to `true` when omitted. Only applied on sites where surcharging control is enabled. + /// + [JsonProperty("surcharging", NullValueHandling = NullValueHandling.Ignore)] + public bool? Surcharging { get; set; } + /// /// Gets or sets TaxExemptReason. /// @@ -238,6 +256,24 @@ public string SalesforceId } } + /// + /// The ID of the Branding Theme assigned to this customer as the customer's default Branding Theme. This customer-level Branding Theme is used when a subscription does not have its own subscription-level Branding Theme. Available only when Branding Themes are enabled for the site. + /// + [JsonProperty("branding_theme_id")] + public int? BrandingThemeId + { + get + { + return this.brandingThemeId; + } + + set + { + this.shouldSerialize["branding_theme_id"] = true; + this.brandingThemeId = value; + } + } + /// public override string ToString() { @@ -260,6 +296,13 @@ public void UnsetSalesforceId() { this.shouldSerialize["salesforce_id"] = false; } + /// + /// Marks the field to not be serialized. + /// + public void UnsetBrandingThemeId() + { + this.shouldSerialize["branding_theme_id"] = false; + } /// /// Checks if the field should be serialized or not. @@ -279,6 +322,15 @@ public bool ShouldSerializeSalesforceId() return this.shouldSerialize["salesforce_id"]; } + /// + /// Checks if the field should be serialized or not. + /// + /// A boolean weather the field should be serialized or not. + public bool ShouldSerializeBrandingThemeId() + { + return this.shouldSerialize["branding_theme_id"]; + } + /// public override bool Equals(object obj) { @@ -318,12 +370,16 @@ public override bool Equals(object obj) this.VatNumber?.Equals(other.VatNumber) == true) && (this.TaxExempt == null && other.TaxExempt == null || this.TaxExempt?.Equals(other.TaxExempt) == true) && + (this.Surcharging == null && other.Surcharging == null || + this.Surcharging?.Equals(other.Surcharging) == true) && (this.TaxExemptReason == null && other.TaxExemptReason == null || this.TaxExemptReason?.Equals(other.TaxExemptReason) == true) && (this.ParentId == null && other.ParentId == null || this.ParentId?.Equals(other.ParentId) == true) && (this.SalesforceId == null && other.SalesforceId == null || this.SalesforceId?.Equals(other.SalesforceId) == true) && + (this.BrandingThemeId == null && other.BrandingThemeId == null || + this.BrandingThemeId?.Equals(other.BrandingThemeId) == true) && base.Equals(obj); } @@ -349,9 +405,11 @@ public override bool Equals(object obj) toStringOutput.Add($"Locale = {this.Locale ?? "null"}"); toStringOutput.Add($"VatNumber = {this.VatNumber ?? "null"}"); toStringOutput.Add($"TaxExempt = {(this.TaxExempt == null ? "null" : this.TaxExempt.ToString())}"); + toStringOutput.Add($"Surcharging = {(this.Surcharging == null ? "null" : this.Surcharging.ToString())}"); toStringOutput.Add($"TaxExemptReason = {this.TaxExemptReason ?? "null"}"); toStringOutput.Add($"ParentId = {(this.ParentId == null ? "null" : this.ParentId.ToString())}"); toStringOutput.Add($"SalesforceId = {this.SalesforceId ?? "null"}"); + toStringOutput.Add($"BrandingThemeId = {(this.BrandingThemeId == null ? "null" : this.BrandingThemeId.ToString())}"); base.ToString(toStringOutput); } diff --git a/AdvancedBilling.Standard/Models/CreateInvoice.cs b/AdvancedBilling.Standard/Models/CreateInvoice.cs index dc6f9a2d..76dfa132 100644 --- a/AdvancedBilling.Standard/Models/CreateInvoice.cs +++ b/AdvancedBilling.Standard/Models/CreateInvoice.cs @@ -91,19 +91,19 @@ public CreateInvoice( public string Memo { get; set; } /// - /// Overrides the defaults for the site + /// Overrides the defaults for the site. /// [JsonProperty("seller_address", NullValueHandling = NullValueHandling.Ignore)] public Models.CreateInvoiceAddress SellerAddress { get; set; } /// - /// Overrides the default for the customer + /// Overrides the default for the customer. /// [JsonProperty("billing_address", NullValueHandling = NullValueHandling.Ignore)] public Models.CreateInvoiceAddress BillingAddress { get; set; } /// - /// Overrides the default for the customer + /// Overrides the default for the customer. /// [JsonProperty("shipping_address", NullValueHandling = NullValueHandling.Ignore)] public Models.CreateInvoiceAddress ShippingAddress { get; set; } diff --git a/AdvancedBilling.Standard/Models/CreateInvoiceItem.cs b/AdvancedBilling.Standard/Models/CreateInvoiceItem.cs index e3508b2b..d59a427e 100644 --- a/AdvancedBilling.Standard/Models/CreateInvoiceItem.cs +++ b/AdvancedBilling.Standard/Models/CreateInvoiceItem.cs @@ -71,13 +71,13 @@ public CreateInvoiceItem( public string Title { get; set; } /// - /// The quantity can contain up to 8 decimal places. i.e. 1.00 or 0.0012 or 0.00000065. If you submit a value with more than 8 decimal places, we will round it down to the 8th decimal place. + /// The quantity can contain up to 8 decimal places. e.g., 1.00 or 0.0012 or 0.00000065. If you submit a value with more than 8 decimal places, we will round it down to the 8th decimal place. /// [JsonProperty("quantity", NullValueHandling = NullValueHandling.Ignore)] public CreateInvoiceItemQuantity Quantity { get; set; } /// - /// The unit_price can contain up to 8 decimal places. i.e. 1.00 or 0.0012 or 0.00000065. If you submit a value with more than 8 decimal places, we will round it down to the 8th decimal place. + /// The unit_price can contain up to 8 decimal places. e.g., 1.00 or 0.0012 or 0.00000065. If you submit a value with more than 8 decimal places, we will round it down to the 8th decimal place. /// [JsonProperty("unit_price", NullValueHandling = NullValueHandling.Ignore)] public CreateInvoiceItemUnitPrice UnitPrice { get; set; } diff --git a/AdvancedBilling.Standard/Models/CreateMetafield.cs b/AdvancedBilling.Standard/Models/CreateMetafield.cs index 079598ec..3d3e6a7d 100644 --- a/AdvancedBilling.Standard/Models/CreateMetafield.cs +++ b/AdvancedBilling.Standard/Models/CreateMetafield.cs @@ -54,7 +54,7 @@ public CreateMetafield( public Models.MetafieldScope Scope { get; set; } /// - /// Indicates the type of metafield. A text metafield allows any string value. Dropdown and radio metafields have a set of values that can be selected. Defaults to 'text'. + /// Indicates the type of metafield. A text metafield allows any string value. Dropdown and radio metafields have a set of values that can be selected. Defaults to 'text'. /// [JsonProperty("input_type", NullValueHandling = NullValueHandling.Ignore)] public Models.MetafieldInput? InputType { get; set; } diff --git a/AdvancedBilling.Standard/Models/CreateOrUpdateEndpointRequest.cs b/AdvancedBilling.Standard/Models/CreateOrUpdateEndpointRequest.cs index ea6cd21f..95eca88c 100644 --- a/AdvancedBilling.Standard/Models/CreateOrUpdateEndpointRequest.cs +++ b/AdvancedBilling.Standard/Models/CreateOrUpdateEndpointRequest.cs @@ -31,7 +31,7 @@ public CreateOrUpdateEndpointRequest( } /// - /// Used to Create or Update Endpoint + /// Used to Create or Update Endpoint. /// [JsonProperty("endpoint")] public Models.CreateOrUpdateEndpoint Endpoint { get; set; } diff --git a/AdvancedBilling.Standard/Models/CreateOrUpdateProduct.cs b/AdvancedBilling.Standard/Models/CreateOrUpdateProduct.cs index 458f4374..d19ab789 100644 --- a/AdvancedBilling.Standard/Models/CreateOrUpdateProduct.cs +++ b/AdvancedBilling.Standard/Models/CreateOrUpdateProduct.cs @@ -16,11 +16,13 @@ public class CreateOrUpdateProduct : BaseModel private Models.IntervalUnit? trialIntervalUnit; private Models.TrialType? trialType; private Models.ExpirationIntervalUnit? expirationIntervalUnit; + private string unspscCode; private Dictionary shouldSerialize = new Dictionary { { "trial_interval_unit", false }, { "trial_type", false }, { "expiration_interval_unit", false }, + { "unspsc_code", false }, }; /// @@ -49,6 +51,7 @@ public CreateOrUpdateProduct() /// expiration_interval_unit. /// auto_create_signup_page. /// tax_code. + /// unspsc_code. public CreateOrUpdateProduct( string name, string description, @@ -65,7 +68,8 @@ public CreateOrUpdateProduct( int? expirationInterval = null, Models.ExpirationIntervalUnit? expirationIntervalUnit = null, bool? autoCreateSignupPage = null, - string taxCode = null) + string taxCode = null, + string unspscCode = null) { this.Name = name; this.Handle = handle; @@ -95,6 +99,11 @@ public CreateOrUpdateProduct( } this.AutoCreateSignupPage = autoCreateSignupPage; this.TaxCode = taxCode; + + if (unspscCode != null) + { + this.UnspscCode = unspscCode; + } } /// @@ -134,7 +143,7 @@ public CreateOrUpdateProduct( public long PriceInCents { get; set; } /// - /// The numerical interval. i.e. an interval of ‘30’ coupled with an interval_unit of day would mean this product would renew every 30 days + /// The numerical interval. e.g., an interval of ‘30’ coupled with an interval_unit of day would mean this product would renew every 30 days. /// [JsonProperty("interval")] public int Interval { get; set; } @@ -152,7 +161,7 @@ public CreateOrUpdateProduct( public long? TrialPriceInCents { get; set; } /// - /// The numerical trial interval. i.e. an interval of ‘30’ coupled with a trial_interval_unit of day would mean this product trial would last 30 days. + /// The numerical trial interval. e.g., an interval of ‘30’ coupled with a trial_interval_unit of day would mean this product trial would last 30 days. /// [JsonProperty("trial_interval", NullValueHandling = NullValueHandling.Ignore)] public int? TrialInterval { get; set; } @@ -176,7 +185,7 @@ public Models.IntervalUnit? TrialIntervalUnit } /// - /// Indicates how a trial is handled when the trail period ends and there is no credit card on file. For `no_obligation`, the subscription transitions to a Trial Ended state. Maxio will not send any emails or statements. For `payment_expected`, the subscription transitions to a Past Due state. Maxio will send normal dunning emails and statements according to your other settings. + /// Indicates how a trial is handled when the trial period ends and there is no credit card on file. For `no_obligation`, the subscription transitions to a Trial Ended state. Maxio will not send any emails or statements. For `payment_expected`, the subscription transitions to a Past Due state. Maxio will send normal dunning emails and statements according to your other settings. /// [JsonProperty("trial_type")] public Models.TrialType? TrialType @@ -194,7 +203,7 @@ public Models.TrialType? TrialType } /// - /// The numerical expiration interval. i.e. an expiration_interval of ‘30’ coupled with an expiration_interval_unit of day would mean this product would expire after 30 days. + /// The numerical expiration interval. e.g., an expiration_interval of ‘30’ coupled with an expiration_interval_unit of day would mean this product would expire after 30 days. /// [JsonProperty("expiration_interval", NullValueHandling = NullValueHandling.Ignore)] public int? ExpirationInterval { get; set; } @@ -229,6 +238,24 @@ public Models.ExpirationIntervalUnit? ExpirationIntervalUnit [JsonProperty("tax_code", NullValueHandling = NullValueHandling.Ignore)] public string TaxCode { get; set; } + /// + /// (Optional) Custom UNSPSC commodity code for Level 3/CEDP payment data. When set, this value is sent as the commodity code on invoice line items for this product instead of the default derived from item_category. + /// + [JsonProperty("unspsc_code")] + public string UnspscCode + { + get + { + return this.unspscCode; + } + + set + { + this.shouldSerialize["unspsc_code"] = true; + this.unspscCode = value; + } + } + /// public override string ToString() { @@ -258,6 +285,13 @@ public void UnsetExpirationIntervalUnit() { this.shouldSerialize["expiration_interval_unit"] = false; } + /// + /// Marks the field to not be serialized. + /// + public void UnsetUnspscCode() + { + this.shouldSerialize["unspsc_code"] = false; + } /// /// Checks if the field should be serialized or not. @@ -286,6 +320,15 @@ public bool ShouldSerializeExpirationIntervalUnit() return this.shouldSerialize["expiration_interval_unit"]; } + /// + /// Checks if the field should be serialized or not. + /// + /// A boolean weather the field should be serialized or not. + public bool ShouldSerializeUnspscCode() + { + return this.shouldSerialize["unspsc_code"]; + } + /// public override bool Equals(object obj) { @@ -322,6 +365,8 @@ public override bool Equals(object obj) this.AutoCreateSignupPage?.Equals(other.AutoCreateSignupPage) == true) && (this.TaxCode == null && other.TaxCode == null || this.TaxCode?.Equals(other.TaxCode) == true) && + (this.UnspscCode == null && other.UnspscCode == null || + this.UnspscCode?.Equals(other.UnspscCode) == true) && base.Equals(obj); } @@ -347,6 +392,7 @@ public override bool Equals(object obj) toStringOutput.Add($"ExpirationIntervalUnit = {(this.ExpirationIntervalUnit == null ? "null" : this.ExpirationIntervalUnit.ToString())}"); toStringOutput.Add($"AutoCreateSignupPage = {(this.AutoCreateSignupPage == null ? "null" : this.AutoCreateSignupPage.ToString())}"); toStringOutput.Add($"TaxCode = {this.TaxCode ?? "null"}"); + toStringOutput.Add($"UnspscCode = {this.UnspscCode ?? "null"}"); base.ToString(toStringOutput); } diff --git a/AdvancedBilling.Standard/Models/CreateOrUpdateSegmentPrice.cs b/AdvancedBilling.Standard/Models/CreateOrUpdateSegmentPrice.cs index 397db062..f10c6402 100644 --- a/AdvancedBilling.Standard/Models/CreateOrUpdateSegmentPrice.cs +++ b/AdvancedBilling.Standard/Models/CreateOrUpdateSegmentPrice.cs @@ -50,7 +50,7 @@ public CreateOrUpdateSegmentPrice( public int? EndingQuantity { get; set; } /// - /// The price can contain up to 8 decimal places. i.e. 1.00 or 0.0012 or 0.00000065 + /// The price can contain up to 8 decimal places. e.g., 1.00 or 0.0012 or 0.00000065 /// [JsonProperty("unit_price")] public CreateOrUpdateSegmentPriceUnitPrice UnitPrice { get; set; } diff --git a/AdvancedBilling.Standard/Models/CreatePaymentProfile.cs b/AdvancedBilling.Standard/Models/CreatePaymentProfile.cs index a611e341..cf7231fc 100644 --- a/AdvancedBilling.Standard/Models/CreatePaymentProfile.cs +++ b/AdvancedBilling.Standard/Models/CreatePaymentProfile.cs @@ -183,25 +183,25 @@ public CreatePaymentProfile( public Models.CardType? CardType { get; set; } /// - /// (Optional when performing an Import via vault_token, required otherwise) The 1- or 2-digit credit card expiration month, as an integer or string, i.e. 5 + /// (Optional when performing an Import via vault_token, required otherwise) The 1- or 2-digit credit card expiration month, as an integer or string, e.g., 5 /// [JsonProperty("expiration_month", NullValueHandling = NullValueHandling.Ignore)] public CreatePaymentProfileExpirationMonth ExpirationMonth { get; set; } /// - /// (Optional when performing a Import via vault_token, required otherwise) The 4-digit credit card expiration year, as an integer or string, i.e. 2012 + /// (Optional when performing an Import via vault_token, required otherwise) The 4-digit credit card expiration year, as an integer or string, e.g., 2012 /// [JsonProperty("expiration_year", NullValueHandling = NullValueHandling.Ignore)] public CreatePaymentProfileExpirationYear ExpirationYear { get; set; } /// - /// The credit card or bank account billing street address (i.e. 123 Main St.). This value is merely passed through to the payment gateway. + /// The credit card or bank account billing street address (e.g., 123 Main St.). This value is merely passed through to the payment gateway. /// [JsonProperty("billing_address", NullValueHandling = NullValueHandling.Ignore)] public string BillingAddress { get; set; } /// - /// Second line of the customer’s billing address i.e. Apt. 100 + /// Second line of the customer’s billing address e.g., Apt. 100 /// [JsonProperty("billing_address_2")] public string BillingAddress2 @@ -219,25 +219,25 @@ public string BillingAddress2 } /// - /// The credit card or bank account billing address city (i.e. “Boston”). This value is merely passed through to the payment gateway. + /// The credit card or bank account billing address city (e.g., “Boston”). This value is merely passed through to the payment gateway. /// [JsonProperty("billing_city", NullValueHandling = NullValueHandling.Ignore)] public string BillingCity { get; set; } /// - /// The credit card or bank account billing address state (i.e. MA). This value is merely passed through to the payment gateway. This must conform to the [ISO_3166-1](https://en.wikipedia.org/wiki/ISO_3166-1#Current_codes) in order to be valid for tax locale purposes. + /// The credit card or bank account billing address state (e.g., MA). This value is merely passed through to the payment gateway. This must conform to the [ISO_3166-1](https://en.wikipedia.org/wiki/ISO_3166-1#Current_codes) in order to be valid for tax locale purposes. /// [JsonProperty("billing_state", NullValueHandling = NullValueHandling.Ignore)] public string BillingState { get; set; } /// - /// The credit card or bank account billing address country, required in [ISO_3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format (i.e. “US”). This value is merely passed through to the payment gateway. Some gateways require country codes in a specific format. Check your gateway’s documentation. If creating an ACH subscription, only US is supported at this time. + /// “The credit card or bank account billing address country, required in [ISO_3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format (e.g., “US”). This value is merely passed through to the payment gateway. Some gateways require country codes in a specific format. Check your gateway’s documentation. If creating an ACH subscription, only US is supported at this time.” /// [JsonProperty("billing_country", NullValueHandling = NullValueHandling.Ignore)] public string BillingCountry { get; set; } /// - /// The credit card or bank account billing address zip code (i.e. 12345). This value is merely passed through to the payment gateway. + /// The credit card or bank account billing address zip code (e.g., 12345). This value is merely passed through to the payment gateway. /// [JsonProperty("billing_zip", NullValueHandling = NullValueHandling.Ignore)] public string BillingZip { get; set; } @@ -297,13 +297,13 @@ public string BillingAddress2 public string BankName { get; set; } /// - /// (Optional when creating with GoCardless, required with Stripe Direct Debit). International Bank Account Number. Alternatively, local bank details can be provided + /// (Optional when creating with GoCardless, required with Stripe Direct Debit). International Bank Account Number. Alternatively, local bank details can be provided. /// [JsonProperty("bank_iban", NullValueHandling = NullValueHandling.Ignore)] public string BankIban { get; set; } /// - /// (Required when creating with ACH. Optional when creating a subscription with GoCardless). The routing number of the bank. It becomes bank_code while passing via GoCardless API + /// (Required when creating with ACH. Optional when creating a subscription with GoCardless). The routing number of the bank. It becomes bank_code while passing via GoCardless API. /// [JsonProperty("bank_routing_number", NullValueHandling = NullValueHandling.Ignore)] public string BankRoutingNumber { get; set; } @@ -315,7 +315,7 @@ public string BillingAddress2 public string BankAccountNumber { get; set; } /// - /// (Optional when creating with GoCardless, required with Stripe BECS or BACS Direct Debit) Branch/Sort code. Alternatively, an IBAN can be provided + /// (Optional when creating with GoCardless, required with Stripe BECS or BACS Direct Debit) Branch/Sort code. Alternatively, an IBAN can be provided. /// [JsonProperty("bank_branch_code", NullValueHandling = NullValueHandling.Ignore)] public string BankBranchCode { get; set; } diff --git a/AdvancedBilling.Standard/Models/CreatePrepaidUsageComponentPricePoint.cs b/AdvancedBilling.Standard/Models/CreatePrepaidUsageComponentPricePoint.cs index 64a61962..a478745f 100644 --- a/AdvancedBilling.Standard/Models/CreatePrepaidUsageComponentPricePoint.cs +++ b/AdvancedBilling.Standard/Models/CreatePrepaidUsageComponentPricePoint.cs @@ -111,25 +111,25 @@ public CreatePrepaidUsageComponentPricePoint( public bool? UseSiteExchangeRate { get; set; } /// - /// (only for prepaid usage components) Boolean which controls whether or not remaining units should be rolled over to the next period + /// (only for prepaid usage components) Boolean which controls whether or not remaining units should be rolled over to the next period. /// [JsonProperty("rollover_prepaid_remainder", NullValueHandling = NullValueHandling.Ignore)] public bool? RolloverPrepaidRemainder { get; set; } /// - /// (only for prepaid usage components) Boolean which controls whether or not the allocated quantity should be renewed at the beginning of each period + /// (only for prepaid usage components) Boolean which controls whether or not the allocated quantity should be renewed at the beginning of each period. /// [JsonProperty("renew_prepaid_allocation", NullValueHandling = NullValueHandling.Ignore)] public bool? RenewPrepaidAllocation { get; set; } /// - /// (only for prepaid usage components where rollover_prepaid_remainder is true) The number of `expiration_interval_unit`s after which rollover amounts should expire + /// (only for prepaid usage components where rollover_prepaid_remainder is true) The number of `expiration_interval_unit`s after which rollover amounts should expire. /// [JsonProperty("expiration_interval", NullValueHandling = NullValueHandling.Ignore)] public double? ExpirationInterval { get; set; } /// - /// (only for prepaid usage components where rollover_prepaid_remainder is true) A string representing the expiration interval unit for this component, either month or day + /// (only for prepaid usage components where rollover_prepaid_remainder is true) A string representing the expiration interval unit for this component, either month or day. /// [JsonProperty("expiration_interval_unit")] public Models.ExpirationIntervalUnit? ExpirationIntervalUnit diff --git a/AdvancedBilling.Standard/Models/CreatePrepayment.cs b/AdvancedBilling.Standard/Models/CreatePrepayment.cs index 14f3a71b..a3013bf2 100644 --- a/AdvancedBilling.Standard/Models/CreatePrepayment.cs +++ b/AdvancedBilling.Standard/Models/CreatePrepayment.cs @@ -61,7 +61,7 @@ public CreatePrepayment( public string Memo { get; set; } /// - /// :- 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. + /// 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. /// [JsonProperty("method")] public Models.CreatePrepaymentMethod Method { get; set; } diff --git a/AdvancedBilling.Standard/Models/CreateProductFamily.cs b/AdvancedBilling.Standard/Models/CreateProductFamily.cs index 4f9bb037..6c808587 100644 --- a/AdvancedBilling.Standard/Models/CreateProductFamily.cs +++ b/AdvancedBilling.Standard/Models/CreateProductFamily.cs @@ -34,10 +34,12 @@ public CreateProductFamily() /// name. /// handle. /// description. + /// surcharging. public CreateProductFamily( string name, string handle = null, - string description = null) + string description = null, + bool? surcharging = null) { this.Name = name; @@ -50,6 +52,7 @@ public CreateProductFamily( { this.Description = description; } + this.Surcharging = surcharging; } /// @@ -94,6 +97,12 @@ public string Description } } + /// + /// Whether surcharging applies to this product family. Defaults to `true` when omitted. Only applied on sites where surcharging is enabled. + /// + [JsonProperty("surcharging", NullValueHandling = NullValueHandling.Ignore)] + public bool? Surcharging { get; set; } + /// public override string ToString() { @@ -148,6 +157,8 @@ public override bool Equals(object obj) this.Handle?.Equals(other.Handle) == true) && (this.Description == null && other.Description == null || this.Description?.Equals(other.Description) == true) && + (this.Surcharging == null && other.Surcharging == null || + this.Surcharging?.Equals(other.Surcharging) == true) && base.Equals(obj); } @@ -160,6 +171,7 @@ public override bool Equals(object obj) toStringOutput.Add($"Name = {this.Name ?? "null"}"); toStringOutput.Add($"Handle = {this.Handle ?? "null"}"); toStringOutput.Add($"Description = {this.Description ?? "null"}"); + toStringOutput.Add($"Surcharging = {(this.Surcharging == null ? "null" : this.Surcharging.ToString())}"); base.ToString(toStringOutput); } diff --git a/AdvancedBilling.Standard/Models/CreateProductPricePoint.cs b/AdvancedBilling.Standard/Models/CreateProductPricePoint.cs index cf85dac5..8769dd4d 100644 --- a/AdvancedBilling.Standard/Models/CreateProductPricePoint.cs +++ b/AdvancedBilling.Standard/Models/CreateProductPricePoint.cs @@ -104,7 +104,7 @@ public CreateProductPricePoint( public long PriceInCents { get; set; } /// - /// The numerical interval. i.e. an interval of ‘30’ coupled with an interval_unit of day would mean this product price point would renew every 30 days + /// The numerical interval. e.g., an interval of ‘30’ coupled with an interval_unit of day would mean this product price point would renew every 30 days. /// [JsonProperty("interval")] public int Interval { get; set; } @@ -122,7 +122,7 @@ public CreateProductPricePoint( public long? TrialPriceInCents { get; set; } /// - /// The numerical trial interval. i.e. an interval of ‘30’ coupled with a trial_interval_unit of day would mean this product price point trial would last 30 days. + /// The numerical trial interval. e.g., an interval of ‘30’ coupled with a trial_interval_unit of day would mean this product price point trial would last 30 days. /// [JsonProperty("trial_interval", NullValueHandling = NullValueHandling.Ignore)] public int? TrialInterval { get; set; } @@ -134,7 +134,7 @@ public CreateProductPricePoint( public Models.IntervalUnit? TrialIntervalUnit { get; set; } /// - /// Indicates how a trial is handled when the trail period ends and there is no credit card on file. For `no_obligation`, the subscription transitions to a Trial Ended state. Maxio will not send any emails or statements. For `payment_expected`, the subscription transitions to a Past Due state. Maxio will send normal dunning emails and statements according to your other settings. + /// Indicates how a trial is handled when the trial period ends and there is no credit card on file. For `no_obligation`, the subscription transitions to a Trial Ended state. Maxio will not send any emails or statements. For `payment_expected`, the subscription transitions to a Past Due state. Maxio will send normal dunning emails and statements according to your other settings. /// [JsonProperty("trial_type")] public Models.TrialType? TrialType @@ -164,7 +164,7 @@ public Models.TrialType? TrialType public bool? InitialChargeAfterTrial { get; set; } /// - /// The numerical expiration interval. i.e. an expiration_interval of ‘30’ coupled with an expiration_interval_unit of day would mean this product price point would expire after 30 days. + /// The numerical expiration interval. e.g., an expiration_interval of ‘30’ coupled with an expiration_interval_unit of day would mean this product price point would expire after 30 days. /// [JsonProperty("expiration_interval", NullValueHandling = NullValueHandling.Ignore)] public int? ExpirationInterval { get; set; } diff --git a/AdvancedBilling.Standard/Models/CreateSubscription.cs b/AdvancedBilling.Standard/Models/CreateSubscription.cs index ad744836..21ce2b6e 100644 --- a/AdvancedBilling.Standard/Models/CreateSubscription.cs +++ b/AdvancedBilling.Standard/Models/CreateSubscription.cs @@ -16,9 +16,11 @@ namespace AdvancedBilling.Standard.Models /// public class CreateSubscription : BaseModel { + private int? brandingThemeId; private string dunningCommunicationDelayTimeZone; private Dictionary shouldSerialize = new Dictionary { + { "branding_theme_id", false }, { "dunning_communication_delay_time_zone", false }, }; @@ -43,6 +45,7 @@ public CreateSubscription() /// receives_invoice_emails. /// net_terms. /// customer_id. + /// branding_theme_id. /// next_billing_at. /// initial_billing_at. /// defer_signup. @@ -94,6 +97,7 @@ public CreateSubscription( string receivesInvoiceEmails = null, string netTerms = null, int? customerId = null, + int? brandingThemeId = null, DateTimeOffset? nextBillingAt = null, DateTimeOffset? initialBillingAt = null, bool? deferSignup = false, @@ -145,6 +149,11 @@ public CreateSubscription( this.ReceivesInvoiceEmails = receivesInvoiceEmails; this.NetTerms = netTerms; this.CustomerId = customerId; + + if (brandingThemeId != null) + { + this.BrandingThemeId = brandingThemeId; + } this.NextBillingAt = nextBillingAt; this.InitialBillingAt = initialBillingAt; this.DeferSignup = deferSignup; @@ -256,6 +265,24 @@ public CreateSubscription( [JsonProperty("customer_id", NullValueHandling = NullValueHandling.Ignore)] public int? CustomerId { get; set; } + /// + /// The ID of the Branding Theme to assign to this subscription. When set, this subscription-level Branding Theme is used instead of the customer's default Branding Theme for subscription-related documents and communications that use subscription theming. Pass null or an empty value to clear the subscription-level Branding Theme. Available only when Branding Themes are enabled for the site. Not returned in the response. + /// + [JsonProperty("branding_theme_id")] + public int? BrandingThemeId + { + get + { + return this.brandingThemeId; + } + + set + { + this.shouldSerialize["branding_theme_id"] = true; + this.brandingThemeId = value; + } + } + /// /// (Optional) Set this attribute to a future date/time to sync imported subscriptions to your existing renewal schedule. See the notes on “Date/Time Format” in our [subscription import documentation](https://maxio.zendesk.com/hc/en-us/articles/24251489107213-Advanced-Billing-Subscription-Imports#date-format). If you provide a next_billing_at timestamp that is in the future, no trial or initial charges will be applied when you create the subscription. In fact, no payment will be captured at all. The first payment will be captured, according to the prices defined by the product, near the time specified by next_billing_at. If you do not provide a value for next_billing_at, any trial and/or initial charges will be assessed and charged at the time of subscription creation. If the card cannot be successfully charged, the subscription will not be created. See further notes in the section on Importing Subscriptions. /// @@ -271,7 +298,7 @@ public CreateSubscription( public DateTimeOffset? InitialBillingAt { get; set; } /// - /// (Optional) Set this attribute to true to create the subscription in the Awaiting Signup Date state. Use this when you want to create a subscription that has an unknown first billing date. When the first billing date is known, update a subscription and set the `initial_billing_at` date. The subscription moves to the Awaiting Signup state with a scheduled initial billing date. You can omit the initial_billing_at date to activate the subscription immediately. See [Subscription States](https://maxio-chargify.zendesk.com/hc/en-us/articles/5404222005773-Subscription-States) for more information. + /// (Optional) Set this attribute to true to create the subscription in the Awaiting Signup Date state. Use this when you want to create a subscription that has an unknown first billing date. When the first billing date is known, update a subscription and set the `initial_billing_at` date. The subscription moves to the Awaiting Signup state with a scheduled initial billing date. You can omit the initial_billing_at date to activate the subscription immediately. See [Subscription States](https://maxio-chargify.zendesk.com/hc/en-us/articles/5404222005773-Subscription-States) for more information. /// [JsonProperty("defer_signup", NullValueHandling = NullValueHandling.Ignore)] public bool? DeferSignup { get; set; } @@ -289,7 +316,7 @@ public CreateSubscription( public int? SalesRepId { get; set; } /// - /// The Payment Profile ID of an existing card or bank account, which belongs to an existing customer to use for payment for this subscription. If the card, bank account, or customer does not exist already, or if you want to use a new (unstored) card or bank account for the subscription, use `payment_profile_attributes` instead to create a new payment profile along with the subscription. (This value is available on an existing subscription via the API as `credit_card` > id or `bank_account` > id) + /// The Payment Profile ID of an existing card or bank account, which belongs to an existing customer to use for payment for this subscription. If the card, bank account, or customer does not exist already, or if you want to use a new (unstored) card or bank account for the subscription, use `payment_profile_attributes` instead to create a new payment profile along with the subscription. (This value is available on an existing subscription via the API as `credit_card` > id or `bank_account` > id.) /// [JsonProperty("payment_profile_id", NullValueHandling = NullValueHandling.Ignore)] public int? PaymentProfileId { get; set; } @@ -331,7 +358,7 @@ public CreateSubscription( public List Components { get; set; } /// - /// (Optional). Cannot be used when also specifying next_billing_at + /// (Optional). Cannot be used when also specifying next_billing_at. /// [JsonProperty("calendar_billing", NullValueHandling = NullValueHandling.Ignore)] public Models.CalendarBilling CalendarBilling { get; set; } @@ -428,7 +455,7 @@ public CreateSubscription( public bool? ProductChangeDelayed { get; set; } /// - /// Use in place of passing product and component information to set up the subscription with an existing offer. May be either the Chargify id of the offer or its handle prefixed with `handle:`.er + /// Use in place of passing product and component information to set up the subscription with an existing offer. May be either the Chargify id of the offer or its handle prefixed with `handle:`. /// [JsonProperty("offer_id", NullValueHandling = NullValueHandling.Ignore)] public CreateSubscriptionOfferId OfferId { get; set; } @@ -516,6 +543,13 @@ public override string ToString() return $"CreateSubscription : ({string.Join(", ", toStringOutput)})"; } + /// + /// Marks the field to not be serialized. + /// + public void UnsetBrandingThemeId() + { + this.shouldSerialize["branding_theme_id"] = false; + } /// /// Marks the field to not be serialized. /// @@ -524,6 +558,15 @@ public void UnsetDunningCommunicationDelayTimeZone() this.shouldSerialize["dunning_communication_delay_time_zone"] = false; } + /// + /// Checks if the field should be serialized or not. + /// + /// A boolean weather the field should be serialized or not. + public bool ShouldSerializeBrandingThemeId() + { + return this.shouldSerialize["branding_theme_id"]; + } + /// /// Checks if the field should be serialized or not. /// @@ -562,6 +605,8 @@ public override bool Equals(object obj) this.NetTerms?.Equals(other.NetTerms) == true) && (this.CustomerId == null && other.CustomerId == null || this.CustomerId?.Equals(other.CustomerId) == true) && + (this.BrandingThemeId == null && other.BrandingThemeId == null || + this.BrandingThemeId?.Equals(other.BrandingThemeId) == true) && (this.NextBillingAt == null && other.NextBillingAt == null || this.NextBillingAt?.Equals(other.NextBillingAt) == true) && (this.InitialBillingAt == null && other.InitialBillingAt == null || @@ -660,6 +705,7 @@ public override bool Equals(object obj) toStringOutput.Add($"ReceivesInvoiceEmails = {this.ReceivesInvoiceEmails ?? "null"}"); toStringOutput.Add($"NetTerms = {this.NetTerms ?? "null"}"); toStringOutput.Add($"CustomerId = {(this.CustomerId == null ? "null" : this.CustomerId.ToString())}"); + toStringOutput.Add($"BrandingThemeId = {(this.BrandingThemeId == null ? "null" : this.BrandingThemeId.ToString())}"); toStringOutput.Add($"NextBillingAt = {(this.NextBillingAt == null ? "null" : this.NextBillingAt.ToString())}"); toStringOutput.Add($"InitialBillingAt = {(this.InitialBillingAt == null ? "null" : this.InitialBillingAt.ToString())}"); toStringOutput.Add($"DeferSignup = {(this.DeferSignup == null ? "null" : this.DeferSignup.ToString())}"); diff --git a/AdvancedBilling.Standard/Models/CreateSubscriptionComponent.cs b/AdvancedBilling.Standard/Models/CreateSubscriptionComponent.cs index bc1deb32..e5b854e6 100644 --- a/AdvancedBilling.Standard/Models/CreateSubscriptionComponent.cs +++ b/AdvancedBilling.Standard/Models/CreateSubscriptionComponent.cs @@ -34,7 +34,7 @@ public CreateSubscriptionComponent() public CreateSubscriptionComponent( CreateSubscriptionComponentComponentId componentId = null, bool? enabled = null, - int? unitBalance = null, + CreateSubscriptionComponentUnitBalance unitBalance = null, CreateSubscriptionComponentAllocatedQuantity allocatedQuantity = null, int? quantity = null, CreateSubscriptionComponentPricePointId pricePointId = null, @@ -65,7 +65,7 @@ public CreateSubscriptionComponent( /// Used for metered and events based components. /// [JsonProperty("unit_balance", NullValueHandling = NullValueHandling.Ignore)] - public int? UnitBalance { get; set; } + public CreateSubscriptionComponentUnitBalance UnitBalance { get; set; } /// /// Used for quantity based components. diff --git a/AdvancedBilling.Standard/Models/CreditCardPaymentProfile.cs b/AdvancedBilling.Standard/Models/CreditCardPaymentProfile.cs index 5a6de753..7409c585 100644 --- a/AdvancedBilling.Standard/Models/CreditCardPaymentProfile.cs +++ b/AdvancedBilling.Standard/Models/CreditCardPaymentProfile.cs @@ -16,6 +16,7 @@ namespace AdvancedBilling.Standard.Models /// public class CreditCardPaymentProfile : BaseModel { + private Models.CardType? cardType; private string vaultToken; private string billingAddress; private string billingCity; @@ -28,6 +29,7 @@ public class CreditCardPaymentProfile : BaseModel private string gatewayHandle; private Dictionary shouldSerialize = new Dictionary { + { "card_type", false }, { "vault_token", false }, { "billing_address", false }, { "billing_city", false }, @@ -104,7 +106,11 @@ public CreditCardPaymentProfile( this.FirstName = firstName; this.LastName = lastName; this.MaskedCardNumber = maskedCardNumber; - this.CardType = cardType; + + if (cardType != null) + { + this.CardType = cardType; + } this.ExpirationMonth = expirationMonth; this.ExpirationYear = expirationYear; this.CustomerId = customerId; @@ -187,7 +193,7 @@ public CreditCardPaymentProfile( public string LastName { get; set; } /// - /// A string representation of the credit card number with all but the last 4 digits masked with X’s (i.e. ‘XXXX-XXXX-XXXX-1234’). + /// A string representation of the credit card number with all but the last 4 digits masked with X’s (e.g., ‘XXXX-XXXX-XXXX-1234’). /// [JsonConverter(typeof(JsonStringConverter))] [JsonProperty("masked_card_number", NullValueHandling = NullValueHandling.Ignore)] @@ -196,8 +202,20 @@ public CreditCardPaymentProfile( /// /// The type of card used. /// - [JsonProperty("card_type", NullValueHandling = NullValueHandling.Ignore)] - public Models.CardType? CardType { get; set; } + [JsonProperty("card_type")] + public Models.CardType? CardType + { + get + { + return this.cardType; + } + + set + { + this.shouldSerialize["card_type"] = true; + this.cardType = value; + } + } /// /// An integer representing the expiration month of the card(1 – 12). @@ -206,7 +224,7 @@ public CreditCardPaymentProfile( public int? ExpirationMonth { get; set; } /// - /// An integer representing the 4-digit expiration year of the card(i.e. ‘2012’). + /// An integer representing the 4-digit expiration year of the card(e.g., ‘2012’). /// [JsonProperty("expiration_year", NullValueHandling = NullValueHandling.Ignore)] public int? ExpirationYear { get; set; } @@ -389,7 +407,7 @@ public string BillingAddress2 public bool? Disabled { get; set; } /// - /// Token received after sending billing information using Maxio.js (formerly Chargify.js). This token will only be received if passed as a sole attribute of credit_card_attributes (i.e. tok_9g6hw85pnpt6knmskpwp4ttt) + /// Token received after sending billing information using Maxio.js (formerly Chargify.js). This token will only be received if passed as a sole attribute of credit_card_attributes (e.g., tok_9g6hw85pnpt6knmskpwp4ttt). /// [JsonConverter(typeof(JsonStringConverter))] [JsonProperty("chargify_token", NullValueHandling = NullValueHandling.Ignore)] @@ -454,6 +472,13 @@ public override string ToString() return $"CreditCardPaymentProfile : ({string.Join(", ", toStringOutput)})"; } + /// + /// Marks the field to not be serialized. + /// + public void UnsetCardType() + { + this.shouldSerialize["card_type"] = false; + } /// /// Marks the field to not be serialized. /// @@ -525,6 +550,15 @@ public void UnsetGatewayHandle() this.shouldSerialize["gateway_handle"] = false; } + /// + /// Checks if the field should be serialized or not. + /// + /// A boolean weather the field should be serialized or not. + public bool ShouldSerializeCardType() + { + return this.shouldSerialize["card_type"]; + } + /// /// Checks if the field should be serialized or not. /// diff --git a/AdvancedBilling.Standard/Models/CreditNote.cs b/AdvancedBilling.Standard/Models/CreditNote.cs index 6e8f3f81..d85bc89c 100644 --- a/AdvancedBilling.Standard/Models/CreditNote.cs +++ b/AdvancedBilling.Standard/Models/CreditNote.cs @@ -189,7 +189,7 @@ public CreditNote( public Models.InvoiceSeller Seller { get; set; } /// - /// Information about the customer who is owner or recipient the credited subscription. + /// Information about the customer who is owner or recipient of the credited subscription. /// [JsonProperty("customer", NullValueHandling = NullValueHandling.Ignore)] public Models.InvoiceCustomer Customer { get; set; } @@ -213,19 +213,19 @@ public CreditNote( public string SubtotalAmount { get; set; } /// - /// Total discount applied to the credit note. Note that this is a positive amount representing the discount amount being credited back to the customer (i.e. a credit on an earlier discount). For example, if the original purchase was $1.00 and the original discount was $0.10, a credit of $0.50 of the original purchase (half) would have a discount credit of $0.05 (also half). + /// Total discount applied to the credit note. Note that this is a positive amount representing the discount amount being credited back to the customer (i.e., a credit on an earlier discount). For example, if the original purchase was $1.00 and the original discount was $0.10, a credit of $0.50 of the original purchase (half) would have a discount credit of $0.05 (also half). /// [JsonProperty("discount_amount", NullValueHandling = NullValueHandling.Ignore)] public string DiscountAmount { get; set; } /// - /// Total tax of the credit note. Note that this is a positive amount representing a previously taxex amount being credited back to the customer (i.e. a credit of an earlier tax). For example, if the original purchase was $1.00 and the original tax was $0.10, a credit of $0.50 of the original purchase (half) would also have a tax credit of $0.05 (also half). + /// Total tax of the credit note. Note that this is a positive amount representing a previously taxed amount being credited back to the customer (i.e., a credit of an earlier tax). For example, if the original purchase was $1.00 and the original tax was $0.10, a credit of $0.50 of the original purchase (half) would also have a tax credit of $0.05 (also half). /// [JsonProperty("tax_amount", NullValueHandling = NullValueHandling.Ignore)] public string TaxAmount { get; set; } /// - /// The credit note total, which is `subtotal_amount - discount_amount + tax_amount`.' + /// The credit note total, which is `subtotal_amount - discount_amount + tax_amount`. /// [JsonProperty("total_amount", NullValueHandling = NullValueHandling.Ignore)] public string TotalAmount { get; set; } @@ -273,7 +273,7 @@ public CreditNote( public List Refunds { get; set; } /// - /// An array of origin invoices for the credit note. Learn more about [Origin Invoice from our docs](https://maxio.zendesk.com/hc/en-us/articles/24252261284749-Credit-Notes-Proration#origin-invoices) + /// An array of origin invoices for the credit note. Learn more about [Origin Invoice from our docs](https://maxio.zendesk.com/hc/en-us/articles/24252261284749-Credit-Notes-Proration#origin-invoices). /// [JsonProperty("origin_invoices", NullValueHandling = NullValueHandling.Ignore)] public List OriginInvoices { get; set; } diff --git a/AdvancedBilling.Standard/Models/CreditNoteLineItem.cs b/AdvancedBilling.Standard/Models/CreditNoteLineItem.cs index c5947c87..24ae47be 100644 --- a/AdvancedBilling.Standard/Models/CreditNoteLineItem.cs +++ b/AdvancedBilling.Standard/Models/CreditNoteLineItem.cs @@ -145,7 +145,7 @@ public CreditNoteLineItem( /// /// The price per unit for the line item. - /// When tiered pricing was used (i.e. not every unit was actually priced at the same price) this will be the blended average cost per unit and the `tiered_unit_price` field will be set to `true`. + /// When tiered pricing was used (i.e., not every unit was actually priced at the same price) this will be the blended average cost per unit and the `tiered_unit_price` field will be set to `true`. /// [JsonProperty("unit_price", NullValueHandling = NullValueHandling.Ignore)] public string UnitPrice { get; set; } diff --git a/AdvancedBilling.Standard/Models/CurrencyOveragePrices.cs b/AdvancedBilling.Standard/Models/CurrencyOveragePrices.cs index 170569a8..0001567d 100644 --- a/AdvancedBilling.Standard/Models/CurrencyOveragePrices.cs +++ b/AdvancedBilling.Standard/Models/CurrencyOveragePrices.cs @@ -157,7 +157,7 @@ public CurrencyOveragePrices( public Models.PricePointType? Type { get; set; } /// - /// Note: Refer to type attribute instead + /// Note: Refer to type attribute instead. /// [JsonProperty("default", NullValueHandling = NullValueHandling.Ignore)] public bool? MDefault { get; set; } @@ -256,7 +256,7 @@ public DateTimeOffset? ArchivedAt public bool? TaxIncluded { get; set; } /// - /// The numerical interval. i.e. an interval of ‘30’ coupled with an interval_unit of day would mean this component price point would renew every 30 days. This property is only available for sites with Multifrequency enabled. + /// The numerical interval. e.g., an interval of ‘30’ coupled with an interval_unit of day would mean this component price point would renew every 30 days. This property is only available for sites with Multifrequency enabled. /// [JsonProperty("interval")] public int? Interval diff --git a/AdvancedBilling.Standard/Models/Customer.cs b/AdvancedBilling.Standard/Models/Customer.cs index 091f9611..bdcd3976 100644 --- a/AdvancedBilling.Standard/Models/Customer.cs +++ b/AdvancedBilling.Standard/Models/Customer.cs @@ -39,6 +39,7 @@ public class Customer : BaseModel private string taxExemptReason; private int? defaultAutoRenewalProfileId; private string maxioid; + private int? brandingThemeId; private Dictionary shouldSerialize = new Dictionary { { "cc_emails", false }, @@ -65,6 +66,7 @@ public class Customer : BaseModel { "tax_exempt_reason", false }, { "default_auto_renewal_profile_id", false }, { "maxioid", false }, + { "branding_theme_id", false }, }; /// @@ -100,6 +102,7 @@ public Customer() /// portal_invite_last_sent_at. /// portal_invite_last_accepted_at. /// tax_exempt. + /// surcharging. /// vat_number. /// parent_id. /// locale. @@ -108,6 +111,7 @@ public Customer() /// tax_exempt_reason. /// default_auto_renewal_profile_id. /// maxioid. + /// branding_theme_id. public Customer( string firstName = null, string lastName = null, @@ -132,6 +136,7 @@ public Customer( DateTimeOffset? portalInviteLastSentAt = null, DateTimeOffset? portalInviteLastAcceptedAt = null, bool? taxExempt = null, + bool? surcharging = null, string vatNumber = null, int? parentId = null, string locale = null, @@ -139,7 +144,8 @@ public Customer( string salesforceId = null, string taxExemptReason = null, int? defaultAutoRenewalProfileId = null, - string maxioid = null) + string maxioid = null, + int? brandingThemeId = null) { this.FirstName = firstName; this.LastName = lastName; @@ -228,6 +234,7 @@ public Customer( this.PortalInviteLastAcceptedAt = portalInviteLastAcceptedAt; } this.TaxExempt = taxExempt; + this.Surcharging = surcharging; if (vatNumber != null) { @@ -268,6 +275,11 @@ public Customer( { this.Maxioid = maxioid; } + + if (brandingThemeId != null) + { + this.BrandingThemeId = brandingThemeId; + } } /// @@ -289,7 +301,7 @@ public Customer( public string Email { get; set; } /// - /// A comma-separated list of emails that should be cc’d on all customer communications (i.e. “joe@example.com, sue@example.com”) + /// “A comma-separated list of emails that should be cc’d on all customer communications (e.g., “joe@example.com, sue@example.com”)” /// [JsonProperty("cc_emails")] public string CcEmails @@ -363,7 +375,7 @@ public string Reference public DateTimeOffset? UpdatedAt { get; set; } /// - /// The customer’s shipping street address (i.e. “123 Main St.”) + /// The customer’s shipping street address (e.g., “123 Main St.”) /// [JsonProperty("address")] public string Address @@ -381,7 +393,7 @@ public string Address } /// - /// Second line of the customer’s shipping address i.e. “Apt. 100” + /// Second line of the customer’s shipping address e.g., “Apt. 100” /// [JsonProperty("address_2")] public string Address2 @@ -399,7 +411,7 @@ public string Address2 } /// - /// The customer’s shipping address city (i.e. “Boston”) + /// The customer’s shipping address city (e.g., “Boston”) /// [JsonProperty("city")] public string City @@ -417,7 +429,7 @@ public string City } /// - /// The customer’s shipping address state (i.e. “MA”) + /// The customer’s shipping address state (e.g., “MA”) /// [JsonProperty("state")] public string State @@ -453,7 +465,7 @@ public string StateName } /// - /// The customer’s shipping address zip code (i.e. “12345”) + /// The customer’s shipping address zip code (e.g., “12345”) /// [JsonProperty("zip")] public string Zip @@ -605,6 +617,12 @@ public DateTimeOffset? PortalInviteLastAcceptedAt [JsonProperty("tax_exempt", NullValueHandling = NullValueHandling.Ignore)] public bool? TaxExempt { get; set; } + /// + /// Whether surcharging is enabled for the customer. Only included on sites where surcharging control is enabled. + /// + [JsonProperty("surcharging", NullValueHandling = NullValueHandling.Ignore)] + public bool? Surcharging { get; set; } + /// /// The VAT business identification number for the customer. This number is used to determine VAT tax opt out rules. It is not validated when added or updated on a customer record. Instead, it is validated via VIES before calculating taxes. Only valid business identification numbers will allow for VAT opt out. /// @@ -749,6 +767,24 @@ public string Maxioid } } + /// + /// The ID of the Branding Theme assigned to this customer as the customer's default Branding Theme. This customer-level Branding Theme is used when a subscription does not have its own subscription-level Branding Theme. Available only when Branding Themes are enabled for the site. + /// + [JsonProperty("branding_theme_id")] + public int? BrandingThemeId + { + get + { + return this.brandingThemeId; + } + + set + { + this.shouldSerialize["branding_theme_id"] = true; + this.brandingThemeId = value; + } + } + /// public override string ToString() { @@ -925,6 +961,13 @@ public void UnsetMaxioid() { this.shouldSerialize["maxioid"] = false; } + /// + /// Marks the field to not be serialized. + /// + public void UnsetBrandingThemeId() + { + this.shouldSerialize["branding_theme_id"] = false; + } /// /// Checks if the field should be serialized or not. @@ -1142,6 +1185,15 @@ public bool ShouldSerializeMaxioid() return this.shouldSerialize["maxioid"]; } + /// + /// Checks if the field should be serialized or not. + /// + /// A boolean weather the field should be serialized or not. + public bool ShouldSerializeBrandingThemeId() + { + return this.shouldSerialize["branding_theme_id"]; + } + /// public override bool Equals(object obj) { @@ -1195,6 +1247,8 @@ public override bool Equals(object obj) this.PortalInviteLastAcceptedAt?.Equals(other.PortalInviteLastAcceptedAt) == true) && (this.TaxExempt == null && other.TaxExempt == null || this.TaxExempt?.Equals(other.TaxExempt) == true) && + (this.Surcharging == null && other.Surcharging == null || + this.Surcharging?.Equals(other.Surcharging) == true) && (this.VatNumber == null && other.VatNumber == null || this.VatNumber?.Equals(other.VatNumber) == true) && (this.ParentId == null && other.ParentId == null || @@ -1211,6 +1265,8 @@ public override bool Equals(object obj) this.DefaultAutoRenewalProfileId?.Equals(other.DefaultAutoRenewalProfileId) == true) && (this.Maxioid == null && other.Maxioid == null || this.Maxioid?.Equals(other.Maxioid) == true) && + (this.BrandingThemeId == null && other.BrandingThemeId == null || + this.BrandingThemeId?.Equals(other.BrandingThemeId) == true) && base.Equals(obj); } @@ -1243,6 +1299,7 @@ public override bool Equals(object obj) toStringOutput.Add($"PortalInviteLastSentAt = {(this.PortalInviteLastSentAt == null ? "null" : this.PortalInviteLastSentAt.ToString())}"); toStringOutput.Add($"PortalInviteLastAcceptedAt = {(this.PortalInviteLastAcceptedAt == null ? "null" : this.PortalInviteLastAcceptedAt.ToString())}"); toStringOutput.Add($"TaxExempt = {(this.TaxExempt == null ? "null" : this.TaxExempt.ToString())}"); + toStringOutput.Add($"Surcharging = {(this.Surcharging == null ? "null" : this.Surcharging.ToString())}"); toStringOutput.Add($"VatNumber = {this.VatNumber ?? "null"}"); toStringOutput.Add($"ParentId = {(this.ParentId == null ? "null" : this.ParentId.ToString())}"); toStringOutput.Add($"Locale = {this.Locale ?? "null"}"); @@ -1251,6 +1308,7 @@ public override bool Equals(object obj) toStringOutput.Add($"TaxExemptReason = {this.TaxExemptReason ?? "null"}"); toStringOutput.Add($"DefaultAutoRenewalProfileId = {(this.DefaultAutoRenewalProfileId == null ? "null" : this.DefaultAutoRenewalProfileId.ToString())}"); toStringOutput.Add($"Maxioid = {this.Maxioid ?? "null"}"); + toStringOutput.Add($"BrandingThemeId = {(this.BrandingThemeId == null ? "null" : this.BrandingThemeId.ToString())}"); base.ToString(toStringOutput); } diff --git a/AdvancedBilling.Standard/Models/CustomerAttributes.cs b/AdvancedBilling.Standard/Models/CustomerAttributes.cs index 511580bb..dc139832 100644 --- a/AdvancedBilling.Standard/Models/CustomerAttributes.cs +++ b/AdvancedBilling.Standard/Models/CustomerAttributes.cs @@ -50,6 +50,7 @@ public CustomerAttributes() /// phone. /// verified. /// tax_exempt. + /// surcharging. /// vat_number. /// metafields. /// parent_id. @@ -71,6 +72,7 @@ public CustomerAttributes( string phone = null, bool? verified = null, bool? taxExempt = null, + bool? surcharging = null, string vatNumber = null, Dictionary metafields = null, int? parentId = null, @@ -96,6 +98,7 @@ public CustomerAttributes( this.Phone = phone; this.Verified = verified; this.TaxExempt = taxExempt; + this.Surcharging = surcharging; this.VatNumber = vatNumber; this.Metafields = metafields; @@ -134,31 +137,31 @@ public CustomerAttributes( public string Email { get; set; } /// - /// A list of emails that should be cc’d on all customer communications. Optional. + /// (Optional) A list of emails that should be cc’d on all customer communications. /// [JsonProperty("cc_emails", NullValueHandling = NullValueHandling.Ignore)] public string CcEmails { get; set; } /// - /// The organization/company of the customer. Optional. + /// (Optional) The organization/company of the customer. /// [JsonProperty("organization", NullValueHandling = NullValueHandling.Ignore)] public string Organization { get; set; } /// - /// A customer “reference”, or unique identifier from your app, stored in Chargify. Can be used so that you may reference your customer’s within Chargify using the same unique value you use in your application. Optional. + /// (Optional) A customer “reference”, or unique identifier from your app, stored in Chargify. Can be used so that you may reference your customer’s within Chargify using the same unique value you use in your application. /// [JsonProperty("reference", NullValueHandling = NullValueHandling.Ignore)] public string Reference { get; set; } /// - /// (Optional) The customer’s shipping street address (i.e. “123 Main St.”). + /// (Optional) The customer’s shipping street address (e.g., “123 Main St.”). /// [JsonProperty("address", NullValueHandling = NullValueHandling.Ignore)] public string Address { get; set; } /// - /// (Optional) Second line of the customer’s shipping address i.e. “Apt. 100” + /// (Optional) Second line of the customer’s shipping address e.g., “Apt. 100” /// [JsonProperty("address_2")] public string Address2 @@ -176,25 +179,25 @@ public string Address2 } /// - /// (Optional) The customer’s shipping address city (i.e. “Boston”). + /// (Optional) The customer’s shipping address city (e.g., “Boston”). /// [JsonProperty("city", NullValueHandling = NullValueHandling.Ignore)] public string City { get; set; } /// - /// (Optional) The customer’s shipping address state (i.e. “MA”). This must conform to the [ISO_3166-1](https://en.wikipedia.org/wiki/ISO_3166-1#Current_codes) in order to be valid for tax locale purposes. + /// “(Optional) The customer’s shipping address state (e.g., “MA”). This must conform to the [ISO_3166-1](https://en.wikipedia.org/wiki/ISO_3166-1#Current_codes) in order to be valid for tax locale purposes.” /// [JsonProperty("state", NullValueHandling = NullValueHandling.Ignore)] public string State { get; set; } /// - /// (Optional) The customer’s shipping address zip code (i.e. “12345”). + /// (Optional) The customer’s shipping address zip code (e.g., “12345”). /// [JsonProperty("zip", NullValueHandling = NullValueHandling.Ignore)] public string Zip { get; set; } /// - /// (Optional) The customer shipping address country, required in [ISO_3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format (i.e. “US”). + /// “(Optional) The customer shipping address country, required in [ISO_3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format (e.g., “US”).” /// [JsonProperty("country", NullValueHandling = NullValueHandling.Ignore)] public string Country { get; set; } @@ -218,7 +221,13 @@ public string Address2 public bool? TaxExempt { get; set; } /// - /// (Optional) Supplying the VAT number allows EU customer’s to opt-out of the Value Added Tax assuming the merchant address and customer billing address are not within the same EU country. It’s important to omit the country code from the VAT number upon entry. Otherwise, taxes will be assessed upon the purchase. + /// (Optional) Whether surcharging is enabled for the customer. Defaults to `true` when omitted. Only applied on sites where surcharging control is enabled. + /// + [JsonProperty("surcharging", NullValueHandling = NullValueHandling.Ignore)] + public bool? Surcharging { get; set; } + + /// + /// (Optional) Supplying the VAT number allows EU customers to opt-out of the Value Added Tax assuming the merchant address and customer billing address are not within the same EU country. It’s important to omit the country code from the VAT number upon entry. Otherwise, taxes will be assessed upon the purchase. /// [JsonProperty("vat_number", NullValueHandling = NullValueHandling.Ignore)] public string VatNumber { get; set; } @@ -393,6 +402,8 @@ public override bool Equals(object obj) this.Verified?.Equals(other.Verified) == true) && (this.TaxExempt == null && other.TaxExempt == null || this.TaxExempt?.Equals(other.TaxExempt) == true) && + (this.Surcharging == null && other.Surcharging == null || + this.Surcharging?.Equals(other.Surcharging) == true) && (this.VatNumber == null && other.VatNumber == null || this.VatNumber?.Equals(other.VatNumber) == true) && (this.Metafields == null && other.Metafields == null || @@ -427,6 +438,7 @@ public override bool Equals(object obj) toStringOutput.Add($"Phone = {this.Phone ?? "null"}"); toStringOutput.Add($"Verified = {(this.Verified == null ? "null" : this.Verified.ToString())}"); toStringOutput.Add($"TaxExempt = {(this.TaxExempt == null ? "null" : this.TaxExempt.ToString())}"); + toStringOutput.Add($"Surcharging = {(this.Surcharging == null ? "null" : this.Surcharging.ToString())}"); toStringOutput.Add($"VatNumber = {this.VatNumber ?? "null"}"); toStringOutput.Add($"Metafields = {(this.Metafields == null ? "null" : this.Metafields.ToString())}"); toStringOutput.Add($"ParentId = {(this.ParentId == null ? "null" : this.ParentId.ToString())}"); diff --git a/AdvancedBilling.Standard/Models/DebitNote.cs b/AdvancedBilling.Standard/Models/DebitNote.cs index 3763e135..e3cf78f2 100644 --- a/AdvancedBilling.Standard/Models/DebitNote.cs +++ b/AdvancedBilling.Standard/Models/DebitNote.cs @@ -123,7 +123,7 @@ public DebitNote( public int? SubscriptionId { get; set; } /// - /// A unique, identifier that appears on the debit note and in places it is referenced. + /// A unique identifier that appears on the debit note and in places it is referenced. /// [JsonProperty("number", NullValueHandling = NullValueHandling.Ignore)] public int? Number { get; set; } @@ -142,7 +142,7 @@ public DebitNote( public string OriginCreditNoteUid { get; set; } /// - /// A unique, identifying string of the connected credit note. + /// A unique identifying string of the connected credit note. /// [JsonProperty("origin_credit_note_number", NullValueHandling = NullValueHandling.Ignore)] public string OriginCreditNoteNumber { get; set; } @@ -201,7 +201,7 @@ public DebitNote( public Models.InvoiceSeller Seller { get; set; } /// - /// Information about the customer who is owner or recipient the debited subscription. + /// Information about the customer who is the owner or recipient of the debited subscription. /// [JsonProperty("customer", NullValueHandling = NullValueHandling.Ignore)] public Models.InvoiceCustomer Customer { get; set; } diff --git a/AdvancedBilling.Standard/Models/EBBComponent.cs b/AdvancedBilling.Standard/Models/EBBComponent.cs index 483c28b0..9903638b 100644 --- a/AdvancedBilling.Standard/Models/EBBComponent.cs +++ b/AdvancedBilling.Standard/Models/EBBComponent.cs @@ -15,9 +15,11 @@ namespace AdvancedBilling.Standard.Models public class EBBComponent : BaseModel { private Models.IntervalUnit? intervalUnit; + private string unspscCode; private Dictionary shouldSerialize = new Dictionary { { "interval_unit", false }, + { "unspsc_code", false }, }; /// @@ -44,6 +46,7 @@ public EBBComponent() /// hide_date_range_on_invoice. /// interval. /// interval_unit. + /// unspsc_code. public EBBComponent( string name, string unitName, @@ -58,7 +61,8 @@ public EBBComponent( string taxCode = null, bool? hideDateRangeOnInvoice = null, int? interval = null, - Models.IntervalUnit? intervalUnit = null) + Models.IntervalUnit? intervalUnit = null, + string unspscCode = null) { this.Name = name; this.UnitName = unitName; @@ -78,16 +82,21 @@ public EBBComponent( { this.IntervalUnit = intervalUnit; } + + if (unspscCode != null) + { + this.UnspscCode = unspscCode; + } } /// - /// A name for this component that is suitable for showing customers and displaying on billing statements, ie. "Minutes". + /// A name for this component that is suitable for showing customers and displaying on billing statements, i.e., "Minutes". /// [JsonProperty("name")] public string Name { get; set; } /// - /// The name of the unit of measurement for the component. It should be singular since it will be automatically pluralized when necessary. i.e. “message”, which may then be shown as “5 messages” on a subscription’s component line-item + /// “The name of the unit of measurement for the component. It should be singular since it will be automatically pluralized when necessary. i.e., “message”, which may then be shown as “5 messages” on a subscription’s component line-item” /// [JsonProperty("unit_name")] public string UnitName { get; set; } @@ -99,7 +108,7 @@ public EBBComponent( public string Description { get; set; } /// - /// A unique identifier for your use that can be used to retrieve this component is subsequent requests. Must start with a letter or number and may only contain lowercase letters, numbers, or the characters '.', ':', '-', or '_'. + /// A unique identifier for your use that can be used to retrieve this component in subsequent requests. Must start with a letter or number and may only contain lowercase letters, numbers, or the characters '.', ':', '-', or '_'. /// [JsonProperty("handle", NullValueHandling = NullValueHandling.Ignore)] public string Handle { get; set; } @@ -129,7 +138,7 @@ public EBBComponent( public List PricePoints { get; set; } /// - /// The amount the customer will be charged per unit when the pricing scheme is “per_unit”. The price can contain up to 8 decimal places. i.e. 1.00 or 0.0012 or 0.00000065 + /// The amount the customer will be charged per unit when the pricing scheme is “per_unit”. The price can contain up to 8 decimal places. i.e., 1.00 or 0.0012 or 0.00000065 /// [JsonProperty("unit_price", NullValueHandling = NullValueHandling.Ignore)] public EBBComponentUnitPrice UnitPrice { get; set; } @@ -153,7 +162,7 @@ public EBBComponent( public int EventBasedBillingMetricId { get; set; } /// - /// The numerical interval. i.e. an interval of ‘30’ coupled with an interval_unit of day would mean this component's default price point would renew every 30 days. This property is only available for sites with Multifrequency enabled. + /// The numerical interval. i.e., an interval of ‘30’ coupled with an interval_unit of day would mean this component's default price point would renew every 30 days. This property is only available for sites with Multifrequency enabled. /// [JsonProperty("interval", NullValueHandling = NullValueHandling.Ignore)] public int? Interval { get; set; } @@ -176,6 +185,24 @@ public Models.IntervalUnit? IntervalUnit } } + /// + /// (Optional) Custom UNSPSC commodity code for Level 3/CEDP payment data. When set, this value is sent as the commodity code on invoice line items for this component instead of the default derived from item_category. + /// + [JsonProperty("unspsc_code")] + public string UnspscCode + { + get + { + return this.unspscCode; + } + + set + { + this.shouldSerialize["unspsc_code"] = true; + this.unspscCode = value; + } + } + /// public override string ToString() { @@ -191,6 +218,13 @@ public void UnsetIntervalUnit() { this.shouldSerialize["interval_unit"] = false; } + /// + /// Marks the field to not be serialized. + /// + public void UnsetUnspscCode() + { + this.shouldSerialize["unspsc_code"] = false; + } /// /// Checks if the field should be serialized or not. @@ -201,6 +235,15 @@ 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 ShouldSerializeUnspscCode() + { + return this.shouldSerialize["unspsc_code"]; + } + /// public override bool Equals(object obj) { @@ -234,6 +277,8 @@ public override bool Equals(object obj) this.Interval?.Equals(other.Interval) == true) && (this.IntervalUnit == null && other.IntervalUnit == null || this.IntervalUnit?.Equals(other.IntervalUnit) == true) && + (this.UnspscCode == null && other.UnspscCode == null || + this.UnspscCode?.Equals(other.UnspscCode) == true) && base.Equals(obj); } @@ -257,6 +302,7 @@ public override bool Equals(object obj) toStringOutput.Add($"EventBasedBillingMetricId = {this.EventBasedBillingMetricId}"); toStringOutput.Add($"Interval = {(this.Interval == null ? "null" : this.Interval.ToString())}"); toStringOutput.Add($"IntervalUnit = {(this.IntervalUnit == null ? "null" : this.IntervalUnit.ToString())}"); + toStringOutput.Add($"UnspscCode = {this.UnspscCode ?? "null"}"); base.ToString(toStringOutput); } diff --git a/AdvancedBilling.Standard/Models/Event.cs b/AdvancedBilling.Standard/Models/Event.cs index b3254a8d..bdf1398d 100644 --- a/AdvancedBilling.Standard/Models/Event.cs +++ b/AdvancedBilling.Standard/Models/Event.cs @@ -90,7 +90,7 @@ public Event( /// /// The schema varies based on the event key. The key-to-event data mapping is as follows: - /// * `subscription_product_change` - SubscriptionProductChange + /// * `subscription_product_change`, `subscription_product_change_scheduled` - SubscriptionProductChange /// * `subscription_state_change` - SubscriptionStateChange /// * `signup_success`, `delayed_signup_creation_success`, `payment_success`, `payment_failure`, `renewal_success`, `renewal_failure`, `chargeback_lost`, `chargeback_accepted`, `chargeback_closed` - PaymentRelatedEvents /// * `refund_success` - RefundSuccess diff --git a/AdvancedBilling.Standard/Models/EventKey.cs b/AdvancedBilling.Standard/Models/EventKey.cs index 9ea46cf5..6f325dd7 100644 --- a/AdvancedBilling.Standard/Models/EventKey.cs +++ b/AdvancedBilling.Standard/Models/EventKey.cs @@ -88,6 +88,12 @@ public enum EventKey [EnumMember(Value = "subscription_product_change")] SubscriptionProductChange, + /// + /// SubscriptionProductChangeScheduled. + /// + [EnumMember(Value = "subscription_product_change_scheduled")] + SubscriptionProductChangeScheduled, + /// /// PendingCancellationChange. /// diff --git a/AdvancedBilling.Standard/Models/GetOneTimeTokenBankAccountPaymentProfile.cs b/AdvancedBilling.Standard/Models/GetOneTimeTokenBankAccountPaymentProfile.cs new file mode 100644 index 00000000..80400c2a --- /dev/null +++ b/AdvancedBilling.Standard/Models/GetOneTimeTokenBankAccountPaymentProfile.cs @@ -0,0 +1,539 @@ +// +// AdvancedBilling.Standard +// +// This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). +// +using APIMatic.Core.Utilities.Converters; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace AdvancedBilling.Standard.Models +{ + /// + /// GetOneTimeTokenBankAccountPaymentProfile. + /// + public class GetOneTimeTokenBankAccountPaymentProfile : BaseModel + { + private string id; + private string customerId; + private string customerVaultToken; + private string gatewayHandle; + private bool? verified; + private Dictionary shouldSerialize = new Dictionary + { + { "id", false }, + { "customer_id", false }, + { "customer_vault_token", false }, + { "gateway_handle", false }, + { "verified", false }, + }; + + /// + /// Initializes a new instance of the class. + /// + public GetOneTimeTokenBankAccountPaymentProfile() + { + } + + /// + /// Initializes a new instance of the class. + /// + /// first_name. + /// last_name. + /// current_vault. + /// vault_token. + /// billing_address. + /// billing_city. + /// billing_country. + /// billing_state. + /// billing_zip. + /// bank_name. + /// masked_bank_routing_number. + /// masked_bank_account_number. + /// bank_account_type. + /// bank_account_holder_type. + /// payment_type. + /// disabled. + /// site_gateway_setting_id. + /// id. + /// customer_id. + /// billing_address_2. + /// customer_vault_token. + /// gateway_handle. + /// verified. + public GetOneTimeTokenBankAccountPaymentProfile( + string firstName, + string lastName, + Models.BankAccountVault currentVault, + string vaultToken, + string billingAddress, + string billingCity, + string billingCountry, + string billingState, + string billingZip, + string bankName, + string maskedBankRoutingNumber, + string maskedBankAccountNumber, + Models.BankAccountType bankAccountType, + Models.BankAccountHolderType bankAccountHolderType, + string paymentType, + bool disabled, + int siteGatewaySettingId, + string id = null, + string customerId = null, + string billingAddress2 = null, + string customerVaultToken = null, + string gatewayHandle = null, + bool? verified = null) + { + + if (id != null) + { + this.Id = id; + } + this.FirstName = firstName; + this.LastName = lastName; + + if (customerId != null) + { + this.CustomerId = customerId; + } + this.CurrentVault = currentVault; + this.VaultToken = vaultToken; + this.BillingAddress = billingAddress; + this.BillingAddress2 = billingAddress2; + this.BillingCity = billingCity; + this.BillingCountry = billingCountry; + this.BillingState = billingState; + this.BillingZip = billingZip; + this.BankName = bankName; + this.MaskedBankRoutingNumber = maskedBankRoutingNumber; + this.MaskedBankAccountNumber = maskedBankAccountNumber; + this.BankAccountType = bankAccountType; + this.BankAccountHolderType = bankAccountHolderType; + this.PaymentType = paymentType; + this.Disabled = disabled; + this.SiteGatewaySettingId = siteGatewaySettingId; + + if (customerVaultToken != null) + { + this.CustomerVaultToken = customerVaultToken; + } + + if (gatewayHandle != null) + { + this.GatewayHandle = gatewayHandle; + } + + if (verified != null) + { + this.Verified = verified; + } + } + + /// + /// Gets or sets Id. + /// + [JsonConverter(typeof(JsonStringConverter))] + [JsonProperty("id")] + public string Id + { + get + { + return this.id; + } + + set + { + this.shouldSerialize["id"] = true; + this.id = value; + } + } + + /// + /// Gets or sets FirstName. + /// + [JsonConverter(typeof(JsonStringConverter), true)] + [JsonProperty("first_name")] + [JsonRequired] + public string FirstName { get; set; } + + /// + /// Gets or sets LastName. + /// + [JsonConverter(typeof(JsonStringConverter), true)] + [JsonProperty("last_name")] + [JsonRequired] + public string LastName { get; set; } + + /// + /// Gets or sets CustomerId. + /// + [JsonConverter(typeof(JsonStringConverter))] + [JsonProperty("customer_id")] + public string CustomerId + { + get + { + return this.customerId; + } + + set + { + this.shouldSerialize["customer_id"] = true; + this.customerId = value; + } + } + + /// + /// The vault that stores the payment profile with the provided vault_token. Use `bogus` for testing. + /// + [JsonProperty("current_vault")] + [JsonRequired] + public Models.BankAccountVault CurrentVault { get; set; } + + /// + /// Gets or sets VaultToken. + /// + [JsonConverter(typeof(JsonStringConverter), true)] + [JsonProperty("vault_token")] + [JsonRequired] + public string VaultToken { get; set; } + + /// + /// Gets or sets BillingAddress. + /// + [JsonConverter(typeof(JsonStringConverter), true)] + [JsonProperty("billing_address")] + [JsonRequired] + public string BillingAddress { get; set; } + + /// + /// Gets or sets BillingAddress2. + /// + [JsonConverter(typeof(JsonStringConverter))] + [JsonProperty("billing_address_2", NullValueHandling = NullValueHandling.Ignore)] + public string BillingAddress2 { get; set; } + + /// + /// Gets or sets BillingCity. + /// + [JsonConverter(typeof(JsonStringConverter), true)] + [JsonProperty("billing_city")] + [JsonRequired] + public string BillingCity { get; set; } + + /// + /// Gets or sets BillingCountry. + /// + [JsonConverter(typeof(JsonStringConverter), true)] + [JsonProperty("billing_country")] + [JsonRequired] + public string BillingCountry { get; set; } + + /// + /// Gets or sets BillingState. + /// + [JsonConverter(typeof(JsonStringConverter), true)] + [JsonProperty("billing_state")] + [JsonRequired] + public string BillingState { get; set; } + + /// + /// Gets or sets BillingZip. + /// + [JsonConverter(typeof(JsonStringConverter), true)] + [JsonProperty("billing_zip")] + [JsonRequired] + public string BillingZip { get; set; } + + /// + /// Gets or sets BankName. + /// + [JsonConverter(typeof(JsonStringConverter), true)] + [JsonProperty("bank_name")] + [JsonRequired] + public string BankName { get; set; } + + /// + /// Gets or sets MaskedBankRoutingNumber. + /// + [JsonConverter(typeof(JsonStringConverter), true)] + [JsonProperty("masked_bank_routing_number")] + [JsonRequired] + public string MaskedBankRoutingNumber { get; set; } + + /// + /// Gets or sets MaskedBankAccountNumber. + /// + [JsonConverter(typeof(JsonStringConverter), true)] + [JsonProperty("masked_bank_account_number")] + [JsonRequired] + public string MaskedBankAccountNumber { get; set; } + + /// + /// Defaults to checking + /// + [JsonProperty("bank_account_type")] + [JsonRequired] + public Models.BankAccountType BankAccountType { get; set; } + + /// + /// Defaults to personal + /// + [JsonProperty("bank_account_holder_type")] + [JsonRequired] + public Models.BankAccountHolderType BankAccountHolderType { get; set; } + + /// + /// Gets or sets PaymentType. + /// + [JsonConverter(typeof(JsonStringConverter), true)] + [JsonProperty("payment_type")] + [JsonRequired] + public string PaymentType { get; set; } + + /// + /// Gets or sets Disabled. + /// + [JsonProperty("disabled")] + [JsonRequired] + public bool Disabled { get; set; } + + /// + /// Gets or sets SiteGatewaySettingId. + /// + [JsonProperty("site_gateway_setting_id")] + [JsonRequired] + public int SiteGatewaySettingId { get; set; } + + /// + /// Gets or sets CustomerVaultToken. + /// + [JsonConverter(typeof(JsonStringConverter))] + [JsonProperty("customer_vault_token")] + public string CustomerVaultToken + { + get + { + return this.customerVaultToken; + } + + set + { + this.shouldSerialize["customer_vault_token"] = true; + this.customerVaultToken = value; + } + } + + /// + /// Gets or sets GatewayHandle. + /// + [JsonConverter(typeof(JsonStringConverter))] + [JsonProperty("gateway_handle")] + public string GatewayHandle + { + get + { + return this.gatewayHandle; + } + + set + { + this.shouldSerialize["gateway_handle"] = true; + this.gatewayHandle = value; + } + } + + /// + /// Gets or sets Verified. + /// + [JsonProperty("verified")] + public bool? Verified + { + get + { + return this.verified; + } + + set + { + this.shouldSerialize["verified"] = true; + this.verified = value; + } + } + + /// + public override string ToString() + { + var toStringOutput = new List(); + this.ToString(toStringOutput); + return $"GetOneTimeTokenBankAccountPaymentProfile : ({string.Join(", ", toStringOutput)})"; + } + + /// + /// Marks the field to not be serialized. + /// + public void UnsetId() + { + this.shouldSerialize["id"] = false; + } + /// + /// Marks the field to not be serialized. + /// + public void UnsetCustomerId() + { + this.shouldSerialize["customer_id"] = false; + } + /// + /// Marks the field to not be serialized. + /// + public void UnsetCustomerVaultToken() + { + this.shouldSerialize["customer_vault_token"] = false; + } + /// + /// Marks the field to not be serialized. + /// + public void UnsetGatewayHandle() + { + this.shouldSerialize["gateway_handle"] = false; + } + /// + /// Marks the field to not be serialized. + /// + public void UnsetVerified() + { + this.shouldSerialize["verified"] = false; + } + + /// + /// Checks if the field should be serialized or not. + /// + /// A boolean weather the field should be serialized or not. + public bool ShouldSerializeId() + { + return this.shouldSerialize["id"]; + } + + /// + /// Checks if the field should be serialized or not. + /// + /// A boolean weather the field should be serialized or not. + public bool ShouldSerializeCustomerId() + { + return this.shouldSerialize["customer_id"]; + } + + /// + /// Checks if the field should be serialized or not. + /// + /// A boolean weather the field should be serialized or not. + public bool ShouldSerializeCustomerVaultToken() + { + return this.shouldSerialize["customer_vault_token"]; + } + + /// + /// Checks if the field should be serialized or not. + /// + /// A boolean weather the field should be serialized or not. + public bool ShouldSerializeGatewayHandle() + { + return this.shouldSerialize["gateway_handle"]; + } + + /// + /// Checks if the field should be serialized or not. + /// + /// A boolean weather the field should be serialized or not. + public bool ShouldSerializeVerified() + { + return this.shouldSerialize["verified"]; + } + + /// + public override bool Equals(object obj) + { + if (obj is null) return false; + if (ReferenceEquals(this, obj)) return true; + + return obj is GetOneTimeTokenBankAccountPaymentProfile other && + (this.Id == null && other.Id == null || + this.Id?.Equals(other.Id) == true) && + (this.FirstName == null && other.FirstName == null || + this.FirstName?.Equals(other.FirstName) == true) && + (this.LastName == null && other.LastName == null || + this.LastName?.Equals(other.LastName) == true) && + (this.CustomerId == null && other.CustomerId == null || + this.CustomerId?.Equals(other.CustomerId) == true) && + (this.CurrentVault.Equals(other.CurrentVault)) && + (this.VaultToken == null && other.VaultToken == null || + this.VaultToken?.Equals(other.VaultToken) == true) && + (this.BillingAddress == null && other.BillingAddress == null || + this.BillingAddress?.Equals(other.BillingAddress) == true) && + (this.BillingAddress2 == null && other.BillingAddress2 == null || + this.BillingAddress2?.Equals(other.BillingAddress2) == true) && + (this.BillingCity == null && other.BillingCity == null || + this.BillingCity?.Equals(other.BillingCity) == true) && + (this.BillingCountry == null && other.BillingCountry == null || + this.BillingCountry?.Equals(other.BillingCountry) == true) && + (this.BillingState == null && other.BillingState == null || + this.BillingState?.Equals(other.BillingState) == true) && + (this.BillingZip == null && other.BillingZip == null || + this.BillingZip?.Equals(other.BillingZip) == true) && + (this.BankName == null && other.BankName == null || + this.BankName?.Equals(other.BankName) == true) && + (this.MaskedBankRoutingNumber == null && other.MaskedBankRoutingNumber == null || + this.MaskedBankRoutingNumber?.Equals(other.MaskedBankRoutingNumber) == true) && + (this.MaskedBankAccountNumber == null && other.MaskedBankAccountNumber == null || + this.MaskedBankAccountNumber?.Equals(other.MaskedBankAccountNumber) == true) && + (this.BankAccountType.Equals(other.BankAccountType)) && + (this.BankAccountHolderType.Equals(other.BankAccountHolderType)) && + (this.PaymentType == null && other.PaymentType == null || + this.PaymentType?.Equals(other.PaymentType) == true) && + (this.Disabled.Equals(other.Disabled)) && + (this.SiteGatewaySettingId.Equals(other.SiteGatewaySettingId)) && + (this.CustomerVaultToken == null && other.CustomerVaultToken == null || + this.CustomerVaultToken?.Equals(other.CustomerVaultToken) == true) && + (this.GatewayHandle == null && other.GatewayHandle == null || + this.GatewayHandle?.Equals(other.GatewayHandle) == true) && + (this.Verified == null && other.Verified == null || + this.Verified?.Equals(other.Verified) == true) && + base.Equals(obj); + } + + /// + /// ToString overload. + /// + /// List of strings. + protected new void ToString(List toStringOutput) + { + toStringOutput.Add($"Id = {this.Id ?? "null"}"); + toStringOutput.Add($"FirstName = {this.FirstName ?? "null"}"); + toStringOutput.Add($"LastName = {this.LastName ?? "null"}"); + toStringOutput.Add($"CustomerId = {this.CustomerId ?? "null"}"); + toStringOutput.Add($"CurrentVault = {this.CurrentVault}"); + toStringOutput.Add($"VaultToken = {this.VaultToken ?? "null"}"); + toStringOutput.Add($"BillingAddress = {this.BillingAddress ?? "null"}"); + toStringOutput.Add($"BillingAddress2 = {this.BillingAddress2 ?? "null"}"); + toStringOutput.Add($"BillingCity = {this.BillingCity ?? "null"}"); + toStringOutput.Add($"BillingCountry = {this.BillingCountry ?? "null"}"); + toStringOutput.Add($"BillingState = {this.BillingState ?? "null"}"); + toStringOutput.Add($"BillingZip = {this.BillingZip ?? "null"}"); + toStringOutput.Add($"BankName = {this.BankName ?? "null"}"); + toStringOutput.Add($"MaskedBankRoutingNumber = {this.MaskedBankRoutingNumber ?? "null"}"); + toStringOutput.Add($"MaskedBankAccountNumber = {this.MaskedBankAccountNumber ?? "null"}"); + toStringOutput.Add($"BankAccountType = {this.BankAccountType}"); + toStringOutput.Add($"BankAccountHolderType = {this.BankAccountHolderType}"); + toStringOutput.Add($"PaymentType = {this.PaymentType ?? "null"}"); + toStringOutput.Add($"Disabled = {this.Disabled}"); + toStringOutput.Add($"SiteGatewaySettingId = {this.SiteGatewaySettingId}"); + toStringOutput.Add($"CustomerVaultToken = {this.CustomerVaultToken ?? "null"}"); + toStringOutput.Add($"GatewayHandle = {this.GatewayHandle ?? "null"}"); + toStringOutput.Add($"Verified = {(this.Verified == null ? "null" : this.Verified.ToString())}"); + + base.ToString(toStringOutput); + } + } +} \ No newline at end of file diff --git a/AdvancedBilling.Standard/Models/GetOneTimeTokenPaymentProfile.cs b/AdvancedBilling.Standard/Models/GetOneTimeTokenPaymentProfile.cs index 269ac2c6..ce431abc 100644 --- a/AdvancedBilling.Standard/Models/GetOneTimeTokenPaymentProfile.cs +++ b/AdvancedBilling.Standard/Models/GetOneTimeTokenPaymentProfile.cs @@ -3,6 +3,7 @@ // // This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). // +using APIMatic.Core.Utilities.Converters; using Newtonsoft.Json; using System.Collections.Generic; @@ -121,6 +122,7 @@ public GetOneTimeTokenPaymentProfile( /// /// Gets or sets Id. /// + [JsonConverter(typeof(JsonStringConverter))] [JsonProperty("id")] public string Id { @@ -139,42 +141,52 @@ public string Id /// /// Gets or sets FirstName. /// + [JsonConverter(typeof(JsonStringConverter), true)] [JsonProperty("first_name")] + [JsonRequired] public string FirstName { get; set; } /// /// Gets or sets LastName. /// + [JsonConverter(typeof(JsonStringConverter), true)] [JsonProperty("last_name")] + [JsonRequired] public string LastName { get; set; } /// /// Gets or sets MaskedCardNumber. /// + [JsonConverter(typeof(JsonStringConverter), true)] [JsonProperty("masked_card_number")] + [JsonRequired] public string MaskedCardNumber { get; set; } /// /// The type of card used. /// [JsonProperty("card_type")] + [JsonRequired] public Models.CardType CardType { get; set; } /// /// Gets or sets ExpirationMonth. /// [JsonProperty("expiration_month")] + [JsonRequired] public double ExpirationMonth { get; set; } /// /// Gets or sets ExpirationYear. /// [JsonProperty("expiration_year")] + [JsonRequired] public double ExpirationYear { get; set; } /// /// Gets or sets CustomerId. /// + [JsonConverter(typeof(JsonStringConverter))] [JsonProperty("customer_id")] public string CustomerId { @@ -194,71 +206,90 @@ public string CustomerId /// The vault that stores the payment profile with the provided `vault_token`. Use `bogus` for testing. /// [JsonProperty("current_vault")] + [JsonRequired] public Models.CreditCardVault CurrentVault { get; set; } /// /// Gets or sets VaultToken. /// + [JsonConverter(typeof(JsonStringConverter), true)] [JsonProperty("vault_token")] + [JsonRequired] public string VaultToken { get; set; } /// /// Gets or sets BillingAddress. /// + [JsonConverter(typeof(JsonStringConverter), true)] [JsonProperty("billing_address")] + [JsonRequired] public string BillingAddress { get; set; } /// /// Gets or sets BillingAddress2. /// + [JsonConverter(typeof(JsonStringConverter))] [JsonProperty("billing_address_2", NullValueHandling = NullValueHandling.Ignore)] public string BillingAddress2 { get; set; } /// /// Gets or sets BillingCity. /// + [JsonConverter(typeof(JsonStringConverter), true)] [JsonProperty("billing_city")] + [JsonRequired] public string BillingCity { get; set; } /// /// Gets or sets BillingCountry. /// + [JsonConverter(typeof(JsonStringConverter), true)] [JsonProperty("billing_country")] + [JsonRequired] public string BillingCountry { get; set; } /// /// Gets or sets BillingState. /// + [JsonConverter(typeof(JsonStringConverter), true)] [JsonProperty("billing_state")] + [JsonRequired] public string BillingState { get; set; } /// /// Gets or sets BillingZip. /// + [JsonConverter(typeof(JsonStringConverter), true)] [JsonProperty("billing_zip")] + [JsonRequired] public string BillingZip { get; set; } /// /// Gets or sets PaymentType. /// + [JsonConverter(typeof(JsonStringConverter), true)] [JsonProperty("payment_type")] + [JsonRequired] public string PaymentType { get; set; } /// /// Gets or sets Disabled. /// [JsonProperty("disabled")] + [JsonRequired] public bool Disabled { get; set; } /// /// Gets or sets SiteGatewaySettingId. /// [JsonProperty("site_gateway_setting_id")] + [JsonRequired] public int SiteGatewaySettingId { get; set; } /// /// Gets or sets CustomerVaultToken. /// + [JsonConverter(typeof(JsonStringConverter))] [JsonProperty("customer_vault_token")] public string CustomerVaultToken { @@ -277,6 +308,7 @@ public string CustomerVaultToken /// /// Gets or sets GatewayHandle. /// + [JsonConverter(typeof(JsonStringConverter))] [JsonProperty("gateway_handle")] public string GatewayHandle { diff --git a/AdvancedBilling.Standard/Models/GetOneTimeTokenRequest.cs b/AdvancedBilling.Standard/Models/GetOneTimeTokenRequest.cs index 5bff8b08..1d96619c 100644 --- a/AdvancedBilling.Standard/Models/GetOneTimeTokenRequest.cs +++ b/AdvancedBilling.Standard/Models/GetOneTimeTokenRequest.cs @@ -3,6 +3,7 @@ // // This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). // +using AdvancedBilling.Standard.Models.Containers; using Newtonsoft.Json; using System.Collections.Generic; @@ -25,7 +26,7 @@ public GetOneTimeTokenRequest() /// /// payment_profile. public GetOneTimeTokenRequest( - Models.GetOneTimeTokenPaymentProfile paymentProfile) + GetOneTimeTokenRequestPaymentProfile paymentProfile) { this.PaymentProfile = paymentProfile; } @@ -34,7 +35,7 @@ public GetOneTimeTokenRequest( /// Gets or sets PaymentProfile. /// [JsonProperty("payment_profile")] - public Models.GetOneTimeTokenPaymentProfile PaymentProfile { get; set; } + public GetOneTimeTokenRequestPaymentProfile PaymentProfile { get; set; } /// public override string ToString() diff --git a/AdvancedBilling.Standard/Models/GroupSettings.cs b/AdvancedBilling.Standard/Models/GroupSettings.cs index 18c5eed1..4028eda1 100644 --- a/AdvancedBilling.Standard/Models/GroupSettings.cs +++ b/AdvancedBilling.Standard/Models/GroupSettings.cs @@ -40,7 +40,7 @@ public GroupSettings( public Models.GroupTarget Target { get; set; } /// - /// Optional attributes related to billing date and accrual. Note: Only applicable for new subscriptions. + /// (Optional) Attributes related to billing date and accrual. Note: Only applicable for new subscriptions. /// [JsonProperty("billing", NullValueHandling = NullValueHandling.Ignore)] public Models.GroupBilling Billing { get; set; } diff --git a/AdvancedBilling.Standard/Models/GroupStatus.cs b/AdvancedBilling.Standard/Models/GroupStatus.cs new file mode 100644 index 00000000..89bb024c --- /dev/null +++ b/AdvancedBilling.Standard/Models/GroupStatus.cs @@ -0,0 +1,31 @@ +// +// AdvancedBilling.Standard +// +// This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). +// +using APIMatic.Core.Utilities.Converters; +using Newtonsoft.Json; +using System.Runtime.Serialization; + +namespace AdvancedBilling.Standard.Models +{ + /// + /// GroupStatus. + /// + + [JsonConverter(typeof(StringEnumConverter))] + public enum GroupStatus + { + /// + /// Ungrouped. + /// + [EnumMember(Value = "ungrouped")] + Ungrouped, + + /// + /// Grouped. + /// + [EnumMember(Value = "grouped")] + Grouped + } +} \ No newline at end of file diff --git a/AdvancedBilling.Standard/Models/GroupTarget.cs b/AdvancedBilling.Standard/Models/GroupTarget.cs index b57c0d00..f578cd5c 100644 --- a/AdvancedBilling.Standard/Models/GroupTarget.cs +++ b/AdvancedBilling.Standard/Models/GroupTarget.cs @@ -40,7 +40,7 @@ public GroupTarget( public Models.GroupTargetType Type { get; set; } /// - /// The id of the target customer or subscription to group the existing subscription with. Ignored and should not be included if type is "self" , "parent", or "eldest" + /// The id of the target customer or subscription to group the existing subscription with. Ignored and should not be included if type is "self", "parent", or "eldest". /// [JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)] public int? Id { get; set; } diff --git a/AdvancedBilling.Standard/Models/Invoice.cs b/AdvancedBilling.Standard/Models/Invoice.cs index 2d5924ce..8bf14ad0 100644 --- a/AdvancedBilling.Standard/Models/Invoice.cs +++ b/AdvancedBilling.Standard/Models/Invoice.cs @@ -22,6 +22,7 @@ public class Invoice : BaseModel private int? subscriptionGroupId; private int? parentInvoiceNumber; private int? groupPrimarySubscriptionId; + private int? brandingThemeId; private Dictionary shouldSerialize = new Dictionary { { "paid_date", false }, @@ -30,6 +31,7 @@ public class Invoice : BaseModel { "subscription_group_id", false }, { "parent_invoice_number", false }, { "group_primary_subscription_id", false }, + { "branding_theme_id", false }, }; /// @@ -98,6 +100,7 @@ public Invoice() /// public_url. /// previous_balance_data. /// public_url_expires_on. + /// branding_theme_id. public Invoice( long? id = null, string uid = null, @@ -154,7 +157,8 @@ public Invoice( Models.InvoiceAvataxDetails avataxDetails = null, string publicUrl = null, Models.InvoicePreviousBalance previousBalanceData = null, - DateTime? publicUrlExpiresOn = null) + DateTime? publicUrlExpiresOn = null, + int? brandingThemeId = null) { this.Id = id; this.Uid = uid; @@ -236,6 +240,11 @@ public Invoice( this.PublicUrl = publicUrl; this.PreviousBalanceData = previousBalanceData; this.PublicUrlExpiresOn = publicUrlExpiresOn; + + if (brandingThemeId != null) + { + this.BrandingThemeId = brandingThemeId; + } } /// @@ -276,7 +285,7 @@ public Invoice( public string Number { get; set; } /// - /// A monotonically increasing number assigned to invoices as they are created. This number is unique within a site and can be used to sort and order invoices. + /// A monotonically increasing number assigned to invoices as they are created. This number is unique within a site and can be used to sort and order invoices. /// [JsonProperty("sequence_number", NullValueHandling = NullValueHandling.Ignore)] public int? SequenceNumber { get; set; } @@ -303,7 +312,7 @@ public Invoice( public DateTimeOffset? UpdatedAt { get; set; } /// - /// Date the invoice was issued to the customer. This is the date that the invoice was made available for payment. + /// Date the invoice was issued to the customer. This is the date that the invoice was made available for payment. /// The format is `"YYYY-MM-DD"`. /// [JsonConverter(typeof(CustomDateTimeConverter), "yyyy'-'MM'-'dd")] @@ -388,7 +397,7 @@ public int? ParentInvoiceId public string Currency { get; set; } /// - /// Consolidation level of the invoice, which is applicable to invoice consolidation. It will hold one of the following values: + /// Consolidation level of the invoice, which is applicable to invoice consolidation. It will hold one of the following values: /// * "none": A normal invoice with no consolidation. /// * "child": An invoice segment which has been combined into a consolidated invoice. /// * "parent": A consolidated invoice, whose contents are composed of invoice segments. @@ -489,7 +498,7 @@ public int? GroupPrimarySubscriptionId public Models.InvoiceSeller Seller { get; set; } /// - /// Information about the customer who is owner or recipient the invoiced subscription. + /// Information about the customer who is owner or recipient of the invoiced subscription. /// [JsonProperty("customer", NullValueHandling = NullValueHandling.Ignore)] public Models.InvoiceCustomer Customer { get; set; } @@ -513,7 +522,7 @@ public int? GroupPrimarySubscriptionId public int? NetTerms { get; set; } /// - /// The memo printed on invoices of any collection type. This message is in control of the merchant. + /// The memo printed on invoices of any collection type. This message is in control of the merchant. /// [JsonProperty("memo", NullValueHandling = NullValueHandling.Ignore)] public string Memo { get; set; } @@ -549,7 +558,7 @@ public int? GroupPrimarySubscriptionId public string TaxAmount { get; set; } /// - /// The invoice total, which is `subtotal_amount - discount_amount + tax_amount`.' + /// The invoice total, which is `subtotal_amount - discount_amount + tax_amount`. /// [JsonProperty("total_amount", NullValueHandling = NullValueHandling.Ignore)] public string TotalAmount { get; set; } @@ -664,6 +673,24 @@ public int? GroupPrimarySubscriptionId [JsonProperty("public_url_expires_on", NullValueHandling = NullValueHandling.Ignore)] public DateTime? PublicUrlExpiresOn { get; set; } + /// + /// The ID of the Branding Theme associated with this invoice. This value represents the Branding Theme used for invoice theming, such as themed invoice rendering. Available only when Branding Themes are enabled for the site. + /// + [JsonProperty("branding_theme_id")] + public int? BrandingThemeId + { + get + { + return this.brandingThemeId; + } + + set + { + this.shouldSerialize["branding_theme_id"] = true; + this.brandingThemeId = value; + } + } + /// public override string ToString() { @@ -714,6 +741,13 @@ public void UnsetGroupPrimarySubscriptionId() { this.shouldSerialize["group_primary_subscription_id"] = false; } + /// + /// Marks the field to not be serialized. + /// + public void UnsetBrandingThemeId() + { + this.shouldSerialize["branding_theme_id"] = false; + } /// /// Checks if the field should be serialized or not. @@ -769,6 +803,15 @@ public bool ShouldSerializeGroupPrimarySubscriptionId() return this.shouldSerialize["group_primary_subscription_id"]; } + /// + /// Checks if the field should be serialized or not. + /// + /// A boolean weather the field should be serialized or not. + public bool ShouldSerializeBrandingThemeId() + { + return this.shouldSerialize["branding_theme_id"]; + } + /// public override bool Equals(object obj) { @@ -888,6 +931,8 @@ public override bool Equals(object obj) this.PreviousBalanceData?.Equals(other.PreviousBalanceData) == true) && (this.PublicUrlExpiresOn == null && other.PublicUrlExpiresOn == null || this.PublicUrlExpiresOn?.Equals(other.PublicUrlExpiresOn) == true) && + (this.BrandingThemeId == null && other.BrandingThemeId == null || + this.BrandingThemeId?.Equals(other.BrandingThemeId) == true) && base.Equals(obj); } @@ -953,6 +998,7 @@ public override bool Equals(object obj) toStringOutput.Add($"PublicUrl = {this.PublicUrl ?? "null"}"); toStringOutput.Add($"PreviousBalanceData = {(this.PreviousBalanceData == null ? "null" : this.PreviousBalanceData.ToString())}"); toStringOutput.Add($"PublicUrlExpiresOn = {(this.PublicUrlExpiresOn == null ? "null" : this.PublicUrlExpiresOn.ToString())}"); + toStringOutput.Add($"BrandingThemeId = {(this.BrandingThemeId == null ? "null" : this.BrandingThemeId.ToString())}"); base.ToString(toStringOutput); } diff --git a/AdvancedBilling.Standard/Models/InvoiceLineItem.cs b/AdvancedBilling.Standard/Models/InvoiceLineItem.cs index f7f5ddf8..f21f0e93 100644 --- a/AdvancedBilling.Standard/Models/InvoiceLineItem.cs +++ b/AdvancedBilling.Standard/Models/InvoiceLineItem.cs @@ -157,7 +157,7 @@ public InvoiceLineItem( } /// - /// Unique identifier for the line item. Useful when cross-referencing the line against individual discounts in the `discounts` or `taxes` lists. + /// Unique identifier for the line item. Useful when cross-referencing the line against individual discounts in the `discounts` or `taxes` lists. /// [JsonProperty("uid", NullValueHandling = NullValueHandling.Ignore)] public string Uid { get; set; } @@ -169,7 +169,7 @@ public InvoiceLineItem( public string Title { get; set; } /// - /// Detailed description for the charge or item represented by this line. May include proration details in plain text. + /// Detailed description for the charge or item represented by this line. May include proration details in plain text. /// Note: this string may contain line breaks that are hints for the best display format on the invoice. /// [JsonProperty("description", NullValueHandling = NullValueHandling.Ignore)] @@ -184,7 +184,7 @@ public InvoiceLineItem( /// /// The price per unit for the line item. - /// When tiered pricing was used (i.e. not every unit was actually priced at the same price) this will be the blended average cost per unit and the `tiered_unit_price` field will be set to `true`. + /// When tiered pricing was used (i.e., not every unit was actually priced at the same price) this will be the blended average cost per unit and the `tiered_unit_price` field will be set to `true`. /// [JsonProperty("unit_price", NullValueHandling = NullValueHandling.Ignore)] public string UnitPrice { get; set; } @@ -219,7 +219,7 @@ public InvoiceLineItem( /// /// The non-canonical total amount for the line. - /// `subtotal_amount` is the canonical amount for a line. The invoice `total_amount` is derived from the sum of the line `subtotal_amount`s and discounts or taxes applied thereafter. Therefore, due to rounding or precision errors, the sum of line `total_amount`s may not equal the invoice `total_amount`. + /// `subtotal_amount` is the canonical amount for a line. The invoice `total_amount` is derived from the sum of the line `subtotal_amount`s and discounts or taxes applied thereafter. Therefore, due to rounding or precision errors, the sum of line `total_amount`s may not equal the invoice `total_amount`. /// [JsonProperty("total_amount", NullValueHandling = NullValueHandling.Ignore)] public string TotalAmount { get; set; } @@ -233,7 +233,7 @@ public InvoiceLineItem( /// /// Start date for the period covered by this line. The format is `"YYYY-MM-DD"`. /// * For periodic charges paid in advance, this date will match the billing date, and the end date will be in the future. - /// * For periodic charges paid in arrears (e.g. metered charges), this date will be the date of the previous billing, and the end date will be the current billing date. + /// * For periodic charges paid in arrears (e.g., metered charges), this date will be the date of the previous billing, and the end date will be the current billing date. /// * For non-periodic charges, this date and the end date will match. /// [JsonConverter(typeof(CustomDateTimeConverter), "yyyy'-'MM'-'dd")] @@ -243,7 +243,7 @@ public InvoiceLineItem( /// /// End date for the period covered by this line. The format is `"YYYY-MM-DD"`. /// * For periodic charges paid in advance, this date will match the next (future) billing date. - /// * For periodic charges paid in arrears (e.g. metered charges), this date will be the date of the current billing date. + /// * For periodic charges paid in arrears (e.g., metered charges), this date will be the date of the current billing date. /// * For non-periodic charges, this date and the start date will match. /// [JsonConverter(typeof(CustomDateTimeConverter), "yyyy'-'MM'-'dd")] diff --git a/AdvancedBilling.Standard/Models/IssueInvoiceEventData.cs b/AdvancedBilling.Standard/Models/IssueInvoiceEventData.cs index d6e92b41..e669b8e8 100644 --- a/AdvancedBilling.Standard/Models/IssueInvoiceEventData.cs +++ b/AdvancedBilling.Standard/Models/IssueInvoiceEventData.cs @@ -43,7 +43,7 @@ public IssueInvoiceEventData( } /// - /// Consolidation level of the invoice, which is applicable to invoice consolidation. It will hold one of the following values: + /// Consolidation level of the invoice, which is applicable to invoice consolidation. It will hold one of the following values: /// * "none": A normal invoice with no consolidation. /// * "child": An invoice segment which has been combined into a consolidated invoice. /// * "parent": A consolidated invoice, whose contents are composed of invoice segments. diff --git a/AdvancedBilling.Standard/Models/IssueInvoiceRequest.cs b/AdvancedBilling.Standard/Models/IssueInvoiceRequest.cs index 75d79e0b..d64f4ab7 100644 --- a/AdvancedBilling.Standard/Models/IssueInvoiceRequest.cs +++ b/AdvancedBilling.Standard/Models/IssueInvoiceRequest.cs @@ -34,7 +34,7 @@ public IssueInvoiceRequest( /// Action taken when payment for an invoice fails: /// - `leave_open_invoice` - prepayments and credits applied to invoice; invoice status set to "open"; email sent to the customer for the issued invoice (if setting applies); payment failure recorded in the invoice history. This is the default option. /// - `rollback_to_pending` - prepayments and credits not applied; invoice remains in "pending" status; no email sent to the customer; payment failure recorded in the invoice history. - /// - `initiate_dunning` - prepayments and credits applied to the invoice; invoice status set to "open"; email sent to the customer for the issued invoice (if setting applies); payment failure recorded in the invoice history; subscription will most likely go into "past_due" or "canceled" state (depending upon net terms and dunning settings). + /// - `initiate_dunning` - prepayments and credits applied to the invoice; invoice status set to "open"; email sent to the customer for the issued invoice (if setting applies); payment failure recorded in the invoice history; subscription will most likely go into "past_due" or "canceled" state (depending upon net terms and dunning settings). /// [JsonProperty("on_failed_payment", NullValueHandling = NullValueHandling.Ignore)] public Models.FailedPaymentAction? OnFailedPayment { get; set; } diff --git a/AdvancedBilling.Standard/Models/ListComponentPricePointsInput.cs b/AdvancedBilling.Standard/Models/ListComponentPricePointsInput.cs index a6bda335..3cee9fc7 100644 --- a/AdvancedBilling.Standard/Models/ListComponentPricePointsInput.cs +++ b/AdvancedBilling.Standard/Models/ListComponentPricePointsInput.cs @@ -49,7 +49,7 @@ public ListComponentPricePointsInput( public int ComponentId { get; set; } /// - /// Include an array of currency price data + /// Include an array of currency price data. /// [JsonProperty("currency_prices", NullValueHandling = NullValueHandling.Ignore)] public bool? CurrencyPrices { get; set; } diff --git a/AdvancedBilling.Standard/Models/ListComponentsForProductFamilyInput.cs b/AdvancedBilling.Standard/Models/ListComponentsForProductFamilyInput.cs index 0b073783..f35386fe 100644 --- a/AdvancedBilling.Standard/Models/ListComponentsForProductFamilyInput.cs +++ b/AdvancedBilling.Standard/Models/ListComponentsForProductFamilyInput.cs @@ -102,7 +102,7 @@ public ListComponentsForProductFamilyInput( public string EndDate { get; set; } /// - /// The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns components with a timestamp at or before exact time provided in query. You can specify timezone in query - otherwise your site's time zone will be used. If provided, this parameter will be used instead of end_date. optional. + /// The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns components with a timestamp at or before exact time provided in query. You can specify timezone in query - otherwise your site's time zone will be used. If provided, this parameter will be used instead of end_date. /// [JsonProperty("end_datetime", NullValueHandling = NullValueHandling.Ignore)] public string EndDatetime { get; set; } diff --git a/AdvancedBilling.Standard/Models/ListComponentsInput.cs b/AdvancedBilling.Standard/Models/ListComponentsInput.cs index ec639e2f..fb32c412 100644 --- a/AdvancedBilling.Standard/Models/ListComponentsInput.cs +++ b/AdvancedBilling.Standard/Models/ListComponentsInput.cs @@ -79,13 +79,13 @@ public ListComponentsInput( public string StartDatetime { get; set; } /// - /// The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns components with a timestamp at or before exact time provided in query. You can specify timezone in query - otherwise your site's time zone will be used. If provided, this parameter will be used instead of end_date. optional + /// The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns components with a timestamp at or before exact time provided in query. You can specify timezone in query - otherwise your site's time zone will be used. If provided, this parameter will be used instead of end_date. /// [JsonProperty("end_datetime", NullValueHandling = NullValueHandling.Ignore)] public string EndDatetime { get; set; } /// - /// Include archived items + /// Include archived items. /// [JsonProperty("include_archived", NullValueHandling = NullValueHandling.Ignore)] public bool? IncludeArchived { get; set; } diff --git a/AdvancedBilling.Standard/Models/ListCouponsForProductFamilyInput.cs b/AdvancedBilling.Standard/Models/ListCouponsForProductFamilyInput.cs index c7c1e5bc..0323fccf 100644 --- a/AdvancedBilling.Standard/Models/ListCouponsForProductFamilyInput.cs +++ b/AdvancedBilling.Standard/Models/ListCouponsForProductFamilyInput.cs @@ -69,7 +69,7 @@ public ListCouponsForProductFamilyInput( public Models.ListCouponsFilter Filter { get; set; } /// - /// When fetching coupons, if you have defined multiple currencies at the site level, you can optionally pass the `?currency_prices=true` query param to include an array of currency price data in the response. Use in query `currency_prices=true`. + /// (Optional) If you have defined multiple currencies at the site level, you can pass `?currency_prices=true` to include an array of currency price data in the response. Use in query `currency_prices=true`. /// [JsonProperty("currency_prices", NullValueHandling = NullValueHandling.Ignore)] public bool? CurrencyPrices { get; set; } diff --git a/AdvancedBilling.Standard/Models/ListCouponsInput.cs b/AdvancedBilling.Standard/Models/ListCouponsInput.cs index d321244e..ea7d0b34 100644 --- a/AdvancedBilling.Standard/Models/ListCouponsInput.cs +++ b/AdvancedBilling.Standard/Models/ListCouponsInput.cs @@ -60,7 +60,7 @@ public ListCouponsInput( public Models.ListCouponsFilter Filter { get; set; } /// - /// When fetching coupons, if you have defined multiple currencies at the site level, you can optionally pass the `?currency_prices=true` query param to include an array of currency price data in the response. Use in query `currency_prices=true`. + /// (Optional) If you have defined multiple currencies at the site level, you can pass `?currency_prices=true` to include an array of currency price data in the response. Use in query `currency_prices=true`. /// [JsonProperty("currency_prices", NullValueHandling = NullValueHandling.Ignore)] public bool? CurrencyPrices { get; set; } diff --git a/AdvancedBilling.Standard/Models/ListCreditNotesInput.cs b/AdvancedBilling.Standard/Models/ListCreditNotesInput.cs index fe64d5bb..8fb7f83b 100644 --- a/AdvancedBilling.Standard/Models/ListCreditNotesInput.cs +++ b/AdvancedBilling.Standard/Models/ListCreditNotesInput.cs @@ -72,31 +72,31 @@ public ListCreditNotesInput( public int? PerPage { get; set; } /// - /// Include line items data + /// Include line items data. /// [JsonProperty("line_items", NullValueHandling = NullValueHandling.Ignore)] public bool? LineItems { get; set; } /// - /// Include discounts data + /// Include discounts data. /// [JsonProperty("discounts", NullValueHandling = NullValueHandling.Ignore)] public bool? Discounts { get; set; } /// - /// Include taxes data + /// Include taxes data. /// [JsonProperty("taxes", NullValueHandling = NullValueHandling.Ignore)] public bool? Taxes { get; set; } /// - /// Include refunds data + /// Include refunds data. /// [JsonProperty("refunds", NullValueHandling = NullValueHandling.Ignore)] public bool? Refunds { get; set; } /// - /// Include applications data + /// Include applications data. /// [JsonProperty("applications", NullValueHandling = NullValueHandling.Ignore)] public bool? Applications { get; set; } diff --git a/AdvancedBilling.Standard/Models/ListEventsInput.cs b/AdvancedBilling.Standard/Models/ListEventsInput.cs index d356b0f6..f228cad9 100644 --- a/AdvancedBilling.Standard/Models/ListEventsInput.cs +++ b/AdvancedBilling.Standard/Models/ListEventsInput.cs @@ -75,13 +75,13 @@ public ListEventsInput( public int? PerPage { get; set; } /// - /// Returns events with an id greater than or equal to the one specified + /// Returns events with an id greater than or equal to the one specified. /// [JsonProperty("since_id", NullValueHandling = NullValueHandling.Ignore)] public long? SinceId { get; set; } /// - /// Returns events with an id less than or equal to the one specified + /// Returns events with an id less than or equal to the one specified. /// [JsonProperty("max_id", NullValueHandling = NullValueHandling.Ignore)] public long? MaxId { get; set; } diff --git a/AdvancedBilling.Standard/Models/ListInvoicesInput.cs b/AdvancedBilling.Standard/Models/ListInvoicesInput.cs index b7221856..3958c402 100644 --- a/AdvancedBilling.Standard/Models/ListInvoicesInput.cs +++ b/AdvancedBilling.Standard/Models/ListInvoicesInput.cs @@ -153,43 +153,43 @@ public ListInvoicesInput( public Models.Direction? Direction { get; set; } /// - /// Include line items data + /// Include line items data. /// [JsonProperty("line_items", NullValueHandling = NullValueHandling.Ignore)] public bool? LineItems { get; set; } /// - /// Include discounts data + /// Include discounts data. /// [JsonProperty("discounts", NullValueHandling = NullValueHandling.Ignore)] public bool? Discounts { get; set; } /// - /// Include taxes data + /// Include taxes data. /// [JsonProperty("taxes", NullValueHandling = NullValueHandling.Ignore)] public bool? Taxes { get; set; } /// - /// Include credits data + /// Include credits data. /// [JsonProperty("credits", NullValueHandling = NullValueHandling.Ignore)] public bool? Credits { get; set; } /// - /// Include payments data + /// Include payments data. /// [JsonProperty("payments", NullValueHandling = NullValueHandling.Ignore)] public bool? Payments { get; set; } /// - /// Include custom fields data + /// Include custom fields data. /// [JsonProperty("custom_fields", NullValueHandling = NullValueHandling.Ignore)] public bool? CustomFields { get; set; } /// - /// Include refunds data + /// Include refunds data. /// [JsonProperty("refunds", NullValueHandling = NullValueHandling.Ignore)] public bool? Refunds { get; set; } diff --git a/AdvancedBilling.Standard/Models/ListMrrMovementsInput.cs b/AdvancedBilling.Standard/Models/ListMrrMovementsInput.cs index 32e12439..54555394 100644 --- a/AdvancedBilling.Standard/Models/ListMrrMovementsInput.cs +++ b/AdvancedBilling.Standard/Models/ListMrrMovementsInput.cs @@ -40,7 +40,7 @@ public ListMrrMovementsInput( } /// - /// optionally filter results by subscription + /// (Optional) Filter results by subscription. /// [JsonProperty("subscription_id", NullValueHandling = NullValueHandling.Ignore)] public int? SubscriptionId { get; set; } diff --git a/AdvancedBilling.Standard/Models/ListProductPricePointsInput.cs b/AdvancedBilling.Standard/Models/ListProductPricePointsInput.cs index f387875e..18e6a3c4 100644 --- a/AdvancedBilling.Standard/Models/ListProductPricePointsInput.cs +++ b/AdvancedBilling.Standard/Models/ListProductPricePointsInput.cs @@ -66,7 +66,7 @@ public ListProductPricePointsInput( public int? PerPage { get; set; } /// - /// When fetching a product's price points, if you have defined multiple currencies at the site level, you can optionally pass the ?currency_prices=true query param to include an array of currency price data in the response. If the product price point 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. + /// (Optional) If you have defined multiple currencies at the site level, you can pass ?currency_prices=true to include an array of currency price data in the response. If the product price point 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. /// [JsonProperty("currency_prices", NullValueHandling = NullValueHandling.Ignore)] public bool? CurrencyPrices { get; set; } diff --git a/AdvancedBilling.Standard/Models/ListProductsForProductFamilyInput.cs b/AdvancedBilling.Standard/Models/ListProductsForProductFamilyInput.cs index 925e4865..5fc10e42 100644 --- a/AdvancedBilling.Standard/Models/ListProductsForProductFamilyInput.cs +++ b/AdvancedBilling.Standard/Models/ListProductsForProductFamilyInput.cs @@ -125,7 +125,7 @@ public ListProductsForProductFamilyInput( public DateTimeOffset? EndDatetime { get; set; } /// - /// Include archived products + /// Include archived products. /// [JsonProperty("include_archived", NullValueHandling = NullValueHandling.Ignore)] public bool? IncludeArchived { get; set; } diff --git a/AdvancedBilling.Standard/Models/ListProformaInvoicesInput.cs b/AdvancedBilling.Standard/Models/ListProformaInvoicesInput.cs index 7051eecf..db051eb7 100644 --- a/AdvancedBilling.Standard/Models/ListProformaInvoicesInput.cs +++ b/AdvancedBilling.Standard/Models/ListProformaInvoicesInput.cs @@ -111,37 +111,37 @@ public ListProformaInvoicesInput( public Models.Direction? Direction { get; set; } /// - /// Include line items data + /// Include line items data. /// [JsonProperty("line_items", NullValueHandling = NullValueHandling.Ignore)] public bool? LineItems { get; set; } /// - /// Include discounts data + /// Include discounts data. /// [JsonProperty("discounts", NullValueHandling = NullValueHandling.Ignore)] public bool? Discounts { get; set; } /// - /// Include taxes data + /// Include taxes data. /// [JsonProperty("taxes", NullValueHandling = NullValueHandling.Ignore)] public bool? Taxes { get; set; } /// - /// Include credits data + /// Include credits data. /// [JsonProperty("credits", NullValueHandling = NullValueHandling.Ignore)] public bool? Credits { get; set; } /// - /// Include payments data + /// Include payments data. /// [JsonProperty("payments", NullValueHandling = NullValueHandling.Ignore)] public bool? Payments { get; set; } /// - /// Include custom fields data + /// Include custom fields data. /// [JsonProperty("custom_fields", NullValueHandling = NullValueHandling.Ignore)] public bool? CustomFields { get; set; } diff --git a/AdvancedBilling.Standard/Models/ListSubscriptionEventsInput.cs b/AdvancedBilling.Standard/Models/ListSubscriptionEventsInput.cs index 995879b9..c0ce6232 100644 --- a/AdvancedBilling.Standard/Models/ListSubscriptionEventsInput.cs +++ b/AdvancedBilling.Standard/Models/ListSubscriptionEventsInput.cs @@ -69,13 +69,13 @@ public ListSubscriptionEventsInput( public int? PerPage { get; set; } /// - /// Returns events with an id greater than or equal to the one specified + /// Returns events with an id greater than or equal to the one specified. /// [JsonProperty("since_id", NullValueHandling = NullValueHandling.Ignore)] public long? SinceId { get; set; } /// - /// Returns events with an id less than or equal to the one specified + /// Returns events with an id less than or equal to the one specified. /// [JsonProperty("max_id", NullValueHandling = NullValueHandling.Ignore)] public long? MaxId { get; set; } diff --git a/AdvancedBilling.Standard/Models/ListSubscriptionGroupPrepayment.cs b/AdvancedBilling.Standard/Models/ListSubscriptionGroupPrepayment.cs index d27e9dac..d9eea6c2 100644 --- a/AdvancedBilling.Standard/Models/ListSubscriptionGroupPrepayment.cs +++ b/AdvancedBilling.Standard/Models/ListSubscriptionGroupPrepayment.cs @@ -25,7 +25,7 @@ public ListSubscriptionGroupPrepayment() /// /// prepayment. public ListSubscriptionGroupPrepayment( - Models.ListSubcriptionGroupPrepaymentItem prepayment) + Models.ListSubscriptionGroupPrepaymentItem prepayment) { this.Prepayment = prepayment; } @@ -34,7 +34,7 @@ public ListSubscriptionGroupPrepayment( /// Gets or sets Prepayment. /// [JsonProperty("prepayment")] - public Models.ListSubcriptionGroupPrepaymentItem Prepayment { get; set; } + public Models.ListSubscriptionGroupPrepaymentItem Prepayment { get; set; } /// public override string ToString() diff --git a/AdvancedBilling.Standard/Models/ListSubcriptionGroupPrepaymentItem.cs b/AdvancedBilling.Standard/Models/ListSubscriptionGroupPrepaymentItem.cs similarity index 92% rename from AdvancedBilling.Standard/Models/ListSubcriptionGroupPrepaymentItem.cs rename to AdvancedBilling.Standard/Models/ListSubscriptionGroupPrepaymentItem.cs index ec4b7c29..75e682b0 100644 --- a/AdvancedBilling.Standard/Models/ListSubcriptionGroupPrepaymentItem.cs +++ b/AdvancedBilling.Standard/Models/ListSubscriptionGroupPrepaymentItem.cs @@ -1,4 +1,4 @@ -// +// // AdvancedBilling.Standard // // This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). @@ -11,19 +11,19 @@ namespace AdvancedBilling.Standard.Models { /// - /// ListSubcriptionGroupPrepaymentItem. + /// ListSubscriptionGroupPrepaymentItem. /// - public class ListSubcriptionGroupPrepaymentItem : BaseModel + public class ListSubscriptionGroupPrepaymentItem : BaseModel { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - public ListSubcriptionGroupPrepaymentItem() + public ListSubscriptionGroupPrepaymentItem() { } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// id. /// subscription_group_uid. @@ -34,7 +34,7 @@ public ListSubcriptionGroupPrepaymentItem() /// memo. /// payment_type. /// created_at. - public ListSubcriptionGroupPrepaymentItem( + public ListSubscriptionGroupPrepaymentItem( int? id = null, string subscriptionGroupUid = null, long? amountInCents = null, @@ -116,7 +116,7 @@ public override string ToString() { var toStringOutput = new List(); this.ToString(toStringOutput); - return $"ListSubcriptionGroupPrepaymentItem : ({string.Join(", ", toStringOutput)})"; + return $"ListSubscriptionGroupPrepaymentItem : ({string.Join(", ", toStringOutput)})"; } /// @@ -125,7 +125,7 @@ public override bool Equals(object obj) if (obj is null) return false; if (ReferenceEquals(this, obj)) return true; - return obj is ListSubcriptionGroupPrepaymentItem other && + return obj is ListSubscriptionGroupPrepaymentItem other && (this.Id == null && other.Id == null || this.Id?.Equals(other.Id) == true) && (this.SubscriptionGroupUid == null && other.SubscriptionGroupUid == null || diff --git a/AdvancedBilling.Standard/Models/ListSubscriptionGroupProformaInvoicesInput.cs b/AdvancedBilling.Standard/Models/ListSubscriptionGroupProformaInvoicesInput.cs index 8c271f1e..f4c5d163 100644 --- a/AdvancedBilling.Standard/Models/ListSubscriptionGroupProformaInvoicesInput.cs +++ b/AdvancedBilling.Standard/Models/ListSubscriptionGroupProformaInvoicesInput.cs @@ -55,37 +55,37 @@ public ListSubscriptionGroupProformaInvoicesInput( public string Uid { get; set; } /// - /// Include line items data + /// Include line items data. /// [JsonProperty("line_items", NullValueHandling = NullValueHandling.Ignore)] public bool? LineItems { get; set; } /// - /// Include discounts data + /// Include discounts data. /// [JsonProperty("discounts", NullValueHandling = NullValueHandling.Ignore)] public bool? Discounts { get; set; } /// - /// Include taxes data + /// Include taxes data. /// [JsonProperty("taxes", NullValueHandling = NullValueHandling.Ignore)] public bool? Taxes { get; set; } /// - /// Include credits data + /// Include credits data. /// [JsonProperty("credits", NullValueHandling = NullValueHandling.Ignore)] public bool? Credits { get; set; } /// - /// Include payments data + /// Include payments data. /// [JsonProperty("payments", NullValueHandling = NullValueHandling.Ignore)] public bool? Payments { get; set; } /// - /// Include custom fields data + /// Include custom fields data. /// [JsonProperty("custom_fields", NullValueHandling = NullValueHandling.Ignore)] public bool? CustomFields { get; set; } diff --git a/AdvancedBilling.Standard/Models/ListSubscriptionsInput.cs b/AdvancedBilling.Standard/Models/ListSubscriptionsInput.cs index bf7e5063..8e780384 100644 --- a/AdvancedBilling.Standard/Models/ListSubscriptionsInput.cs +++ b/AdvancedBilling.Standard/Models/ListSubscriptionsInput.cs @@ -3,6 +3,7 @@ // // This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). // +using AdvancedBilling.Standard.Models.Containers; using AdvancedBilling.Standard.Utilities; using Newtonsoft.Json; using Newtonsoft.Json.Converters; @@ -28,53 +29,80 @@ public ListSubscriptionsInput() /// /// page. /// per_page. + /// sort. + /// direction. /// state. /// product. + /// q. + /// q_scope. + /// customer_id. /// product_price_point_id. /// coupon. /// coupon_code. + /// collection_method. + /// branding_theme_id. /// date_field. /// start_date. /// end_date. /// start_datetime. /// end_datetime. /// metadata. - /// direction. - /// sort. + /// group_status. + /// dunning_exemption. + /// payment_gateways. + /// currencies. /// include. public ListSubscriptionsInput( int? page = 1, int? perPage = 20, + Models.SubscriptionSort? sort = Models.SubscriptionSort.SignupDate, + Models.SortingDirection? direction = null, Models.SubscriptionStateFilter? state = null, - int? product = null, + ListSubscriptionsInputProduct product = null, + string q = null, + Models.QScope? qScope = null, + int? customerId = null, int? productPricePointId = null, int? coupon = null, string couponCode = null, + Models.CollectionMethod1? collectionMethod = null, + int? brandingThemeId = null, Models.SubscriptionDateField? dateField = null, DateTime? startDate = null, DateTime? endDate = null, DateTimeOffset? startDatetime = null, DateTimeOffset? endDatetime = null, Dictionary metadata = null, - Models.SortingDirection? direction = null, - Models.SubscriptionSort? sort = Models.SubscriptionSort.SignupDate, + Models.GroupStatus? groupStatus = null, + bool? dunningExemption = null, + string paymentGateways = null, + string currencies = null, List include = null) { this.Page = page; this.PerPage = perPage; + this.Sort = sort; + this.Direction = direction; this.State = state; this.Product = product; + this.Q = q; + this.QScope = qScope; + this.CustomerId = customerId; this.ProductPricePointId = productPricePointId; this.Coupon = coupon; this.CouponCode = couponCode; + this.CollectionMethod = collectionMethod; + this.BrandingThemeId = brandingThemeId; this.DateField = dateField; this.StartDate = startDate; this.EndDate = endDate; this.StartDatetime = startDatetime; this.EndDatetime = endDatetime; this.Metadata = metadata; - this.Direction = direction; - this.Sort = sort; + this.GroupStatus = groupStatus; + this.DunningExemption = dunningExemption; + this.PaymentGateways = paymentGateways; + this.Currencies = currencies; this.Include = include; } @@ -92,6 +120,19 @@ public ListSubscriptionsInput( [JsonProperty("per_page", NullValueHandling = NullValueHandling.Ignore)] public int? PerPage { get; set; } + /// + /// The attribute by which to sort + /// + [JsonProperty("sort", NullValueHandling = NullValueHandling.Ignore)] + public Models.SubscriptionSort? Sort { get; set; } + + /// + /// Controls the order in which results are returned. + /// Use in query `direction=asc`. + /// + [JsonProperty("direction", NullValueHandling = NullValueHandling.Ignore)] + public Models.SortingDirection? Direction { get; set; } + /// /// The current state of the subscription /// @@ -99,13 +140,31 @@ public ListSubscriptionsInput( public Models.SubscriptionStateFilter? State { get; set; } /// - /// The product id of the subscription. (Note that the product handle cannot be used.) + /// Filter subscriptions by product. Accepts product ID or exact product name. Product handle is not supported. /// [JsonProperty("product", NullValueHandling = NullValueHandling.Ignore)] - public int? Product { get; set; } + public ListSubscriptionsInputProduct Product { get; set; } /// - /// The ID of the product price point. If supplied, product is required + /// Search string. + /// + [JsonProperty("q", NullValueHandling = NullValueHandling.Ignore)] + public string Q { get; set; } + + /// + /// Scope of fields used by the q search. + /// + [JsonProperty("q_scope", NullValueHandling = NullValueHandling.Ignore)] + public Models.QScope? QScope { get; set; } + + /// + /// The Advanced Billing id of the customer. + /// + [JsonProperty("customer_id", NullValueHandling = NullValueHandling.Ignore)] + public int? CustomerId { get; set; } + + /// + /// The ID of the product price point. If supplied, product is required. /// [JsonProperty("product_price_point_id", NullValueHandling = NullValueHandling.Ignore)] public int? ProductPricePointId { get; set; } @@ -122,6 +181,18 @@ public ListSubscriptionsInput( [JsonProperty("coupon_code", NullValueHandling = NullValueHandling.Ignore)] public string CouponCode { get; set; } + /// + /// The collection method for the subscription. + /// + [JsonProperty("collection_method", NullValueHandling = NullValueHandling.Ignore)] + public Models.CollectionMethod1? CollectionMethod { get; set; } + + /// + /// Filter subscriptions by the ID of an assigned Branding Theme. Branding Themes is a beta feature. See [Understand Branding Themes](https://docs.maxio.com/hc/en-us/articles/43796895662093-Understand-Branding-Themes#understand-branding-themes-0-0) for more information. + /// + [JsonProperty("branding_theme_id", NullValueHandling = NullValueHandling.Ignore)] + public int? BrandingThemeId { get; set; } + /// /// The type of filter you'd like to apply to your search. Allowed Values: , current_period_ends_at, current_period_starts_at, created_at, activated_at, canceled_at, expires_at, trial_started_at, trial_ended_at, updated_at /// @@ -165,17 +236,28 @@ public ListSubscriptionsInput( public Dictionary Metadata { get; set; } /// - /// Controls the order in which results are returned. - /// Use in query `direction=asc`. + /// Filter by whether a subscription is in a group. /// - [JsonProperty("direction", NullValueHandling = NullValueHandling.Ignore)] - public Models.SortingDirection? Direction { get; set; } + [JsonProperty("group_status", NullValueHandling = NullValueHandling.Ignore)] + public Models.GroupStatus? GroupStatus { get; set; } /// - /// The attribute by which to sort + /// Filter by dunning exemption status. /// - [JsonProperty("sort", NullValueHandling = NullValueHandling.Ignore)] - public Models.SubscriptionSort? Sort { get; set; } + [JsonProperty("dunning_exemption", NullValueHandling = NullValueHandling.Ignore)] + public bool? DunningExemption { get; set; } + + /// + /// Comma-separated payment gateway identifiers. + /// + [JsonProperty("payment_gateways", NullValueHandling = NullValueHandling.Ignore)] + public string PaymentGateways { get; set; } + + /// + /// Comma-separated currency codes. + /// + [JsonProperty("currencies", NullValueHandling = NullValueHandling.Ignore)] + public string Currencies { get; set; } /// /// Allows including additional data in the response. Use in query: `include[]=self_service_page_token`. @@ -202,16 +284,30 @@ public override bool Equals(object obj) this.Page?.Equals(other.Page) == true) && (this.PerPage == null && other.PerPage == null || this.PerPage?.Equals(other.PerPage) == true) && + (this.Sort == null && other.Sort == null || + this.Sort?.Equals(other.Sort) == true) && + (this.Direction == null && other.Direction == null || + this.Direction?.Equals(other.Direction) == true) && (this.State == null && other.State == null || this.State?.Equals(other.State) == true) && (this.Product == null && other.Product == null || this.Product?.Equals(other.Product) == true) && + (this.Q == null && other.Q == null || + this.Q?.Equals(other.Q) == true) && + (this.QScope == null && other.QScope == null || + this.QScope?.Equals(other.QScope) == true) && + (this.CustomerId == null && other.CustomerId == null || + this.CustomerId?.Equals(other.CustomerId) == true) && (this.ProductPricePointId == null && other.ProductPricePointId == null || this.ProductPricePointId?.Equals(other.ProductPricePointId) == true) && (this.Coupon == null && other.Coupon == null || this.Coupon?.Equals(other.Coupon) == true) && (this.CouponCode == null && other.CouponCode == null || this.CouponCode?.Equals(other.CouponCode) == true) && + (this.CollectionMethod == null && other.CollectionMethod == null || + this.CollectionMethod?.Equals(other.CollectionMethod) == true) && + (this.BrandingThemeId == null && other.BrandingThemeId == null || + this.BrandingThemeId?.Equals(other.BrandingThemeId) == true) && (this.DateField == null && other.DateField == null || this.DateField?.Equals(other.DateField) == true) && (this.StartDate == null && other.StartDate == null || @@ -224,10 +320,14 @@ public override bool Equals(object obj) this.EndDatetime?.Equals(other.EndDatetime) == true) && (this.Metadata == null && other.Metadata == null || this.Metadata?.Equals(other.Metadata) == true) && - (this.Direction == null && other.Direction == null || - this.Direction?.Equals(other.Direction) == true) && - (this.Sort == null && other.Sort == null || - this.Sort?.Equals(other.Sort) == true) && + (this.GroupStatus == null && other.GroupStatus == null || + this.GroupStatus?.Equals(other.GroupStatus) == true) && + (this.DunningExemption == null && other.DunningExemption == null || + this.DunningExemption?.Equals(other.DunningExemption) == true) && + (this.PaymentGateways == null && other.PaymentGateways == null || + this.PaymentGateways?.Equals(other.PaymentGateways) == true) && + (this.Currencies == null && other.Currencies == null || + this.Currencies?.Equals(other.Currencies) == true) && (this.Include == null && other.Include == null || this.Include?.Equals(other.Include) == true) && base.Equals(obj); @@ -241,19 +341,28 @@ public override bool Equals(object obj) { toStringOutput.Add($"Page = {(this.Page == null ? "null" : this.Page.ToString())}"); toStringOutput.Add($"PerPage = {(this.PerPage == null ? "null" : this.PerPage.ToString())}"); + toStringOutput.Add($"Sort = {(this.Sort == null ? "null" : this.Sort.ToString())}"); + toStringOutput.Add($"Direction = {(this.Direction == null ? "null" : this.Direction.ToString())}"); toStringOutput.Add($"State = {(this.State == null ? "null" : this.State.ToString())}"); toStringOutput.Add($"Product = {(this.Product == null ? "null" : this.Product.ToString())}"); + toStringOutput.Add($"Q = {this.Q ?? "null"}"); + toStringOutput.Add($"QScope = {(this.QScope == null ? "null" : this.QScope.ToString())}"); + toStringOutput.Add($"CustomerId = {(this.CustomerId == null ? "null" : this.CustomerId.ToString())}"); toStringOutput.Add($"ProductPricePointId = {(this.ProductPricePointId == null ? "null" : this.ProductPricePointId.ToString())}"); toStringOutput.Add($"Coupon = {(this.Coupon == null ? "null" : this.Coupon.ToString())}"); toStringOutput.Add($"CouponCode = {this.CouponCode ?? "null"}"); + toStringOutput.Add($"CollectionMethod = {(this.CollectionMethod == null ? "null" : this.CollectionMethod.ToString())}"); + toStringOutput.Add($"BrandingThemeId = {(this.BrandingThemeId == null ? "null" : this.BrandingThemeId.ToString())}"); toStringOutput.Add($"DateField = {(this.DateField == null ? "null" : this.DateField.ToString())}"); toStringOutput.Add($"StartDate = {(this.StartDate == null ? "null" : this.StartDate.ToString())}"); toStringOutput.Add($"EndDate = {(this.EndDate == null ? "null" : this.EndDate.ToString())}"); toStringOutput.Add($"StartDatetime = {(this.StartDatetime == null ? "null" : this.StartDatetime.ToString())}"); toStringOutput.Add($"EndDatetime = {(this.EndDatetime == null ? "null" : this.EndDatetime.ToString())}"); toStringOutput.Add($"Metadata = {(this.Metadata == null ? "null" : this.Metadata.ToString())}"); - toStringOutput.Add($"Direction = {(this.Direction == null ? "null" : this.Direction.ToString())}"); - toStringOutput.Add($"Sort = {(this.Sort == null ? "null" : this.Sort.ToString())}"); + toStringOutput.Add($"GroupStatus = {(this.GroupStatus == null ? "null" : this.GroupStatus.ToString())}"); + toStringOutput.Add($"DunningExemption = {(this.DunningExemption == null ? "null" : this.DunningExemption.ToString())}"); + toStringOutput.Add($"PaymentGateways = {this.PaymentGateways ?? "null"}"); + toStringOutput.Add($"Currencies = {this.Currencies ?? "null"}"); toStringOutput.Add($"Include = {(this.Include == null ? "null" : $"[{string.Join(", ", this.Include)} ]")}"); base.ToString(toStringOutput); diff --git a/AdvancedBilling.Standard/Models/ListUsagesInput.cs b/AdvancedBilling.Standard/Models/ListUsagesInput.cs index d762e736..c9f73b8d 100644 --- a/AdvancedBilling.Standard/Models/ListUsagesInput.cs +++ b/AdvancedBilling.Standard/Models/ListUsagesInput.cs @@ -67,13 +67,13 @@ public ListUsagesInput( public ListUsagesInputComponentId ComponentId { get; set; } /// - /// Returns usages with an id greater than or equal to the one specified + /// Returns usages with an id greater than or equal to the one specified. /// [JsonProperty("since_id", NullValueHandling = NullValueHandling.Ignore)] public long? SinceId { get; set; } /// - /// Returns usages with an id less than or equal to the one specified + /// Returns usages with an id less than or equal to the one specified. /// [JsonProperty("max_id", NullValueHandling = NullValueHandling.Ignore)] public long? MaxId { get; set; } diff --git a/AdvancedBilling.Standard/Models/Metafield.cs b/AdvancedBilling.Standard/Models/Metafield.cs index 16c2fde7..04e95c9c 100644 --- a/AdvancedBilling.Standard/Models/Metafield.cs +++ b/AdvancedBilling.Standard/Models/Metafield.cs @@ -81,7 +81,7 @@ public Metafield( public int? DataCount { get; set; } /// - /// Indicates the type of metafield. A text metafield allows any string value. Dropdown and radio metafields have a set of values that can be selected. Defaults to 'text'. + /// Indicates the type of metafield. A text metafield allows any string value. Dropdown and radio metafields have a set of values that can be selected. Defaults to 'text'. /// [JsonProperty("input_type", NullValueHandling = NullValueHandling.Ignore)] public Models.MetafieldInput? InputType { get; set; } diff --git a/AdvancedBilling.Standard/Models/MeteredComponent.cs b/AdvancedBilling.Standard/Models/MeteredComponent.cs index 3bf1d145..fd97f1f4 100644 --- a/AdvancedBilling.Standard/Models/MeteredComponent.cs +++ b/AdvancedBilling.Standard/Models/MeteredComponent.cs @@ -15,9 +15,11 @@ namespace AdvancedBilling.Standard.Models public class MeteredComponent : BaseModel { private Models.IntervalUnit? intervalUnit; + private string unspscCode; private Dictionary shouldSerialize = new Dictionary { { "interval_unit", false }, + { "unspsc_code", false }, }; /// @@ -46,6 +48,7 @@ public MeteredComponent() /// public_signup_page_ids. /// interval. /// interval_unit. + /// unspsc_code. public MeteredComponent( string name, string unitName, @@ -62,7 +65,8 @@ public MeteredComponent( bool? allowFractionalQuantities = null, List publicSignupPageIds = null, int? interval = null, - Models.IntervalUnit? intervalUnit = null) + Models.IntervalUnit? intervalUnit = null, + string unspscCode = null) { this.Name = name; this.UnitName = unitName; @@ -84,16 +88,21 @@ public MeteredComponent( { this.IntervalUnit = intervalUnit; } + + if (unspscCode != null) + { + this.UnspscCode = unspscCode; + } } /// - /// A name for this component that is suitable for showing customers and displaying on billing statements, ie. "Minutes". + /// A name for this component that is suitable for showing customers and displaying on billing statements, e.g., "Minutes". /// [JsonProperty("name")] public string Name { get; set; } /// - /// The name of the unit of measurement for the component. It should be singular since it will be automatically pluralized when necessary. i.e. “message”, which may then be shown as “5 messages” on a subscription’s component line-item + /// The name of the unit of measurement for the component. It should be singular since it will be automatically pluralized when necessary. e.g., “message”, which may then be shown as “5 messages” on a subscription’s component line-item /// [JsonProperty("unit_name")] public string UnitName { get; set; } @@ -105,7 +114,7 @@ public MeteredComponent( public string Description { get; set; } /// - /// A unique identifier for your use that can be used to retrieve this component is subsequent requests. Must start with a letter or number and may only contain lowercase letters, numbers, or the characters '.', ':', '-', or '_'. + /// A unique identifier for your use that can be used to retrieve this component in subsequent requests. Must start with a letter or number and may only contain lowercase letters, numbers, or the characters '.', ':', '-', or '_'. /// [JsonProperty("handle", NullValueHandling = NullValueHandling.Ignore)] public string Handle { get; set; } @@ -135,7 +144,7 @@ public MeteredComponent( public List PricePoints { get; set; } /// - /// The amount the customer will be charged per unit when the pricing scheme is “per_unit”. For On/Off Components, this is the amount that the customer will be charged when they turn the component on for the subscription. The price can contain up to 8 decimal places. i.e. 1.00 or 0.0012 or 0.00000065 + /// The amount the customer will be charged per unit when the pricing scheme is “per_unit”. For On/Off Components, this is the amount that the customer will be charged when they turn the component on for the subscription. The price can contain up to 8 decimal places. e.g., 1.00 or 0.0012 or 0.00000065 /// [JsonProperty("unit_price", NullValueHandling = NullValueHandling.Ignore)] public MeteredComponentUnitPrice UnitPrice { get; set; } @@ -171,7 +180,7 @@ public MeteredComponent( public List PublicSignupPageIds { get; set; } /// - /// The numerical interval. i.e. an interval of ‘30’ coupled with an interval_unit of day would mean this component's default price point would renew every 30 days. This property is only available for sites with Multifrequency enabled. + /// The numerical interval. e.g., an interval of ‘30’ coupled with an interval_unit of day would mean this component's default price point would renew every 30 days. This property is only available for sites with Multifrequency enabled. /// [JsonProperty("interval", NullValueHandling = NullValueHandling.Ignore)] public int? Interval { get; set; } @@ -194,6 +203,24 @@ public Models.IntervalUnit? IntervalUnit } } + /// + /// (Optional) Custom UNSPSC commodity code for Level 3/CEDP payment data. When set, this value is sent as the commodity code on invoice line items for this component instead of the default derived from item_category. + /// + [JsonProperty("unspsc_code")] + public string UnspscCode + { + get + { + return this.unspscCode; + } + + set + { + this.shouldSerialize["unspsc_code"] = true; + this.unspscCode = value; + } + } + /// public override string ToString() { @@ -209,6 +236,13 @@ public void UnsetIntervalUnit() { this.shouldSerialize["interval_unit"] = false; } + /// + /// Marks the field to not be serialized. + /// + public void UnsetUnspscCode() + { + this.shouldSerialize["unspsc_code"] = false; + } /// /// Checks if the field should be serialized or not. @@ -219,6 +253,15 @@ 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 ShouldSerializeUnspscCode() + { + return this.shouldSerialize["unspsc_code"]; + } + /// public override bool Equals(object obj) { @@ -257,6 +300,8 @@ public override bool Equals(object obj) this.Interval?.Equals(other.Interval) == true) && (this.IntervalUnit == null && other.IntervalUnit == null || this.IntervalUnit?.Equals(other.IntervalUnit) == true) && + (this.UnspscCode == null && other.UnspscCode == null || + this.UnspscCode?.Equals(other.UnspscCode) == true) && base.Equals(obj); } @@ -282,6 +327,7 @@ public override bool Equals(object obj) toStringOutput.Add($"PublicSignupPageIds = {(this.PublicSignupPageIds == null ? "null" : $"[{string.Join(", ", this.PublicSignupPageIds)} ]")}"); toStringOutput.Add($"Interval = {(this.Interval == null ? "null" : this.Interval.ToString())}"); toStringOutput.Add($"IntervalUnit = {(this.IntervalUnit == null ? "null" : this.IntervalUnit.ToString())}"); + toStringOutput.Add($"UnspscCode = {this.UnspscCode ?? "null"}"); base.ToString(toStringOutput); } diff --git a/AdvancedBilling.Standard/Models/MeteredUsage.cs b/AdvancedBilling.Standard/Models/MeteredUsage.cs index ee714acd..5d0815ac 100644 --- a/AdvancedBilling.Standard/Models/MeteredUsage.cs +++ b/AdvancedBilling.Standard/Models/MeteredUsage.cs @@ -4,6 +4,7 @@ // This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). // using APIMatic.Core.Utilities.Converters; +using AdvancedBilling.Standard.Models.Containers; using Newtonsoft.Json; using System.Collections.Generic; @@ -32,7 +33,7 @@ public MeteredUsage() /// memo. public MeteredUsage( string previousUnitBalance, - int newUnitBalance, + MeteredUsageNewUnitBalance newUnitBalance, int usageQuantity, int componentId, string componentHandle, @@ -59,7 +60,7 @@ public MeteredUsage( /// [JsonProperty("new_unit_balance")] [JsonRequired] - public int NewUnitBalance { get; set; } + public MeteredUsageNewUnitBalance NewUnitBalance { get; set; } /// /// Gets or sets UsageQuantity. @@ -108,7 +109,8 @@ public override bool Equals(object obj) return obj is MeteredUsage other && (this.PreviousUnitBalance == null && other.PreviousUnitBalance == null || this.PreviousUnitBalance?.Equals(other.PreviousUnitBalance) == true) && - (this.NewUnitBalance.Equals(other.NewUnitBalance)) && + (this.NewUnitBalance == null && other.NewUnitBalance == null || + this.NewUnitBalance?.Equals(other.NewUnitBalance) == true) && (this.UsageQuantity.Equals(other.UsageQuantity)) && (this.ComponentId.Equals(other.ComponentId)) && (this.ComponentHandle == null && other.ComponentHandle == null || @@ -125,7 +127,7 @@ public override bool Equals(object obj) protected new void ToString(List toStringOutput) { toStringOutput.Add($"PreviousUnitBalance = {this.PreviousUnitBalance ?? "null"}"); - toStringOutput.Add($"NewUnitBalance = {this.NewUnitBalance}"); + toStringOutput.Add($"NewUnitBalance = {(this.NewUnitBalance == null ? "null" : this.NewUnitBalance.ToString())}"); toStringOutput.Add($"UsageQuantity = {this.UsageQuantity}"); toStringOutput.Add($"ComponentId = {this.ComponentId}"); toStringOutput.Add($"ComponentHandle = {this.ComponentHandle ?? "null"}"); diff --git a/AdvancedBilling.Standard/Models/OfferItem.cs b/AdvancedBilling.Standard/Models/OfferItem.cs index 6efc762e..57671e5a 100644 --- a/AdvancedBilling.Standard/Models/OfferItem.cs +++ b/AdvancedBilling.Standard/Models/OfferItem.cs @@ -116,7 +116,7 @@ public OfferItem( public List CurrencyPrices { get; set; } /// - /// The numerical interval. i.e. an interval of '30' coupled with an interval_unit of day would mean this component price point would renew every 30 days. This property is only available for sites with Multifrequency enabled. + /// The numerical interval. e.g., an interval of '30' coupled with an interval_unit of day would mean this component price point would renew every 30 days. This property is only available for sites with Multifrequency enabled. /// [JsonProperty("interval", NullValueHandling = NullValueHandling.Ignore)] public int? Interval { get; set; } diff --git a/AdvancedBilling.Standard/Models/OnOffComponent.cs b/AdvancedBilling.Standard/Models/OnOffComponent.cs index ee2c1200..d1d87543 100644 --- a/AdvancedBilling.Standard/Models/OnOffComponent.cs +++ b/AdvancedBilling.Standard/Models/OnOffComponent.cs @@ -17,11 +17,13 @@ public class OnOffComponent : BaseModel private Models.CreditType? upgradeCharge; private Models.CreditType? downgradeCredit; private Models.IntervalUnit? intervalUnit; + private string unspscCode; private Dictionary shouldSerialize = new Dictionary { { "upgrade_charge", false }, { "downgrade_credit", false }, { "interval_unit", false }, + { "unspsc_code", false }, }; /// @@ -49,6 +51,7 @@ public OnOffComponent() /// public_signup_page_ids. /// interval. /// interval_unit. + /// unspsc_code. public OnOffComponent( string name, OnOffComponentUnitPrice unitPrice, @@ -64,7 +67,8 @@ public OnOffComponent( bool? allowFractionalQuantities = null, List publicSignupPageIds = null, int? interval = null, - Models.IntervalUnit? intervalUnit = null) + Models.IntervalUnit? intervalUnit = null, + string unspscCode = null) { this.Name = name; this.Description = description; @@ -93,10 +97,15 @@ public OnOffComponent( { this.IntervalUnit = intervalUnit; } + + if (unspscCode != null) + { + this.UnspscCode = unspscCode; + } } /// - /// A name for this component that is suitable for showing customers and displaying on billing statements, ie. "Minutes". + /// A name for this component that is suitable for showing customers and displaying on billing statements, e.g., "Minutes". /// [JsonProperty("name")] public string Name { get; set; } @@ -108,7 +117,7 @@ public OnOffComponent( public string Description { get; set; } /// - /// A unique identifier for your use that can be used to retrieve this component is subsequent requests. Must start with a letter or number and may only contain lowercase letters, numbers, or the characters '.', ':', '-', or '_'. + /// A unique identifier for your use that can be used to retrieve this component in subsequent requests. Must start with a letter or number and may only contain lowercase letters, numbers, or the characters '.', ':', '-', or '_'. /// [JsonProperty("handle", NullValueHandling = NullValueHandling.Ignore)] public string Handle { get; set; } @@ -162,7 +171,7 @@ public Models.CreditType? DowngradeCredit public List PricePoints { get; set; } /// - /// This is the amount that the customer will be charged when they turn the component on for the subscription. The price can contain up to 8 decimal places. i.e. 1.00 or 0.0012 or 0.00000065 + /// This is the amount that the customer will be charged when they turn the component on for the subscription. The price can contain up to 8 decimal places. e.g., 1.00 or 0.0012 or 0.00000065 /// [JsonProperty("unit_price")] public OnOffComponentUnitPrice UnitPrice { get; set; } @@ -198,7 +207,7 @@ public Models.CreditType? DowngradeCredit public List PublicSignupPageIds { get; set; } /// - /// The numerical interval. i.e. an interval of ‘30’ coupled with an interval_unit of day would mean this component's default price point would renew every 30 days. This property is only available for sites with Multifrequency enabled. + /// The numerical interval. e.g., an interval of ‘30’ coupled with an interval_unit of day would mean this component's default price point would renew every 30 days. This property is only available for sites with Multifrequency enabled. /// [JsonProperty("interval", NullValueHandling = NullValueHandling.Ignore)] public int? Interval { get; set; } @@ -221,6 +230,24 @@ public Models.IntervalUnit? IntervalUnit } } + /// + /// (Optional) Custom UNSPSC commodity code for Level 3/CEDP payment data. When set, this value is sent as the commodity code on invoice line items for this component instead of the default derived from item_category. + /// + [JsonProperty("unspsc_code")] + public string UnspscCode + { + get + { + return this.unspscCode; + } + + set + { + this.shouldSerialize["unspsc_code"] = true; + this.unspscCode = value; + } + } + /// public override string ToString() { @@ -250,6 +277,13 @@ public void UnsetIntervalUnit() { this.shouldSerialize["interval_unit"] = false; } + /// + /// Marks the field to not be serialized. + /// + public void UnsetUnspscCode() + { + this.shouldSerialize["unspsc_code"] = false; + } /// /// Checks if the field should be serialized or not. @@ -278,6 +312,15 @@ 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 ShouldSerializeUnspscCode() + { + return this.shouldSerialize["unspsc_code"]; + } + /// public override bool Equals(object obj) { @@ -315,6 +358,8 @@ public override bool Equals(object obj) this.Interval?.Equals(other.Interval) == true) && (this.IntervalUnit == null && other.IntervalUnit == null || this.IntervalUnit?.Equals(other.IntervalUnit) == true) && + (this.UnspscCode == null && other.UnspscCode == null || + this.UnspscCode?.Equals(other.UnspscCode) == true) && base.Equals(obj); } @@ -339,6 +384,7 @@ public override bool Equals(object obj) toStringOutput.Add($"PublicSignupPageIds = {(this.PublicSignupPageIds == null ? "null" : $"[{string.Join(", ", this.PublicSignupPageIds)} ]")}"); toStringOutput.Add($"Interval = {(this.Interval == null ? "null" : this.Interval.ToString())}"); toStringOutput.Add($"IntervalUnit = {(this.IntervalUnit == null ? "null" : this.IntervalUnit.ToString())}"); + toStringOutput.Add($"UnspscCode = {this.UnspscCode ?? "null"}"); base.ToString(toStringOutput); } diff --git a/AdvancedBilling.Standard/Models/PaymentProfileAttributes.cs b/AdvancedBilling.Standard/Models/PaymentProfileAttributes.cs index 8609db2b..264f8596 100644 --- a/AdvancedBilling.Standard/Models/PaymentProfileAttributes.cs +++ b/AdvancedBilling.Standard/Models/PaymentProfileAttributes.cs @@ -114,7 +114,7 @@ public PaymentProfileAttributes( } /// - /// (Optional) Token received after sending billing information using Maxio.js (formerly Chargify.js). This token must be passed as a sole attribute of `payment_profile_attributes` (i.e. tok_9g6hw85pnpt6knmskpwp4ttt) + /// (Optional) Token received after sending billing information using Maxio.js (formerly Chargify.js). This token must be passed as a sole attribute of `payment_profile_attributes` (e.g., tok_9g6hw85pnpt6knmskpwp4ttt). /// [JsonProperty("chargify_token", NullValueHandling = NullValueHandling.Ignore)] public string ChargifyToken { get; set; } @@ -150,37 +150,37 @@ public PaymentProfileAttributes( public string MaskedCardNumber { get; set; } /// - /// The full credit card number (string representation, i.e. 5424000000000015) + /// The full credit card number (string representation, e.g., 5424000000000015) /// [JsonProperty("full_number", NullValueHandling = NullValueHandling.Ignore)] public string FullNumber { get; set; } /// - /// (Optional, used only for Subscription Import) If you know the card type (i.e. Visa, MC, etc) you may supply it here so that we may display the card type in the UI. + /// (Optional, used only for Subscription Import) If you know the card type (e.g., Visa, MC, etc.) you may supply it here so that we may display the card type in the UI. /// [JsonProperty("card_type", NullValueHandling = NullValueHandling.Ignore)] public Models.CardType? CardType { get; set; } /// - /// (Optional when performing a Subscription Import via vault_token, required otherwise) The 1- or 2-digit credit card expiration month, as an integer or string, i.e. 5 + /// (Optional when performing a Subscription Import via vault_token, required otherwise) The 1- or 2-digit credit card expiration month, as an integer or string, e.g., 5 /// [JsonProperty("expiration_month", NullValueHandling = NullValueHandling.Ignore)] public PaymentProfileAttributesExpirationMonth ExpirationMonth { get; set; } /// - /// (Optional when performing a Subscription Import via vault_token, required otherwise) The 4-digit credit card expiration year, as an integer or string, i.e. 2012 + /// (Optional when performing a Subscription Import via vault_token, required otherwise) The 4-digit credit card expiration year, as an integer or string, e.g., 2012 /// [JsonProperty("expiration_year", NullValueHandling = NullValueHandling.Ignore)] public PaymentProfileAttributesExpirationYear ExpirationYear { get; set; } /// - /// (Optional, may be required by your product configuration or gateway settings) The credit card or bank account billing street address (i.e. 123 Main St.). This value is merely passed through to the payment gateway. + /// (Optional, may be required by your product configuration or gateway settings) The credit card or bank account billing street address (e.g., 123 Main St.). This value is merely passed through to the payment gateway. /// [JsonProperty("billing_address", NullValueHandling = NullValueHandling.Ignore)] public string BillingAddress { get; set; } /// - /// (Optional) Second line of the customer’s billing address i.e. Apt. 100 + /// (Optional) Second line of the customer’s billing address, e.g., Apt. 100 /// [JsonProperty("billing_address_2")] public string BillingAddress2 @@ -198,25 +198,25 @@ public string BillingAddress2 } /// - /// (Optional, may be required by your product configuration or gateway settings) The credit card or bank account billing address city (i.e. “Boston”). This value is merely passed through to the payment gateway. + /// (Optional, may be required by your product configuration or gateway settings) The credit card or bank account billing address city (e.g., “Boston”). This value is merely passed through to the payment gateway. /// [JsonProperty("billing_city", NullValueHandling = NullValueHandling.Ignore)] public string BillingCity { get; set; } /// - /// (Optional, may be required by your product configuration or gateway settings) The credit card or bank account billing address state (i.e. MA). This value is merely passed through to the payment gateway. This must conform to the [ISO_3166-1](https://en.wikipedia.org/wiki/ISO_3166-1#Current_codes) in order to be valid for tax locale purposes. + /// (Optional, may be required by your product configuration or gateway settings) The credit card or bank account billing address state (e.g., MA). This value is merely passed through to the payment gateway. This must conform to the [ISO_3166-1](https://en.wikipedia.org/wiki/ISO_3166-1#Current_codes) in order to be valid for tax locale purposes. /// [JsonProperty("billing_state", NullValueHandling = NullValueHandling.Ignore)] public string BillingState { get; set; } /// - /// (Optional, may be required by your product configuration or gateway settings) The credit card or bank account billing address country, required in [ISO_3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format (i.e. “US”). This value is merely passed through to the payment gateway. Some gateways require country codes in a specific format. Check your gateway’s documentation. If creating an ACH subscription, only US is supported at this time. + /// (Optional, may be required by your product configuration or gateway settings) The credit card or bank account billing address country, required in [ISO_3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format (e.g., “US”). This value is merely passed through to the payment gateway. Some gateways require country codes in a specific format. Check your gateway’s documentation. If creating an ACH subscription, only US is supported at this time. /// [JsonProperty("billing_country", NullValueHandling = NullValueHandling.Ignore)] public string BillingCountry { get; set; } /// - /// (Optional, may be required by your product configuration or gateway settings) The credit card or bank account billing address zip code (i.e. 12345). This value is merely passed through to the payment gateway. + /// (Optional, may be required by your product configuration or gateway settings) The credit card or bank account billing address zip code (e.g., 12345). This value is merely passed through to the payment gateway. /// [JsonProperty("billing_zip", NullValueHandling = NullValueHandling.Ignore)] public string BillingZip { get; set; } @@ -270,7 +270,7 @@ public string BillingAddress2 public string Cvv { get; set; } /// - /// (Optional, used only for Subscription Import) If you have the last 4 digits of the credit card number, you may supply them here so that we may create a masked card number (i.e. XXXX-XXXX-XXXX-1234) for display in the UI. Last 4 digits are required for refunds in Auth.Net. + /// (Optional, used only for Subscription Import) If you have the last 4 digits of the credit card number, you may supply them here so that we may create a masked card number (e.g., XXXX-XXXX-XXXX-1234) for display in the UI. Last 4 digits are required for refunds in Auth.Net. /// [JsonProperty("last_four", NullValueHandling = NullValueHandling.Ignore)] public string LastFour { get; set; } diff --git a/AdvancedBilling.Standard/Models/PrepaidUsage.cs b/AdvancedBilling.Standard/Models/PrepaidUsage.cs index c6f79228..d6ad95d4 100644 --- a/AdvancedBilling.Standard/Models/PrepaidUsage.cs +++ b/AdvancedBilling.Standard/Models/PrepaidUsage.cs @@ -4,6 +4,7 @@ // This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). // using APIMatic.Core.Utilities.Converters; +using AdvancedBilling.Standard.Models.Containers; using Newtonsoft.Json; using System.Collections.Generic; @@ -37,8 +38,8 @@ public PrepaidUsage() public PrepaidUsage( string previousUnitBalance, string previousOverageUnitBalance, - int newUnitBalance, - int newOverageUnitBalance, + PrepaidUsageNewUnitBalance newUnitBalance, + PrepaidUsageNewOverageUnitBalance newOverageUnitBalance, int usageQuantity, int overageUsageQuantity, int componentId, @@ -79,14 +80,14 @@ public PrepaidUsage( /// [JsonProperty("new_unit_balance")] [JsonRequired] - public int NewUnitBalance { get; set; } + public PrepaidUsageNewUnitBalance NewUnitBalance { get; set; } /// /// Gets or sets NewOverageUnitBalance. /// [JsonProperty("new_overage_unit_balance")] [JsonRequired] - public int NewOverageUnitBalance { get; set; } + public PrepaidUsageNewOverageUnitBalance NewOverageUnitBalance { get; set; } /// /// Gets or sets UsageQuantity. @@ -151,8 +152,10 @@ public override bool Equals(object obj) this.PreviousUnitBalance?.Equals(other.PreviousUnitBalance) == true) && (this.PreviousOverageUnitBalance == null && other.PreviousOverageUnitBalance == null || this.PreviousOverageUnitBalance?.Equals(other.PreviousOverageUnitBalance) == true) && - (this.NewUnitBalance.Equals(other.NewUnitBalance)) && - (this.NewOverageUnitBalance.Equals(other.NewOverageUnitBalance)) && + (this.NewUnitBalance == null && other.NewUnitBalance == null || + this.NewUnitBalance?.Equals(other.NewUnitBalance) == true) && + (this.NewOverageUnitBalance == null && other.NewOverageUnitBalance == null || + this.NewOverageUnitBalance?.Equals(other.NewOverageUnitBalance) == true) && (this.UsageQuantity.Equals(other.UsageQuantity)) && (this.OverageUsageQuantity.Equals(other.OverageUsageQuantity)) && (this.ComponentId.Equals(other.ComponentId)) && @@ -173,8 +176,8 @@ public override bool Equals(object obj) { toStringOutput.Add($"PreviousUnitBalance = {this.PreviousUnitBalance ?? "null"}"); toStringOutput.Add($"PreviousOverageUnitBalance = {this.PreviousOverageUnitBalance ?? "null"}"); - toStringOutput.Add($"NewUnitBalance = {this.NewUnitBalance}"); - toStringOutput.Add($"NewOverageUnitBalance = {this.NewOverageUnitBalance}"); + toStringOutput.Add($"NewUnitBalance = {(this.NewUnitBalance == null ? "null" : this.NewUnitBalance.ToString())}"); + toStringOutput.Add($"NewOverageUnitBalance = {(this.NewOverageUnitBalance == null ? "null" : this.NewOverageUnitBalance.ToString())}"); toStringOutput.Add($"UsageQuantity = {this.UsageQuantity}"); toStringOutput.Add($"OverageUsageQuantity = {this.OverageUsageQuantity}"); toStringOutput.Add($"ComponentId = {this.ComponentId}"); diff --git a/AdvancedBilling.Standard/Models/PrepaidUsageComponent.cs b/AdvancedBilling.Standard/Models/PrepaidUsageComponent.cs index 2d1f49f9..9009f1cc 100644 --- a/AdvancedBilling.Standard/Models/PrepaidUsageComponent.cs +++ b/AdvancedBilling.Standard/Models/PrepaidUsageComponent.cs @@ -17,11 +17,13 @@ public class PrepaidUsageComponent : BaseModel private Models.CreditType? upgradeCharge; private Models.CreditType? downgradeCredit; private Models.ExpirationIntervalUnit? expirationIntervalUnit; + private string unspscCode; private Dictionary shouldSerialize = new Dictionary { { "upgrade_charge", false }, { "downgrade_credit", false }, { "expiration_interval_unit", false }, + { "unspsc_code", false }, }; /// @@ -55,6 +57,7 @@ public PrepaidUsageComponent() /// display_on_hosted_page. /// allow_fractional_quantities. /// public_signup_page_ids. + /// unspsc_code. public PrepaidUsageComponent( string name, string unitName, @@ -76,7 +79,8 @@ public PrepaidUsageComponent( Models.ExpirationIntervalUnit? expirationIntervalUnit = null, bool? displayOnHostedPage = null, bool? allowFractionalQuantities = null, - List publicSignupPageIds = null) + List publicSignupPageIds = null, + string unspscCode = null) { this.Name = name; this.UnitName = unitName; @@ -111,16 +115,21 @@ public PrepaidUsageComponent( this.DisplayOnHostedPage = displayOnHostedPage; this.AllowFractionalQuantities = allowFractionalQuantities; this.PublicSignupPageIds = publicSignupPageIds; + + if (unspscCode != null) + { + this.UnspscCode = unspscCode; + } } /// - /// A name for this component that is suitable for showing customers and displaying on billing statements, ie. "Minutes". + /// A name for this component that is suitable for showing customers and displaying on billing statements, e.g., "Minutes". /// [JsonProperty("name")] public string Name { get; set; } /// - /// The name of the unit of measurement for the component. It should be singular since it will be automatically pluralized when necessary. i.e. “message”, which may then be shown as “5 messages” on a subscription’s component line-item + /// The name of the unit of measurement for the component. It should be singular since it will be automatically pluralized when necessary. e.g., “message”, which may then be shown as “5 messages” on a subscription’s component line-item /// [JsonProperty("unit_name")] public string UnitName { get; set; } @@ -132,7 +141,7 @@ public PrepaidUsageComponent( public string Description { get; set; } /// - /// A unique identifier for your use that can be used to retrieve this component is subsequent requests. Must start with a letter or number and may only contain lowercase letters, numbers, or the characters '.', ':', '-', or '_'. + /// A unique identifier for your use that can be used to retrieve this component in subsequent requests. Must start with a letter or number and may only contain lowercase letters, numbers, or the characters '.', ':', '-', or '_'. /// [JsonProperty("handle", NullValueHandling = NullValueHandling.Ignore)] public string Handle { get; set; } @@ -198,7 +207,7 @@ public Models.CreditType? DowngradeCredit public List PricePoints { get; set; } /// - /// The amount the customer will be charged per unit when the pricing scheme is “per_unit”. For On/Off Components, this is the amount that the customer will be charged when they turn the component on for the subscription. The price can contain up to 8 decimal places. i.e. 1.00 or 0.0012 or 0.00000065 + /// The amount the customer will be charged per unit when the pricing scheme is “per_unit”. For On/Off Components, this is the amount that the customer will be charged when they turn the component on for the subscription. The price can contain up to 8 decimal places. e.g., 1.00 or 0.0012 or 0.00000065 /// [JsonProperty("unit_price", NullValueHandling = NullValueHandling.Ignore)] public PrepaidUsageComponentUnitPrice UnitPrice { get; set; } @@ -222,13 +231,13 @@ public Models.CreditType? DowngradeCredit public Models.OveragePricing OveragePricing { get; set; } /// - /// Boolean which controls whether or not remaining units should be rolled over to the next period + /// Boolean which controls whether or not remaining units should be rolled over to the next period. /// [JsonProperty("rollover_prepaid_remainder", NullValueHandling = NullValueHandling.Ignore)] public bool? RolloverPrepaidRemainder { get; set; } /// - /// Boolean which controls whether or not the allocated quantity should be renewed at the beginning of each period + /// Boolean which controls whether or not the allocated quantity should be renewed at the beginning of each period. /// [JsonProperty("renew_prepaid_allocation", NullValueHandling = NullValueHandling.Ignore)] public bool? RenewPrepaidAllocation { get; set; } @@ -275,6 +284,24 @@ public Models.ExpirationIntervalUnit? ExpirationIntervalUnit [JsonProperty("public_signup_page_ids", NullValueHandling = NullValueHandling.Ignore)] public List PublicSignupPageIds { get; set; } + /// + /// (Optional) Custom UNSPSC commodity code for Level 3/CEDP payment data. When set, this value is sent as the commodity code on invoice line items for this component instead of the default derived from item_category. + /// + [JsonProperty("unspsc_code")] + public string UnspscCode + { + get + { + return this.unspscCode; + } + + set + { + this.shouldSerialize["unspsc_code"] = true; + this.unspscCode = value; + } + } + /// public override string ToString() { @@ -304,6 +331,13 @@ public void UnsetExpirationIntervalUnit() { this.shouldSerialize["expiration_interval_unit"] = false; } + /// + /// Marks the field to not be serialized. + /// + public void UnsetUnspscCode() + { + this.shouldSerialize["unspsc_code"] = false; + } /// /// Checks if the field should be serialized or not. @@ -332,6 +366,15 @@ public bool ShouldSerializeExpirationIntervalUnit() return this.shouldSerialize["expiration_interval_unit"]; } + /// + /// Checks if the field should be serialized or not. + /// + /// A boolean weather the field should be serialized or not. + public bool ShouldSerializeUnspscCode() + { + return this.shouldSerialize["unspsc_code"]; + } + /// public override bool Equals(object obj) { @@ -380,6 +423,8 @@ public override bool Equals(object obj) this.AllowFractionalQuantities?.Equals(other.AllowFractionalQuantities) == true) && (this.PublicSignupPageIds == null && other.PublicSignupPageIds == null || this.PublicSignupPageIds?.Equals(other.PublicSignupPageIds) == true) && + (this.UnspscCode == null && other.UnspscCode == null || + this.UnspscCode?.Equals(other.UnspscCode) == true) && base.Equals(obj); } @@ -410,6 +455,7 @@ public override bool Equals(object obj) toStringOutput.Add($"DisplayOnHostedPage = {(this.DisplayOnHostedPage == null ? "null" : this.DisplayOnHostedPage.ToString())}"); toStringOutput.Add($"AllowFractionalQuantities = {(this.AllowFractionalQuantities == null ? "null" : this.AllowFractionalQuantities.ToString())}"); toStringOutput.Add($"PublicSignupPageIds = {(this.PublicSignupPageIds == null ? "null" : $"[{string.Join(", ", this.PublicSignupPageIds)} ]")}"); + toStringOutput.Add($"UnspscCode = {this.UnspscCode ?? "null"}"); base.ToString(toStringOutput); } diff --git a/AdvancedBilling.Standard/Models/Price.cs b/AdvancedBilling.Standard/Models/Price.cs index 10438aaf..2ef4028d 100644 --- a/AdvancedBilling.Standard/Models/Price.cs +++ b/AdvancedBilling.Standard/Models/Price.cs @@ -72,7 +72,7 @@ public PriceEndingQuantity EndingQuantity } /// - /// The price can contain up to 8 decimal places. i.e. 1.00 or 0.0012 or 0.00000065 + /// The price can contain up to 8 decimal places. e.g., 1.00 or 0.0012 or 0.00000065 /// [JsonProperty("unit_price")] public PriceUnitPrice UnitPrice { get; set; } diff --git a/AdvancedBilling.Standard/Models/Product.cs b/AdvancedBilling.Standard/Models/Product.cs index c61b82da..c81709bc 100644 --- a/AdvancedBilling.Standard/Models/Product.cs +++ b/AdvancedBilling.Standard/Models/Product.cs @@ -33,6 +33,7 @@ public class Product : BaseModel private bool? useSiteExchangeRate; private string itemCategory; private string productPricePointHandle; + private string unspscCode; private Dictionary shouldSerialize = new Dictionary { { "handle", false }, @@ -53,6 +54,7 @@ public class Product : BaseModel { "use_site_exchange_rate", false }, { "item_category", false }, { "product_price_point_handle", false }, + { "unspsc_code", false }, }; /// @@ -102,6 +104,7 @@ public Product() /// item_category. /// product_price_point_id. /// product_price_point_handle. + /// unspsc_code. public Product( int? id = null, string name = null, @@ -139,7 +142,8 @@ public Product( bool? useSiteExchangeRate = null, string itemCategory = null, int? productPricePointId = null, - string productPricePointHandle = null) + string productPricePointHandle = null, + string unspscCode = null) { this.Id = id; this.Name = name; @@ -250,6 +254,11 @@ public Product( { this.ProductPricePointHandle = productPricePointHandle; } + + if (unspscCode != null) + { + this.UnspscCode = unspscCode; + } } /// @@ -301,7 +310,7 @@ public string Description } /// - /// E.g. Internal ID or SKU Number + /// E.g., Internal ID or SKU Number /// [JsonProperty("accounting_code")] public string AccountingCode @@ -325,7 +334,7 @@ public string AccountingCode public bool? RequestCreditCard { get; set; } /// - /// A numerical interval for the length a subscription to this product will run before it expires. See the description of interval for a description of how this value is coupled with an interval unit to calculate the full interval + /// A numerical interval for the length a subscription to this product will run before it expires. See the description of interval for a description of how this value is coupled with an interval unit to calculate the full interval. /// [JsonProperty("expiration_interval")] public int? ExpirationInterval @@ -381,7 +390,7 @@ public Models.ExpirationIntervalUnit? ExpirationIntervalUnit public long? PriceInCents { get; set; } /// - /// The numerical interval. i.e. an interval of ‘30’ coupled with an interval_unit of day would mean this product would renew every 30 days + /// The numerical interval. e.g., an interval of ‘30’ coupled with an interval_unit of day would mean this product would renew every 30 days. /// [JsonProperty("interval", NullValueHandling = NullValueHandling.Ignore)] public int? Interval { get; set; } @@ -429,7 +438,7 @@ public long? TrialPriceInCents } /// - /// A numerical interval for the length of the trial period of a subscription to this product. See the description of interval for a description of how this value is coupled with an interval unit to calculate the full interval + /// A numerical interval for the length of the trial period of a subscription to this product. See the description of interval for a description of how this value is coupled with an interval unit to calculate the full interval. /// [JsonProperty("trial_interval")] public int? TrialInterval @@ -556,7 +565,7 @@ public bool? InitialChargeAfterTrial public int? VersionNumber { get; set; } /// - /// The parameters will append to the url after a successful account update. See [help documentation](https://help.chargify.com/products/product-editing.html#return-parameters-after-account-update) + /// The parameters will append to the url after a successful account update. See [help documentation](https://help.chargify.com/products/product-editing.html#return-parameters-after-account-update). /// [JsonProperty("update_return_params")] public string UpdateReturnParams @@ -693,6 +702,24 @@ public string ProductPricePointHandle } } + /// + /// (Optional) Custom UNSPSC commodity code for Level 3/CEDP payment data. When set, this value is sent as the commodity code on invoice line items for this product instead of the default derived from item_category. + /// + [JsonProperty("unspsc_code")] + public string UnspscCode + { + get + { + return this.unspscCode; + } + + set + { + this.shouldSerialize["unspsc_code"] = true; + this.unspscCode = value; + } + } + /// public override string ToString() { @@ -827,6 +854,13 @@ public void UnsetProductPricePointHandle() { this.shouldSerialize["product_price_point_handle"] = false; } + /// + /// Marks the field to not be serialized. + /// + public void UnsetUnspscCode() + { + this.shouldSerialize["unspsc_code"] = false; + } /// /// Checks if the field should be serialized or not. @@ -990,6 +1024,15 @@ public bool ShouldSerializeProductPricePointHandle() return this.shouldSerialize["product_price_point_handle"]; } + /// + /// Checks if the field should be serialized or not. + /// + /// A boolean weather the field should be serialized or not. + public bool ShouldSerializeUnspscCode() + { + return this.shouldSerialize["unspsc_code"]; + } + /// public override bool Equals(object obj) { @@ -1071,6 +1114,8 @@ public override bool Equals(object obj) this.ProductPricePointId?.Equals(other.ProductPricePointId) == true) && (this.ProductPricePointHandle == null && other.ProductPricePointHandle == null || this.ProductPricePointHandle?.Equals(other.ProductPricePointHandle) == true) && + (this.UnspscCode == null && other.UnspscCode == null || + this.UnspscCode?.Equals(other.UnspscCode) == true) && base.Equals(obj); } @@ -1117,6 +1162,7 @@ public override bool Equals(object obj) toStringOutput.Add($"ItemCategory = {this.ItemCategory ?? "null"}"); toStringOutput.Add($"ProductPricePointId = {(this.ProductPricePointId == null ? "null" : this.ProductPricePointId.ToString())}"); toStringOutput.Add($"ProductPricePointHandle = {this.ProductPricePointHandle ?? "null"}"); + toStringOutput.Add($"UnspscCode = {this.UnspscCode ?? "null"}"); base.ToString(toStringOutput); } diff --git a/AdvancedBilling.Standard/Models/ProductFamily.cs b/AdvancedBilling.Standard/Models/ProductFamily.cs index f4f4bb40..1f619507 100644 --- a/AdvancedBilling.Standard/Models/ProductFamily.cs +++ b/AdvancedBilling.Standard/Models/ProductFamily.cs @@ -40,6 +40,7 @@ public ProductFamily() /// handle. /// accounting_code. /// description. + /// surcharging. /// created_at. /// updated_at. /// archived_at. @@ -49,6 +50,7 @@ public ProductFamily( string handle = null, string accountingCode = null, string description = null, + bool? surcharging = null, DateTimeOffset? createdAt = null, DateTimeOffset? updatedAt = null, DateTimeOffset? archivedAt = null) @@ -66,6 +68,7 @@ public ProductFamily( { this.Description = description; } + this.Surcharging = surcharging; this.CreatedAt = createdAt; this.UpdatedAt = updatedAt; @@ -129,6 +132,12 @@ public string Description } } + /// + /// Whether surcharging applies to this product family. Only included on sites where surcharging is enabled. + /// + [JsonProperty("surcharging", NullValueHandling = NullValueHandling.Ignore)] + public bool? Surcharging { get; set; } + /// /// Gets or sets CreatedAt. /// @@ -236,6 +245,8 @@ public override bool Equals(object obj) this.AccountingCode?.Equals(other.AccountingCode) == true) && (this.Description == null && other.Description == null || this.Description?.Equals(other.Description) == true) && + (this.Surcharging == null && other.Surcharging == null || + this.Surcharging?.Equals(other.Surcharging) == true) && (this.CreatedAt == null && other.CreatedAt == null || this.CreatedAt?.Equals(other.CreatedAt) == true) && (this.UpdatedAt == null && other.UpdatedAt == null || @@ -256,6 +267,7 @@ public override bool Equals(object obj) toStringOutput.Add($"Handle = {this.Handle ?? "null"}"); toStringOutput.Add($"AccountingCode = {this.AccountingCode ?? "null"}"); toStringOutput.Add($"Description = {this.Description ?? "null"}"); + toStringOutput.Add($"Surcharging = {(this.Surcharging == null ? "null" : this.Surcharging.ToString())}"); toStringOutput.Add($"CreatedAt = {(this.CreatedAt == null ? "null" : this.CreatedAt.ToString())}"); toStringOutput.Add($"UpdatedAt = {(this.UpdatedAt == null ? "null" : this.UpdatedAt.ToString())}"); toStringOutput.Add($"ArchivedAt = {(this.ArchivedAt == null ? "null" : this.ArchivedAt.ToString())}"); diff --git a/AdvancedBilling.Standard/Models/ProductPricePoint.cs b/AdvancedBilling.Standard/Models/ProductPricePoint.cs index 60dd068d..7ca0f687 100644 --- a/AdvancedBilling.Standard/Models/ProductPricePoint.cs +++ b/AdvancedBilling.Standard/Models/ProductPricePoint.cs @@ -214,7 +214,7 @@ public string Handle public long? PriceInCents { get; set; } /// - /// The numerical interval. i.e. an interval of ‘30’ coupled with an interval_unit of day would mean this product price point would renew every 30 days + /// The numerical interval. e.g., an interval of ‘30’ coupled with an interval_unit of day would mean this product price point would renew every 30 days. /// [JsonProperty("interval", NullValueHandling = NullValueHandling.Ignore)] public int? Interval { get; set; } @@ -244,7 +244,7 @@ public long? TrialPriceInCents } /// - /// The numerical trial interval. i.e. an interval of ‘30’ coupled with a trial_interval_unit of day would mean this product price point trial would last 30 days + /// The numerical trial interval. e.g., an interval of ‘30’ coupled with a trial_interval_unit of day would mean this product price point trial would last 30 days. /// [JsonProperty("trial_interval")] public int? TrialInterval @@ -280,7 +280,7 @@ public Models.IntervalUnit? TrialIntervalUnit } /// - /// Indicates how a trial is handled when the trail period ends and there is no credit card on file. For `no_obligation`, the subscription transitions to a Trial Ended state. Maxio will not send any emails or statements. For `payment_expected`, the subscription transitions to a Past Due state. Maxio will send normal dunning emails and statements according to your other settings. + /// Indicates how a trial is handled when the trial period ends and there is no credit card on file. For `no_obligation`, the subscription transitions to a Trial Ended state. Maxio will not send any emails or statements. For `payment_expected`, the subscription transitions to a Past Due state. Maxio will send normal dunning emails and statements according to your other settings. /// [JsonProperty("trial_type")] public Models.TrialType? TrialType @@ -352,7 +352,7 @@ public bool? InitialChargeAfterTrial } /// - /// The numerical expiration interval. i.e. an expiration_interval of ‘30’ coupled with an expiration_interval_unit of day would mean this product price point would expire after 30 days + /// The numerical expiration interval. e.g., an expiration_interval of ‘30’ coupled with an expiration_interval_unit of day would mean this product price point would expire after 30 days. /// [JsonProperty("expiration_interval")] public int? ExpirationInterval diff --git a/AdvancedBilling.Standard/Models/ProformaInvoice.cs b/AdvancedBilling.Standard/Models/ProformaInvoice.cs index d0660fe1..4ba02283 100644 --- a/AdvancedBilling.Standard/Models/ProformaInvoice.cs +++ b/AdvancedBilling.Standard/Models/ProformaInvoice.cs @@ -298,7 +298,7 @@ public int? SequenceNumber public string Currency { get; set; } /// - /// Consolidation level of the invoice, which is applicable to invoice consolidation. It will hold one of the following values: + /// Consolidation level of the invoice, which is applicable to invoice consolidation. It will hold one of the following values: /// * "none": A normal invoice with no consolidation. /// * "child": An invoice segment which has been combined into a consolidated invoice. /// * "parent": A consolidated invoice, whose contents are composed of invoice segments. @@ -321,7 +321,7 @@ public int? SequenceNumber public string ProductFamilyName { get; set; } /// - /// 'proforma' value is deprecated in favor of proforma_adhoc and proforma_automatic + /// 'proforma' value is deprecated in favor of proforma_adhoc and proforma_automatic. /// [JsonProperty("role", NullValueHandling = NullValueHandling.Ignore)] public Models.ProformaInvoiceRole? Role { get; set; } @@ -333,7 +333,7 @@ public int? SequenceNumber public Models.InvoiceSeller Seller { get; set; } /// - /// Information about the customer who is owner or recipient the invoiced subscription. + /// Information about the customer who is owner or recipient of the invoiced subscription. /// [JsonProperty("customer", NullValueHandling = NullValueHandling.Ignore)] public Models.InvoiceCustomer Customer { get; set; } diff --git a/AdvancedBilling.Standard/Models/PublicSignupPage.cs b/AdvancedBilling.Standard/Models/PublicSignupPage.cs index 96d9cd3e..990c0789 100644 --- a/AdvancedBilling.Standard/Models/PublicSignupPage.cs +++ b/AdvancedBilling.Standard/Models/PublicSignupPage.cs @@ -62,7 +62,7 @@ public PublicSignupPage( public int? Id { get; set; } /// - /// The url to which a customer will be returned after a successful signup (public_signup_pages only) + /// The url to which a customer will be returned after a successful signup (public_signup_pages only). /// [JsonProperty("return_url")] public string ReturnUrl @@ -98,7 +98,7 @@ public string ReturnParams } /// - /// The url where the signup page can be viewed (public_signup_pages only) + /// The url where the signup page can be viewed (public_signup_pages only). /// [JsonProperty("url", NullValueHandling = NullValueHandling.Ignore)] public string Url { get; set; } diff --git a/AdvancedBilling.Standard/Models/QScope.cs b/AdvancedBilling.Standard/Models/QScope.cs new file mode 100644 index 00000000..da5dd37d --- /dev/null +++ b/AdvancedBilling.Standard/Models/QScope.cs @@ -0,0 +1,55 @@ +// +// AdvancedBilling.Standard +// +// This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). +// +using APIMatic.Core.Utilities.Converters; +using Newtonsoft.Json; +using System.Runtime.Serialization; + +namespace AdvancedBilling.Standard.Models +{ + /// + /// QScope. + /// + + [JsonConverter(typeof(StringEnumConverter))] + public enum QScope + { + /// + /// FullName. + /// + [EnumMember(Value = "full_name")] + FullName, + + /// + /// FirstName. + /// + [EnumMember(Value = "first_name")] + FirstName, + + /// + /// LastName. + /// + [EnumMember(Value = "last_name")] + LastName, + + /// + /// Organization. + /// + [EnumMember(Value = "organization")] + Organization, + + /// + /// CustomerReference. + /// + [EnumMember(Value = "customer_reference")] + CustomerReference, + + /// + /// SubscriptionReference. + /// + [EnumMember(Value = "subscription_reference")] + SubscriptionReference + } +} \ No newline at end of file diff --git a/AdvancedBilling.Standard/Models/QuantityBasedComponent.cs b/AdvancedBilling.Standard/Models/QuantityBasedComponent.cs index 03a3a1b8..3d57a59d 100644 --- a/AdvancedBilling.Standard/Models/QuantityBasedComponent.cs +++ b/AdvancedBilling.Standard/Models/QuantityBasedComponent.cs @@ -17,11 +17,13 @@ public class QuantityBasedComponent : BaseModel private Models.CreditType? upgradeCharge; private Models.CreditType? downgradeCredit; private Models.IntervalUnit? intervalUnit; + private string unspscCode; private Dictionary shouldSerialize = new Dictionary { { "upgrade_charge", false }, { "downgrade_credit", false }, { "interval_unit", false }, + { "unspsc_code", false }, }; /// @@ -53,6 +55,7 @@ public QuantityBasedComponent() /// public_signup_page_ids. /// interval. /// interval_unit. + /// unspsc_code. public QuantityBasedComponent( string name, string unitName, @@ -72,7 +75,8 @@ public QuantityBasedComponent( bool? allowFractionalQuantities = null, List publicSignupPageIds = null, int? interval = null, - Models.IntervalUnit? intervalUnit = null) + Models.IntervalUnit? intervalUnit = null, + string unspscCode = null) { this.Name = name; this.UnitName = unitName; @@ -105,16 +109,21 @@ public QuantityBasedComponent( { this.IntervalUnit = intervalUnit; } + + if (unspscCode != null) + { + this.UnspscCode = unspscCode; + } } /// - /// A name for this component that is suitable for showing customers and displaying on billing statements, ie. "Minutes". + /// A name for this component that is suitable for showing customers and displaying on billing statements, e.g., "Minutes". /// [JsonProperty("name")] public string Name { get; set; } /// - /// The name of the unit of measurement for the component. It should be singular since it will be automatically pluralized when necessary. i.e. “message”, which may then be shown as “5 messages” on a subscription’s component line-item + /// “The name of the unit of measurement for the component. It should be singular since it will be automatically pluralized when necessary. e.g., “message”, which may then be shown as “5 messages” on a subscription’s component line-item.” /// [JsonProperty("unit_name")] public string UnitName { get; set; } @@ -126,7 +135,7 @@ public QuantityBasedComponent( public string Description { get; set; } /// - /// A unique identifier for your use that can be used to retrieve this component is subsequent requests. Must start with a letter or number and may only contain lowercase letters, numbers, or the characters '.', ':', '-', or '_'. + /// A unique identifier for your use that can be used to retrieve this component in subsequent requests. Must start with a letter or number and may only contain lowercase letters, numbers, or the characters '.', ':', '-', or '_'. /// [JsonProperty("handle", NullValueHandling = NullValueHandling.Ignore)] public string Handle { get; set; } @@ -192,7 +201,7 @@ public Models.CreditType? DowngradeCredit public List PricePoints { get; set; } /// - /// The amount the customer will be charged per unit when the pricing scheme is “per_unit”. For On/Off Components, this is the amount that the customer will be charged when they turn the component on for the subscription. The price can contain up to 8 decimal places. i.e. 1.00 or 0.0012 or 0.00000065 + /// The amount the customer will be charged per unit when the pricing scheme is “per_unit”. For On/Off Components, this is the amount that the customer will be charged when they turn the component on for the subscription. The price can contain up to 8 decimal places. e.g., 1.00 or 0.0012 or 0.00000065 /// [JsonProperty("unit_price", NullValueHandling = NullValueHandling.Ignore)] public QuantityBasedComponentUnitPrice UnitPrice { get; set; } @@ -234,7 +243,7 @@ public Models.CreditType? DowngradeCredit public List PublicSignupPageIds { get; set; } /// - /// The numerical interval. i.e. an interval of ‘30’ coupled with an interval_unit of day would mean this component's default price point would renew every 30 days. This property is only available for sites with Multifrequency enabled. + /// The numerical interval. e.g., an interval of ‘30’ coupled with an interval_unit of day would mean this component’s default price point would renew every 30 days. This property is only available for sites with Multifrequency enabled. /// [JsonProperty("interval", NullValueHandling = NullValueHandling.Ignore)] public int? Interval { get; set; } @@ -257,6 +266,24 @@ public Models.IntervalUnit? IntervalUnit } } + /// + /// (Optional) Custom UNSPSC commodity code for Level 3/CEDP payment data. When set, this value is sent as the commodity code on invoice line items for this component instead of the default derived from item_category. + /// + [JsonProperty("unspsc_code")] + public string UnspscCode + { + get + { + return this.unspscCode; + } + + set + { + this.shouldSerialize["unspsc_code"] = true; + this.unspscCode = value; + } + } + /// public override string ToString() { @@ -286,6 +313,13 @@ public void UnsetIntervalUnit() { this.shouldSerialize["interval_unit"] = false; } + /// + /// Marks the field to not be serialized. + /// + public void UnsetUnspscCode() + { + this.shouldSerialize["unspsc_code"] = false; + } /// /// Checks if the field should be serialized or not. @@ -314,6 +348,15 @@ 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 ShouldSerializeUnspscCode() + { + return this.shouldSerialize["unspsc_code"]; + } + /// public override bool Equals(object obj) { @@ -358,6 +401,8 @@ public override bool Equals(object obj) this.Interval?.Equals(other.Interval) == true) && (this.IntervalUnit == null && other.IntervalUnit == null || this.IntervalUnit?.Equals(other.IntervalUnit) == true) && + (this.UnspscCode == null && other.UnspscCode == null || + this.UnspscCode?.Equals(other.UnspscCode) == true) && base.Equals(obj); } @@ -386,6 +431,7 @@ public override bool Equals(object obj) toStringOutput.Add($"PublicSignupPageIds = {(this.PublicSignupPageIds == null ? "null" : $"[{string.Join(", ", this.PublicSignupPageIds)} ]")}"); toStringOutput.Add($"Interval = {(this.Interval == null ? "null" : this.Interval.ToString())}"); toStringOutput.Add($"IntervalUnit = {(this.IntervalUnit == null ? "null" : this.IntervalUnit.ToString())}"); + toStringOutput.Add($"UnspscCode = {this.UnspscCode ?? "null"}"); base.ToString(toStringOutput); } diff --git a/AdvancedBilling.Standard/Models/ReactivateSubscriptionRequest.cs b/AdvancedBilling.Standard/Models/ReactivateSubscriptionRequest.cs index 6f41eda1..f9b79c5b 100644 --- a/AdvancedBilling.Standard/Models/ReactivateSubscriptionRequest.cs +++ b/AdvancedBilling.Standard/Models/ReactivateSubscriptionRequest.cs @@ -47,7 +47,7 @@ public ReactivateSubscriptionRequest( } /// - /// These values are only applicable to subscriptions using calendar billing + /// These values are only applicable to subscriptions using calendar billing. /// [JsonProperty("calendar_billing", NullValueHandling = NullValueHandling.Ignore)] public Models.ReactivationBilling CalendarBilling { get; set; } diff --git a/AdvancedBilling.Standard/Models/ReactivationBilling.cs b/AdvancedBilling.Standard/Models/ReactivationBilling.cs index 88ddf89e..c70b47d0 100644 --- a/AdvancedBilling.Standard/Models/ReactivationBilling.cs +++ b/AdvancedBilling.Standard/Models/ReactivationBilling.cs @@ -31,7 +31,7 @@ public ReactivationBilling( } /// - /// You may choose how to handle the reactivation charge for that subscription: 1) `prorated` A prorated charge for the product price will be attempted for to complete the period 2) `immediate` A full-price charge for the product price will be attempted immediately 3) `delayed` A full-price charge for the product price will be attempted at the next renewal + /// You may choose how to handle the reactivation charge for that subscription: 1) `prorated` A prorated charge for the product price will be attempted to complete the period 2) `immediate` A full-price charge for the product price will be attempted immediately 3) `delayed` A full-price charge for the product price will be attempted at the next renewal. /// [JsonProperty("reactivation_charge", NullValueHandling = NullValueHandling.Ignore)] public Models.ReactivationCharge? ReactivationCharge { get; set; } diff --git a/AdvancedBilling.Standard/Models/ReadEventsCountInput.cs b/AdvancedBilling.Standard/Models/ReadEventsCountInput.cs index ca3ec24d..7f642db9 100644 --- a/AdvancedBilling.Standard/Models/ReadEventsCountInput.cs +++ b/AdvancedBilling.Standard/Models/ReadEventsCountInput.cs @@ -60,13 +60,13 @@ public ReadEventsCountInput( public int? PerPage { get; set; } /// - /// Returns events with an id greater than or equal to the one specified + /// Returns events with an id greater than or equal to the one specified. /// [JsonProperty("since_id", NullValueHandling = NullValueHandling.Ignore)] public long? SinceId { get; set; } /// - /// Returns events with an id less than or equal to the one specified + /// Returns events with an id less than or equal to the one specified. /// [JsonProperty("max_id", NullValueHandling = NullValueHandling.Ignore)] public long? MaxId { get; set; } diff --git a/AdvancedBilling.Standard/Models/RefundInvoice.cs b/AdvancedBilling.Standard/Models/RefundInvoice.cs index 5e89575f..a2c21dce 100644 --- a/AdvancedBilling.Standard/Models/RefundInvoice.cs +++ b/AdvancedBilling.Standard/Models/RefundInvoice.cs @@ -82,7 +82,7 @@ public RefundInvoice( public bool? ApplyCredit { get; set; } /// - /// If `apply_credit` set to false and refunding full amount, if `void_invoice` set to true, invoice will be voided after refund. Defaults to `false`. + /// If `apply_credit` is set to false and refunding full amount, if `void_invoice` is set to true, invoice will be voided after refund. Defaults to `false`. /// [JsonProperty("void_invoice", NullValueHandling = NullValueHandling.Ignore)] public bool? VoidInvoice { get; set; } diff --git a/AdvancedBilling.Standard/Models/RefundInvoiceEventData.cs b/AdvancedBilling.Standard/Models/RefundInvoiceEventData.cs index 99c7f12a..8f17d093 100644 --- a/AdvancedBilling.Standard/Models/RefundInvoiceEventData.cs +++ b/AdvancedBilling.Standard/Models/RefundInvoiceEventData.cs @@ -63,7 +63,7 @@ public RefundInvoiceEventData( public bool ApplyCredit { get; set; } /// - /// Consolidation level of the invoice, which is applicable to invoice consolidation. It will hold one of the following values: + /// Consolidation level of the invoice, which is applicable to invoice consolidation. It will hold one of the following values: /// * "none": A normal invoice with no consolidation. /// * "child": An invoice segment which has been combined into a consolidated invoice. /// * "parent": A consolidated invoice, whose contents are composed of invoice segments. diff --git a/AdvancedBilling.Standard/Models/Register.cs b/AdvancedBilling.Standard/Models/Register.cs index 039dbca3..3aefee9c 100644 --- a/AdvancedBilling.Standard/Models/Register.cs +++ b/AdvancedBilling.Standard/Models/Register.cs @@ -58,7 +58,7 @@ public Register( public string Name { get; set; } /// - /// The ISO 4217 currency code (3 character string) representing the currency of invoice transaction. + /// The ISO 4217 currency code (3 character string) representing the currency of an invoice transaction. /// [JsonProperty("currency_code", NullValueHandling = NullValueHandling.Ignore)] public string CurrencyCode { get; set; } diff --git a/AdvancedBilling.Standard/Models/RenewalPreviewRequest.cs b/AdvancedBilling.Standard/Models/RenewalPreviewRequest.cs index 77e1394c..ae063484 100644 --- a/AdvancedBilling.Standard/Models/RenewalPreviewRequest.cs +++ b/AdvancedBilling.Standard/Models/RenewalPreviewRequest.cs @@ -31,7 +31,7 @@ public RenewalPreviewRequest( } /// - /// An optional array of component definitions to preview. Providing any component definitions here will override the actual components on the subscription (and their quantities), and the billing preview will contain only these components (in addition to any product base fees). + /// (Optional) Array of component definitions to preview. Providing any component definitions here will override the actual components on the subscription (and their quantities), and the billing preview will contain only these components (in addition to any product base fees). /// [JsonProperty("components", NullValueHandling = NullValueHandling.Ignore)] public List Components { get; set; } diff --git a/AdvancedBilling.Standard/Models/ScheduledRenewalComponentCustomPrice.cs b/AdvancedBilling.Standard/Models/ScheduledRenewalComponentCustomPrice.cs index 40e1ef77..8aa72bd2 100644 --- a/AdvancedBilling.Standard/Models/ScheduledRenewalComponentCustomPrice.cs +++ b/AdvancedBilling.Standard/Models/ScheduledRenewalComponentCustomPrice.cs @@ -43,7 +43,7 @@ public ScheduledRenewalComponentCustomPrice( public bool? TaxIncluded { get; set; } /// - /// Omit for On/Off components + /// Omit for On/Off components. /// [JsonProperty("pricing_scheme")] public Models.PricingScheme PricingScheme { get; set; } diff --git a/AdvancedBilling.Standard/Models/ScheduledRenewalItemRequestBodyComponent.cs b/AdvancedBilling.Standard/Models/ScheduledRenewalItemRequestBodyComponent.cs index f0f638f7..37802b9d 100644 --- a/AdvancedBilling.Standard/Models/ScheduledRenewalItemRequestBodyComponent.cs +++ b/AdvancedBilling.Standard/Models/ScheduledRenewalItemRequestBodyComponent.cs @@ -65,7 +65,7 @@ public ScheduledRenewalItemRequestBodyComponent( public int? PricePointId { get; set; } /// - /// Optional quantity for the item. + /// (Optional) Quantity for the item. /// [JsonProperty("quantity", NullValueHandling = NullValueHandling.Ignore)] public int? Quantity { get; set; } diff --git a/AdvancedBilling.Standard/Models/ScheduledRenewalItemRequestBodyProduct.cs b/AdvancedBilling.Standard/Models/ScheduledRenewalItemRequestBodyProduct.cs index db9be2b8..ece17420 100644 --- a/AdvancedBilling.Standard/Models/ScheduledRenewalItemRequestBodyProduct.cs +++ b/AdvancedBilling.Standard/Models/ScheduledRenewalItemRequestBodyProduct.cs @@ -65,7 +65,7 @@ public ScheduledRenewalItemRequestBodyProduct( public int? PricePointId { get; set; } /// - /// Optional quantity for the item. + /// (Optional) Quantity for the item. /// [JsonProperty("quantity", NullValueHandling = NullValueHandling.Ignore)] public int? Quantity { get; set; } diff --git a/AdvancedBilling.Standard/Models/ScheduledRenewalProductPricePoint.cs b/AdvancedBilling.Standard/Models/ScheduledRenewalProductPricePoint.cs index be0ea334..fa1fa402 100644 --- a/AdvancedBilling.Standard/Models/ScheduledRenewalProductPricePoint.cs +++ b/AdvancedBilling.Standard/Models/ScheduledRenewalProductPricePoint.cs @@ -108,7 +108,7 @@ public ScheduledRenewalProductPricePoint( public long? InitialChargeInCents { get; set; } /// - /// The numerical expiration interval. i.e. an expiration_interval of ‘30’ coupled with an expiration_interval_unit of day would mean this product price point would expire after 30 days. + /// The numerical expiration interval. e.g., an expiration_interval of ‘30’ coupled with an expiration_interval_unit of day would mean this product price point would expire after 30 days. /// [JsonProperty("expiration_interval", NullValueHandling = NullValueHandling.Ignore)] public int? ExpirationInterval { get; set; } diff --git a/AdvancedBilling.Standard/Models/ServiceCredit1.cs b/AdvancedBilling.Standard/Models/ServiceCredit1.cs index afc7a694..9e11bfea 100644 --- a/AdvancedBilling.Standard/Models/ServiceCredit1.cs +++ b/AdvancedBilling.Standard/Models/ServiceCredit1.cs @@ -94,7 +94,7 @@ public ServiceCredit1( public string Memo { get; set; } /// - /// The invoice uid associated with the entry. Only present for debit entries + /// The invoice uid associated with the entry. Only present for debit entries. /// [JsonProperty("invoice_uid")] public string InvoiceUid diff --git a/AdvancedBilling.Standard/Models/Subscription.cs b/AdvancedBilling.Standard/Models/Subscription.cs index 21f76774..356c8bcc 100644 --- a/AdvancedBilling.Standard/Models/Subscription.cs +++ b/AdvancedBilling.Standard/Models/Subscription.cs @@ -473,7 +473,7 @@ public Subscription( public long? TotalRevenueInCents { get; set; } /// - /// (Added Nov 5 2013) The recurring amount of the product (and version),currently subscribed. NOTE: this may differ from the current price of,the product, if you’ve changed the price of the product but haven’t,moved this subscription to a newer version. + /// (Added Nov 5 2013) The recurring amount of the product (and version), currently subscribed. NOTE: this may differ from the current price of the product, if you’ve changed the price of the product but haven’t moved this subscription to a newer version. /// [JsonProperty("product_price_in_cents", NullValueHandling = NullValueHandling.Ignore)] public long? ProductPriceInCents { get; set; } @@ -485,7 +485,7 @@ public Subscription( public int? ProductVersionNumber { get; set; } /// - /// Timestamp relating to the end of the current (recurring) period (i.e.,when the next regularly scheduled attempted charge will occur) + /// Timestamp relating to the end of the current (recurring) period (i.e., when the next regularly scheduled attempted charge will occur) /// [JsonConverter(typeof(IsoDateTimeConverter))] [JsonProperty("current_period_ends_at")] @@ -504,7 +504,7 @@ public DateTimeOffset? CurrentPeriodEndsAt } /// - /// Timestamp that indicates when capture of payment will be tried or,retried. This value will usually track the current_period_ends_at, but,will diverge if a renewal payment fails and must be retried. In that,case, the current_period_ends_at will advance to the end of the next,period (time doesn’t stop because a payment was missed) but the,next_assessment_at will be scheduled for the auto-retry time (i.e. 24,hours in the future, in some cases) + /// Timestamp that indicates when capture of payment will be tried or retried. This value will usually track the current_period_ends_at, but will diverge if a renewal payment fails and must be retried. In that case, the current_period_ends_at will advance to the end of the next period (time doesn’t stop because a payment was missed) but the next_assessment_at will be scheduled for the auto-retry time (e.g., 24 hours in the future, in some cases). /// [JsonConverter(typeof(IsoDateTimeConverter))] [JsonProperty("next_assessment_at")] @@ -561,7 +561,7 @@ public DateTimeOffset? TrialEndedAt } /// - /// Timestamp for when the subscription began (i.e. when it came out of trial, or when it began in the case of no trial) + /// Timestamp for when the subscription began (i.e., when it came out of trial, or when it began in the case of no trial) /// [JsonConverter(typeof(IsoDateTimeConverter))] [JsonProperty("activated_at")] @@ -705,7 +705,7 @@ public DateTimeOffset? CurrentPeriodStartedAt } /// - /// Only valid for webhook payloads The previous state for webhooks that have indicated a change in state. For normal API calls, this will always be the same as the state (current state) + /// Only valid for webhook payloads The previous state for webhooks that have indicated a change in state. For normal API calls, this will always be the same as the state (current state). /// [JsonProperty("previous_state", NullValueHandling = NullValueHandling.Ignore)] public Models.SubscriptionState? PreviousState { get; set; } @@ -717,7 +717,7 @@ public DateTimeOffset? CurrentPeriodStartedAt public int? SignupPaymentId { get; set; } /// - /// The revenue, formatted as a string of decimal separated dollars and,cents, from the subscription signup ($50.00 would be formatted as,50.00) + /// The revenue, formatted as a string of decimal separated dollars and cents, from the subscription signup ($50.00 would be formatted as 50.00) /// [JsonProperty("signup_revenue", NullValueHandling = NullValueHandling.Ignore)] public string SignupRevenue { get; set; } @@ -934,7 +934,7 @@ public int? CouponUsesAllowed } /// - /// The churn reason code associated to a cancelled subscription. + /// The churn reason code associated to a canceled subscription. /// [JsonProperty("reason_code")] public string ReasonCode @@ -1090,7 +1090,7 @@ public int? StoredCredentialTransactionId } /// - /// The reference value (provided by your app) for the subscription istelf. + /// The reference value (provided by your app) for the subscription itself. /// [JsonProperty("reference")] public string Reference @@ -1127,13 +1127,13 @@ public DateTimeOffset? OnHoldAt } /// - /// Boolean representing whether the subscription is prepaid and currently in dunning. Only returned for Relationship Invoicing sites with the feature enabled + /// Boolean representing whether the subscription is prepaid and currently in dunning. Only returned for Relationship Invoicing sites with the feature enabled. /// [JsonProperty("prepaid_dunning", NullValueHandling = NullValueHandling.Ignore)] public bool? PrepaidDunning { get; set; } /// - /// Additional coupon data. To use this data you also have to include the following param in the request`include[]=coupons`. + /// Additional coupon data. To use this data you also have to include the following param in the request: `include[]=coupons`. /// Only in Read Subscription Endpoint. /// [JsonProperty("coupons", NullValueHandling = NullValueHandling.Ignore)] diff --git a/AdvancedBilling.Standard/Models/SubscriptionComponent.cs b/AdvancedBilling.Standard/Models/SubscriptionComponent.cs index 90b8924e..b2e5ea87 100644 --- a/AdvancedBilling.Standard/Models/SubscriptionComponent.cs +++ b/AdvancedBilling.Standard/Models/SubscriptionComponent.cs @@ -92,7 +92,7 @@ public SubscriptionComponent( Models.ComponentKind? kind = null, string unitName = null, bool? enabled = null, - int? unitBalance = null, + SubscriptionComponentUnitBalance unitBalance = null, string currency = null, SubscriptionComponentAllocatedQuantity allocatedQuantity = null, Models.PricingScheme? pricingScheme = null, @@ -227,7 +227,7 @@ public SubscriptionComponent( public string UnitName { get; set; } /// - /// (for on/off components) indicates if the component is enabled for the subscription + /// (for on/off components) indicates if the component is enabled for the subscription. /// [JsonProperty("enabled", NullValueHandling = NullValueHandling.Ignore)] public bool? Enabled { get; set; } @@ -236,7 +236,7 @@ public SubscriptionComponent( /// Gets or sets UnitBalance. /// [JsonProperty("unit_balance", NullValueHandling = NullValueHandling.Ignore)] - public int? UnitBalance { get; set; } + public SubscriptionComponentUnitBalance UnitBalance { get; set; } /// /// Gets or sets Currency. @@ -500,7 +500,7 @@ public string Description public bool? AllowFractionalQuantities { get; set; } /// - /// An optional object, will be returned if provided `include=subscription` query param. + /// (Optional) Object that will be returned if the `include=subscription` query param is provided. /// [JsonProperty("subscription", NullValueHandling = NullValueHandling.Ignore)] public Models.SubscriptionComponentSubscription Subscription { get; set; } @@ -518,7 +518,7 @@ public string Description public bool? DisplayOnHostedPage { get; set; } /// - /// The numerical interval. i.e. an interval of '30' coupled with an interval_unit of day would mean this component price point would renew every 30 days. This property is only available for sites with Multifrequency enabled. + /// The numerical interval. e.g., an interval of '30' coupled with an interval_unit of day would mean this component price point would renew every 30 days. This property is only available for sites with Multifrequency enabled. /// [JsonProperty("interval", NullValueHandling = NullValueHandling.Ignore)] public int? Interval { get; set; } diff --git a/AdvancedBilling.Standard/Models/SubscriptionCustomPrice.cs b/AdvancedBilling.Standard/Models/SubscriptionCustomPrice.cs index 95d75255..9731fc4f 100644 --- a/AdvancedBilling.Standard/Models/SubscriptionCustomPrice.cs +++ b/AdvancedBilling.Standard/Models/SubscriptionCustomPrice.cs @@ -135,7 +135,7 @@ public SubscriptionCustomPrice( public Models.IntervalUnit? TrialIntervalUnit { get; set; } /// - /// Indicates how a trial is handled when the trail period ends and there is no credit card on file. For `no_obligation`, the subscription transitions to a Trial Ended state. Maxio will not send any emails or statements. For `payment_expected`, the subscription transitions to a Past Due state. Maxio will send normal dunning emails and statements according to your other settings. + /// Indicates how a trial is handled when the trial period ends and there is no credit card on file. For `no_obligation`, the subscription transitions to a Trial Ended state. Maxio will not send any emails or statements. For `payment_expected`, the subscription transitions to a Past Due state. Maxio will send normal dunning emails and statements according to your other settings. /// [JsonProperty("trial_type")] public Models.TrialType? TrialType diff --git a/AdvancedBilling.Standard/Models/SubscriptionGroupBankAccount.cs b/AdvancedBilling.Standard/Models/SubscriptionGroupBankAccount.cs index 2249d0d3..04ed8eae 100644 --- a/AdvancedBilling.Standard/Models/SubscriptionGroupBankAccount.cs +++ b/AdvancedBilling.Standard/Models/SubscriptionGroupBankAccount.cs @@ -88,19 +88,19 @@ public SubscriptionGroupBankAccount( public string BankAccountNumber { get; set; } /// - /// (Required when creating a subscription with ACH. Optional when creating a subscription with GoCardless). The routing number of the bank. It becomes bank_code while passing via GoCardless API + /// (Required when creating a subscription with ACH. Optional when creating a subscription with GoCardless.) The routing number of the bank. It becomes bank_code while passing via GoCardless API. /// [JsonProperty("bank_routing_number", NullValueHandling = NullValueHandling.Ignore)] public string BankRoutingNumber { get; set; } /// - /// (Optional when creating a subscription with GoCardless). International Bank Account Number. Alternatively, local bank details can be provided + /// (Optional when creating a subscription with GoCardless). International Bank Account Number. Alternatively, local bank details can be provided. /// [JsonProperty("bank_iban", NullValueHandling = NullValueHandling.Ignore)] public string BankIban { get; set; } /// - /// (Optional when creating a subscription with GoCardless) Branch code. Alternatively, an IBAN can be provided + /// (Optional when creating a subscription with GoCardless) Branch code. Alternatively, an IBAN can be provided. /// [JsonProperty("bank_branch_code", NullValueHandling = NullValueHandling.Ignore)] public string BankBranchCode { get; set; } diff --git a/AdvancedBilling.Standard/Models/SubscriptionGroupSignupItem.cs b/AdvancedBilling.Standard/Models/SubscriptionGroupSignupItem.cs index 7fde4a00..7c581db0 100644 --- a/AdvancedBilling.Standard/Models/SubscriptionGroupSignupItem.cs +++ b/AdvancedBilling.Standard/Models/SubscriptionGroupSignupItem.cs @@ -91,13 +91,13 @@ public SubscriptionGroupSignupItem( public string ProductPricePointHandle { get; set; } /// - /// Use in place of passing product and component information to set up the subscription with an existing offer. May be either the Chargify ID of the offer or its handle prefixed with `handle:` + /// Use in place of passing product and component information to set up the subscription with an existing offer. May be either the Chargify ID of the offer or its handle prefixed with `handle:`. /// [JsonProperty("offer_id", NullValueHandling = NullValueHandling.Ignore)] public int? OfferId { get; set; } /// - /// The reference value (provided by your app) for the subscription itelf. + /// The reference value (provided by your app) for the subscription itself. /// [JsonProperty("reference", NullValueHandling = NullValueHandling.Ignore)] public string Reference { get; set; } @@ -133,7 +133,7 @@ public SubscriptionGroupSignupItem( public Models.SubscriptionCustomPrice CustomPrice { get; set; } /// - /// (Optional). Cannot be used when also specifying next_billing_at + /// (Optional). Cannot be used when also specifying next_billing_at. /// [JsonProperty("calendar_billing", NullValueHandling = NullValueHandling.Ignore)] public Models.CalendarBilling CalendarBilling { get; set; } diff --git a/AdvancedBilling.Standard/Models/SubscriptionListInclude.cs b/AdvancedBilling.Standard/Models/SubscriptionListInclude.cs index 962f26e9..5fe12c95 100644 --- a/AdvancedBilling.Standard/Models/SubscriptionListInclude.cs +++ b/AdvancedBilling.Standard/Models/SubscriptionListInclude.cs @@ -20,6 +20,24 @@ public enum SubscriptionListInclude /// SelfServicePageToken. /// [EnumMember(Value = "self_service_page_token")] - SelfServicePageToken + SelfServicePageToken, + + /// + /// CurrentAccountBalanceInCents. + /// + [EnumMember(Value = "current_account_balance_in_cents")] + CurrentAccountBalanceInCents, + + /// + /// CurrentBillingAmount. + /// + [EnumMember(Value = "current_billing_amount")] + CurrentBillingAmount, + + /// + /// Coupons. + /// + [EnumMember(Value = "coupons")] + Coupons } } \ No newline at end of file diff --git a/AdvancedBilling.Standard/Models/SubscriptionProductChange.cs b/AdvancedBilling.Standard/Models/SubscriptionProductChange.cs index 63ffd1bb..71175f9b 100644 --- a/AdvancedBilling.Standard/Models/SubscriptionProductChange.cs +++ b/AdvancedBilling.Standard/Models/SubscriptionProductChange.cs @@ -4,6 +4,8 @@ // This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). // using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System; using System.Collections.Generic; namespace AdvancedBilling.Standard.Models @@ -13,6 +15,16 @@ namespace AdvancedBilling.Standard.Models /// public class SubscriptionProductChange : BaseModel { + private int? previousProductPricePointId; + private int? newProductPricePointId; + private DateTimeOffset? effectiveAt; + private Dictionary shouldSerialize = new Dictionary + { + { "previous_product_price_point_id", false }, + { "new_product_price_point_id", false }, + { "effective_at", false }, + }; + /// /// Initializes a new instance of the class. /// @@ -25,12 +37,33 @@ public SubscriptionProductChange() /// /// previous_product_id. /// new_product_id. + /// previous_product_price_point_id. + /// new_product_price_point_id. + /// effective_at. public SubscriptionProductChange( int previousProductId, - int newProductId) + int newProductId, + int? previousProductPricePointId = null, + int? newProductPricePointId = null, + DateTimeOffset? effectiveAt = null) { this.PreviousProductId = previousProductId; this.NewProductId = newProductId; + + if (previousProductPricePointId != null) + { + this.PreviousProductPricePointId = previousProductPricePointId; + } + + if (newProductPricePointId != null) + { + this.NewProductPricePointId = newProductPricePointId; + } + + if (effectiveAt != null) + { + this.EffectiveAt = effectiveAt; + } } /// @@ -47,6 +80,61 @@ public SubscriptionProductChange( [JsonRequired] public int NewProductId { get; set; } + /// + /// Gets or sets PreviousProductPricePointId. + /// + [JsonProperty("previous_product_price_point_id")] + public int? PreviousProductPricePointId + { + get + { + return this.previousProductPricePointId; + } + + set + { + this.shouldSerialize["previous_product_price_point_id"] = true; + this.previousProductPricePointId = value; + } + } + + /// + /// Gets or sets NewProductPricePointId. + /// + [JsonProperty("new_product_price_point_id")] + public int? NewProductPricePointId + { + get + { + return this.newProductPricePointId; + } + + set + { + this.shouldSerialize["new_product_price_point_id"] = true; + this.newProductPricePointId = value; + } + } + + /// + /// When the scheduled product change takes effect (the subscription's next renewal). Only sent for `subscription_product_change_scheduled`. + /// + [JsonConverter(typeof(IsoDateTimeConverter))] + [JsonProperty("effective_at")] + public DateTimeOffset? EffectiveAt + { + get + { + return this.effectiveAt; + } + + set + { + this.shouldSerialize["effective_at"] = true; + this.effectiveAt = value; + } + } + /// public override string ToString() { @@ -55,6 +143,55 @@ public override string ToString() return $"SubscriptionProductChange : ({string.Join(", ", toStringOutput)})"; } + /// + /// Marks the field to not be serialized. + /// + public void UnsetPreviousProductPricePointId() + { + this.shouldSerialize["previous_product_price_point_id"] = false; + } + /// + /// Marks the field to not be serialized. + /// + public void UnsetNewProductPricePointId() + { + this.shouldSerialize["new_product_price_point_id"] = false; + } + /// + /// Marks the field to not be serialized. + /// + public void UnsetEffectiveAt() + { + this.shouldSerialize["effective_at"] = false; + } + + /// + /// Checks if the field should be serialized or not. + /// + /// A boolean weather the field should be serialized or not. + public bool ShouldSerializePreviousProductPricePointId() + { + return this.shouldSerialize["previous_product_price_point_id"]; + } + + /// + /// Checks if the field should be serialized or not. + /// + /// A boolean weather the field should be serialized or not. + public bool ShouldSerializeNewProductPricePointId() + { + return this.shouldSerialize["new_product_price_point_id"]; + } + + /// + /// Checks if the field should be serialized or not. + /// + /// A boolean weather the field should be serialized or not. + public bool ShouldSerializeEffectiveAt() + { + return this.shouldSerialize["effective_at"]; + } + /// public override bool Equals(object obj) { @@ -64,6 +201,12 @@ public override bool Equals(object obj) return obj is SubscriptionProductChange other && (this.PreviousProductId.Equals(other.PreviousProductId)) && (this.NewProductId.Equals(other.NewProductId)) && + (this.PreviousProductPricePointId == null && other.PreviousProductPricePointId == null || + this.PreviousProductPricePointId?.Equals(other.PreviousProductPricePointId) == true) && + (this.NewProductPricePointId == null && other.NewProductPricePointId == null || + this.NewProductPricePointId?.Equals(other.NewProductPricePointId) == true) && + (this.EffectiveAt == null && other.EffectiveAt == null || + this.EffectiveAt?.Equals(other.EffectiveAt) == true) && base.Equals(obj); } @@ -75,6 +218,9 @@ public override bool Equals(object obj) { toStringOutput.Add($"PreviousProductId = {this.PreviousProductId}"); toStringOutput.Add($"NewProductId = {this.NewProductId}"); + toStringOutput.Add($"PreviousProductPricePointId = {(this.PreviousProductPricePointId == null ? "null" : this.PreviousProductPricePointId.ToString())}"); + toStringOutput.Add($"NewProductPricePointId = {(this.NewProductPricePointId == null ? "null" : this.NewProductPricePointId.ToString())}"); + toStringOutput.Add($"EffectiveAt = {(this.EffectiveAt == null ? "null" : this.EffectiveAt.ToString())}"); base.ToString(toStringOutput); } diff --git a/AdvancedBilling.Standard/Models/SubscriptionStateFilter.cs b/AdvancedBilling.Standard/Models/SubscriptionStateFilter.cs index f1702800..feeaec9f 100644 --- a/AdvancedBilling.Standard/Models/SubscriptionStateFilter.cs +++ b/AdvancedBilling.Standard/Models/SubscriptionStateFilter.cs @@ -40,12 +40,36 @@ public enum SubscriptionStateFilter [EnumMember(Value = "expired_cards")] ExpiredCards, + /// + /// EnumExpiredCardsLiveSubscriptions. + /// + [EnumMember(Value = "expired_cards_(live_subscriptions)")] + EnumExpiredCardsLiveSubscriptions, + + /// + /// EnumExpiredCardsAllSubscriptions. + /// + [EnumMember(Value = "expired_cards_(all_subscriptions)")] + EnumExpiredCardsAllSubscriptions, + /// /// OnHold. /// [EnumMember(Value = "on_hold")] OnHold, + /// + /// AwaitingSignup. + /// + [EnumMember(Value = "awaiting_signup")] + AwaitingSignup, + + /// + /// AwaitingSignupDate. + /// + [EnumMember(Value = "awaiting_signup_date")] + AwaitingSignupDate, + /// /// PastDue. /// @@ -64,6 +88,12 @@ public enum SubscriptionStateFilter [EnumMember(Value = "pending_renewal")] PendingRenewal, + /// + /// PrepaidDunning. + /// + [EnumMember(Value = "prepaid_dunning")] + PrepaidDunning, + /// /// Suspended. /// diff --git a/AdvancedBilling.Standard/Models/UpdateComponent.cs b/AdvancedBilling.Standard/Models/UpdateComponent.cs index 932b3553..9191411d 100644 --- a/AdvancedBilling.Standard/Models/UpdateComponent.cs +++ b/AdvancedBilling.Standard/Models/UpdateComponent.cs @@ -18,6 +18,7 @@ public class UpdateComponent : BaseModel private string taxCode; private Models.ItemCategory? itemCategory; private Models.CreditType? upgradeCharge; + private string unspscCode; private Dictionary shouldSerialize = new Dictionary { { "description", false }, @@ -25,6 +26,7 @@ public class UpdateComponent : BaseModel { "tax_code", false }, { "item_category", false }, { "upgrade_charge", false }, + { "unspsc_code", false }, }; /// @@ -46,6 +48,7 @@ public UpdateComponent() /// item_category. /// display_on_hosted_page. /// upgrade_charge. + /// unspsc_code. public UpdateComponent( string handle = null, string name = null, @@ -55,7 +58,8 @@ public UpdateComponent( string taxCode = null, Models.ItemCategory? itemCategory = null, bool? displayOnHostedPage = null, - Models.CreditType? upgradeCharge = null) + Models.CreditType? upgradeCharge = null, + string unspscCode = null) { this.Handle = handle; this.Name = name; @@ -86,6 +90,11 @@ public UpdateComponent( { this.UpgradeCharge = upgradeCharge; } + + if (unspscCode != null) + { + this.UnspscCode = unspscCode; + } } /// @@ -95,7 +104,7 @@ public UpdateComponent( public string Handle { get; set; } /// - /// The name of the Component, suitable for display on statements. i.e. Text Messages. + /// The name of the Component, suitable for display on statements. e.g., Text Messages. /// [JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)] public string Name { get; set; } @@ -202,6 +211,24 @@ public Models.CreditType? UpgradeCharge } } + /// + /// (Optional) Custom UNSPSC commodity code for Level 3/CEDP payment data. When set, this value is sent as the commodity code on invoice line items for this component instead of the default derived from item_category. + /// + [JsonProperty("unspsc_code")] + public string UnspscCode + { + get + { + return this.unspscCode; + } + + set + { + this.shouldSerialize["unspsc_code"] = true; + this.unspscCode = value; + } + } + /// public override string ToString() { @@ -245,6 +272,13 @@ public void UnsetUpgradeCharge() { this.shouldSerialize["upgrade_charge"] = false; } + /// + /// Marks the field to not be serialized. + /// + public void UnsetUnspscCode() + { + this.shouldSerialize["unspsc_code"] = false; + } /// /// Checks if the field should be serialized or not. @@ -291,6 +325,15 @@ public bool ShouldSerializeUpgradeCharge() return this.shouldSerialize["upgrade_charge"]; } + /// + /// Checks if the field should be serialized or not. + /// + /// A boolean weather the field should be serialized or not. + public bool ShouldSerializeUnspscCode() + { + return this.shouldSerialize["unspsc_code"]; + } + /// public override bool Equals(object obj) { @@ -316,6 +359,8 @@ public override bool Equals(object obj) this.DisplayOnHostedPage?.Equals(other.DisplayOnHostedPage) == true) && (this.UpgradeCharge == null && other.UpgradeCharge == null || this.UpgradeCharge?.Equals(other.UpgradeCharge) == true) && + (this.UnspscCode == null && other.UnspscCode == null || + this.UnspscCode?.Equals(other.UnspscCode) == true) && base.Equals(obj); } @@ -334,6 +379,7 @@ public override bool Equals(object obj) toStringOutput.Add($"ItemCategory = {(this.ItemCategory == null ? "null" : this.ItemCategory.ToString())}"); toStringOutput.Add($"DisplayOnHostedPage = {(this.DisplayOnHostedPage == null ? "null" : this.DisplayOnHostedPage.ToString())}"); toStringOutput.Add($"UpgradeCharge = {(this.UpgradeCharge == null ? "null" : this.UpgradeCharge.ToString())}"); + toStringOutput.Add($"UnspscCode = {this.UnspscCode ?? "null"}"); base.ToString(toStringOutput); } diff --git a/AdvancedBilling.Standard/Models/UpdateComponentPricePoint.cs b/AdvancedBilling.Standard/Models/UpdateComponentPricePoint.cs index 685a8dcb..64a40fab 100644 --- a/AdvancedBilling.Standard/Models/UpdateComponentPricePoint.cs +++ b/AdvancedBilling.Standard/Models/UpdateComponentPricePoint.cs @@ -92,7 +92,7 @@ public UpdateComponentPricePoint( public bool? TaxIncluded { get; set; } /// - /// The numerical interval. i.e. an interval of ‘30’ coupled with an interval_unit of day would mean this component price point would renew every 30 days. This property is only available for sites with Multifrequency enabled. + /// The numerical interval. e.g., an interval of ‘30’ coupled with an interval_unit of day would mean this component price point would renew every 30 days. This property is only available for sites with Multifrequency enabled. /// [JsonProperty("interval", NullValueHandling = NullValueHandling.Ignore)] public int? Interval { get; set; } diff --git a/AdvancedBilling.Standard/Models/UpdateCustomer.cs b/AdvancedBilling.Standard/Models/UpdateCustomer.cs index e9f4da62..f3967ed1 100644 --- a/AdvancedBilling.Standard/Models/UpdateCustomer.cs +++ b/AdvancedBilling.Standard/Models/UpdateCustomer.cs @@ -16,11 +16,13 @@ public class UpdateCustomer : BaseModel private int? parentId; private bool? verified; private string salesforceId; + private int? brandingThemeId; private Dictionary shouldSerialize = new Dictionary { { "parent_id", false }, { "verified", false }, { "salesforce_id", false }, + { "branding_theme_id", false }, }; /// @@ -49,10 +51,12 @@ public UpdateCustomer() /// locale. /// vat_number. /// tax_exempt. + /// surcharging. /// tax_exempt_reason. /// parent_id. /// verified. /// salesforce_id. + /// branding_theme_id. public UpdateCustomer( string firstName = null, string lastName = null, @@ -70,10 +74,12 @@ public UpdateCustomer( string locale = null, string vatNumber = null, bool? taxExempt = null, + bool? surcharging = null, string taxExemptReason = null, int? parentId = null, bool? verified = null, - string salesforceId = null) + string salesforceId = null, + int? brandingThemeId = null) { this.FirstName = firstName; this.LastName = lastName; @@ -91,6 +97,7 @@ public UpdateCustomer( this.Locale = locale; this.VatNumber = vatNumber; this.TaxExempt = taxExempt; + this.Surcharging = surcharging; this.TaxExemptReason = taxExemptReason; if (parentId != null) @@ -107,6 +114,11 @@ public UpdateCustomer( { this.SalesforceId = salesforceId; } + + if (brandingThemeId != null) + { + this.BrandingThemeId = brandingThemeId; + } } /// @@ -205,6 +217,12 @@ public UpdateCustomer( [JsonProperty("tax_exempt", NullValueHandling = NullValueHandling.Ignore)] public bool? TaxExempt { get; set; } + /// + /// Whether surcharging is enabled for the customer. Only applied on sites where surcharging control is enabled. + /// + [JsonProperty("surcharging", NullValueHandling = NullValueHandling.Ignore)] + public bool? Surcharging { get; set; } + /// /// Gets or sets TaxExemptReason. /// @@ -230,7 +248,7 @@ public int? ParentId } /// - /// Is the customer verified to use ACH as a payment method. Available only on Authorize.Net gateway + /// Is the customer verified to use ACH as a payment method. Available only on the Authorize.Net gateway. /// [JsonProperty("verified")] public bool? Verified @@ -265,6 +283,24 @@ public string SalesforceId } } + /// + /// The ID of the Branding Theme assigned to this customer as the customer's default Branding Theme. This customer-level Branding Theme is used when a subscription does not have its own subscription-level Branding Theme. Available only when Branding Themes are enabled for the site. + /// + [JsonProperty("branding_theme_id")] + public int? BrandingThemeId + { + get + { + return this.brandingThemeId; + } + + set + { + this.shouldSerialize["branding_theme_id"] = true; + this.brandingThemeId = value; + } + } + /// public override string ToString() { @@ -294,6 +330,13 @@ public void UnsetSalesforceId() { this.shouldSerialize["salesforce_id"] = false; } + /// + /// Marks the field to not be serialized. + /// + public void UnsetBrandingThemeId() + { + this.shouldSerialize["branding_theme_id"] = false; + } /// /// Checks if the field should be serialized or not. @@ -322,6 +365,15 @@ public bool ShouldSerializeSalesforceId() return this.shouldSerialize["salesforce_id"]; } + /// + /// Checks if the field should be serialized or not. + /// + /// A boolean weather the field should be serialized or not. + public bool ShouldSerializeBrandingThemeId() + { + return this.shouldSerialize["branding_theme_id"]; + } + /// public override bool Equals(object obj) { @@ -361,6 +413,8 @@ public override bool Equals(object obj) this.VatNumber?.Equals(other.VatNumber) == true) && (this.TaxExempt == null && other.TaxExempt == null || this.TaxExempt?.Equals(other.TaxExempt) == true) && + (this.Surcharging == null && other.Surcharging == null || + this.Surcharging?.Equals(other.Surcharging) == true) && (this.TaxExemptReason == null && other.TaxExemptReason == null || this.TaxExemptReason?.Equals(other.TaxExemptReason) == true) && (this.ParentId == null && other.ParentId == null || @@ -369,6 +423,8 @@ public override bool Equals(object obj) this.Verified?.Equals(other.Verified) == true) && (this.SalesforceId == null && other.SalesforceId == null || this.SalesforceId?.Equals(other.SalesforceId) == true) && + (this.BrandingThemeId == null && other.BrandingThemeId == null || + this.BrandingThemeId?.Equals(other.BrandingThemeId) == true) && base.Equals(obj); } @@ -394,10 +450,12 @@ public override bool Equals(object obj) toStringOutput.Add($"Locale = {this.Locale ?? "null"}"); toStringOutput.Add($"VatNumber = {this.VatNumber ?? "null"}"); toStringOutput.Add($"TaxExempt = {(this.TaxExempt == null ? "null" : this.TaxExempt.ToString())}"); + toStringOutput.Add($"Surcharging = {(this.Surcharging == null ? "null" : this.Surcharging.ToString())}"); toStringOutput.Add($"TaxExemptReason = {this.TaxExemptReason ?? "null"}"); toStringOutput.Add($"ParentId = {(this.ParentId == null ? "null" : this.ParentId.ToString())}"); toStringOutput.Add($"Verified = {(this.Verified == null ? "null" : this.Verified.ToString())}"); toStringOutput.Add($"SalesforceId = {this.SalesforceId ?? "null"}"); + toStringOutput.Add($"BrandingThemeId = {(this.BrandingThemeId == null ? "null" : this.BrandingThemeId.ToString())}"); base.ToString(toStringOutput); } diff --git a/AdvancedBilling.Standard/Models/UpdateInvoice.cs b/AdvancedBilling.Standard/Models/UpdateInvoice.cs new file mode 100644 index 00000000..c8d2d7b7 --- /dev/null +++ b/AdvancedBilling.Standard/Models/UpdateInvoice.cs @@ -0,0 +1,169 @@ +// +// AdvancedBilling.Standard +// +// This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). +// +using AdvancedBilling.Standard.Utilities; +using Newtonsoft.Json; +using System; +using System.Collections.Generic; + +namespace AdvancedBilling.Standard.Models +{ + /// + /// UpdateInvoice. + /// + public class UpdateInvoice : BaseModel + { + /// + /// Initializes a new instance of the class. + /// + public UpdateInvoice() + { + } + + /// + /// Initializes a new instance of the class. + /// + /// line_items. + /// issue_date. + /// net_terms. + /// payment_instructions. + /// memo. + /// seller_address. + /// billing_address. + /// shipping_address. + /// coupons. + public UpdateInvoice( + List lineItems = null, + DateTime? issueDate = null, + int? netTerms = null, + string paymentInstructions = null, + string memo = null, + Models.CreateInvoiceAddress sellerAddress = null, + Models.CreateInvoiceAddress billingAddress = null, + Models.CreateInvoiceAddress shippingAddress = null, + List coupons = null) + { + this.LineItems = lineItems; + this.IssueDate = issueDate; + this.NetTerms = netTerms; + this.PaymentInstructions = paymentInstructions; + this.Memo = memo; + this.SellerAddress = sellerAddress; + this.BillingAddress = billingAddress; + this.ShippingAddress = shippingAddress; + this.Coupons = coupons; + } + + /// + /// Line item changes to apply. Line items without a `uid` are added, line items with a `uid` are updated, and line items with a `uid` and `_destroy` set to `true` are removed. Existing line items not referenced in the array remain unchanged. + /// + [JsonProperty("line_items", NullValueHandling = NullValueHandling.Ignore)] + public List LineItems { get; set; } + + /// + /// New issue date for the invoice (format YYYY-MM-DD). This date is interpreted and validated in your site's time zone. It must be today or a date in the past — future dates are not accepted. The due date is recalculated from the issue date and net terms. + /// + [JsonConverter(typeof(CustomDateTimeConverter), "yyyy'-'MM'-'dd")] + [JsonProperty("issue_date", NullValueHandling = NullValueHandling.Ignore)] + public DateTime? IssueDate { get; set; } + + /// + /// Number of days after the issue date on which the invoice is due. The due date is recalculated when net terms or the issue date change. + /// + [JsonProperty("net_terms", NullValueHandling = NullValueHandling.Ignore)] + public int? NetTerms { get; set; } + + /// + /// Custom payment instructions displayed on the invoice. + /// + [JsonProperty("payment_instructions", NullValueHandling = NullValueHandling.Ignore)] + public string PaymentInstructions { get; set; } + + /// + /// A custom memo displayed on the invoice. + /// + [JsonProperty("memo", NullValueHandling = NullValueHandling.Ignore)] + public string Memo { get; set; } + + /// + /// Replaces the seller address on the invoice + /// + [JsonProperty("seller_address", NullValueHandling = NullValueHandling.Ignore)] + public Models.CreateInvoiceAddress SellerAddress { get; set; } + + /// + /// Replaces the billing address on the invoice + /// + [JsonProperty("billing_address", NullValueHandling = NullValueHandling.Ignore)] + public Models.CreateInvoiceAddress BillingAddress { get; set; } + + /// + /// Replaces the shipping address on the invoice + /// + [JsonProperty("shipping_address", NullValueHandling = NullValueHandling.Ignore)] + public Models.CreateInvoiceAddress ShippingAddress { get; set; } + + /// + /// When present, replaces all discounts currently applied to the invoice. Send an empty array to remove all discounts. + /// + [JsonProperty("coupons", NullValueHandling = NullValueHandling.Ignore)] + public List Coupons { get; set; } + + /// + public override string ToString() + { + var toStringOutput = new List(); + this.ToString(toStringOutput); + return $"UpdateInvoice : ({string.Join(", ", toStringOutput)})"; + } + + /// + public override bool Equals(object obj) + { + if (obj is null) return false; + if (ReferenceEquals(this, obj)) return true; + + return obj is UpdateInvoice other && + (this.LineItems == null && other.LineItems == null || + this.LineItems?.Equals(other.LineItems) == true) && + (this.IssueDate == null && other.IssueDate == null || + this.IssueDate?.Equals(other.IssueDate) == true) && + (this.NetTerms == null && other.NetTerms == null || + this.NetTerms?.Equals(other.NetTerms) == true) && + (this.PaymentInstructions == null && other.PaymentInstructions == null || + this.PaymentInstructions?.Equals(other.PaymentInstructions) == true) && + (this.Memo == null && other.Memo == null || + this.Memo?.Equals(other.Memo) == true) && + (this.SellerAddress == null && other.SellerAddress == null || + this.SellerAddress?.Equals(other.SellerAddress) == true) && + (this.BillingAddress == null && other.BillingAddress == null || + this.BillingAddress?.Equals(other.BillingAddress) == true) && + (this.ShippingAddress == null && other.ShippingAddress == null || + this.ShippingAddress?.Equals(other.ShippingAddress) == true) && + (this.Coupons == null && other.Coupons == null || + this.Coupons?.Equals(other.Coupons) == true) && + base.Equals(obj); + } + + /// + /// ToString overload. + /// + /// List of strings. + protected new void ToString(List toStringOutput) + { + toStringOutput.Add($"LineItems = {(this.LineItems == null ? "null" : $"[{string.Join(", ", this.LineItems)} ]")}"); + toStringOutput.Add($"IssueDate = {(this.IssueDate == null ? "null" : this.IssueDate.ToString())}"); + toStringOutput.Add($"NetTerms = {(this.NetTerms == null ? "null" : this.NetTerms.ToString())}"); + toStringOutput.Add($"PaymentInstructions = {this.PaymentInstructions ?? "null"}"); + toStringOutput.Add($"Memo = {this.Memo ?? "null"}"); + toStringOutput.Add($"SellerAddress = {(this.SellerAddress == null ? "null" : this.SellerAddress.ToString())}"); + toStringOutput.Add($"BillingAddress = {(this.BillingAddress == null ? "null" : this.BillingAddress.ToString())}"); + toStringOutput.Add($"ShippingAddress = {(this.ShippingAddress == null ? "null" : this.ShippingAddress.ToString())}"); + toStringOutput.Add($"Coupons = {(this.Coupons == null ? "null" : $"[{string.Join(", ", this.Coupons)} ]")}"); + + base.ToString(toStringOutput); + } + } +} \ No newline at end of file diff --git a/AdvancedBilling.Standard/Models/UpdateInvoiceItem.cs b/AdvancedBilling.Standard/Models/UpdateInvoiceItem.cs new file mode 100644 index 00000000..e2dc3ad4 --- /dev/null +++ b/AdvancedBilling.Standard/Models/UpdateInvoiceItem.cs @@ -0,0 +1,227 @@ +// +// AdvancedBilling.Standard +// +// This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). +// +using AdvancedBilling.Standard.Models.Containers; +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace AdvancedBilling.Standard.Models +{ + /// + /// UpdateInvoiceItem. + /// + public class UpdateInvoiceItem : BaseModel + { + /// + /// Initializes a new instance of the class. + /// + public UpdateInvoiceItem() + { + } + + /// + /// Initializes a new instance of the class. + /// + /// title. + /// quantity. + /// unit_price. + /// taxable. + /// tax_code. + /// period_range_start. + /// period_range_end. + /// product_id. + /// component_id. + /// price_point_id. + /// product_price_point_id. + /// description. + /// uid. + /// _destroy. + public UpdateInvoiceItem( + string title = null, + UpdateInvoiceItemQuantity quantity = null, + UpdateInvoiceItemUnitPrice unitPrice = null, + bool? taxable = null, + string taxCode = null, + string periodRangeStart = null, + string periodRangeEnd = null, + UpdateInvoiceItemProductId productId = null, + UpdateInvoiceItemComponentId componentId = null, + UpdateInvoiceItemPricePointId pricePointId = null, + UpdateInvoiceItemProductPricePointId productPricePointId = null, + string description = null, + string uid = null, + bool? destroy = null) + { + this.Title = title; + this.Quantity = quantity; + this.UnitPrice = unitPrice; + this.Taxable = taxable; + this.TaxCode = taxCode; + this.PeriodRangeStart = periodRangeStart; + this.PeriodRangeEnd = periodRangeEnd; + this.ProductId = productId; + this.ComponentId = componentId; + this.PricePointId = pricePointId; + this.ProductPricePointId = productPricePointId; + this.Description = description; + this.Uid = uid; + this.Destroy = destroy; + } + + /// + /// Gets or sets Title. + /// + [JsonProperty("title", NullValueHandling = NullValueHandling.Ignore)] + public string Title { get; set; } + + /// + /// The quantity can contain up to 8 decimal places. e.g., 1.00 or 0.0012 or 0.00000065. If you submit a value with more than 8 decimal places, we will round it down to the 8th decimal place. + /// + [JsonProperty("quantity", NullValueHandling = NullValueHandling.Ignore)] + public UpdateInvoiceItemQuantity Quantity { get; set; } + + /// + /// The unit_price can contain up to 8 decimal places. e.g., 1.00 or 0.0012 or 0.00000065. If you submit a value with more than 8 decimal places, we will round it down to the 8th decimal place. + /// + [JsonProperty("unit_price", NullValueHandling = NullValueHandling.Ignore)] + public UpdateInvoiceItemUnitPrice UnitPrice { get; set; } + + /// + /// Set to true to automatically calculate taxes. Site must be configured to use and calculate taxes. If using AvaTax, a tax_code parameter must also be sent. + /// + [JsonProperty("taxable", NullValueHandling = NullValueHandling.Ignore)] + public bool? Taxable { get; set; } + + /// + /// A string representing the tax code related to the product 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", NullValueHandling = NullValueHandling.Ignore)] + public string TaxCode { get; set; } + + /// + /// YYYY-MM-DD + /// + [JsonProperty("period_range_start", NullValueHandling = NullValueHandling.Ignore)] + public string PeriodRangeStart { get; set; } + + /// + /// YYYY-MM-DD + /// + [JsonProperty("period_range_end", NullValueHandling = NullValueHandling.Ignore)] + public string PeriodRangeEnd { get; set; } + + /// + /// Product handle or product id. + /// + [JsonProperty("product_id", NullValueHandling = NullValueHandling.Ignore)] + public UpdateInvoiceItemProductId ProductId { get; set; } + + /// + /// Component handle or component id. + /// + [JsonProperty("component_id", NullValueHandling = NullValueHandling.Ignore)] + public UpdateInvoiceItemComponentId ComponentId { get; set; } + + /// + /// Price point handle or id. For component. + /// + [JsonProperty("price_point_id", NullValueHandling = NullValueHandling.Ignore)] + public UpdateInvoiceItemPricePointId PricePointId { get; set; } + + /// + /// Gets or sets ProductPricePointId. + /// + [JsonProperty("product_price_point_id", NullValueHandling = NullValueHandling.Ignore)] + public UpdateInvoiceItemProductPricePointId ProductPricePointId { get; set; } + + /// + /// Gets or sets Description. + /// + [JsonProperty("description", NullValueHandling = NullValueHandling.Ignore)] + public string Description { get; set; } + + /// + /// Unique identifier of an existing line item on the invoice. When provided, the matching line item is updated with the submitted attributes. When omitted, a new line item is added to the invoice. + /// + [JsonProperty("uid", NullValueHandling = NullValueHandling.Ignore)] + public string Uid { get; set; } + + /// + /// Set to `true` together with `uid` to remove the matching line item from the invoice. Line items not referenced in the request remain unchanged. + /// + [JsonProperty("_destroy", NullValueHandling = NullValueHandling.Ignore)] + public bool? Destroy { get; set; } + + /// + public override string ToString() + { + var toStringOutput = new List(); + this.ToString(toStringOutput); + return $"UpdateInvoiceItem : ({string.Join(", ", toStringOutput)})"; + } + + /// + public override bool Equals(object obj) + { + if (obj is null) return false; + if (ReferenceEquals(this, obj)) return true; + + return obj is UpdateInvoiceItem other && + (this.Title == null && other.Title == null || + this.Title?.Equals(other.Title) == true) && + (this.Quantity == null && other.Quantity == null || + this.Quantity?.Equals(other.Quantity) == true) && + (this.UnitPrice == null && other.UnitPrice == null || + this.UnitPrice?.Equals(other.UnitPrice) == 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.PeriodRangeStart == null && other.PeriodRangeStart == null || + this.PeriodRangeStart?.Equals(other.PeriodRangeStart) == true) && + (this.PeriodRangeEnd == null && other.PeriodRangeEnd == null || + this.PeriodRangeEnd?.Equals(other.PeriodRangeEnd) == true) && + (this.ProductId == null && other.ProductId == null || + this.ProductId?.Equals(other.ProductId) == true) && + (this.ComponentId == null && other.ComponentId == null || + this.ComponentId?.Equals(other.ComponentId) == true) && + (this.PricePointId == null && other.PricePointId == null || + this.PricePointId?.Equals(other.PricePointId) == true) && + (this.ProductPricePointId == null && other.ProductPricePointId == null || + this.ProductPricePointId?.Equals(other.ProductPricePointId) == true) && + (this.Description == null && other.Description == null || + this.Description?.Equals(other.Description) == true) && + (this.Uid == null && other.Uid == null || + this.Uid?.Equals(other.Uid) == true) && + (this.Destroy == null && other.Destroy == null || + this.Destroy?.Equals(other.Destroy) == true) && + base.Equals(obj); + } + + /// + /// ToString overload. + /// + /// List of strings. + protected new void ToString(List toStringOutput) + { + toStringOutput.Add($"Title = {this.Title ?? "null"}"); + toStringOutput.Add($"Quantity = {(this.Quantity == null ? "null" : this.Quantity.ToString())}"); + toStringOutput.Add($"UnitPrice = {(this.UnitPrice == null ? "null" : this.UnitPrice.ToString())}"); + toStringOutput.Add($"Taxable = {(this.Taxable == null ? "null" : this.Taxable.ToString())}"); + toStringOutput.Add($"TaxCode = {this.TaxCode ?? "null"}"); + toStringOutput.Add($"PeriodRangeStart = {this.PeriodRangeStart ?? "null"}"); + toStringOutput.Add($"PeriodRangeEnd = {this.PeriodRangeEnd ?? "null"}"); + toStringOutput.Add($"ProductId = {(this.ProductId == null ? "null" : this.ProductId.ToString())}"); + toStringOutput.Add($"ComponentId = {(this.ComponentId == null ? "null" : this.ComponentId.ToString())}"); + toStringOutput.Add($"PricePointId = {(this.PricePointId == null ? "null" : this.PricePointId.ToString())}"); + toStringOutput.Add($"ProductPricePointId = {(this.ProductPricePointId == null ? "null" : this.ProductPricePointId.ToString())}"); + toStringOutput.Add($"Description = {this.Description ?? "null"}"); + toStringOutput.Add($"Uid = {this.Uid ?? "null"}"); + toStringOutput.Add($"Destroy = {(this.Destroy == null ? "null" : this.Destroy.ToString())}"); + + base.ToString(toStringOutput); + } + } +} \ No newline at end of file diff --git a/AdvancedBilling.Standard/Models/UpdateInvoiceRequest.cs b/AdvancedBilling.Standard/Models/UpdateInvoiceRequest.cs new file mode 100644 index 00000000..aec82b55 --- /dev/null +++ b/AdvancedBilling.Standard/Models/UpdateInvoiceRequest.cs @@ -0,0 +1,70 @@ +// +// AdvancedBilling.Standard +// +// This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ). +// +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace AdvancedBilling.Standard.Models +{ + /// + /// UpdateInvoiceRequest. + /// + public class UpdateInvoiceRequest : BaseModel + { + /// + /// Initializes a new instance of the class. + /// + public UpdateInvoiceRequest() + { + } + + /// + /// Initializes a new instance of the class. + /// + /// invoice. + public UpdateInvoiceRequest( + Models.UpdateInvoice invoice) + { + this.Invoice = invoice; + } + + /// + /// Attributes of a draft ad hoc invoice which can be updated. Only the submitted attributes are changed. + /// + [JsonProperty("invoice")] + public Models.UpdateInvoice Invoice { get; set; } + + /// + public override string ToString() + { + var toStringOutput = new List(); + this.ToString(toStringOutput); + return $"UpdateInvoiceRequest : ({string.Join(", ", toStringOutput)})"; + } + + /// + public override bool Equals(object obj) + { + if (obj is null) return false; + if (ReferenceEquals(this, obj)) return true; + + return obj is UpdateInvoiceRequest other && + (this.Invoice == null && other.Invoice == null || + this.Invoice?.Equals(other.Invoice) == true) && + base.Equals(obj); + } + + /// + /// ToString overload. + /// + /// List of strings. + protected new void ToString(List toStringOutput) + { + toStringOutput.Add($"Invoice = {(this.Invoice == null ? "null" : this.Invoice.ToString())}"); + + base.ToString(toStringOutput); + } + } +} \ No newline at end of file diff --git a/AdvancedBilling.Standard/Models/UpdateMetafield.cs b/AdvancedBilling.Standard/Models/UpdateMetafield.cs index 51b3f820..032d5dc3 100644 --- a/AdvancedBilling.Standard/Models/UpdateMetafield.cs +++ b/AdvancedBilling.Standard/Models/UpdateMetafield.cs @@ -64,7 +64,7 @@ public UpdateMetafield( public Models.MetafieldScope Scope { get; set; } /// - /// Indicates the type of metafield. A text metafield allows any string value. Dropdown and radio metafields have a set of values that can be selected. Defaults to 'text'. + /// Indicates the type of metafield. A text metafield allows any string value. Dropdown and radio metafields have a set of values that can be selected. Defaults to 'text'. /// [JsonProperty("input_type", NullValueHandling = NullValueHandling.Ignore)] public Models.MetafieldInput? InputType { get; set; } diff --git a/AdvancedBilling.Standard/Models/UpdatePaymentProfile.cs b/AdvancedBilling.Standard/Models/UpdatePaymentProfile.cs index 592fcf69..8a0bdc85 100644 --- a/AdvancedBilling.Standard/Models/UpdatePaymentProfile.cs +++ b/AdvancedBilling.Standard/Models/UpdatePaymentProfile.cs @@ -101,13 +101,13 @@ public UpdatePaymentProfile( public Models.CardType? CardType { get; set; } /// - /// (Optional when performing an Import via vault_token, required otherwise) The 1- or 2-digit credit card expiration month, as an integer or string, i.e. 5 + /// (Optional when performing an Import via vault_token, required otherwise) The 1- or 2-digit credit card expiration month, as an integer or string, e.g., 5 /// [JsonProperty("expiration_month", NullValueHandling = NullValueHandling.Ignore)] public string ExpirationMonth { get; set; } /// - /// (Optional when performing a Import via vault_token, required otherwise) The 4-digit credit card expiration year, as an integer or string, i.e. 2012 + /// (Optional when performing an Import via vault_token, required otherwise) The 4-digit credit card expiration year, as an integer or string, e.g., 2012 /// [JsonProperty("expiration_year", NullValueHandling = NullValueHandling.Ignore)] public string ExpirationYear { get; set; } @@ -119,37 +119,37 @@ public UpdatePaymentProfile( public Models.AllVaults? CurrentVault { get; set; } /// - /// The credit card or bank account billing street address (i.e. 123 Main St.). This value is merely passed through to the payment gateway. + /// The credit card or bank account billing street address (e.g., 123 Main St.). This value is merely passed through to the payment gateway. /// [JsonProperty("billing_address", NullValueHandling = NullValueHandling.Ignore)] public string BillingAddress { get; set; } /// - /// The credit card or bank account billing address city (i.e. “Boston”). This value is merely passed through to the payment gateway. + /// The credit card or bank account billing address city (e.g., “Boston”). This value is merely passed through to the payment gateway. /// [JsonProperty("billing_city", NullValueHandling = NullValueHandling.Ignore)] public string BillingCity { get; set; } /// - /// The credit card or bank account billing address state (i.e. MA). This value is merely passed through to the payment gateway. This must conform to the [ISO_3166-1](https://en.wikipedia.org/wiki/ISO_3166-1#Current_codes) in order to be valid for tax locale purposes. + /// The credit card or bank account billing address state (e.g., MA). This value is merely passed through to the payment gateway. This must conform to the [ISO_3166-1](https://en.wikipedia.org/wiki/ISO_3166-1#Current_codes) in order to be valid for tax locale purposes. /// [JsonProperty("billing_state", NullValueHandling = NullValueHandling.Ignore)] public string BillingState { get; set; } /// - /// The credit card or bank account billing address zip code (i.e. 12345). This value is merely passed through to the payment gateway. + /// The credit card or bank account billing address zip code (e.g., 12345). This value is merely passed through to the payment gateway. /// [JsonProperty("billing_zip", NullValueHandling = NullValueHandling.Ignore)] public string BillingZip { get; set; } /// - /// The credit card or bank account billing address country, required in [ISO_3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format (i.e. “US”). This value is merely passed through to the payment gateway. Some gateways require country codes in a specific format. Check your gateway’s documentation. If creating an ACH subscription, only US is supported at this time. + /// The credit card or bank account billing address country, required in [ISO_3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format (e.g., “US”). This value is merely passed through to the payment gateway. Some gateways require country codes in a specific format. Check your gateway’s documentation. If creating an ACH subscription, only US is supported at this time. /// [JsonProperty("billing_country", NullValueHandling = NullValueHandling.Ignore)] public string BillingCountry { get; set; } /// - /// Second line of the customer’s billing address i.e. Apt. 100 + /// Second line of the customer’s billing address, e.g., Apt. 100 /// [JsonProperty("billing_address_2")] public string BillingAddress2 diff --git a/AdvancedBilling.Standard/Models/UpdatePrice.cs b/AdvancedBilling.Standard/Models/UpdatePrice.cs index 870c21ca..3bdd65e8 100644 --- a/AdvancedBilling.Standard/Models/UpdatePrice.cs +++ b/AdvancedBilling.Standard/Models/UpdatePrice.cs @@ -56,7 +56,7 @@ public UpdatePrice( public UpdatePriceEndingQuantity EndingQuantity { get; set; } /// - /// The price can contain up to 8 decimal places. i.e. 1.00 or 0.0012 or 0.00000065 + /// The price can contain up to 8 decimal places. e.g., 1.00 or 0.0012 or 0.00000065 /// [JsonProperty("unit_price", NullValueHandling = NullValueHandling.Ignore)] public UpdatePriceUnitPrice UnitPrice { get; set; } diff --git a/AdvancedBilling.Standard/Models/UpdateSubscription.cs b/AdvancedBilling.Standard/Models/UpdateSubscription.cs index 387a6732..c15a1978 100644 --- a/AdvancedBilling.Standard/Models/UpdateSubscription.cs +++ b/AdvancedBilling.Standard/Models/UpdateSubscription.cs @@ -16,9 +16,11 @@ namespace AdvancedBilling.Standard.Models /// public class UpdateSubscription : BaseModel { + private int? brandingThemeId; private string dunningCommunicationDelayTimeZone; private Dictionary shouldSerialize = new Dictionary { + { "branding_theme_id", false }, { "dunning_communication_delay_time_zone", false }, }; @@ -42,6 +44,7 @@ public UpdateSubscription() /// initial_billing_at. /// defer_signup. /// next_billing_at. + /// branding_theme_id. /// expires_at. /// payment_collection_method. /// receives_invoice_emails. @@ -65,6 +68,7 @@ public UpdateSubscription( DateTimeOffset? initialBillingAt = null, bool? deferSignup = false, DateTimeOffset? nextBillingAt = null, + int? brandingThemeId = null, DateTimeOffset? expiresAt = null, string paymentCollectionMethod = null, bool? receivesInvoiceEmails = null, @@ -88,6 +92,11 @@ public UpdateSubscription( this.InitialBillingAt = initialBillingAt; this.DeferSignup = deferSignup; this.NextBillingAt = nextBillingAt; + + if (brandingThemeId != null) + { + this.BrandingThemeId = brandingThemeId; + } this.ExpiresAt = expiresAt; this.PaymentCollectionMethod = paymentCollectionMethod; this.ReceivesInvoiceEmails = receivesInvoiceEmails; @@ -113,13 +122,13 @@ public UpdateSubscription( public Models.CreditCardAttributes CreditCardAttributes { get; set; } /// - /// Set to the handle of a different product to change the subscription's product + /// Set to the handle of a different product to change the subscription's product. /// [JsonProperty("product_handle", NullValueHandling = NullValueHandling.Ignore)] public string ProductHandle { get; set; } /// - /// Set to the id of a different product to change the subscription's product + /// Set to the id of a different product to change the subscription's product. /// [JsonProperty("product_id", NullValueHandling = NullValueHandling.Ignore)] public int? ProductId { get; set; } @@ -149,7 +158,7 @@ public UpdateSubscription( public UpdateSubscriptionSnapDay SnapDay { get; set; } /// - /// (Optional) Set this attribute to a future date/time to update a subscription in the Awaiting Signup Date state, to Awaiting Signup. In the Awaiting Signup state, a subscription behaves like any other. It can be canceled, allocated to, or have its billing date changed. etc. When the `initial_billing_at` date hits, the subscription will transition to the expected state. If the product has a trial, the subscription will enter a trial, otherwise it will go active. Setup fees will be respected either before or after the trial, as configured on the price point. If the payment is due at the initial_billing_at and it fails the subscription will be immediately canceled. You can omit the initial_billing_at date to activate the subscription immediately. See the [subscription import](https://maxio.zendesk.com/hc/en-us/articles/24251489107213-Advanced-Billing-Subscription-Imports#date-format) documentation for more information about Date/Time formats. + /// (Optional) Set this attribute to a future date/time to update a subscription in the Awaiting Signup Date state, to Awaiting Signup. In the Awaiting Signup state, a subscription behaves like any other. It can be canceled, allocated to, or have its billing date changed, etc. When the `initial_billing_at` date hits, the subscription will transition to the expected state. If the product has a trial, the subscription will enter a trial, otherwise it will go active. Setup fees will be respected either before or after the trial, as configured on the price point. If the payment is due at the initial_billing_at and it fails the subscription will be immediately canceled. You can omit the initial_billing_at date to activate the subscription immediately. See the [subscription import](https://maxio.zendesk.com/hc/en-us/articles/24251489107213-Advanced-Billing-Subscription-Imports#date-format) documentation for more information about Date/Time formats. /// [JsonConverter(typeof(IsoDateTimeConverter))] [JsonProperty("initial_billing_at", NullValueHandling = NullValueHandling.Ignore)] @@ -168,6 +177,24 @@ public UpdateSubscription( [JsonProperty("next_billing_at", NullValueHandling = NullValueHandling.Ignore)] public DateTimeOffset? NextBillingAt { get; set; } + /// + /// The ID of the Branding Theme to assign to this subscription. When set, this subscription-level Branding Theme is used instead of the customer's default Branding Theme for subscription-related documents and communications that use subscription theming. Pass null or an empty value to clear the subscription-level Branding Theme. Available only when Branding Themes are enabled for the site. Not returned in the response. + /// + [JsonProperty("branding_theme_id")] + public int? BrandingThemeId + { + get + { + return this.brandingThemeId; + } + + set + { + this.shouldSerialize["branding_theme_id"] = true; + this.brandingThemeId = value; + } + } + /// /// Timestamp giving the expiration date of this subscription (if any). You may manually change the expiration date at any point during a subscription period. /// @@ -261,6 +288,13 @@ public override string ToString() return $"UpdateSubscription : ({string.Join(", ", toStringOutput)})"; } + /// + /// Marks the field to not be serialized. + /// + public void UnsetBrandingThemeId() + { + this.shouldSerialize["branding_theme_id"] = false; + } /// /// Marks the field to not be serialized. /// @@ -269,6 +303,15 @@ public void UnsetDunningCommunicationDelayTimeZone() this.shouldSerialize["dunning_communication_delay_time_zone"] = false; } + /// + /// Checks if the field should be serialized or not. + /// + /// A boolean weather the field should be serialized or not. + public bool ShouldSerializeBrandingThemeId() + { + return this.shouldSerialize["branding_theme_id"]; + } + /// /// Checks if the field should be serialized or not. /// @@ -305,6 +348,8 @@ public override bool Equals(object obj) this.DeferSignup?.Equals(other.DeferSignup) == true) && (this.NextBillingAt == null && other.NextBillingAt == null || this.NextBillingAt?.Equals(other.NextBillingAt) == true) && + (this.BrandingThemeId == null && other.BrandingThemeId == null || + this.BrandingThemeId?.Equals(other.BrandingThemeId) == true) && (this.ExpiresAt == null && other.ExpiresAt == null || this.ExpiresAt?.Equals(other.ExpiresAt) == true) && (this.PaymentCollectionMethod == null && other.PaymentCollectionMethod == null || @@ -348,6 +393,7 @@ public override bool Equals(object obj) toStringOutput.Add($"InitialBillingAt = {(this.InitialBillingAt == null ? "null" : this.InitialBillingAt.ToString())}"); toStringOutput.Add($"DeferSignup = {(this.DeferSignup == null ? "null" : this.DeferSignup.ToString())}"); toStringOutput.Add($"NextBillingAt = {(this.NextBillingAt == null ? "null" : this.NextBillingAt.ToString())}"); + toStringOutput.Add($"BrandingThemeId = {(this.BrandingThemeId == null ? "null" : this.BrandingThemeId.ToString())}"); toStringOutput.Add($"ExpiresAt = {(this.ExpiresAt == null ? "null" : this.ExpiresAt.ToString())}"); toStringOutput.Add($"PaymentCollectionMethod = {this.PaymentCollectionMethod ?? "null"}"); toStringOutput.Add($"ReceivesInvoiceEmails = {(this.ReceivesInvoiceEmails == null ? "null" : this.ReceivesInvoiceEmails.ToString())}"); diff --git a/AdvancedBilling.Standard/Models/Webhook.cs b/AdvancedBilling.Standard/Models/Webhook.cs index aac16e0c..36102bd4 100644 --- a/AdvancedBilling.Standard/Models/Webhook.cs +++ b/AdvancedBilling.Standard/Models/Webhook.cs @@ -82,7 +82,7 @@ public Webhook( public string MEvent { get; set; } /// - /// The unique identifier for the webhooks (unique across all of Chargify). This is not changed on a retry/replay of the same webhook, so it may be used to avoid duplicate action for the same event. + /// The unique identifier for the webhook (unique across all of Chargify). This is not changed on a retry/replay of the same webhook, so it may be used to avoid duplicate action for the same event. /// [JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)] public long? Id { get; set; } @@ -140,7 +140,7 @@ public DateTimeOffset? AcceptedAt public string LastSentUrl { get; set; } /// - /// A boolean flag describing whether the webhook was accepted by the webhook endpoint for the most recent attempt. (Acceptance is defined by receiving a “200 OK” HTTP response within a reasonable timeframe, i.e. 15 seconds) + /// “A boolean flag describing whether the webhook was accepted by the webhook endpoint for the most recent attempt. (Acceptance is defined by receiving a “200 OK” HTTP response within a reasonable timeframe, e.g., 15 seconds.)” /// [JsonProperty("successful", NullValueHandling = NullValueHandling.Ignore)] public bool? Successful { get; set; } diff --git a/AdvancedBilling.Standard/Models/WebhookSubscription.cs b/AdvancedBilling.Standard/Models/WebhookSubscription.cs index 605b32fb..2888316f 100644 --- a/AdvancedBilling.Standard/Models/WebhookSubscription.cs +++ b/AdvancedBilling.Standard/Models/WebhookSubscription.cs @@ -196,6 +196,12 @@ public enum WebhookSubscription [EnumMember(Value = "subscription_product_change")] SubscriptionProductChange, + /// + /// SubscriptionProductChangeScheduled. + /// + [EnumMember(Value = "subscription_product_change_scheduled")] + SubscriptionProductChangeScheduled, + /// /// SubscriptionStateChange. /// diff --git a/AdvancedBilling.sln b/AdvancedBilling.sln index 1327c630..7adc3dea 100644 --- a/AdvancedBilling.sln +++ b/AdvancedBilling.sln @@ -2,7 +2,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 VisualStudioVersion = 15.0.26430.14 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AdvancedBilling.Standard", "AdvancedBilling.Standard/AdvancedBilling.Standard.csproj", "{1e7f1da0-0b75-41d6-ac32-960d708c0884}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AdvancedBilling.Standard", "AdvancedBilling.Standard/AdvancedBilling.Standard.csproj", "{88f65849-c6bc-4113-9303-6cc4d1feba89}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -10,10 +10,10 @@ Global Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {1e7f1da0-0b75-41d6-ac32-960d708c0884}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {1e7f1da0-0b75-41d6-ac32-960d708c0884}.Debug|Any CPU.Build.0 = Debug|Any CPU - {1e7f1da0-0b75-41d6-ac32-960d708c0884}.Release|Any CPU.ActiveCfg = Release|Any CPU - {1e7f1da0-0b75-41d6-ac32-960d708c0884}.Release|Any CPU.Build.0 = Release|Any CPU + {88f65849-c6bc-4113-9303-6cc4d1feba89}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {88f65849-c6bc-4113-9303-6cc4d1feba89}.Debug|Any CPU.Build.0 = Debug|Any CPU + {88f65849-c6bc-4113-9303-6cc4d1feba89}.Release|Any CPU.ActiveCfg = Release|Any CPU + {88f65849-c6bc-4113-9303-6cc4d1feba89}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/README.md b/README.md index 09f5e490..28c11d6a 100644 --- a/README.md +++ b/README.md @@ -29,25 +29,25 @@ curl -u :x -H Accept:application/json -H Content-Type:application/json If you are building with .NET CLI tools then you can also use the following command: ```bash -dotnet add package Maxio.AdvancedBillingSdk --version 9.1.0 +dotnet add package Maxio.AdvancedBillingSdk --version 10.0.0 ``` You can also view the package at: -https://www.nuget.org/packages/Maxio.AdvancedBillingSdk/9.1.0 +https://www.nuget.org/packages/Maxio.AdvancedBillingSdk/10.0.0 ## Initialize the API Client -**_Note:_** Documentation for the client can be found [here.](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/9.1.0/doc/client.md) +**_Note:_** Documentation for the client can be found [here.](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/10.0.0/doc/client.md) The following parameters are configurable for the API Client: | Parameter | Type | Description | | --- | --- | --- | | Site | `string` | The subdomain for your Advanced Billing site.
*Default*: `"subdomain"` | -| Environment | [`Environment`](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/9.1.0/README.md#environments) | The API environment.
**Default: `Environment.US`** | +| Environment | [`Environment`](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/10.0.0/README.md#environments) | The API environment.
**Default: `Environment.US`** | | Timeout | `TimeSpan` | Http client timeout.
*Default*: `TimeSpan.FromSeconds(120)` | -| HttpClientConfiguration | [`Action`](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/9.1.0/doc/http-client-configuration-builder.md) | Action delegate that configures the HTTP client by using the HttpClientConfiguration.Builder for customizing API call settings.
*Default*: `new HttpClient()` | -| BasicAuthCredentials | [`BasicAuthCredentials`](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/9.1.0/doc/auth/basic-authentication.md) | The Credentials Setter for Basic Authentication | +| HttpClientConfiguration | [`Action`](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/10.0.0/doc/http-client-configuration-builder.md) | Action delegate that configures the HTTP client by using the HttpClientConfiguration.Builder for customizing API call settings.
*Default*: `new HttpClient()` | +| BasicAuthCredentials | [`BasicAuthCredentials`](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/10.0.0/doc/auth/basic-authentication.md) | The Credentials Setter for Basic Authentication | The API client can be initialized as follows: @@ -92,7 +92,7 @@ var client = AdvancedBillingClient .FromConfiguration(configuration.GetSection("AdvancedBilling")); ``` -See the [Configuration-Based Initialization](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/9.1.0/doc/configuration-based-initialization.md) section for details. +See the [Configuration-Based Initialization](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/10.0.0/doc/configuration-based-initialization.md) section for details. ## Environments @@ -109,65 +109,65 @@ The SDK can be configured to use a different environment for making API calls. A This API uses the following authentication schemes. -* [`BasicAuth (Basic Authentication)`](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/9.1.0/doc/auth/basic-authentication.md) +* [`BasicAuth (Basic Authentication)`](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/10.0.0/doc/auth/basic-authentication.md) ## List of APIs -* [API Exports](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/9.1.0/doc/controllers/api-exports.md) -* [Advance Invoice](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/9.1.0/doc/controllers/advance-invoice.md) -* [Billing Portal](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/9.1.0/doc/controllers/billing-portal.md) -* [Component Price Points](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/9.1.0/doc/controllers/component-price-points.md) -* [Custom Fields](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/9.1.0/doc/controllers/custom-fields.md) -* [Events-Based Billing Segments](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/9.1.0/doc/controllers/events-based-billing-segments.md) -* [Payment Profiles](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/9.1.0/doc/controllers/payment-profiles.md) -* [Product Families](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/9.1.0/doc/controllers/product-families.md) -* [Product Price Points](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/9.1.0/doc/controllers/product-price-points.md) -* [Proforma Invoices](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/9.1.0/doc/controllers/proforma-invoices.md) -* [Reason Codes](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/9.1.0/doc/controllers/reason-codes.md) -* [Referral Codes](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/9.1.0/doc/controllers/referral-codes.md) -* [Sales Commissions](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/9.1.0/doc/controllers/sales-commissions.md) -* [Subscription Components](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/9.1.0/doc/controllers/subscription-components.md) -* [Subscription Groups](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/9.1.0/doc/controllers/subscription-groups.md) -* [Subscription Group Invoice Account](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/9.1.0/doc/controllers/subscription-group-invoice-account.md) -* [Subscription Group Status](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/9.1.0/doc/controllers/subscription-group-status.md) -* [Subscription Invoice Account](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/9.1.0/doc/controllers/subscription-invoice-account.md) -* [Subscription Notes](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/9.1.0/doc/controllers/subscription-notes.md) -* [Subscription Products](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/9.1.0/doc/controllers/subscription-products.md) -* [Subscription Renewals](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/9.1.0/doc/controllers/subscription-renewals.md) -* [Subscription Status](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/9.1.0/doc/controllers/subscription-status.md) -* [Coupons](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/9.1.0/doc/controllers/coupons.md) -* [Components](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/9.1.0/doc/controllers/components.md) -* [Customers](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/9.1.0/doc/controllers/customers.md) -* [Events](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/9.1.0/doc/controllers/events.md) -* [Insights](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/9.1.0/doc/controllers/insights.md) -* [Invoices](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/9.1.0/doc/controllers/invoices.md) -* [Offers](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/9.1.0/doc/controllers/offers.md) -* [Products](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/9.1.0/doc/controllers/products.md) -* [Sites](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/9.1.0/doc/controllers/sites.md) -* [Subscriptions](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/9.1.0/doc/controllers/subscriptions.md) -* [Webhooks](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/9.1.0/doc/controllers/webhooks.md) +* [API Exports](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/10.0.0/doc/controllers/api-exports.md) +* [Advance Invoice](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/10.0.0/doc/controllers/advance-invoice.md) +* [Billing Portal](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/10.0.0/doc/controllers/billing-portal.md) +* [Component Price Points](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/10.0.0/doc/controllers/component-price-points.md) +* [Custom Fields](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/10.0.0/doc/controllers/custom-fields.md) +* [Events-Based Billing Segments](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/10.0.0/doc/controllers/events-based-billing-segments.md) +* [Payment Profiles](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/10.0.0/doc/controllers/payment-profiles.md) +* [Product Families](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/10.0.0/doc/controllers/product-families.md) +* [Product Price Points](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/10.0.0/doc/controllers/product-price-points.md) +* [Proforma Invoices](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/10.0.0/doc/controllers/proforma-invoices.md) +* [Reason Codes](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/10.0.0/doc/controllers/reason-codes.md) +* [Referral Codes](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/10.0.0/doc/controllers/referral-codes.md) +* [Sales Commissions](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/10.0.0/doc/controllers/sales-commissions.md) +* [Subscription Components](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/10.0.0/doc/controllers/subscription-components.md) +* [Subscription Groups](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/10.0.0/doc/controllers/subscription-groups.md) +* [Subscription Group Invoice Account](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/10.0.0/doc/controllers/subscription-group-invoice-account.md) +* [Subscription Group Status](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/10.0.0/doc/controllers/subscription-group-status.md) +* [Subscription Invoice Account](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/10.0.0/doc/controllers/subscription-invoice-account.md) +* [Subscription Notes](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/10.0.0/doc/controllers/subscription-notes.md) +* [Subscription Products](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/10.0.0/doc/controllers/subscription-products.md) +* [Subscription Renewals](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/10.0.0/doc/controllers/subscription-renewals.md) +* [Subscription Status](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/10.0.0/doc/controllers/subscription-status.md) +* [Coupons](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/10.0.0/doc/controllers/coupons.md) +* [Components](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/10.0.0/doc/controllers/components.md) +* [Customers](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/10.0.0/doc/controllers/customers.md) +* [Events](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/10.0.0/doc/controllers/events.md) +* [Insights](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/10.0.0/doc/controllers/insights.md) +* [Invoices](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/10.0.0/doc/controllers/invoices.md) +* [Offers](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/10.0.0/doc/controllers/offers.md) +* [Products](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/10.0.0/doc/controllers/products.md) +* [Sites](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/10.0.0/doc/controllers/sites.md) +* [Subscriptions](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/10.0.0/doc/controllers/subscriptions.md) +* [Webhooks](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/10.0.0/doc/controllers/webhooks.md) ## SDK Infrastructure ### Configuration -* [Configuration-Based Initialization](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/9.1.0/doc/configuration-based-initialization.md) -* [HttpClientConfiguration](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/9.1.0/doc/http-client-configuration.md) -* [HttpClientConfigurationBuilder](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/9.1.0/doc/http-client-configuration-builder.md) -* [ProxyConfigurationBuilder](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/9.1.0/doc/proxy-configuration-builder.md) +* [Configuration-Based Initialization](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/10.0.0/doc/configuration-based-initialization.md) +* [HttpClientConfiguration](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/10.0.0/doc/http-client-configuration.md) +* [HttpClientConfigurationBuilder](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/10.0.0/doc/http-client-configuration-builder.md) +* [ProxyConfigurationBuilder](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/10.0.0/doc/proxy-configuration-builder.md) ### HTTP -* [HttpCallback](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/9.1.0/doc/http-callback.md) -* [HttpContext](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/9.1.0/doc/http-context.md) -* [HttpRequest](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/9.1.0/doc/http-request.md) -* [HttpResponse](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/9.1.0/doc/http-response.md) -* [HttpStringResponse](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/9.1.0/doc/http-string-response.md) +* [HttpCallback](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/10.0.0/doc/http-callback.md) +* [HttpContext](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/10.0.0/doc/http-context.md) +* [HttpRequest](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/10.0.0/doc/http-request.md) +* [HttpResponse](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/10.0.0/doc/http-response.md) +* [HttpStringResponse](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/10.0.0/doc/http-string-response.md) ### Utilities -* [ApiException](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/9.1.0/doc/api-exception.md) -* [ApiHelper](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/9.1.0/doc/api-helper.md) -* [CustomDateTimeConverter](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/9.1.0/doc/custom-date-time-converter.md) -* [UnixDateTimeConverter](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/9.1.0/doc/unix-date-time-converter.md) +* [ApiException](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/10.0.0/doc/api-exception.md) +* [ApiHelper](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/10.0.0/doc/api-helper.md) +* [CustomDateTimeConverter](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/10.0.0/doc/custom-date-time-converter.md) +* [UnixDateTimeConverter](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/10.0.0/doc/unix-date-time-converter.md) diff --git a/doc/controllers/advance-invoice.md b/doc/controllers/advance-invoice.md index f63fa5b4..0dd4942e 100644 --- a/doc/controllers/advance-invoice.md +++ b/doc/controllers/advance-invoice.md @@ -17,10 +17,13 @@ AdvanceInvoiceController advanceInvoiceController = client.AdvanceInvoiceControl # Issue Advance Invoice -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 for 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. +Issues an invoice in advance for a subscription's next renewal date. For the most part, advance invoices function like any other invoice, except they are issued early and have special behavior upon being voided. For more information on advance invoices, including eligibility for generating one, see [Issue Invoice In Advance](https://maxio.zendesk.com/hc/en-us/articles/24252026404749-Issue-Invoice-In-Advance). + +A subscription can only have one advance invoice per billing period. Attempting to issue an advance invoice when one already exists returns an error. + +Regeneration of the invoice can be forced with the params `force: true`, which voids an advance invoice if one exists and generates a new one. If no advance invoice exists, a new one is generated. + +Consider using either the create or preview endpoints for proforma invoices to preview this advance invoice before using this endpoint to generate it. ```csharp IssueAdvanceInvoiceAsync( @@ -127,8 +130,11 @@ catch (ApiException e) # Void Advance Invoice -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, [see our help docs](../../doc/models/invoice.md). +Voids a subscription's existing advance invoice. Once voided, it can later be regenerated if desired. + +A `reason` is required to void, and the invoice must have an open status. Voiding causes 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 [Invoice](../../doc/models/invoice.md). ```csharp VoidAdvanceInvoiceAsync( diff --git a/doc/controllers/api-exports.md b/doc/controllers/api-exports.md index 7d67b60b..b6e93be3 100644 --- a/doc/controllers/api-exports.md +++ b/doc/controllers/api-exports.md @@ -185,9 +185,7 @@ catch (ApiException e) # Export Proforma Invoices -Creates a proforma invoices export and returns a batch job object. - -It is only available for Relationship Invoicing architecture. +Creates a proforma invoices export and returns a batch job object. Proforma invoices are only available on Relationship Invoicing sites. ```csharp ExportProformaInvoicesAsync() @@ -315,7 +313,7 @@ catch (ApiException e) # Read Proforma Invoices Export -Returns a batch job object for a proforma invoices export. +Returns a batch job object for a proforma invoices export. Proforma invoices are only available on Relationship Invoicing sites. ```csharp ReadProformaInvoicesExportAsync( diff --git a/doc/controllers/billing-portal.md b/doc/controllers/billing-portal.md index 3c1a8092..a7a4e3f2 100644 --- a/doc/controllers/billing-portal.md +++ b/doc/controllers/billing-portal.md @@ -20,21 +20,15 @@ BillingPortalController billingPortalController = client.BillingPortalController Enables Billing Portal access for a customer, with an option to send an invitation email at the same time. -## Billing Portal Documentation - -Full documentation on how the Billing Portal operates within the Advanced Billing UI can be located [here](https://maxio.zendesk.com/hc/en-us/articles/24252412965133-Billing-Portal-Overview). - -This documentation is focused on how to configure the Billing Portal Settings, as well as Subscriber Interaction and Merchant Management of the Billing Portal. - -You can use this endpoint to enable Billing Portal access for a Customer, with the option of sending the Customer an Invitation email at the same time. - ## 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 your customer has been invited to the Billing Portal, they 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](../../doc/controllers/billing-portal.md#read-billing-portal-link). Because the URL is cryptographically signed with a timestamp, merchants cannot generate the URL without requesting it through the API. -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. +To prevent abuse and overuse, 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 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. +For more information configuring the Billing Portal, see [Billing Portal Overview](https://maxio.zendesk.com/hc/en-us/articles/24252412965133-Billing-Portal-Overview). ```csharp EnableBillingPortalForCustomerAsync( @@ -88,13 +82,13 @@ catch (ApiException e) Returns the exact URL required for a subscriber to access the Billing Portal. -## Rules for Management Link API +## Management Link Request Rules -+ When retrieving a management URL, multiple requests for the same customer in a short period will return the **same** URL -+ We will not generate a new URL for 15 days ++ When retrieving a management URL, multiple requests for the same customer in a short period return the **same** URL ++ A new URL is not generated for 15 days + You must cache and remember this URL if you are going to need it again within 15 days + Only request a new URL after the `new_link_available_at` date -+ You are limited to 15 requests for the same URL. If you make more than 15 requests before `new_link_available_at`, you will be blocked from further Management URL requests (with a response code `429`) ++ You are limited to 15 requests for the same URL. If you make more than 15 requests before `new_link_available_at`, you are blocked from further Management URL requests (with a response code `429`). ```csharp ReadBillingPortalLinkAsync( diff --git a/doc/controllers/component-price-points.md b/doc/controllers/component-price-points.md index d5548b99..39ea0548 100644 --- a/doc/controllers/component-price-points.md +++ b/doc/controllers/component-price-points.md @@ -196,8 +196,6 @@ Lists the price points associated with a component. You may specify the component by using either the numeric id or the `handle:gold` syntax. -When fetching a component's price points, if you have defined multiple currencies at the site level, you can optionally pass the `?currency_prices=true` query param to include an array of currency price data in the response. - If the price point 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. ```csharp @@ -716,7 +714,7 @@ This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) | --- | --- | --- | --- | | `componentId` | [`ReadComponentPricePointComponentId`](../../doc/models/containers/read-component-price-point-component-id.md) | Template, Required | This is a container for one-of cases. | | `pricePointId` | [`ReadComponentPricePointPricePointId`](../../doc/models/containers/read-component-price-point-price-point-id.md) | Template, Required | This is a container for one-of cases. | -| `currencyPrices` | `bool?` | Query, Optional | Include an array of currency price data | +| `currencyPrices` | `bool?` | Query, Optional | Include an array of currency price data. | ## Response Type diff --git a/doc/controllers/components.md b/doc/controllers/components.md index 62ed6014..644563d2 100644 --- a/doc/controllers/components.md +++ b/doc/controllers/components.md @@ -32,8 +32,14 @@ Metered components are used to bill for any type of unit that resets to 0 at the 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. +#### Hybrid Pricing + +A `volume`, `tiered`, or `stairstep` metered component can combine its primary pricing with a secondary pricing model (the `overage_pricing` parameter) so both bill as a single invoice line item instead of two. This does not apply to metered components configured for event-based billing (metric, meter, or formula). See [Hybrid Pricing](page:introduction/basic-concepts/hybrid-pricing) for requirements and configuration details. + For more information on components, see our documentation [here](https://maxio.zendesk.com/hc/en-us/articles/24261141522189-Components-Overview). +If you have the new [Catalog experience](page:help/announcements/2026-announcements#new-catalog-experience-and-terminology) enabled, taxable components must include a non-blank `tax_code`. Sending `"tax_code": ""` returns `422`. + ```csharp CreateMeteredComponentAsync( string productFamilyId, @@ -159,7 +165,7 @@ catch (ApiException e) Creates a Quantity Based component definition under the specified product family. A Quantity Based component can then be added and “allocated” for a subscription. -When defining a Quantity Based component, you can choose one of 2 types: +When defining a Quantity Based component, you can choose one of two types: #### Recurring @@ -171,8 +177,16 @@ One-time quantity-based components are used to create ad hoc usage charges that The allocated quantity for one-time quantity-based components immediately gets reset back to zero after the allocation is made. +For more information, see [Components Overview](https://maxio.zendesk.com/hc/en-us/articles/24261141522189-Components-Overview). + +#### Hybrid Pricing + +A `volume`, `tiered`, or `stairstep` component can combine its primary pricing with a secondary pricing model (the `overage_pricing` parameter) so both bill as a single invoice line item instead of two. See [Hybrid Pricing](page:introduction/basic-concepts/hybrid-pricing) for requirements and configuration details. + For more information on components, see our documentation [here](https://maxio.zendesk.com/hc/en-us/articles/24261141522189-Components-Overview). +If you have the new [Catalog experience](page:help/announcements/2026-announcements#new-catalog-experience-and-terminology) enabled, taxable components must include a non-blank `tax_code`. Sending `"tax_code": ""` returns `422`. + ```csharp CreateQuantityBasedComponentAsync( string productFamilyId, @@ -302,6 +316,8 @@ On/off components are used for any flat fee, recurring add on (think $99/month f For more information on components, see our documentation [here](https://maxio.zendesk.com/hc/en-us/articles/24261141522189-Components-Overview). +If you have the new [Catalog experience](page:help/announcements/2026-announcements#new-catalog-experience-and-terminology) enabled, taxable components must include a non-blank `tax_code`. Sending `"tax_code": ""` returns `422`. + ```csharp CreateOnOffComponentAsync( string productFamilyId, @@ -412,9 +428,11 @@ catch (ApiException e) Creates a prepaid usage component definition under the specified product family. A 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. +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 usage is subsequently tracked against the amount purchased. -For more information on components, see our documentation [here](https://maxio.zendesk.com/hc/en-us/articles/24261141522189-Components-Overview). +For more information, see [Components Overview](https://maxio.zendesk.com/hc/en-us/articles/24261141522189-Components-Overview). + +If you have the new [Catalog experience](page:help/announcements/2026-announcements#new-catalog-experience-and-terminology) enabled, taxable components must include a non-blank `tax_code`; sending a blank value results in a validation error. ```csharp CreatePrepaidUsageComponentAsync( @@ -571,7 +589,9 @@ Event-based components are similar to other component types, in that you define 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, see our documentation [here](https://maxio.zendesk.com/hc/en-us/articles/24261141522189-Components-Overview). +For more information, see [Components Overview](https://maxio.zendesk.com/hc/en-us/articles/24261141522189-Components-Overview). + +If you have the new [Catalog experience](page:help/announcements/2026-announcements#new-catalog-experience-and-terminology) enabled, taxable components must include a non-blank `tax_code`; sending a blank value results in a validation error. ```csharp CreateEventBasedComponentAsync( @@ -841,6 +861,8 @@ Updates a component from a specific product family. You may read the component by either the component's id or handle. When using the handle, it must be prefixed with `handle:`. +If you have the new [Catalog experience](page:help/announcements/2026-announcements#new-catalog-experience-and-terminology) enabled, taxable components must include a non-blank `tax_code`. Sending `"tax_code": ""` returns `422`. + ```csharp UpdateProductFamilyComponentAsync( int productFamilyId, @@ -1176,6 +1198,8 @@ Updates a component. You may read the component by either the component's id or handle. When using the handle, it must be prefixed with `handle:`. +If you have the new [Catalog experience](page:help/announcements/2026-announcements#new-catalog-experience-and-terminology) enabled, taxable components must include a non-blank `tax_code`. Sending `"tax_code": ""` returns `422`. + ```csharp UpdateComponentAsync( string componentId, diff --git a/doc/controllers/coupons.md b/doc/controllers/coupons.md index 2dd34217..7b63e919 100644 --- a/doc/controllers/coupons.md +++ b/doc/controllers/coupons.md @@ -30,11 +30,7 @@ CouponsController couponsController = client.CouponsController; Creates a coupon under the specified product family. -You can create either a flat amount coupon by specifying amount_in_cents, or a percentage coupon by specifying percentage -You can restrict a coupon to only apply to specific products / components by optionally passing in `restricted_products` and/or `restricted_components` objects in the format: -`{ "": boolean_value }` - -Coupons can be administered in the Advanced Billing application or created via API. See [creating coupons](https://maxio.zendesk.com/hc/en-us/articles/24261212433165-Creating-Editing-Deleting-Coupons) for more information. +You can create either a flat amount coupon, by specifying `amount_in_cents`, or percentage coupon by specifying `percentage`. See [Apply Coupons to Subscriptions](https://maxio.zendesk.com/hc/en-us/articles/24261259337101-Coupons-and-Subscriptions) for information on applying a coupon to a subscription in the Advanced Billing UI. @@ -279,9 +275,9 @@ catch (ApiException e) # Find Coupon -Searches for a coupon by code, returning a 404 if no coupon is found. By passing a code parameter, the find will attempt to locate a coupon that matches that code. +Searches for a coupon by code. -If you have more than one product family and if the coupon you are trying to find does not belong to the default product family in your site, then you will need to specify (either in the url or as a query string param) the product family id. +If you have more than one product family and if the coupon you are trying to find does not belong to the default product family in your site, you need to specify (either in the URL or as a query string param) the `product_family_id`. ```csharp FindCouponAsync( @@ -300,7 +296,7 @@ This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) | --- | --- | --- | --- | | `productFamilyId` | `int?` | Query, Optional | The Advanced Billing id of the product family to which the coupon belongs | | `code` | `string` | Query, Optional | The code of the coupon | -| `currencyPrices` | `bool?` | Query, Optional | When fetching coupons, if you have defined multiple currencies at the site level, you can optionally pass the `?currency_prices=true` query param to include an array of currency price data in the response. | +| `currencyPrices` | `bool?` | Query, Optional | (Optional) If you have defined multiple currencies at the site level, you can pass `?currency_prices=true` to include an array of currency price data in the response. | ## Response Type @@ -329,12 +325,11 @@ catch (ApiException e) # Read Coupon -Returns a coupon by its Advanced Billing-assigned ID. You must identify the Coupon in this call by the ID parameter that Advanced Billing assigns. -If instead you would like to find a Coupon using a Coupon code, see the Coupon Find method. +Returns a coupon by its system-assigned ID. You must identify the Coupon in this call by the ID parameter assigned to it. -When fetching a coupon, if you have defined multiple currencies at the site level, you can optionally pass the `?currency_prices=true` query param to include an array of currency price data in the response. +If instead you would like to find a Coupon using a Coupon code, use the [Find Coupon](../../doc/controllers/coupons.md#find-coupon) endpoint. -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. +If the coupon is set to `use_site_exchange_rate: true`, it returns pricing based on the current exchange rate. If the flag is set to false, it returns all of the defined prices for each currency. ```csharp ReadCouponAsync( @@ -353,7 +348,7 @@ This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) | --- | --- | --- | --- | | `productFamilyId` | `int` | Template, Required | The Advanced Billing id of the product family to which the coupon belongs | | `couponId` | `int` | Template, Required | The Advanced Billing id of the coupon | -| `currencyPrices` | `bool?` | Query, Optional | When fetching coupons, if you have defined multiple currencies at the site level, you can optionally pass the `?currency_prices=true` query param to include an array of currency price data in the response. | +| `currencyPrices` | `bool?` | Query, Optional | (Optional) If you have defined multiple currencies at the site level, you can pass `?currency_prices=true` to include an array of currency price data in the response. | ## Response Type @@ -803,23 +798,17 @@ catch (ApiException e) # Validate Coupon -Verifies whether a specific coupon code is valid. This method is useful for validating coupon codes that are entered by a customer. If the coupon is found and is valid, the coupon will be returned with a 200 status code. - -If the coupon is invalid, the status code will be 404 and the response will say why it is invalid. If the coupon is valid, the status code will be 200 and the coupon will be returned. The following reasons for invalidity are supported: - -+ Coupon not found -+ Coupon is invalid -+ Coupon expired +Verifies whether a specific coupon code is valid. This method is useful for validating coupon codes that are entered by a customer. -If you have more than one product family and if the coupon you are validating does not belong to the first product family in your site, then you will need to specify the product family, either in the url or as a query string param. This can be done by supplying the id or the handle in the `handle:my-family` format. +If you have more than one product family and if the coupon you are validating does not belong to the first product family in your site, you need to specify the product family, either in the URL or as a query string param. This can be done by supplying the id or the handle in the `handle:my-family` format. -Eg. +Supplying the `product_family_handle` in the URL: ``` https://.chargify.com/product_families/handle:/coupons/validate.?code= ``` -Or: +Supplying the `product_family_id` as a query parameter: ``` https://.chargify.com/coupons/validate.?code=&product_family_id= @@ -980,8 +969,6 @@ catch (ApiException e) Creates subcodes for an existing coupon. -## Coupon Subcodes Intro - Coupon Subcodes allow you to create a set of unique codes that allow you to expand the use of one coupon. For example: @@ -996,21 +983,9 @@ Coupon Subcodes: + DP80302 + SPRINGBALTIMORE -Coupon subcodes can be administered in the Admin Interface or via the API. - -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 +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 are capitalized before the subcode is created. -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, 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. +Note: If you are using any of the allowed special characters ("%", "@", "+", "-", "_", and "."), you must encode them for use in the URL. % to %25 @ to %40 @@ -1019,7 +994,9 @@ This request allows you to create specific subcodes underneath an existing coupo _ to %5F . to %2E -So, if the coupon subcode is `20%OFF`, the URL to delete this coupon subcode would be: `https://.chargify.com/coupons/567/codes/20%25OFF.` +So, if the coupon subcode is `20%OFF`, the URL to delete this coupon subcode would be: `https://.chargify.com/coupons/567/codes/20%25OFF.`. + +For more information on coupon codes and applying coupons to subscriptions, see [Coupon Codes](https://maxio.zendesk.com/hc/en-us/articles/24261208729229-Coupon-Codes) and [Coupons and Subscriptions](https://maxio.zendesk.com/hc/en-us/articles/24261259337101-Coupons-and-Subscriptions). ```csharp CreateCouponSubcodesAsync( @@ -1249,7 +1226,7 @@ Note: If you are using any of the allowed special characters (“%”, “@”, ## Percent Encoding Example -Or if the coupon subcode is 20%OFF, the URL to delete this coupon subcode would be: @https://.chargify.com/coupons/567/codes/20%25OFF. +Or if the coupon subcode is 20%OFF, the URL to delete this coupon subcode would be: @https://.chargify.com/coupons/567/codes/20%25OFF.. ```csharp DeleteCouponSubcodeAsync( diff --git a/doc/controllers/customers.md b/doc/controllers/customers.md index 4db4a875..74f1ef25 100644 --- a/doc/controllers/customers.md +++ b/doc/controllers/customers.md @@ -21,30 +21,29 @@ CustomersController customersController = client.CustomersController; # Create Customer -Creates a new customer; can also be created alongside a new subscription. The only validation restriction is that you may only create one customer for a given reference value. +Creates a new customer; can also be created alongside a new subscription. The only validation restriction is that you can only create one customer for a given reference value. -If provided, the `reference` value must be unique. It represents a unique identifier for the customer from your own app, i.e. the customer’s ID. This allows you to retrieve a given customer via a piece of shared information. Alternatively, you may choose to leave `reference` blank, and store Advanced Billing’s unique ID for the customer, which is in the `id` attribute. +If provided, the `reference` value must be unique. It represents a unique identifier for the customer from your own app, i.e. the customer’s ID. This allows you to retrieve a given customer via a piece of shared information. Alternatively, you can choose to leave `reference` blank, and store the system-assigned unique ID for the customer, which is in the `id` attribute. -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). +For more information, see [Customer Details](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. +Format the country attribute of the customer using the ISO Standard Country 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) +Countries should be formatted as two characters. For more information, see [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. +Format the state attribute of the customer using the ISO Standard State codes. -+ US States (2 characters): [ISO_3166-2](https://en.wikipedia.org/wiki/ISO_3166-2:US) ++ US States (two characters): see [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, 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 (two to three characters): To find the correct state codes outside 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 the 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) +You can attribute a language/region to the customer to deliver invoices in any required language. For more information, see [Customer Locale](https://maxio.zendesk.com/hc/en-us/articles/24286672013709-Customer-Locale). ```csharp CreateCustomerAsync( @@ -133,6 +132,7 @@ catch (ApiException e) "portal_invite_last_sent_at": null, "portal_invite_last_accepted_at": null, "tax_exempt": false, + "surcharging": false, "vat_number": null, "parent_id": null, "locale": "en-US" @@ -232,7 +232,8 @@ catch (ApiException e) "portal_customer_created_at": "2016-10-04T15:22:29-04:00", "portal_invite_last_sent_at": "2016-10-04T15:22:30-04:00", "portal_invite_last_accepted_at": null, - "tax_exempt": false + "tax_exempt": false, + "surcharging": false } }, { @@ -258,6 +259,7 @@ catch (ApiException e) "portal_invite_last_sent_at": "2016-10-13T16:52:54-04:00", "portal_invite_last_accepted_at": null, "tax_exempt": false, + "surcharging": true, "parent_id": 123 } }, @@ -284,6 +286,7 @@ catch (ApiException e) "portal_invite_last_sent_at": "2016-10-19T10:49:19-04:00", "portal_invite_last_accepted_at": null, "tax_exempt": false, + "surcharging": false, "parent_id": null } } @@ -358,6 +361,7 @@ catch (ApiException e) "portal_invite_last_sent_at": null, "portal_invite_last_accepted_at": null, "tax_exempt": false, + "surcharging": false, "vat_number": null, "parent_id": null, "locale": "es-MX", @@ -452,6 +456,7 @@ catch (ApiException e) "portal_invite_last_sent_at": null, "portal_invite_last_accepted_at": null, "tax_exempt": false, + "surcharging": false, "vat_number": "012345678" } } @@ -549,6 +554,8 @@ catch (ApiException e) Lists all subscriptions that belong to a customer. +If you have the new [Catalog experience](page:help/announcements/2026-announcements#new-catalog-experience-and-terminology) enabled, subscriptions no longer require an associated product. For subscriptions without an associated product, 'product', 'product_price_point_id', and 'product_price_point_type' are returned as 'null'. + ```csharp ListCustomerSubscriptionsAsync( int customerId) diff --git a/doc/controllers/events-based-billing-segments.md b/doc/controllers/events-based-billing-segments.md index 8c5ffb5f..728554d0 100644 --- a/doc/controllers/events-based-billing-segments.md +++ b/doc/controllers/events-based-billing-segments.md @@ -172,9 +172,9 @@ catch (ApiException e) # Update Segment -Updates a single segment for a component with a segmented metric. It allows you to update the pricing for the segment. +Updates a single segment for a component with a segmented metric. You can also update the pricing for the segment. -You may specify component and/or price point by using either the numeric ID or the `handle:gold` syntax. +You can specify component and/or price point by using either the numeric ID or the `handle:gold` syntax. ```csharp UpdateSegmentAsync( diff --git a/doc/controllers/events.md b/doc/controllers/events.md index 49744c25..e8f6adff 100644 --- a/doc/controllers/events.md +++ b/doc/controllers/events.md @@ -19,15 +19,11 @@ EventsController eventsController = client.EventsController; Lists events for a site. -## Events Intro +Events include various activity that happens around a Site. This information is **especially** useful to track down issues that arise when subscriptions are not created due to errors. -Advanced Billing Events include various activity that happens around a Site. This information is **especially** useful to track down issues that arise when subscriptions are not created due to errors. +Within the UI, Events are referred to as Site Activity. For more information, see [Site Activity](https://maxio.zendesk.com/hc/en-us/articles/24250671733517-Site-Activity). -Within the Advanced Billing UI, "Events" are referred to as "Site Activity". Full documentation on how to view Events / Site Activity in the Advanced Billing UI can be located [here](https://maxio.zendesk.com/hc/en-us/articles/24250671733517-Site-Activity). - -## List Events for a Site - -This method will retrieve a list of events for a site. Use query string filters to narrow down results. You may use the `key` filter as part of your query string to narrow down results. +Use query string filters to narrow down results. You can use the `filter` parameter to filter by event key. ### Legacy Filters @@ -42,7 +38,7 @@ The following keys are no longer supported. ## Event Key -The event type is identified by the key property. You can check supported keys [here](../../doc/models/event-key.md). +The event type is identified by the key property. See [Event Key](../../doc/models/event-key.md) for a complete list of supported keys. ## Event Specific Data @@ -59,7 +55,7 @@ Here’s an example event for the `subscription_product_change` event: "event": { "id": 351, "key": "subscription_product_change", - "message": "Product changed on Marky Mark's subscription from 'Basic' to 'Pro'", + "message": "Product changed on Mark Alan's subscription from 'Basic' to 'Pro'", "subscription_id": 205, "event_specific_data": { "new_product_id": 3, @@ -77,7 +73,7 @@ Here’s an example event for the `subscription_state_change` event: "event": { "id": 353, "key": "subscription_state_change", - "message": "State changed on Marky Mark's subscription to Pro from trialing to active", + "message": "State changed on Mark Alan's subscription to Pro from trialing to active", "subscription_id": 205, "event_specific_data": { "new_subscription_state": "active", @@ -88,6 +84,22 @@ Here’s an example event for the `subscription_state_change` event: } ``` +## Enhanced Catalog Experience + +If you’re using the [enhanced Catalog experience](page:help/announcements/2026-announcements#new-catalog-experience-and-terminology), you’ll see updated naming in webhook events and messages. + +Event name changes: + +- subscription_product_change → subscription_plan_change +- component_allocation_change → allocation_change +- component_billing_date_change → product_billing_date_change + +Message updates: + +- “Plan changed on Subscription from previous plan to new plan” +- “Successful payment for allocation changes to Product on Subscription” +- “Failed payment for allocation changes to Product on Subscription” + ```csharp ListEventsAsync( Models.ListEventsInput input) @@ -204,7 +216,7 @@ Lists events for a subscription. ## Event Key -The event type is identified by the key property. You can check supported keys [here](../../doc/models/event-key.md). +The event type is identified by the key property. See [Event Key](../../doc/models/event-key.md) for a complete list of supported keys. ## Event Specific Data @@ -212,6 +224,22 @@ Different event types may include additional data in `event_specific_data` prope While some events share the same schema for `event_specific_data`, others may not include it at all. For precise mappings from key to event_specific_data, refer to [Event](../../doc/models/event.md). +## Enhanced Catalog Experience + +If you’re using the [enhanced Catalog experience](page:help/announcements/2026-announcements#new-catalog-experience-and-terminology), you’ll see updated naming in webhook events and messages. + +Event name changes: + +- subscription_product_change → subscription_plan_change +- component_allocation_change → allocation_change +- component_billing_date_change → product_billing_date_change + +Message updates: + +- “Successful payment for allocation changes to Product on Subscription” +- “Failed payment for allocation changes to Product on Subscription” +- “Plan changed on Subscription from previous plan to new plan” + ```csharp ListSubscriptionEventsAsync( Models.ListSubscriptionEventsInput input) @@ -307,6 +335,20 @@ catch (ApiException e) Returns the total count of events for a given site. +If you’re using the [enhanced Catalog experience](page:help/announcements/2026-announcements#new-catalog-experience-and-terminology), you’ll see updated naming in webhook events and messages. + +Event name changes: + +- subscription_product_change → subscription_plan_change +- component_allocation_change → allocation_change +- component_billing_date_change → product_billing_date_change + +Message updates: + +- “Successful payment for allocation changes to Product on Subscription” +- “Failed payment for allocation changes to Product on Subscription” +- “Plan changed on Subscription from previous plan to new plan” + ```csharp ReadEventsCountAsync( Models.ReadEventsCountInput input) diff --git a/doc/controllers/insights.md b/doc/controllers/insights.md index 0a40dce1..488fcb3b 100644 --- a/doc/controllers/insights.md +++ b/doc/controllers/insights.md @@ -95,8 +95,8 @@ This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `atTime` | `DateTimeOffset?` | Query, Optional | submit a timestamp in ISO8601 format to request MRR for a historic time | -| `subscriptionId` | `int?` | Query, Optional | submit the id of a subscription in order to limit results | +| `atTime` | `DateTimeOffset?` | Query, Optional | submit a timestamp in ISO8601 format to request MRR for a historic time. | +| `subscriptionId` | `int?` | Query, Optional | submit the id of a subscription in order to limit results. | ## Response Type @@ -264,7 +264,7 @@ catch (ApiException e) **This endpoint is deprecated.** -This endpoint returns your site's current MRR, including plan and usage breakouts split per subscription. +Lists your site's current MRR, including plan and usage breakouts split per subscription. ```csharp ListMrrPerSubscriptionAsync( diff --git a/doc/controllers/invoices.md b/doc/controllers/invoices.md index 5d70d814..10a963e5 100644 --- a/doc/controllers/invoices.md +++ b/doc/controllers/invoices.md @@ -23,6 +23,8 @@ InvoicesController invoicesController = client.InvoicesController; * [Void Invoice](../../doc/controllers/invoices.md#void-invoice) * [List Consolidated Invoice Segments](../../doc/controllers/invoices.md#list-consolidated-invoice-segments) * [Create Invoice](../../doc/controllers/invoices.md#create-invoice) +* [Update Invoice](../../doc/controllers/invoices.md#update-invoice) +* [Delete Invoice](../../doc/controllers/invoices.md#delete-invoice) * [Send Invoice](../../doc/controllers/invoices.md#send-invoice) * [Preview Customer Information Changes](../../doc/controllers/invoices.md#preview-customer-information-changes) * [Update Customer Information](../../doc/controllers/invoices.md#update-customer-information) @@ -31,7 +33,7 @@ InvoicesController invoicesController = client.InvoicesController; # Refund Invoice -Refund an invoice, segment, or consolidated invoice. +Refunds an invoice, segment, or consolidated invoice. ## Partial Refund for Consolidated Invoice @@ -107,7 +109,7 @@ catch (ApiException e) # List Invoices -By default, invoices returned on the index will only include totals, not detailed breakdowns for `line_items`, `discounts`, `taxes`, `credits`, `payments`, `custom_fields`, or `refunds`. To include breakdowns, pass the specific field as a key in the query with a value set to `true`. +Lists invoices for a site. By default, invoices returned on the index will only include totals, not detailed breakdowns for `line_items`, `discounts`, `taxes`, `credits`, `payments`, `custom_fields`, or `refunds`. To include breakdowns, pass the specific field as a key in the query with a value set to `true`. ```csharp ListInvoicesAsync( @@ -451,7 +453,7 @@ catch (ApiException e) # Read Invoice -Use this endpoint to retrieve the details for an invoice. +Returns the details for an invoice. ## PDF Invoice retrieval @@ -614,7 +616,7 @@ catch (ApiException e) # List Invoice Events -This endpoint returns a list of invoice events. Each event contains event "data" (such as an applied payment) as well as a snapshot of the `invoice` at the time of event completion. +Lists invoice events for a site. Each event contains event "data" (such as an applied payment) as well as a snapshot of the `invoice` at the time of event completion. Exposed event types are: @@ -1069,7 +1071,7 @@ catch (ApiException e) # Record Payment for Invoice -Applies a payment of a given type against a specific invoice. If you would like to apply a payment across multiple invoices, you can use the Bulk Payment endpoint. +Applies a payment of a given type against a specific invoice. If you would like to apply a payment across multiple invoices, you can use the [Record Payment for Multiple Invoices](../../doc/controllers/invoices.md#record-payment-for-multiple-invoices) endpoint. ```csharp RecordPaymentForInvoiceAsync( @@ -1135,31 +1137,10 @@ catch (ApiException e) # Record Payment for Multiple Invoices -This API call should be used when you want to record an external payment against multiple invoices. +Records an external payment against multiple invoices. To apply a payment to multiple invoices, at minimum, specify the `amount` and `applications` (i.e., `invoice_uid` and `amount`) details. -``` -{ - "payment": { - "memo": "to pay the bills", - "details": "check number 8675309", - "method": "check", - "amount": "250.00", - "applications": [ - { - "invoice_uid": "inv_8gk5bwkct3gqt", - "amount": "100.00" - }, - { - "invoice_uid": "inv_7bc6bwkct3lyt", - "amount": "150.00" - } - ] - } -} -``` - Note that the invoice payment amounts must be greater than 0. Total amount must be greater or equal to invoices payment amount sum. ```csharp @@ -1257,7 +1238,7 @@ catch (ApiException e) # List Credit Notes -Credit Notes are like inverse invoices. They reduce the amount a customer owes. +Lists credit notes for a site. Credit Notes are like inverse invoices. They reduce the amount a customer owes. By default, the credit notes returned by this endpoint will exclude the arrays of `line_items`, `discounts`, `taxes`, `applications`, or `refunds`. To include these arrays, pass the specific field as a key in the query with a value set to `true`. @@ -1616,7 +1597,7 @@ catch (ApiException e) # Read Credit Note -Use this endpoint to retrieve the details for a credit note. +Returns the details for a credit note. ```csharp ReadCreditNoteAsync( @@ -1971,7 +1952,7 @@ catch (ApiException e) # Record Payment for Subscription -Record an external payment made against a subscription that will pay partially or in full one or more invoices. +Records an external payment made against a subscription that will pay partially or in full one or more invoices. Payment will be applied starting with the oldest open invoice and then next oldest, and so on until the amount of the payment is fully consumed. @@ -2065,7 +2046,7 @@ catch (ApiException e) # Reopen Invoice -This endpoint allows you to reopen any invoice with the "canceled" status. Invoices enter "canceled" status if they were open at the time the subscription was canceled (whether through dunning or an intentional cancellation). +Reopens any invoice with the "canceled" status. Invoices enter "canceled" status if they were open at the time the subscription was canceled (whether through dunning or an intentional cancellation). Invoices with "canceled" status are no longer considered to be due. Once reopened, they are considered due for payment. Payment may then be captured in one of the following ways: @@ -2127,7 +2108,7 @@ catch (ApiException e) # Void Invoice -This endpoint allows you to void any invoice with the "open" or "canceled" status. It will also allow voiding of an invoice with the "pending" status if it is not a consolidated invoice. +Voids any invoice with the "open" or "canceled" status. It will also allow voiding of an invoice with the "pending" status if it is not a consolidated invoice. ```csharp VoidInvoiceAsync( @@ -2191,7 +2172,7 @@ catch (ApiException e) # List Consolidated Invoice Segments -Invoice segments returned on the index will only include totals, not detailed breakdowns for `line_items`, `discounts`, `taxes`, `credits`, `payments`, or `custom_fields`. +Lists segments for a consolidated invoice. Invoice segments returned on the index will only include totals, not detailed breakdowns for `line_items`, `discounts`, `taxes`, `credits`, `payments`, or `custom_fields`. ```csharp ListConsolidatedInvoiceSegmentsAsync( @@ -2511,7 +2492,7 @@ catch (ApiException e) # Create Invoice -This endpoint will allow you to create an ad hoc invoice. +Creates an ad hoc invoice. ### Basic Behavior @@ -2884,9 +2865,183 @@ catch (ApiException e) | 422 | Unprocessable Entity (WebDAV) | [`ErrorArrayMapResponseException`](../../doc/models/error-array-map-response-exception.md) | +# Update Invoice + +Updates an ad hoc invoice while it is in the `draft` state. + +**Important: only invoices with the `adhoc` role and `draft` status can be updated.** Any other invoice — issued, or with a different role (e.g. `renewal`, `signup`) — cannot be updated through this endpoint and the request returns a `422` error. If the invoice does not belong to the provided subscription, a `404` error is returned. + +Only the attributes submitted in the request are changed — omitted attributes keep their current values. + +### Line Items + +The `line_items` array describes changes to the invoice's line items. Line items not referenced in the array remain unchanged. + +#### Adding a line item + +A line item without a `uid` is added to the invoice. The same line item types and options as on invoice creation are supported (custom items, `product_id`, `component_id`, price points, period date ranges, taxes). + +#### Updating a line item + +A line item with the `uid` of an existing line item updates that line item with the submitted attributes. Amounts and taxes are recalculated. + +#### Removing a line item + +A line item with a `uid` and `"_destroy": true` is removed from the invoice. Other line items remain unchanged. + +Referencing a `uid` which does not exist on the invoice returns a `422` error. + +### Coupons + +When the `coupons` key is present, the submitted coupons replace all discounts currently applied to the invoice. Send an empty array to remove all discounts. Coupon options are the same as on invoice creation. + +### Invoice Options + +#### Issue Date and Net Terms + +The `issue_date` parameter can be sent to change the invoice's issue date. Only today or dates in the past are accepted. The date is interpreted and validated in your site's time zone, using the `YYYY-MM-DD` format. The `net_terms` parameter indicates the number of days after the issue date on which the invoice is due. The due date is recalculated whenever the issue date or net terms change. + +#### Addresses + +The seller, shipping and billing addresses can be sent to replace the addresses on the invoice. Each address requires to send a `first_name` at a minimum in order to work. Taxes are recalculated after an address change. + +#### Memo and Payment Instructions + +A custom memo can be sent with the `memo` parameter. Likewise, custom payment instructions can be sent with the `payment_instructions` parameter. + +```csharp +UpdateInvoiceAsync( + int subscriptionId, + string uid, + Models.UpdateInvoiceRequest body = null) +``` + +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + +## Parameters + +| Parameter | Type | Tags | Description | +| --- | --- | --- | --- | +| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription. | +| `uid` | `string` | Template, Required | The unique identifier for the invoice, this does not refer to the public facing invoice number. | +| `body` | [`UpdateInvoiceRequest`](../../doc/models/update-invoice-request.md) | Body, Optional | Request payload for updating a draft ad hoc invoice. | + +## Response Type + +**200**: OK + +[`Task`](../../doc/models/invoice-response.md) + +## Example Usage + +```csharp +int subscriptionId = 222; +string uid = "uid0"; +UpdateInvoiceRequest body = new UpdateInvoiceRequest +{ + Invoice = new UpdateInvoice + { + NetTerms = 30, + Memo = "Updated memo", + }, +}; + +try +{ + InvoiceResponse result = await invoicesController.UpdateInvoiceAsync( + subscriptionId, + uid, + body + ); +} +catch (ApiException e) +{ + Console.WriteLine(e.Message); + if (e is ErrorListResponseException) + { + // TODO: Handle ErrorListResponseException exception here + } + if (e is ErrorArrayMapResponseException) + { + // TODO: Handle ErrorArrayMapResponseException exception here + } +} +``` + +## Errors + +| HTTP Status Code | Error Description | Exception Class | +| --- | --- | --- | +| 404 | Not Found | [`ErrorListResponseException`](../../doc/models/error-list-response-exception.md) | +| 422 | Unprocessable Entity (WebDAV) | [`ErrorArrayMapResponseException`](../../doc/models/error-array-map-response-exception.md) | + + +# Delete Invoice + +Deletes an ad hoc invoice while it is in the `draft` state. + +**Important: only invoices with the `adhoc` role and `draft` status can be deleted.** Any other invoice — issued, or with a different role (e.g. `renewal`, `signup`) — cannot be deleted through this endpoint and the request returns a `422` error. Issued invoices should be voided instead. If the invoice does not belong to the provided subscription, a `404` error is returned. + +A successful deletion returns a `204 No Content` response and the invoice is permanently removed. + +```csharp +DeleteInvoiceAsync( + int subscriptionId, + string uid) +``` + +## Authentication + +This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) + +## Parameters + +| Parameter | Type | Tags | Description | +| --- | --- | --- | --- | +| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription. | +| `uid` | `string` | Template, Required | The unique identifier for the invoice, this does not refer to the public facing invoice number. | + +## Response Type + +**204**: No Content + +`Task` + +## Example Usage + +```csharp +int subscriptionId = 222; +string uid = "uid0"; +try +{ + await invoicesController.DeleteInvoiceAsync( + subscriptionId, + uid + ); +} +catch (ApiException e) +{ + Console.WriteLine(e.Message); + if (e is ErrorListResponseException) + { + // TODO: Handle ErrorListResponseException exception here + } +} +``` + +## Errors + +| HTTP Status Code | Error Description | Exception Class | +| --- | --- | --- | +| 404 | Not Found | [`ErrorListResponseException`](../../doc/models/error-list-response-exception.md) | +| 422 | Unprocessable Entity (WebDAV) | [`ErrorListResponseException`](../../doc/models/error-list-response-exception.md) | + + # Send Invoice -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. +Sends an invoice to the customer 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. **File Attachments**: You can attach files to invoice emails using `attachment_urls[]` parameter by providing URLs to the files you want to attach. When using attachments, the request must use `multipart/form-data` content type. Max 10 files, 10MB per file. @@ -2963,7 +3118,7 @@ catch (ApiException e) # Preview Customer Information Changes -Customer information may change after an invoice is issued, which may lead to a mismatch between customer information that is present on an open invoice and actual customer information. This endpoint allows you to preview these differences, if any. +Previews the effect of customer information changes on an open invoice. Customer information may change after an invoice is issued, which may lead to a mismatch between customer information that is present on an open invoice and actual customer information. This endpoint allows you to preview these differences, if any. The endpoint doesn't accept a request body. Customer information differences are calculated on the application side. @@ -3069,7 +3224,7 @@ catch (ApiException e) # Update Customer Information -This endpoint updates customer information on an open invoice and returns the updated invoice. If you would like to preview changes that will be applied, use the `/invoices/{uid}/customer_information/preview.json` endpoint first. +Updates customer information on an open invoice and returns the updated invoice. If you would like to preview changes that will be applied, use the `/invoices/{uid}/customer_information/preview.json` endpoint first. The endpoint doesn't accept a request body. Customer information differences are calculated on the application side. @@ -3310,7 +3465,7 @@ catch (ApiException e) # Issue Invoice -This endpoint allows you to issue an invoice that is in "pending" or "draft" status. For example, you can issue an invoice that was created when allocating new quantity on a component and using "accrue charges" option. +Issues an invoice that is in "pending" or "draft" status. For example, you can issue an invoice that was created when allocating new quantity on a component and using "accrue charges" option. You cannot issue a pending child invoice that was created for a member subscription in a group. diff --git a/doc/controllers/offers.md b/doc/controllers/offers.md index b037903a..538e41dc 100644 --- a/doc/controllers/offers.md +++ b/doc/controllers/offers.md @@ -19,15 +19,13 @@ OffersController offersController = client.OffersController; # Create Offer -Creates an offer within your Advanced Billing site. - -## Documentation +Creates an offer within your site. Offers allow you to package complicated combinations of products, components and coupons into a convenient package which can then be subscribed to just like products. Once an offer is defined it can be used as an alternative to the product when creating subscriptions. -Full documentation on how to use offers in the Advanced Billing UI can be located [here](https://maxio.zendesk.com/hc/en-us/articles/24261295098637-Offers-Overview). +For more information, see [Offers](https://maxio.zendesk.com/hc/en-us/articles/24261295098637-Offers-Overview) in the product documentation. ## Using a Product Price Point diff --git a/doc/controllers/payment-profiles.md b/doc/controllers/payment-profiles.md index d234337e..896eec68 100644 --- a/doc/controllers/payment-profiles.md +++ b/doc/controllers/payment-profiles.md @@ -146,7 +146,7 @@ catch (ApiException e) # List Payment Profiles -Returns all active payment profiles for a site, or for one customer within a site. If no payment profiles are found, this endpoint will return an empty array, not a 404. +Lists all active payment profiles for a site, or for one customer within a site. If no payment profiles are found, this endpoint returns an empty array. ```csharp ListPaymentProfilesAsync( @@ -494,7 +494,7 @@ catch (ApiException e) Deletes an unused payment profile. -If the payment profile is in use by one or more subscriptions or groups, a 422 and error message will be returned. +If the payment profile is in use by one or more subscriptions or groups, an error message is returned. ```csharp DeleteUnusedPaymentProfileAsync( @@ -547,9 +547,9 @@ catch (ApiException e) Deletes a payment profile belonging to the customer on the subscription. -+ If the customer has multiple subscriptions, the payment profile will be removed from all of them. +If the customer has multiple subscriptions, the payment profile is removed from all of them. -+ If you delete the default payment profile for a subscription, you will need to specify another payment profile to be the default through the api, or either prompt the user to enter a card in the billing portal or on the self-service page, or visit the Payment Details tab on the subscription in the Admin UI and use the “Add New Credit Card” or “Make Active Payment Method” link, (depending on whether there are other cards present). +If you delete the default payment profile for a subscription, you need to specify another payment profile to be the default through the API, or either prompt the user to enter a card in the billing portal or on the self-service page, or visit the Payment Details tab on the subscription in the Admin UI and use the “Add New Credit Card” or “Make Active Payment Method” link, (depending on whether there are other cards present). ```csharp DeleteSubscriptionsPaymentProfileAsync( @@ -824,7 +824,7 @@ catch (ApiException e) # Change Subscription Group Default Payment Profile -This will change the default payment profile on the subscription group to the existing payment profile with the id specified. +Changes the default payment profile on the subscription group to the existing payment profile with the specified ID. You must elect to change the existing payment profile to a new payment profile ID in order to receive a satisfactory response from this endpoint. @@ -913,7 +913,7 @@ catch (ApiException e) # Read One Time Token -One Time Tokens aka Advanced Billing Tokens house the credit card or ACH (Authorize.Net or Stripe only) data for a customer. +Returns the one-time token data, including credit card or ACH details, associated with the provided token ID. One Time Tokens aka Advanced Billing Tokens house the credit card or ACH (Authorize.Net or Stripe only) data for a customer. You can use One Time Tokens while creating a subscription or payment profile instead of passing all bank account or credit card data directly to a given API endpoint. @@ -967,7 +967,7 @@ catch (ApiException e) # Send Request Update Payment Email -You can send a "request payment update" email to the customer associated with the subscription. +Sends a "request payment update" email to the customer associated with the subscription. If you attempt to send a "request payment update" email more than five times within a 30-minute period, you will receive a `422` response with an error message in the body. This error message will indicate that the request has been rejected due to excessive attempts, and will provide instructions on how to resubmit the request. diff --git a/doc/controllers/product-families.md b/doc/controllers/product-families.md index 0f518243..6ea8644f 100644 --- a/doc/controllers/product-families.md +++ b/doc/controllers/product-families.md @@ -180,7 +180,7 @@ catch (ApiException e) # Create Product Family -Creates 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 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). @@ -214,6 +214,7 @@ CreateProductFamilyRequest body = new CreateProductFamilyRequest { Name = "Acme Projects", Description = "Amazing project management tool", + Surcharging = false, }, }; @@ -240,7 +241,8 @@ catch (ApiException e) "name": "Acme Projects", "description": "Amazing project management tool", "handle": "acme-projects", - "accounting_code": null + "accounting_code": null, + "surcharging": false } } ``` @@ -254,7 +256,7 @@ catch (ApiException e) # List Product Families -Returns a list of Product Families for a site. +Lists Product Families for a site. ```csharp ListProductFamiliesAsync( @@ -306,6 +308,7 @@ catch (ApiException e) "description": null, "handle": "acme-projects", "accounting_code": null, + "surcharging": false, "created_at": "2013-02-20T15:05:51-07:00", "updated_at": "2013-02-20T15:05:51-07:00", "archived_at": null @@ -318,6 +321,7 @@ catch (ApiException e) "description": "Another family.", "handle": "bat-family", "accounting_code": null, + "surcharging": true, "created_at": "2014-04-16T12:41:13-06:00", "updated_at": "2014-04-16T12:41:13-06:00", "archived_at": "2024-11-05T09:30:00-07:00" @@ -378,6 +382,7 @@ catch (ApiException e) "description": "", "handle": "billing-plans", "accounting_code": null, + "surcharging": false, "archived_at": null } } diff --git a/doc/controllers/product-price-points.md b/doc/controllers/product-price-points.md index 18b4e687..16e4f65e 100644 --- a/doc/controllers/product-price-points.md +++ b/doc/controllers/product-price-points.md @@ -312,7 +312,7 @@ This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) | --- | --- | --- | --- | | `productId` | [`ReadProductPricePointProductId`](../../doc/models/containers/read-product-price-point-product-id.md) | Template, Required | This is a container for one-of cases. | | `pricePointId` | [`ReadProductPricePointPricePointId`](../../doc/models/containers/read-product-price-point-price-point-id.md) | Template, Required | This is a container for one-of cases. | -| `currencyPrices` | `bool?` | Query, Optional | When fetching a product's price points, if you have defined multiple currencies at the site level, you can optionally pass the ?currency_prices=true query param to include an array of currency price data in the response. If the product price point 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. | +| `currencyPrices` | `bool?` | Query, Optional | (Optional) If you have defined multiple currencies at the site level, you can pass ?currency_prices=true to include an array of currency price data in the response. If the product price point 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. | ## Response Type diff --git a/doc/controllers/products.md b/doc/controllers/products.md index 9e3d3343..61503b04 100644 --- a/doc/controllers/products.md +++ b/doc/controllers/products.md @@ -20,11 +20,13 @@ ProductsController productsController = client.ProductsController; # Create Product -Creates a product in your Advanced Billing site. +Creates a product in your site. -See the following product documentation for more information: +If you have the new [Catalog experience](page:help/announcements/2026-announcements#new-catalog-experience-and-terminology) enabled, the `auto_create_signup_page` parameter is not supported. If `auto_create_signup_page` is included (with any value) an error is returned. -+ [Products Documentation](https://maxio.zendesk.com/hc/en-us/articles/24261090117645-Products-Overview) +For more information, see: + ++ [Products Overview](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) ```csharp diff --git a/doc/controllers/proforma-invoices.md b/doc/controllers/proforma-invoices.md index 3558c881..bbf854d4 100644 --- a/doc/controllers/proforma-invoices.md +++ b/doc/controllers/proforma-invoices.md @@ -24,7 +24,7 @@ ProformaInvoicesController proformaInvoicesController = client.ProformaInvoicesC # Create Consolidated Proforma Invoice -Creates a consolidated proforma invoice asynchronously. It will return a 201 with no message, or a 422 with any errors. To find and view the new consolidated proforma invoice, you may poll the subscription group listing for proforma invoices; only one consolidated proforma invoice may be created per group at a time. +Creates a consolidated proforma invoice asynchronously. To find and view the new consolidated proforma invoice, you can poll the subscription group listing for proforma invoices; only one consolidated proforma invoice can be created per group at a time. If the information becomes outdated, simply void the old consolidated proforma invoice and generate a new one. @@ -435,7 +435,7 @@ catch (ApiException e) # Preview Proforma Invoice -Returns a preview of the data that will be included on a given subscription's proforma invoice if one were to be generated. It will have similar line items and totals as a renewal preview, but the response will be presented in the format of a proforma invoice. Consequently it will include additional information such as the name and addresses that will appear on the proforma invoice. +Previews the data that will be included on a given subscription's proforma invoice if one were to be generated. It will have similar line items and totals as a renewal preview, but the response will be presented in the format of a proforma invoice. Consequently it will include additional information such as the name and addresses that will appear on the proforma invoice. The preview endpoint is subject to all the same conditions as the proforma invoice endpoint. For example, previews are only available on the Relationship Invoicing architecture, and previews cannot be made for end-of-life subscriptions. diff --git a/doc/controllers/reason-codes.md b/doc/controllers/reason-codes.md index b5838efd..739cc7f3 100644 --- a/doc/controllers/reason-codes.md +++ b/doc/controllers/reason-codes.md @@ -21,21 +21,11 @@ ReasonCodesController reasonCodesController = client.ReasonCodesController; Creates a reason code for a given site. -# Reason Codes Intro - Reason Codes are a way to gain a high-level view of why your customers are cancelling the subscription to your product or service. Add a set of churn reason codes to be displayed in-app and/or the Maxio Billing Portal. As your subscribers decide to cancel their subscription, learn why they decided to cancel. -## Reason Code Documentation - -Full documentation on how Reason Codes operate within Advanced Billing can be located under the following links. - -[Churn Reason Codes](https://maxio.zendesk.com/hc/en-us/articles/24286647554701-Churn-Reason-Codes) - -## Create Reason Code - -This method gives a merchant the option to create reason codes for a given site. +For more information, see [Churn Reason Codes](https://maxio.zendesk.com/hc/en-us/articles/24286647554701-Churn-Reason-Codes). ```csharp CreateReasonCodeAsync( diff --git a/doc/controllers/referral-codes.md b/doc/controllers/referral-codes.md index 6b695e9b..b08a5598 100644 --- a/doc/controllers/referral-codes.md +++ b/doc/controllers/referral-codes.md @@ -13,13 +13,7 @@ ReferralCodesController referralCodesController = client.ReferralCodesController Validates whether a referral code is valid and applicable within your site. This method is useful for validating referral codes that are entered by a customer. -## Referrals Documentation - -Full documentation on how to use the referrals feature in the Advanced Billing UI can be located [here](https://maxio.zendesk.com/hc/en-us/sections/24286965611405-Referrals). - -## Server Response - -If the referral code is valid the status code will be `200` and the referral code will be returned. If the referral code is invalid, a `404` response will be returned. +For more information, see [Understanding Referrals](https://docs.maxio.com/hc/en-us/articles/24286981223693-Understanding-Referrals) in the product documentation. ```csharp ValidateReferralCodeAsync( diff --git a/doc/controllers/sales-commissions.md b/doc/controllers/sales-commissions.md index d6d18c21..7c9f0dbc 100644 --- a/doc/controllers/sales-commissions.md +++ b/doc/controllers/sales-commissions.md @@ -25,7 +25,7 @@ The Sales Commission API differs from other Chargify API endpoints. This resourc 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` +> Note: The request is at seller level, it means `<>` variable will be replaced by `app`. ```csharp ListSalesCommissionSettingsAsync( @@ -106,7 +106,7 @@ catch (ApiException e) # List Sales Reps -Returns a sales rep list with details. +Lists sales reps with details. ## Modified Authentication Process @@ -114,7 +114,7 @@ The Sales Commission API differs from other Chargify API endpoints. This resourc 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` +> Note: The request is at seller level, it means `<>` variable will be replaced by `app`. ```csharp ListSalesRepsAsync( @@ -252,7 +252,7 @@ The Sales Commission API differs from other Chargify API endpoints. This resourc 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` +> Note: The request is at seller level, it means `<>` variable will be replaced by `app`. ```csharp ReadSalesRepAsync( diff --git a/doc/controllers/sites.md b/doc/controllers/sites.md index cb637cc5..d0027ab5 100644 --- a/doc/controllers/sites.md +++ b/doc/controllers/sites.md @@ -19,20 +19,19 @@ SitesController sitesController = client.SitesController; Retrieves site data. -Full documentation on Sites in the Advanced Billing UI can be located [here](https://maxio.zendesk.com/hc/en-us/sections/24250550707085-Sites). - -Specifically, the [Clearing Site Data](https://maxio.zendesk.com/hc/en-us/articles/24250617028365-Clearing-Site-Data) section is relevant to this endpoint documentation. +For more information, see [Sites](https://maxio.zendesk.com/hc/en-us/sections/24250550707085-Sites) in the product documentation. Specifically, the [Clearing Site Data](https://maxio.zendesk.com/hc/en-us/articles/24250617028365-Clearing-Site-Data) section is relevant to this endpoint. #### Relationship invoicing enabled -If the site has RI enabled then you will see more settings like: +If the site has Relationship invoicing enabled, additional properties are returned in the response: - "customer_hierarchy_enabled": true, - "whopays_enabled": true, - "whopays_default_payer": "self" +``` +"customer_hierarchy_enabled": true, +"whopays_enabled": true, +"whopays_default_payer": "self" +``` -You can read more about these settings here: -[Who Pays & Customer Hierarchy](https://maxio.zendesk.com/hc/en-us/articles/24252185211533-Customer-Hierarchies-WhoPays) +For more information, see [Who Pays & Customer Hierarchy](https://maxio.zendesk.com/hc/en-us/articles/24252185211533-Customer-Hierarchies-WhoPays). ```csharp ReadSiteAsync() @@ -157,7 +156,7 @@ catch (ApiException e) # List Chargify Js Public Keys -Returns public keys used for Maxio.js (formerly Chargify.js). +Lists public keys used for Maxio.js (formerly Chargify.js). ```csharp ListChargifyJsPublicKeysAsync( diff --git a/doc/controllers/subscription-components.md b/doc/controllers/subscription-components.md index 47b01531..d89f7926 100644 --- a/doc/controllers/subscription-components.md +++ b/doc/controllers/subscription-components.md @@ -603,7 +603,7 @@ catch (ApiException e) # List Allocations -Returns the 50 most recent Allocations, ordered by most recent first. +Lists the 50 most recent Allocations, ordered by most recent first. ## On/Off Components @@ -1333,7 +1333,7 @@ catch (ApiException e) # List Usages -Returns a list of usages associated with a subscription for a particular metered component. This will display the previously recorded components for a subscription. +Lists usages associated with a subscription for a particular metered component. This will display the previously recorded components for a subscription. This endpoint is not compatible with quantity-based components. @@ -1427,13 +1427,13 @@ catch (ApiException e) Activates an event-based component for a single subscription. -In order to bill your subscribers on your Events data under the Events-Based Billing feature, the components must be activated for the subscriber. +To bill your subscribers on your Events data under the Events-Based Billing feature, the components must be activated for the subscriber. -Learn more about the role of activation in the [Events-Based Billing docs](https://maxio.zendesk.com/hc/en-us/articles/24260323329805-Events-Based-Billing-Overview). +For more information, see [Design Your Catalog](https://docs.maxio.com/hc/en-us/articles/24181036583053-Design-Your-Catalog?method=componenttypes). -Use this endpoint to activate an event-based component for a single subscription. Activating an event-based component causes Advanced Billing to bill for events when the subscription is renewed. +Use this endpoint to activate an event-based component for a single subscription. Activating an event-based component causes billing for events when the subscription is renewed. -*Note: it is possible to stream events for a subscription at any time, regardless of component activation status. The activation status only determines if the subscription should be billed for event-based component usage at renewal.* +Note: it is possible to stream events for a subscription at any time, regardless of component activation status. The activation status only determines if the subscription should be billed for event-based component usage at renewal. ```csharp ActivateEventBasedComponentAsync( @@ -1555,21 +1555,15 @@ catch (ApiException e) Records a single event for Events-Based Billing. -## Documentation - Events-Based Billing is an evolved form of metered billing that is based on data-rich events streamed in real-time from your system to Advanced Billing. These events can then be transformed, enriched, or analyzed to form the computed totals of usage charges billed to your customers. This API allows you to stream events into the Advanced Billing data ingestion engine. -Learn more about the feature in general in the [Events-Based Billing help docs](https://maxio.zendesk.com/hc/en-us/articles/24260323329805-Events-Based-Billing-Overview). - -## Record Event - -Use this endpoint to record a single event. +For more information, see [Design Your Catalog](https://docs.maxio.com/hc/en-us/articles/24181036583053-Design-Your-Catalog?method=componenttypes). -*Note: this endpoint differs from the standard Chargify API endpoints in that the URL subdomain will be `events` and your site subdomain will be included in the URL path. For example:* +Note: this endpoint differs from the standard URL for this API in that `events` and your site subdomain are included in the path. For example: ``` https://events.chargify.com/my-site-subdomain/events/my-stream-api-handle @@ -1591,7 +1585,7 @@ This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `apiHandle` | `string` | Template, Required | Identifies the Stream for which the event should be published. | -| `storeUid` | `string` | Query, Optional | If you've attached your own Keen project as an Advanced Billing event data-store, use this parameter to indicate the data-store. | +| `storeUid` | `string` | Query, Optional | If you've attached your own Keen project as an Advanced Billing event data-store, use this parameter to indicate the data-store. This applies to Legacy Metering sites only — it has no effect on Maxio Metering sites. | | `body` | [`EBBEvent`](../../doc/models/ebb-event.md) | Body, Optional | - | ## Response Type @@ -1634,7 +1628,7 @@ catch (ApiException e) Records a collection of events. -*Note: this endpoint differs from the standard Chargify API endpoints in that the subdomain will be `events` and your site subdomain will be included in the URL path.* +Note: this endpoint differs from the standard URL for this API in that `events` and your site subdomain are included in the path. A maximum of 1000 events can be published in a single request. A 422 will be returned if this limit is exceeded. @@ -1654,7 +1648,7 @@ This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `apiHandle` | `string` | Template, Required | Identifies the Stream for which the events should be published. | -| `storeUid` | `string` | Query, Optional | If you've attached your own Keen project as an Advanced Billing event data-store, use this parameter to indicate the data-store. | +| `storeUid` | `string` | Query, Optional | If you've attached your own Keen project as an Advanced Billing event data-store, use this parameter to indicate the data-store. This applies to Legacy Metering sites only — it has no effect on Maxio Metering sites. | | `body` | [`List`](../../doc/models/ebb-event.md) | Body, Optional | - | ## Response Type diff --git a/doc/controllers/subscription-groups.md b/doc/controllers/subscription-groups.md index 97990116..7c1c713c 100644 --- a/doc/controllers/subscription-groups.md +++ b/doc/controllers/subscription-groups.md @@ -193,7 +193,7 @@ catch (ApiException e) # List Subscription Groups -Returns an array of subscription groups for the site. The response is paginated and will return a `meta` key with pagination information. +Lists subscription groups for the site. The response is paginated and will return a `meta` key with pagination information. #### Account Balance Information @@ -355,9 +355,9 @@ catch (ApiException e) "current_billing_amount_in_cents": 11500, "customer": { "first_name": "Mark", - "last_name": "Wannabewahlberg", - "organization": "The Funky Bunch", - "email": "markymark@example.com", + "last_name": "Smith", + "organization": "Acme Inc.", + "email": "smith@example.com", "reference": "4c92223b-bc16-4d0d-87ff-b177a89a2655" }, "account_balances": { @@ -528,7 +528,7 @@ catch (ApiException e) Finds the subscription group associated with a subscription. -If the subscription is not in a group, the endpoint will return a 404 code. +If the subscription is not in a group, this endpoint returns an error. ```csharp FindSubscriptionGroupAsync( @@ -584,9 +584,9 @@ catch (ApiException e) "cancel_at_end_of_period": false, "customer": { "first_name": "Mark", - "last_name": "Wannabewahlberg", - "organization": "The Funky Bunch", - "email": "markymark@example.com", + "last_name": "Smith", + "organization": "Acme Inc.", + "email": "smith@example.com", "reference": "4c92223b-bc16-4d0d-87ff-b177a89a2655" }, "account_balances": { @@ -615,7 +615,7 @@ catch (ApiException e) # Add Subscription to Group -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. +Adds an existing subscription to a subscription group. 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. @@ -713,7 +713,7 @@ catch (ApiException e) # Remove Subscription from Group -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 remove an existing subscription from a subscription group. +Removes an existing subscription from a subscription group. 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 remove an existing subscription from a subscription group. ```csharp RemoveSubscriptionFromGroupAsync( diff --git a/doc/controllers/subscription-notes.md b/doc/controllers/subscription-notes.md index 9fd40d9e..72431ef2 100644 --- a/doc/controllers/subscription-notes.md +++ b/doc/controllers/subscription-notes.md @@ -21,13 +21,11 @@ SubscriptionNotesController subscriptionNotesController = client.SubscriptionNot Creates a note for a subscription. -## How to Use Subscription Notes - Notes allow you to record information about a particular Subscription in a free text format. -If you have structured data such as birth date, color, etc., consider using Metadata instead. +If you have structured data such as birth date, color, etc., consider using [Metadata](../../doc/controllers/custom-fields.md#create-metadata) instead. -Full documentation on how to use Notes in the Advanced Billing UI can be located [here](https://maxio.zendesk.com/hc/en-us/articles/24251712214413-Subscription-Summary-Overview). +For more information, see [Adding Notes](https://docs.maxio.com/hc/en-us/articles/24251654953997-Understanding-the-Subscription-Summary-Page#billing-portal-status:~:text=documentation%20for%20more.-,Adding%20Notes,-Notes%20are%20optional) in the product documentation. ```csharp CreateSubscriptionNoteAsync( diff --git a/doc/controllers/subscription-products.md b/doc/controllers/subscription-products.md index aad987e7..0c9221bd 100644 --- a/doc/controllers/subscription-products.md +++ b/doc/controllers/subscription-products.md @@ -18,17 +18,15 @@ SubscriptionProductsController subscriptionProductsController = client.Subscript Migrates a subscription to a different product. -In order to create a migration, you must pass the `product_id` or `product_handle` in the object when you send a POST request. You may also pass either a `product_price_point_id` or `product_price_point_handle` to choose which price point the subscription is moved to. If no price point identifier is passed the subscription will be moved to the products default price point. The response will be the updated subscription. +To create a migration, you must pass the `product_id` or `product_handle` in the object when you send a POST request. You can also pass either a `product_price_point_id` or `product_price_point_handle` to choose which price point the subscription is moved to. If no price point identifier is passed, the subscription is moved to the product's default price point. The response is the updated subscription. ## Valid Subscriptions -Subscriptions should be in the `active` or `trialing` state in order to be migrated. +Subscriptions should be in the `active` or `trialing` state to be migrated. (For backwards compatibility reasons, it is possible to migrate a subscription that is in the `trial_ended` state via the API, however this is not recommended. Since `trial_ended` is an end-of-life state, the subscription should be canceled, the product changed, and then the subscription can be reactivated.) -## 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). +For more information, see [Product Changes and Migrations](https://docs.maxio.com/hc/en-us/articles/24252069837581-Product-Changes-and-Migrations). ## Failed Migrations diff --git a/doc/controllers/subscription-renewals.md b/doc/controllers/subscription-renewals.md index 7143db7d..12b025e6 100644 --- a/doc/controllers/subscription-renewals.md +++ b/doc/controllers/subscription-renewals.md @@ -639,7 +639,7 @@ catch (ApiException e) # Unpublish Scheduled Renewal Configuration -Returns a scheduled renewal configuration to an editable state. +Restores a scheduled renewal configuration to an editable state. ```csharp UnpublishScheduledRenewalConfigurationAsync( @@ -821,6 +821,8 @@ catch (ApiException e) Adds product and component line items to the scheduled renewal. +If your site has list vs sales pricing enabled, accepts renewal_configuration_item.custom_price.list_price_point_id, validates and persists it; omitted value follows existing/default behavior; with list vs sales pricing disabled, parameter is ignored (no validation/behavioral impact). This functionality is supported in the API, but is not currently supported in SDKs. + ```csharp CreateScheduledRenewalConfigurationItemAsync( int subscriptionId, @@ -925,6 +927,8 @@ catch (ApiException e) Updates an existing configuration item’s pricing and quantity. +If you site has list vs sales pricing enabled, accepts renewal_configuration_item.custom_price.list_price_point_id, validates and persists it; omitted value follows existing/default behavior; with list vs sales pricing disabled, parameter is ignored (no validation/behavioral impact). This functionality is supported in the API, but is not currently supported in SDKs. + ```csharp UpdateScheduledRenewalConfigurationItemAsync( int subscriptionId, diff --git a/doc/controllers/subscription-status.md b/doc/controllers/subscription-status.md index 5c0e0970..ace4eb20 100644 --- a/doc/controllers/subscription-status.md +++ b/doc/controllers/subscription-status.md @@ -584,7 +584,7 @@ This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription. | -| `body` | [`PauseRequest`](../../doc/models/pause-request.md) | Body, Optional | Allows to pause a Subscription | +| `body` | [`PauseRequest`](../../doc/models/pause-request.md) | Body, Optional | Allows you to pause a Subscription. | ## Response Type @@ -764,7 +764,7 @@ This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription. | -| `body` | [`PauseRequest`](../../doc/models/pause-request.md) | Body, Optional | Allows to pause a Subscription | +| `body` | [`PauseRequest`](../../doc/models/pause-request.md) | Body, Optional | Allows you to pause a Subscription. | ## Response Type @@ -1436,26 +1436,26 @@ catch (ApiException e) Previews a subscription’s next renewal assessment. 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, 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 [Subscriber Interface Overview](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. +This endpoint is particularly useful because it returns 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: +By default, the preview includes billing details for all components _at their **current** quantities_. This means: * Current `allocated_quantity` for quantity-based components * Current enabled/disabled status for on/off components * Current metered usage `unit_balance` for metered components * Current metric quantity value for events recorded thus far for events-based components -In the above statements, "current" means the quantity or value as of the call to the renewal preview endpoint. We do not predict end-of-period values for components, so metered or events-based usage may be less than it will eventually be at the end of the period. +In the above statements, "current" means the quantity or value as of the call to the renewal preview endpoint. End-of-period values for components are not predicted, so metered or events-based usage may be less than it will eventually be at the end of the period. -Optionally, **you may provide your own custom quantities** for any component to see a billing preview for non-current quantities. This is accomplished by sending a request body with data under the `components` key. See the request body documentation below. +Optionally, **you can provide your own custom quantities** for any component to see a billing preview for non-current quantities. This is accomplished by sending a request body with data under the `components` key. See the request body documentation below. -## Subscription Side Effects +## Preview Behavior -You can request a `POST` to obtain this data from the endpoint without any side effects. This method allows you to preview data, but does not log any changes against a subscription. +Sending a `POST` request to this endpoint returns preview data without modifying the subscription. This method previews data, but does not log any changes against a subscription. ```csharp PreviewRenewalAsync( diff --git a/doc/controllers/subscriptions.md b/doc/controllers/subscriptions.md index 10cbe5ee..6d0c4dfc 100644 --- a/doc/controllers/subscriptions.md +++ b/doc/controllers/subscriptions.md @@ -34,6 +34,48 @@ Identify an existing customer with `customer_id` or `customer_reference`. Option 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. +## List vs Sales Pricing + +When a subscription uses custom pricing as the sales price, you can optionally provide a list price for any item. If omitted, the list price defaults to the sales price. The difference between the list price and sales price is used to calculate implicit discounts, which appear on Invoices and in reporting. List price can also support revenue allocations in [Advanced Revenue](https://docs.maxio.com/hc/en-us/articles/24177001342861-Create-and-Configure-RevenueBooks). + +If your site has list pricing enabled, the API accepts `custom_price.list_price_point_id` for custom pricing, validates and persists it, and returns list price metadata in subscription responses. If list pricing is disabled, this input is ignored and related response fields are omitted. + +When list pricing is enabled: + +- Subscription → Product `product_price_point_list_price_point_id` (integer) +- `product_price_point_list_price_point_handle` (string) +- Subscription Components (when components are included in the response, such as with subscriptions built from components or component serialization paths) `component_id` (integer) +- `price_point_id` (integer) +- `list_price_point_id` (integer) + +When list pricing is disabled: + +- Subscription → Product `product_price_point_list_price_point_id`: omitted +- `product_price_point_list_price_point_handle`: omitted +- Subscription Components `list_price_point_id`: omitted + +This functionality is supported in the API, but is not currently supported in SDKs. + +## Subscriptions can now work independently from the catalog + +If you have the new [Catalog experience](page:help/announcements/2026-announcements#new-catalog-experience-and-terminology) enabled, you can create subscriptions without a `product_id` or `product_handle` using POST /subscriptions, building them entirely from components. + +A valid subscription must include at least one active component with: + +- a positive `allocated_quantity`, +- a positive `unit_balance`, or +- 'enabled: true' (for on/off components) +- a configured metered component + +`component_id` can be provided as a numeric ID or in handle: format. If `trial_interval` and `trial_interval_unit` are included, they are applied at creation. + +In the response, product and product price point fields are null, and component details are returned instead. + +This functionality is supported in the API, but is not currently supported in SDKs. + +## Payment information + +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](../../doc/controllers/payment-profiles.md#create-payment-profile) endpoint for details on payment parameters. See the [Subscription Signups](page:introduction/basic-concepts/subscription-signup) article for more information on working with subscriptions in Advanced Billing. ## Payment information @@ -260,7 +302,9 @@ catch (ApiException e) # List Subscriptions -Returns an array of subscriptions from a Site. Pay close attention to query string filters and pagination in order to control responses from the server. +Lists subscriptions for a site. Use the query string filters and pagination to control responses from the server. + +If you have the new [Catalog experience](page:help/announcements/2026-announcements#new-catalog-experience-and-terminology) enabled, some subscriptions may not have an associated product. For subscriptions without an associated product, 'product', 'product_price_point_id', and 'product_price_point_type' are returned as 'null'. ## Search for a subscription @@ -298,14 +342,6 @@ ListSubscriptionsInput listSubscriptionsInput = new ListSubscriptionsInput { Page = 1, PerPage = 50, - StartDate = DateTime.Parse("2022-07-01"), - EndDate = DateTime.Parse("2022-08-01"), - StartDatetime = DateTime.ParseExact("2022-07-01 09:00:05", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", - provider: CultureInfo.InvariantCulture, - DateTimeStyles.RoundtripKind), - EndDatetime = DateTime.ParseExact("2022-08-01 10:00:05", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", - provider: CultureInfo.InvariantCulture, - DateTimeStyles.RoundtripKind), Sort = SubscriptionSort.SignupDate, Include = new List { @@ -374,7 +410,9 @@ The server response will not return data under the key/value pair of `next_billi 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_day` and immediately `READ/GET` the subscription data, it will still contain original `snap_day`. The `snap_day` will reset to null on the next billing cycle. This is because a product change is instantaneous and only affects the product associated with a subscription. +> 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 the original `snap_day`. The `snap_day` will be reset to `null` on the next billing cycle. This is because a product change is instantaneous and only affects the product associated with a subscription. + +If you have the new [Catalog experience](page:help/announcements/2026-announcements#new-catalog-experience-and-terminology) enabled, some subscriptions may not have an associated product. For subscriptions without an associated product, `product`, `product_price_point_id`, and `product_price_point_type` are returned as `null`. ```csharp UpdateSubscriptionAsync( @@ -552,6 +590,8 @@ catch (ApiException e) Retrieves subscription details. +If you have the new [Catalog experience](page:help/announcements/2026-announcements#new-catalog-experience-and-terminology) enabled, some subscriptions may not have an associated product. For subscriptions without an associated product, 'product', 'product_price_point_id', and 'product_price_point_type' are returned as 'null'. + ## Self-Service Page token Self-Service Page token for the subscription is not returned by default. If this information is desired, the include[]=self_service_page_token parameter must be provided with the request. @@ -881,7 +921,7 @@ catch (ApiException e) Purges an individual subscription for sites in test mode. -Provide the subscription ID in the url. To confirm, supply the customer ID in the query string `ack` parameter. You may also delete the customer record and/or payment profiles by passing `cascade` parameters. For example, to delete just the customer record, the query params would be: `?ack={customer_id}&cascade[]=customer` +Provide the subscription ID in the URL. To confirm, supply the customer ID in the query string `ack` parameter. You may also delete the customer record and/or payment profiles by passing `cascade` parameters. For example, to delete just the customer record, the query params would be: `?ack={customer_id}&cascade[]=customer` If you need to remove subscriptions from a live site, contact support to discuss your use case. @@ -1032,27 +1072,43 @@ Previews a subscription by POSTing the same JSON or XML as for a subscription cr 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. +This endpoint does not create a subscription; it is meant to serve as a prediction. + +For more information, see [Subscriber Interface Overview](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). +## Subscriptions can now work independently from the catalog + +If you have the new [Catalog experience](page:help/announcements/2026-announcements#new-catalog-experience-and-terminology) enabled, you can create subscriptions without a `product_id` or `product_handle` using POST /subscriptions, building them entirely from components. + +A valid subscription must include at least one active component with: + +- a positive `allocated_quantity`, +- a positive `unit_balance`, or +- 'enabled: true' (for on/off components) + +`component_id` can be provided as a numeric ID or in handle: format. If `trial_interval` and `trial_interval_unit` are included, they are applied at creation. + +In the response, product and product price point fields are null, and component details are returned instead. + +This functionality is supported in the API, but is not currently supported in SDKs. ## Taxable Subscriptions -This endpoint will preview taxes applicable to a purchase. In order for taxes to be previewed, the following conditions must be met: +This endpoint previews taxes applicable to a purchase. 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 ++ The subscription payload must contain a full billing or shipping address to calculate tax -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) +For more information about creating taxable previews, see [Taxes](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 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. The billing address and the credit card information are stored together within the payment profile object. Also, you cannot send a billing address 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 you may leave off the billing information. +If you'd like to calculate subscriptions that do not include tax, you can leave off the billing information. ```csharp PreviewSubscriptionAsync( @@ -1446,7 +1502,7 @@ catch (ApiException e) Removes a coupon from an existing subscription. -For more information on the expected behavior 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) +For more information on the expected behavior of removing a coupon from a subscription, see [Coupons and Subscriptions](https://maxio.zendesk.com/hc/en-us/articles/24261259337101-Coupons-and-Subscriptions#removing-a-coupon). ```csharp RemoveCouponFromSubscriptionAsync( @@ -1504,16 +1560,14 @@ catch (ApiException e) # Activate Subscription -Activates awaiting signup and trialing subscriptions. This feature is only available on the Relationship Invoicing architecture. Subscriptions in a group may not be activated immediately. - -For details on how the activation works, and how to activate subscriptions through the application, see [activation](#). +Activates awaiting signup and trialing subscriptions. This feature is only available on the Relationship Invoicing architecture. Subscriptions in a group cannot be activated immediately. The `revert_on_failure` parameter controls the behavior upon activation failure. -- If set to `true` and something goes wrong i.e. payment fails, then Advanced Billing will not change the subscription's state. The subscription’s billing period will also remain the same. -- If set to `false` and something goes wrong i.e. payment fails, then Advanced Billing will continue through with the activation and enter an end of life state. For trialing subscriptions, that will either be trial ended (if the trial is no obligation), past due (if the trial has an obligation), or canceled (if the site has no dunning strategy, or has a strategy that says to cancel immediately). For awaiting signup subscriptions, that will always be canceled. +- If set to `true` and something goes wrong i.e. payment fails, the subscription's state does not change. The subscription’s billing period also remains the same. +- If set to `false` and something goes wrong i.e. payment fails, the activation continues and enters an end of life state. For trialing subscriptions, that is either trial ended (if the trial is no obligation), past due (if the trial has an obligation), or canceled (if the site has no dunning strategy, or has a strategy that says to cancel immediately). For awaiting signup subscriptions, that is always canceled. -The default activation failure behavior can be configured per activation attempt, or you may set a default value under Config > Settings > Subscription Activation Settings. +The default activation failure behavior can be configured per activation attempt, or you can set a default value under Config > Settings > Subscription Activation Settings. ## Activation Scenarios @@ -1545,8 +1599,8 @@ The default activation failure behavior can be configured per activation attempt ### Activate Trialing subscription -You can read more about the behavior of trialing subscriptions [here](https://maxio.zendesk.com/hc/en-us/articles/24252155721869-Trialing-Subscriptions). -When the `revert_on_failure` parameter is set to `true`, the subscription's state will remain as Trialing, we will void the invoice from activation and return any prepayments and credits applied to the invoice back to the subscription. +For more information about the behavior of trialing subscriptions, see [Trialing Subscriptions](https://maxio.zendesk.com/hc/en-us/articles/24252155721869-Trialing-Subscriptions). +When the `revert_on_failure` parameter is set to `true`, the subscription's state remains Trialing; the invoice from activation is voided, and any prepayments and credits applied to the invoice are returned to the subscription. ```csharp ActivateSubscriptionAsync( diff --git a/doc/controllers/webhooks.md b/doc/controllers/webhooks.md index 47a3ff39..c5b68b5b 100644 --- a/doc/controllers/webhooks.md +++ b/doc/controllers/webhooks.md @@ -77,7 +77,7 @@ catch (ApiException e) "last_sent_at": "2016-11-08T16:43:54-05:00", "last_sent_url": "http://requestb.in/11u45x71", "successful": false, - "body": "id=141765032&event=statement_settled&payload[site][id]=31615&payload[site][subdomain]=general-goods&payload[subscription][id]=15100141&payload[subscription][state]=active&payload[subscription][balance_in_cents]=0&payload[customer][id]=14585695&payload[customer][first_name]=Pookie&payload[customer][last_name]=Test&payload[customer][reference]=&payload[customer][organization]=&payload[customer][address]=&payload[customer][address_2]=&payload[customer][city]=&payload[customer][state]=&payload[customer][zip]=&payload[customer][country]=&payload[customer][email]=pookie999%40example.com&payload[customer][phone]=&payload[statement][closed_at]=2016-11-08%2016%3A22%3A20%20-0500&payload[statement][created_at]=2016-11-08%2016%3A22%3A18%20-0500&payload[statement][id]=80168049&payload[statement][opened_at]=2016-11-07%2016%3A22%3A15%20-0500&payload[statement][settled_at]=2016-11-08%2016%3A22%3A20%20-0500&payload[statement][subscription_id]=15100141&payload[statement][updated_at]=2016-11-08%2016%3A22%3A20%20-0500&payload[statement][starting_balance_in_cents]=0&payload[statement][ending_balance_in_cents]=0&payload[statement][total_in_cents]=6400&payload[statement][memo]=We%20thank%20you%20for%20your%20continued%20business!&payload[statement][events][0][id]=346956565&payload[statement][events][0][key]=renewal_success&payload[statement][events][0][message]=Successful%20renewal%20for%20Pookie%20Test's%20subscription%20to%20%2410%20Basic%20Plan&payload[statement][events][1][id]=346956579&payload[statement][events][1][key]=payment_success&payload[statement][events][1][message]=Successful%20payment%20of%20%2464.00%20for%20Pookie%20Test's%20subscription%20to%20%2410%20Basic%20Plan&payload[statement][events][2][id]=347299359&payload[statement][events][2][key]=renewal_success&payload[statement][events][2][message]=Successful%20renewal%20for%20Pookie%20Test's%20subscription%20to%20%2410%20Basic%20Plan&payload[statement][transactions][0][id]=161537343&payload[statement][transactions][0][subscription_id]=15100141&payload[statement][transactions][0][type]=Charge&payload[statement][transactions][0][kind]=baseline&payload[statement][transactions][0][transaction_type]=charge&payload[statement][transactions][0][success]=true&payload[statement][transactions][0][amount_in_cents]=1000&payload[statement][transactions][0][memo]=%2410%20Basic%20Plan%20(11%2F08%2F2016%20-%2011%2F09%2F2016)&payload[statement][transactions][0][created_at]=2016-11-08%2016%3A22%3A18%20-0500&payload[statement][transactions][0][starting_balance_in_cents]=0&payload[statement][transactions][0][ending_balance_in_cents]=1000&payload[statement][transactions][0][gateway_used]=&payload[statement][transactions][0][gateway_transaction_id]=&payload[statement][transactions][0][gateway_order_id]=&payload[statement][transactions][0][payment_id]=161537369&payload[statement][transactions][0][product_id]=3792003&payload[statement][transactions][0][tax_id]=&payload[statement][transactions][0][component_id]=&payload[statement][transactions][0][statement_id]=80168049&payload[statement][transactions][0][customer_id]=14585695&payload[statement][transactions][0][original_amount_in_cents]=&payload[statement][transactions][0][discount_amount_in_cents]=&payload[statement][transactions][0][taxable_amount_in_cents]=&payload[statement][transactions][1][id]=161537344&payload[statement][transactions][1][subscription_id]=15100141&payload[statement][transactions][1][type]=Charge&payload[statement][transactions][1][kind]=quantity_based_component&payload[statement][transactions][1][transaction_type]=charge&payload[statement][transactions][1][success]=true&payload[statement][transactions][1][amount_in_cents]=5400&payload[statement][transactions][1][memo]=Timesheet%20Users%3A%2018%20Timesheet%20Users&payload[statement][transactions][1][created_at]=2016-11-08%2016%3A22%3A18%20-0500&payload[statement][transactions][1][starting_balance_in_cents]=1000&payload[statement][transactions][1][ending_balance_in_cents]=6400&payload[statement][transactions][1][gateway_used]=&payload[statement][transactions][1][gateway_transaction_id]=&payload[statement][transactions][1][gateway_order_id]=&payload[statement][transactions][1][payment_id]=161537369&payload[statement][transactions][1][product_id]=3792003&payload[statement][transactions][1][tax_id]=&payload[statement][transactions][1][component_id]=277221&payload[statement][transactions][1][statement_id]=80168049&payload[statement][transactions][1][customer_id]=14585695&payload[statement][transactions][1][original_amount_in_cents]=&payload[statement][transactions][1][discount_amount_in_cents]=&payload[statement][transactions][1][taxable_amount_in_cents]=&payload[statement][transactions][2][id]=161537369&payload[statement][transactions][2][subscription_id]=15100141&payload[statement][transactions][2][type]=Payment&payload[statement][transactions][2][kind]=&payload[statement][transactions][2][transaction_type]=payment&payload[statement][transactions][2][success]=true&payload[statement][transactions][2][amount_in_cents]=6400&payload[statement][transactions][2][memo]=Pookie%20Test%20-%20%2410%20Basic%20Plan%3A%20Renewal%20payment&payload[statement][transactions][2][created_at]=2016-11-08%2016%3A22%3A20%20-0500&payload[statement][transactions][2][starting_balance_in_cents]=6400&payload[statement][transactions][2][ending_balance_in_cents]=0&payload[statement][transactions][2][gateway_used]=bogus&payload[statement][transactions][2][gateway_transaction_id]=53433&payload[statement][transactions][2][gateway_order_id]=&payload[statement][transactions][2][payment_id]=&payload[statement][transactions][2][product_id]=3792003&payload[statement][transactions][2][tax_id]=&payload[statement][transactions][2][component_id]=&payload[statement][transactions][2][statement_id]=80168049&payload[statement][transactions][2][customer_id]=14585695&payload[statement][transactions][2][card_number]=XXXX-XXXX-XXXX-1&payload[statement][transactions][2][card_expiration]=10%2F2020&payload[statement][transactions][2][card_type]=bogus&payload[statement][transactions][2][refunded_amount_in_cents]=0&payload[product][id]=3792003&payload[product][name]=%2410%20Basic%20Plan&payload[product_family][id]=527890&payload[product_family][name]=Acme%20Projects&payload[payment_profile][id]=10102821&payload[payment_profile][first_name]=Pookie&payload[payment_profile][last_name]=Test&payload[payment_profile][billing_address]=&payload[payment_profile][billing_address_2]=&payload[payment_profile][billing_city]=&payload[payment_profile][billing_country]=&payload[payment_profile][billing_state]=&payload[payment_profile][billing_zip]=&payload[event_id]=347299384", + "body": "id=141765032&event=statement_settled&payload[site][id]=31615&payload[site][subdomain]=general-goods&payload[subscription][id]=15100141&payload[subscription][state]=active&payload[subscription][balance_in_cents]=0&payload[customer][id]=14585695&payload[customer][first_name]=Alan&payload[customer][last_name]=Test&payload[customer][reference]=&payload[customer][organization]=&payload[customer][address]=&payload[customer][address_2]=&payload[customer][city]=&payload[customer][state]=&payload[customer][zip]=&payload[customer][country]=&payload[customer][email]=alan999%40example.com&payload[customer][phone]=&payload[statement][closed_at]=2016-11-08%2016%3A22%3A20%20-0500&payload[statement][created_at]=2016-11-08%2016%3A22%3A18%20-0500&payload[statement][id]=80168049&payload[statement][opened_at]=2016-11-07%2016%3A22%3A15%20-0500&payload[statement][settled_at]=2016-11-08%2016%3A22%3A20%20-0500&payload[statement][subscription_id]=15100141&payload[statement][updated_at]=2016-11-08%2016%3A22%3A20%20-0500&payload[statement][starting_balance_in_cents]=0&payload[statement][ending_balance_in_cents]=0&payload[statement][total_in_cents]=6400&payload[statement][memo]=We%20thank%20you%20for%20your%20continued%20business!&payload[statement][events][0][id]=346956565&payload[statement][events][0][key]=renewal_success&payload[statement][events][0][message]=Successful%20renewal%20for%20Alan%20Test's%20subscription%20to%20%2410%20Basic%20Plan&payload[statement][events][1][id]=346956579&payload[statement][events][1][key]=payment_success&payload[statement][events][1][message]=Successful%20payment%20of%20%2464.00%20for%20Alan%20Test's%20subscription%20to%20%2410%20Basic%20Plan&payload[statement][events][2][id]=347299359&payload[statement][events][2][key]=renewal_success&payload[statement][events][2][message]=Successful%20renewal%20for%20Alan%20Test's%20subscription%20to%20%2410%20Basic%20Plan&payload[statement][transactions][0][id]=161537343&payload[statement][transactions][0][subscription_id]=15100141&payload[statement][transactions][0][type]=Charge&payload[statement][transactions][0][kind]=baseline&payload[statement][transactions][0][transaction_type]=charge&payload[statement][transactions][0][success]=true&payload[statement][transactions][0][amount_in_cents]=1000&payload[statement][transactions][0][memo]=%2410%20Basic%20Plan%20(11%2F08%2F2016%20-%2011%2F09%2F2016)&payload[statement][transactions][0][created_at]=2016-11-08%2016%3A22%3A18%20-0500&payload[statement][transactions][0][starting_balance_in_cents]=0&payload[statement][transactions][0][ending_balance_in_cents]=1000&payload[statement][transactions][0][gateway_used]=&payload[statement][transactions][0][gateway_transaction_id]=&payload[statement][transactions][0][gateway_order_id]=&payload[statement][transactions][0][payment_id]=161537369&payload[statement][transactions][0][product_id]=3792003&payload[statement][transactions][0][tax_id]=&payload[statement][transactions][0][component_id]=&payload[statement][transactions][0][statement_id]=80168049&payload[statement][transactions][0][customer_id]=14585695&payload[statement][transactions][0][original_amount_in_cents]=&payload[statement][transactions][0][discount_amount_in_cents]=&payload[statement][transactions][0][taxable_amount_in_cents]=&payload[statement][transactions][1][id]=161537344&payload[statement][transactions][1][subscription_id]=15100141&payload[statement][transactions][1][type]=Charge&payload[statement][transactions][1][kind]=quantity_based_component&payload[statement][transactions][1][transaction_type]=charge&payload[statement][transactions][1][success]=true&payload[statement][transactions][1][amount_in_cents]=5400&payload[statement][transactions][1][memo]=Timesheet%20Users%3A%2018%20Timesheet%20Users&payload[statement][transactions][1][created_at]=2016-11-08%2016%3A22%3A18%20-0500&payload[statement][transactions][1][starting_balance_in_cents]=1000&payload[statement][transactions][1][ending_balance_in_cents]=6400&payload[statement][transactions][1][gateway_used]=&payload[statement][transactions][1][gateway_transaction_id]=&payload[statement][transactions][1][gateway_order_id]=&payload[statement][transactions][1][payment_id]=161537369&payload[statement][transactions][1][product_id]=3792003&payload[statement][transactions][1][tax_id]=&payload[statement][transactions][1][component_id]=277221&payload[statement][transactions][1][statement_id]=80168049&payload[statement][transactions][1][customer_id]=14585695&payload[statement][transactions][1][original_amount_in_cents]=&payload[statement][transactions][1][discount_amount_in_cents]=&payload[statement][transactions][1][taxable_amount_in_cents]=&payload[statement][transactions][2][id]=161537369&payload[statement][transactions][2][subscription_id]=15100141&payload[statement][transactions][2][type]=Payment&payload[statement][transactions][2][kind]=&payload[statement][transactions][2][transaction_type]=payment&payload[statement][transactions][2][success]=true&payload[statement][transactions][2][amount_in_cents]=6400&payload[statement][transactions][2][memo]=Alan%20Test%20-%20%2410%20Basic%20Plan%3A%20Renewal%20payment&payload[statement][transactions][2][created_at]=2016-11-08%2016%3A22%3A20%20-0500&payload[statement][transactions][2][starting_balance_in_cents]=6400&payload[statement][transactions][2][ending_balance_in_cents]=0&payload[statement][transactions][2][gateway_used]=bogus&payload[statement][transactions][2][gateway_transaction_id]=53433&payload[statement][transactions][2][gateway_order_id]=&payload[statement][transactions][2][payment_id]=&payload[statement][transactions][2][product_id]=3792003&payload[statement][transactions][2][tax_id]=&payload[statement][transactions][2][component_id]=&payload[statement][transactions][2][statement_id]=80168049&payload[statement][transactions][2][customer_id]=14585695&payload[statement][transactions][2][card_number]=XXXX-XXXX-XXXX-1&payload[statement][transactions][2][card_expiration]=10%2F2020&payload[statement][transactions][2][card_type]=bogus&payload[statement][transactions][2][refunded_amount_in_cents]=0&payload[product][id]=3792003&payload[product][name]=%2410%20Basic%20Plan&payload[product_family][id]=527890&payload[product_family][name]=Acme%20Projects&payload[payment_profile][id]=10102821&payload[payment_profile][first_name]=Alan&payload[payment_profile][last_name]=Test&payload[payment_profile][billing_address]=&payload[payment_profile][billing_address_2]=&payload[payment_profile][billing_city]=&payload[payment_profile][billing_country]=&payload[payment_profile][billing_state]=&payload[payment_profile][billing_zip]=&payload[event_id]=347299384", "signature": "7c606ec4628ce75ec46e284097ce163a", "signature_hmac_sha_256": "40f25e83dd324508bb2149e3e525821922fb210535ebfbfa81e7ab951996b41d" } @@ -93,7 +93,7 @@ catch (ApiException e) "last_sent_at": "2016-11-08T16:43:54-05:00", "last_sent_url": "http://requestb.in/11u45x71", "successful": false, - "body": "id=141765008&event=payment_success&payload[site][id]=31615&payload[site][subdomain]=general-goods&payload[subscription][id]=15100141&payload[subscription][state]=active&payload[subscription][trial_started_at]=&payload[subscription][trial_ended_at]=&payload[subscription][activated_at]=2016-11-04%2017%3A06%3A43%20-0400&payload[subscription][created_at]=2016-11-04%2017%3A06%3A42%20-0400&payload[subscription][updated_at]=2016-11-08%2016%3A22%3A22%20-0500&payload[subscription][expires_at]=&payload[subscription][balance_in_cents]=0&payload[subscription][current_period_ends_at]=2016-11-09%2016%3A06%3A42%20-0500&payload[subscription][next_assessment_at]=2016-11-09%2016%3A06%3A42%20-0500&payload[subscription][canceled_at]=&payload[subscription][cancellation_message]=&payload[subscription][next_product_id]=&payload[subscription][cancel_at_end_of_period]=false&payload[subscription][payment_collection_method]=automatic&payload[subscription][snap_day]=&payload[subscription][cancellation_method]=&payload[subscription][current_period_started_at]=2016-11-08%2016%3A06%3A42%20-0500&payload[subscription][previous_state]=active&payload[subscription][signup_payment_id]=161034048&payload[subscription][signup_revenue]=64.00&payload[subscription][delayed_cancel_at]=&payload[subscription][coupon_code]=&payload[subscription][total_revenue_in_cents]=32000&payload[subscription][product_price_in_cents]=1000&payload[subscription][product_version_number]=7&payload[subscription][payment_type]=credit_card&payload[subscription][referral_code]=pggn84&payload[subscription][coupon_use_count]=&payload[subscription][coupon_uses_allowed]=&payload[subscription][customer][id]=14585695&payload[subscription][customer][first_name]=Test&payload[subscription][customer][last_name]=Test&payload[subscription][customer][organization]=&payload[subscription][customer][email]=pookie999%40example.com&payload[subscription][customer][created_at]=2016-11-04%2017%3A06%3A42%20-0400&payload[subscription][customer][updated_at]=2016-11-04%2017%3A06%3A45%20-0400&payload[subscription][customer][reference]=&payload[subscription][customer][address]=&payload[subscription][customer][address_2]=&payload[subscription][customer][city]=&payload[subscription][customer][state]=&payload[subscription][customer][zip]=&payload[subscription][customer][country]=&payload[subscription][customer][phone]=&payload[subscription][customer][portal_invite_last_sent_at]=2016-11-04%2017%3A06%3A45%20-0400&payload[subscription][customer][portal_invite_last_accepted_at]=&payload[subscription][customer][verified]=false&payload[subscription][customer][portal_customer_created_at]=2016-11-04%2017%3A06%3A45%20-0400&payload[subscription][customer][cc_emails]=&payload[subscription][product][id]=3792003&payload[subscription][product][name]=%2410%20Basic%20Plan&payload[subscription][product][handle]=basic&payload[subscription][product][description]=lorem%20ipsum&payload[subscription][product][accounting_code]=basic&payload[subscription][product][request_credit_card]=false&payload[subscription][product][expiration_interval]=&payload[subscription][product][expiration_interval_unit]=never&payload[subscription][product][created_at]=2016-03-24%2013%3A38%3A39%20-0400&payload[subscription][product][updated_at]=2016-11-03%2013%3A03%3A05%20-0400&payload[subscription][product][price_in_cents]=1000&payload[subscription][product][interval]=1&payload[subscription][product][interval_unit]=day&payload[subscription][product][initial_charge_in_cents]=&payload[subscription][product][trial_price_in_cents]=&payload[subscription][product][trial_interval]=&payload[subscription][product][trial_interval_unit]=month&payload[subscription][product][archived_at]=&payload[subscription][product][require_credit_card]=false&payload[subscription][product][return_params]=&payload[subscription][product][taxable]=false&payload[subscription][product][update_return_url]=&payload[subscription][product][initial_charge_after_trial]=false&payload[subscription][product][version_number]=7&payload[subscription][product][update_return_params]=&payload[subscription][product][product_family][id]=527890&payload[subscription][product][product_family][name]=Acme%20Projects&payload[subscription][product][product_family][description]=&payload[subscription][product][product_family][handle]=billing-plans&payload[subscription][product][product_family][accounting_code]=&payload[subscription][product][public_signup_pages][id]=281054&payload[subscription][product][public_signup_pages][return_url]=http%3A%2F%2Fwww.example.com%3Fsuccessfulsignup&payload[subscription][product][public_signup_pages][return_params]=&payload[subscription][product][public_signup_pages][url]=https%3A%2F%2Fgeneral-goods.chargify.com%2Fsubscribe%2Fkqvmfrbgd89q%2Fbasic&payload[subscription][product][public_signup_pages][id]=281240&payload[subscription][product][public_signup_pages][return_url]=&payload[subscription][product][public_signup_pages][return_params]=&payload[subscription][product][public_signup_pages][url]=https%3A%2F%2Fgeneral-goods.chargify.com%2Fsubscribe%2Fdkffht5dxfd8%2Fbasic&payload[subscription][product][public_signup_pages][id]=282694&payload[subscription][product][public_signup_pages][return_url]=&payload[subscription][product][public_signup_pages][return_params]=&payload[subscription][product][public_signup_pages][url]=https%3A%2F%2Fgeneral-goods.chargify.com%2Fsubscribe%2Fjwffwgdd95s8%2Fbasic&payload[subscription][credit_card][id]=10102821&payload[subscription][credit_card][first_name]=Pookie&payload[subscription][credit_card][last_name]=Test&payload[subscription][credit_card][masked_card_number]=XXXX-XXXX-XXXX-1&payload[subscription][credit_card][card_type]=bogus&payload[subscription][credit_card][expiration_month]=10&payload[subscription][credit_card][expiration_year]=2020&payload[subscription][credit_card][customer_id]=14585695&payload[subscription][credit_card][current_vault]=bogus&payload[subscription][credit_card][vault_token]=1&payload[subscription][credit_card][billing_address]=&payload[subscription][credit_card][billing_city]=&payload[subscription][credit_card][billing_state]=&payload[subscription][credit_card][billing_zip]=&payload[subscription][credit_card][billing_country]=&payload[subscription][credit_card][customer_vault_token]=&payload[subscription][credit_card][billing_address_2]=&payload[subscription][credit_card][payment_type]=credit_card&payload[subscription][credit_card][site_gateway_setting_id]=&payload[subscription][credit_card][gateway_handle]=&payload[transaction][id]=161537369&payload[transaction][subscription_id]=15100141&payload[transaction][type]=Payment&payload[transaction][kind]=&payload[transaction][transaction_type]=payment&payload[transaction][success]=true&payload[transaction][amount_in_cents]=6400&payload[transaction][memo]=Pookie%20Test%20-%20%2410%20Basic%20Plan%3A%20Renewal%20payment&payload[transaction][created_at]=2016-11-08%2016%3A22%3A20%20-0500&payload[transaction][starting_balance_in_cents]=6400&payload[transaction][ending_balance_in_cents]=0&payload[transaction][gateway_used]=bogus&payload[transaction][gateway_transaction_id]=53433&payload[transaction][gateway_response_code]=&payload[transaction][gateway_order_id]=&payload[transaction][payment_id]=&payload[transaction][product_id]=3792003&payload[transaction][tax_id]=&payload[transaction][component_id]=&payload[transaction][statement_id]=80168049&payload[transaction][customer_id]=14585695&payload[transaction][card_number]=XXXX-XXXX-XXXX-1&payload[transaction][card_expiration]=10%2F2020&payload[transaction][card_type]=bogus&payload[transaction][refunded_amount_in_cents]=0&payload[transaction][invoice_id]=&payload[event_id]=347299364", + "body": "id=141765008&event=payment_success&payload[site][id]=31615&payload[site][subdomain]=general-goods&payload[subscription][id]=15100141&payload[subscription][state]=active&payload[subscription][trial_started_at]=&payload[subscription][trial_ended_at]=&payload[subscription][activated_at]=2016-11-04%2017%3A06%3A43%20-0400&payload[subscription][created_at]=2016-11-04%2017%3A06%3A42%20-0400&payload[subscription][updated_at]=2016-11-08%2016%3A22%3A22%20-0500&payload[subscription][expires_at]=&payload[subscription][balance_in_cents]=0&payload[subscription][current_period_ends_at]=2016-11-09%2016%3A06%3A42%20-0500&payload[subscription][next_assessment_at]=2016-11-09%2016%3A06%3A42%20-0500&payload[subscription][canceled_at]=&payload[subscription][cancellation_message]=&payload[subscription][next_product_id]=&payload[subscription][cancel_at_end_of_period]=false&payload[subscription][payment_collection_method]=automatic&payload[subscription][snap_day]=&payload[subscription][cancellation_method]=&payload[subscription][current_period_started_at]=2016-11-08%2016%3A06%3A42%20-0500&payload[subscription][previous_state]=active&payload[subscription][signup_payment_id]=161034048&payload[subscription][signup_revenue]=64.00&payload[subscription][delayed_cancel_at]=&payload[subscription][coupon_code]=&payload[subscription][total_revenue_in_cents]=32000&payload[subscription][product_price_in_cents]=1000&payload[subscription][product_version_number]=7&payload[subscription][payment_type]=credit_card&payload[subscription][referral_code]=pggn84&payload[subscription][coupon_use_count]=&payload[subscription][coupon_uses_allowed]=&payload[subscription][customer][id]=14585695&payload[subscription][customer][first_name]=Test&payload[subscription][customer][last_name]=Test&payload[subscription][customer][organization]=&payload[subscription][customer][email]=alan999%40example.com&payload[subscription][customer][created_at]=2016-11-04%2017%3A06%3A42%20-0400&payload[subscription][customer][updated_at]=2016-11-04%2017%3A06%3A45%20-0400&payload[subscription][customer][reference]=&payload[subscription][customer][address]=&payload[subscription][customer][address_2]=&payload[subscription][customer][city]=&payload[subscription][customer][state]=&payload[subscription][customer][zip]=&payload[subscription][customer][country]=&payload[subscription][customer][phone]=&payload[subscription][customer][portal_invite_last_sent_at]=2016-11-04%2017%3A06%3A45%20-0400&payload[subscription][customer][portal_invite_last_accepted_at]=&payload[subscription][customer][verified]=false&payload[subscription][customer][portal_customer_created_at]=2016-11-04%2017%3A06%3A45%20-0400&payload[subscription][customer][cc_emails]=&payload[subscription][product][id]=3792003&payload[subscription][product][name]=%2410%20Basic%20Plan&payload[subscription][product][handle]=basic&payload[subscription][product][description]=lorem%20ipsum&payload[subscription][product][accounting_code]=basic&payload[subscription][product][request_credit_card]=false&payload[subscription][product][expiration_interval]=&payload[subscription][product][expiration_interval_unit]=never&payload[subscription][product][created_at]=2016-03-24%2013%3A38%3A39%20-0400&payload[subscription][product][updated_at]=2016-11-03%2013%3A03%3A05%20-0400&payload[subscription][product][price_in_cents]=1000&payload[subscription][product][interval]=1&payload[subscription][product][interval_unit]=day&payload[subscription][product][initial_charge_in_cents]=&payload[subscription][product][trial_price_in_cents]=&payload[subscription][product][trial_interval]=&payload[subscription][product][trial_interval_unit]=month&payload[subscription][product][archived_at]=&payload[subscription][product][require_credit_card]=false&payload[subscription][product][return_params]=&payload[subscription][product][taxable]=false&payload[subscription][product][update_return_url]=&payload[subscription][product][initial_charge_after_trial]=false&payload[subscription][product][version_number]=7&payload[subscription][product][update_return_params]=&payload[subscription][product][product_family][id]=527890&payload[subscription][product][product_family][name]=Acme%20Projects&payload[subscription][product][product_family][description]=&payload[subscription][product][product_family][handle]=billing-plans&payload[subscription][product][product_family][accounting_code]=&payload[subscription][product][public_signup_pages][id]=281054&payload[subscription][product][public_signup_pages][return_url]=http%3A%2F%2Fwww.example.com%3Fsuccessfulsignup&payload[subscription][product][public_signup_pages][return_params]=&payload[subscription][product][public_signup_pages][url]=https%3A%2F%2Fgeneral-goods.chargify.com%2Fsubscribe%2Fkqvmfrbgd89q%2Fbasic&payload[subscription][product][public_signup_pages][id]=281240&payload[subscription][product][public_signup_pages][return_url]=&payload[subscription][product][public_signup_pages][return_params]=&payload[subscription][product][public_signup_pages][url]=https%3A%2F%2Fgeneral-goods.chargify.com%2Fsubscribe%2Fdkffht5dxfd8%2Fbasic&payload[subscription][product][public_signup_pages][id]=282694&payload[subscription][product][public_signup_pages][return_url]=&payload[subscription][product][public_signup_pages][return_params]=&payload[subscription][product][public_signup_pages][url]=https%3A%2F%2Fgeneral-goods.chargify.com%2Fsubscribe%2Fjwffwgdd95s8%2Fbasic&payload[subscription][credit_card][id]=10102821&payload[subscription][credit_card][first_name]=Alan&payload[subscription][credit_card][last_name]=Test&payload[subscription][credit_card][masked_card_number]=XXXX-XXXX-XXXX-1&payload[subscription][credit_card][card_type]=bogus&payload[subscription][credit_card][expiration_month]=10&payload[subscription][credit_card][expiration_year]=2020&payload[subscription][credit_card][customer_id]=14585695&payload[subscription][credit_card][current_vault]=bogus&payload[subscription][credit_card][vault_token]=1&payload[subscription][credit_card][billing_address]=&payload[subscription][credit_card][billing_city]=&payload[subscription][credit_card][billing_state]=&payload[subscription][credit_card][billing_zip]=&payload[subscription][credit_card][billing_country]=&payload[subscription][credit_card][customer_vault_token]=&payload[subscription][credit_card][billing_address_2]=&payload[subscription][credit_card][payment_type]=credit_card&payload[subscription][credit_card][site_gateway_setting_id]=&payload[subscription][credit_card][gateway_handle]=&payload[transaction][id]=161537369&payload[transaction][subscription_id]=15100141&payload[transaction][type]=Payment&payload[transaction][kind]=&payload[transaction][transaction_type]=payment&payload[transaction][success]=true&payload[transaction][amount_in_cents]=6400&payload[transaction][memo]=Alan%20Test%20-%20%2410%20Basic%20Plan%3A%20Renewal%20payment&payload[transaction][created_at]=2016-11-08%2016%3A22%3A20%20-0500&payload[transaction][starting_balance_in_cents]=6400&payload[transaction][ending_balance_in_cents]=0&payload[transaction][gateway_used]=bogus&payload[transaction][gateway_transaction_id]=53433&payload[transaction][gateway_response_code]=&payload[transaction][gateway_order_id]=&payload[transaction][payment_id]=&payload[transaction][product_id]=3792003&payload[transaction][tax_id]=&payload[transaction][component_id]=&payload[transaction][statement_id]=80168049&payload[transaction][customer_id]=14585695&payload[transaction][card_number]=XXXX-XXXX-XXXX-1&payload[transaction][card_expiration]=10%2F2020&payload[transaction][card_type]=bogus&payload[transaction][refunded_amount_in_cents]=0&payload[transaction][invoice_id]=&payload[event_id]=347299364", "signature": "fbcf2f6be579f9658cff90c4373e0ca2", "signature_hmac_sha_256": "db96654f5456c5460062feb944ac8bb1418f9d181ae04a8ed982fe9ffdca8de1" } @@ -228,7 +228,7 @@ This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `body` | [`CreateOrUpdateEndpointRequest`](../../doc/models/create-or-update-endpoint-request.md) | Body, Optional | Used to Create or Update Endpoint | +| `body` | [`CreateOrUpdateEndpointRequest`](../../doc/models/create-or-update-endpoint-request.md) | Body, Optional | Used to Create or Update Endpoint. | ## Response Type @@ -294,7 +294,7 @@ catch (ApiException e) # List Endpoints -Returns created endpoints for a site. +Lists endpoints configured for a site. ```csharp ListEndpointsAsync() @@ -376,7 +376,7 @@ This endpoint requires [BasicAuth](../../doc/auth/basic-authentication.md) | Parameter | Type | Tags | Description | | --- | --- | --- | --- | | `endpointId` | `int` | Template, Required | The Advanced Billing id for the endpoint that should be updated | -| `body` | [`CreateOrUpdateEndpointRequest`](../../doc/models/create-or-update-endpoint-request.md) | Body, Optional | Used to Create or Update Endpoint | +| `body` | [`CreateOrUpdateEndpointRequest`](../../doc/models/create-or-update-endpoint-request.md) | Body, Optional | Used to Create or Update Endpoint. | ## Response Type diff --git a/doc/models/account-balance.md b/doc/models/account-balance.md index 94a9332d..a60efed8 100644 --- a/doc/models/account-balance.md +++ b/doc/models/account-balance.md @@ -13,13 +13,16 @@ | `AutomaticBalanceInCents` | `long?` | Optional | The automatic balance in cents. | | `RemittanceBalanceInCents` | `long?` | Optional | The remittance balance in cents. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +AccountBalance accountBalance = new AccountBalance { - "balance_in_cents": 16, - "automatic_balance_in_cents": 226, - "remittance_balance_in_cents": 62 -} + BalanceInCents = 242L, + AutomaticBalanceInCents = 0L, + RemittanceBalanceInCents = 32L, +}; ``` diff --git a/doc/models/account-balances.md b/doc/models/account-balances.md index 2624c3af..6c0c585a 100644 --- a/doc/models/account-balances.md +++ b/doc/models/account-balances.md @@ -9,41 +9,49 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `OpenInvoices` | [`AccountBalance`](../../doc/models/account-balance.md) | Optional | The balance, in cents, of the sum of the subscription's open, payable invoices. | -| `PendingInvoices` | [`AccountBalance`](../../doc/models/account-balance.md) | Optional | The balance, in cents, of the sum of the subscription's pending, payable invoices. | +| `OpenInvoices` | [`AccountBalance`](../../doc/models/account-balance.md) | Optional | The balance, in cents, of the sum of the subscription's open, payable invoices. | +| `PendingInvoices` | [`AccountBalance`](../../doc/models/account-balance.md) | Optional | The balance, in cents, of the sum of the subscription's pending, payable invoices. | | `PendingDiscounts` | [`AccountBalance`](../../doc/models/account-balance.md) | Optional | The balance, in cents, of the subscription's Pending Discount account. | | `ServiceCredits` | [`AccountBalance`](../../doc/models/account-balance.md) | Optional | The balance, in cents, of the subscription's Service Credit account. | | `Prepayments` | [`AccountBalance`](../../doc/models/account-balance.md) | Optional | The balance, in cents, of the subscription's Prepayment account. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +AccountBalances accountBalances = new AccountBalances { - "open_invoices": { - "balance_in_cents": 40, - "automatic_balance_in_cents": 202, - "remittance_balance_in_cents": 170 - }, - "pending_invoices": { - "balance_in_cents": 0, - "automatic_balance_in_cents": 242, - "remittance_balance_in_cents": 46 - }, - "pending_discounts": { - "balance_in_cents": 88, - "automatic_balance_in_cents": 154, - "remittance_balance_in_cents": 134 - }, - "service_credits": { - "balance_in_cents": 84, - "automatic_balance_in_cents": 70, - "remittance_balance_in_cents": 38 - }, - "prepayments": { - "balance_in_cents": 192, - "automatic_balance_in_cents": 178, - "remittance_balance_in_cents": 146 - } -} + OpenInvoices = new AccountBalance + { + BalanceInCents = 40L, + AutomaticBalanceInCents = 202L, + RemittanceBalanceInCents = 170L, + }, + PendingInvoices = new AccountBalance + { + BalanceInCents = 0L, + AutomaticBalanceInCents = 242L, + RemittanceBalanceInCents = 46L, + }, + PendingDiscounts = new AccountBalance + { + BalanceInCents = 88L, + AutomaticBalanceInCents = 154L, + RemittanceBalanceInCents = 134L, + }, + ServiceCredits = new AccountBalance + { + BalanceInCents = 84L, + AutomaticBalanceInCents = 70L, + RemittanceBalanceInCents = 38L, + }, + Prepayments = new AccountBalance + { + BalanceInCents = 192L, + AutomaticBalanceInCents = 178L, + RemittanceBalanceInCents = 146L, + }, +}; ``` diff --git a/doc/models/ach-agreement.md b/doc/models/ach-agreement.md index 429187c0..1139121c 100644 --- a/doc/models/ach-agreement.md +++ b/doc/models/ach-agreement.md @@ -16,14 +16,17 @@ | `AuthorizerLastName` | `string` | Optional | (Required when providing ACH agreement params) The last name of the person authorizing the ACH agreement. | | `IpAddress` | `string` | Optional | (Required when providing ACH agreement params) The IP address of the person authorizing the ACH agreement. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +ACHAgreement aCHAgreement = new ACHAgreement { - "agreement_terms": "agreement_terms4", - "authorizer_first_name": "authorizer_first_name2", - "authorizer_last_name": "authorizer_last_name2", - "ip_address": "ip_address2" -} + AgreementTerms = "agreement_terms4", + AuthorizerFirstName = "authorizer_first_name2", + AuthorizerLastName = "authorizer_last_name2", + IpAddress = "ip_address2", +}; ``` diff --git a/doc/models/activate-event-based-component.md b/doc/models/activate-event-based-component.md index 71cabf21..8b980f6d 100644 --- a/doc/models/activate-event-based-component.md +++ b/doc/models/activate-event-based-component.md @@ -13,33 +13,43 @@ | `BillingSchedule` | [`BillingSchedule`](../../doc/models/billing-schedule.md) | Optional | Billing schedule settings for component allocations or usages on multi-frequency subscriptions. Use this to start a component's billing period on a custom date instead of aligning with the product charge schedule. | | `CustomPrice` | [`ComponentCustomPrice`](../../doc/models/component-custom-price.md) | Optional | Create or update custom pricing unique to the subscription. Used in place of `price_point_id`. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using AdvancedBilling.Standard.Models.Containers; +using System.Collections.Generic; + +ActivateEventBasedComponent activateEventBasedComponent = new ActivateEventBasedComponent { - "price_point_id": 44, - "billing_schedule": { - "initial_billing_at": "2016-03-13" - }, - "custom_price": { - "tax_included": false, - "pricing_scheme": "stairstep", - "interval": 66, - "interval_unit": "day", - "list_price_point_id": 174, - "prices": [ - { - "starting_quantity": 242, - "ending_quantity": 40, - "unit_price": 23.26 - }, - { - "starting_quantity": 242, - "ending_quantity": 40, - "unit_price": 23.26 - } - ] - } -} + PricePointId = 68, + BillingSchedule = new BillingSchedule + { + InitialBillingAt = DateTime.Parse("2016-03-13"), + }, + CustomPrice = new ComponentCustomPrice + { + Prices = new List + { + new Price + { + StartingQuantity = PriceStartingQuantity.FromNumber(242), + UnitPrice = PriceUnitPrice.FromPrecision(23.26), + EndingQuantity = PriceEndingQuantity.FromNumber(40), + }, + new Price + { + StartingQuantity = PriceStartingQuantity.FromNumber(242), + UnitPrice = PriceUnitPrice.FromPrecision(23.26), + EndingQuantity = PriceEndingQuantity.FromNumber(40), + }, + }, + TaxIncluded = false, + PricingScheme = PricingScheme.Stairstep, + Interval = 66, + IntervalUnit = IntervalUnit.Day, + ListPricePointId = 174, + }, +}; ``` diff --git a/doc/models/activate-subscription-request.md b/doc/models/activate-subscription-request.md index bd16cfaf..767ee9d8 100644 --- a/doc/models/activate-subscription-request.md +++ b/doc/models/activate-subscription-request.md @@ -9,13 +9,16 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `RevertOnFailure` | `bool?` | Optional | You may choose how to handle the activation failure. `true` means do not change the subscription’s state and billing period. `false` means to continue through with the activation and enter an end of life state. If this parameter is omitted or `null` is passed it will default to value set in the site settings (default: `true`) | +| `RevertOnFailure` | `bool?` | Optional | You may choose how to handle the activation failure. `true` means do not change the subscription’s state and billing period. `false` means to continue through with the activation and enter an end-of-life state. If this parameter is omitted or `null` is passed it will default to the value set in the site settings (default: `true`). | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +ActivateSubscriptionRequest activateSubscriptionRequest = new ActivateSubscriptionRequest { - "revert_on_failure": false -} + RevertOnFailure = false, +}; ``` diff --git a/doc/models/add-coupons-request.md b/doc/models/add-coupons-request.md index f34f2d8d..40910cf0 100644 --- a/doc/models/add-coupons-request.md +++ b/doc/models/add-coupons-request.md @@ -11,14 +11,19 @@ | --- | --- | --- | --- | | `Codes` | `List` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Collections.Generic; + +AddCouponsRequest addCouponsRequest = new AddCouponsRequest { - "codes": [ - "codes0", - "codes1" - ] -} + Codes = new List + { + "codes6", + "codes7", + }, +}; ``` diff --git a/doc/models/add-subscription-to-a-group.md b/doc/models/add-subscription-to-a-group.md index f093acc1..94e8bfae 100644 --- a/doc/models/add-subscription-to-a-group.md +++ b/doc/models/add-subscription-to-a-group.md @@ -11,21 +11,27 @@ | --- | --- | --- | --- | | `Group` | [`GroupSettings`](../../doc/models/group-settings.md) | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +AddSubscriptionToAGroup addSubscriptionToAGroup = new AddSubscriptionToAGroup { - "group": { - "target": { - "type": "parent", - "id": 236 + MGroup = new GroupSettings + { + Target = new GroupTarget + { + Type = GroupTargetType.Parent, + Id = 236, + }, + Billing = new GroupBilling + { + Accrue = false, + AlignDate = false, + Prorate = false, + }, }, - "billing": { - "accrue": false, - "align_date": false, - "prorate": false - } - } -} +}; ``` diff --git a/doc/models/address-change.md b/doc/models/address-change.md index 7eaacfba..8c61131d 100644 --- a/doc/models/address-change.md +++ b/doc/models/address-change.md @@ -12,24 +12,29 @@ | `Before` | [`InvoiceAddress`](../../doc/models/invoice-address.md) | Required | - | | `After` | [`InvoiceAddress`](../../doc/models/invoice-address.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +AddressChange addressChange = new AddressChange { - "before": { - "street": "street0", - "line2": "line24", - "city": "city0", - "state": "state6", - "zip": "zip4" - }, - "after": { - "street": "street2", - "line2": "line26", - "city": "city8", - "state": "state2", - "zip": "zip4" - } -} + Before = new InvoiceAddress + { + Street = "street0", + Line2 = "line24", + City = "city0", + State = "state6", + Zip = "zip4", + }, + After = new InvoiceAddress + { + Street = "street2", + Line2 = "line26", + City = "city8", + State = "state2", + Zip = "zip4", + }, +}; ``` diff --git a/doc/models/agreement-acceptance.md b/doc/models/agreement-acceptance.md index 4df80626..1a881bf2 100644 --- a/doc/models/agreement-acceptance.md +++ b/doc/models/agreement-acceptance.md @@ -12,21 +12,24 @@ Required when creating a subscription with Maxio Payments. | Name | Type | Tags | Description | | --- | --- | --- | --- | | `IpAddress` | `string` | Optional | Required when providing agreement acceptance params. | -| `TermsUrl` | `string` | Optional | Required when creating a subscription with Maxio Payments. Either terms_url or provacy_policy_url required when providing agreement_acceptance params. | +| `TermsUrl` | `string` | Optional | Required when creating a subscription with Maxio Payments. Either terms_url or privacy_policy_url is required when providing agreement_acceptance params. | | `PrivacyPolicyUrl` | `string` | Optional | - | | `ReturnRefundPolicyUrl` | `string` | Optional | - | | `DeliveryPolicyUrl` | `string` | Optional | - | | `SecureCheckoutPolicyUrl` | `string` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +AgreementAcceptance agreementAcceptance = new AgreementAcceptance { - "ip_address": "ip_address2", - "terms_url": "terms_url0", - "privacy_policy_url": "privacy_policy_url0", - "return_refund_policy_url": "return_refund_policy_url4", - "delivery_policy_url": "delivery_policy_url8" -} + IpAddress = "ip_address8", + TermsUrl = "terms_url6", + PrivacyPolicyUrl = "privacy_policy_url4", + ReturnRefundPolicyUrl = "return_refund_policy_url0", + DeliveryPolicyUrl = "delivery_policy_url4", +}; ``` diff --git a/doc/models/all-vaults.md b/doc/models/all-vaults.md index be2f56f6..d7f29938 100644 --- a/doc/models/all-vaults.md +++ b/doc/models/all-vaults.md @@ -46,3 +46,11 @@ The vault that stores the payment profile with the provided `vault_token`. Use ` | `Unipaas` | | `Wirecard` | +## Example + +```csharp +using AdvancedBilling.Standard.Models; + +AllVaults allVaults = AllVaults.EwayRapidStd; +``` + diff --git a/doc/models/allocate-components.md b/doc/models/allocate-components.md index d0c0c5ef..723b2c28 100644 --- a/doc/models/allocate-components.md +++ b/doc/models/allocate-components.md @@ -15,35 +15,51 @@ | `AccrueCharge` | `bool?` | Optional | - | | `UpgradeCharge` | [`CreditType?`](../../doc/models/credit-type.md) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided. | | `DowngradeCredit` | [`CreditType?`](../../doc/models/credit-type.md) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided. | -| `PaymentCollectionMethod` | [`CollectionMethod?`](../../doc/models/collection-method.md) | Optional | (Optional) If not passed, the allocation(s) will use the payment collection method on the subscription | +| `PaymentCollectionMethod` | [`CollectionMethod?`](../../doc/models/collection-method.md) | Optional | (Optional) If not passed, the allocation(s) will use the payment collection method on the subscription. | | `InitiateDunning` | `bool?` | Optional | If true, if the immediate component payment fails, initiate dunning for the subscription.
Otherwise, leave the charges on the subscription to pay for at renewal. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Collections.Generic; + +AllocateComponents allocateComponents = new AllocateComponents { - "proration_upgrade_scheme": "proration_upgrade_scheme2", - "proration_downgrade_scheme": "proration_downgrade_scheme0", - "allocations": [ + ProrationUpgradeScheme = "proration_upgrade_scheme8", + ProrationDowngradeScheme = "proration_downgrade_scheme6", + Allocations = new List { - "quantity": 26.48, - "decimal_quantity": "decimal_quantity8", - "previous_quantity": 55.5, - "decimal_previous_quantity": "decimal_previous_quantity2", - "component_id": 242, - "memo": "memo6" + new CreateAllocation + { + Quantity = 26.48, + DecimalQuantity = "decimal_quantity8", + PreviousQuantity = 55.5, + DecimalPreviousQuantity = "decimal_previous_quantity2", + ComponentId = 242, + Memo = "memo6", + }, + new CreateAllocation + { + Quantity = 26.48, + DecimalQuantity = "decimal_quantity8", + PreviousQuantity = 55.5, + DecimalPreviousQuantity = "decimal_previous_quantity2", + ComponentId = 242, + Memo = "memo6", + }, + new CreateAllocation + { + Quantity = 26.48, + DecimalQuantity = "decimal_quantity8", + PreviousQuantity = 55.5, + DecimalPreviousQuantity = "decimal_previous_quantity2", + ComponentId = 242, + Memo = "memo6", + }, }, - { - "quantity": 26.48, - "decimal_quantity": "decimal_quantity8", - "previous_quantity": 55.5, - "decimal_previous_quantity": "decimal_previous_quantity2", - "component_id": 242, - "memo": "memo6" - } - ], - "accrue_charge": false, - "upgrade_charge": "full" -} + AccrueCharge = false, + UpgradeCharge = CreditType.Prorated, +}; ``` diff --git a/doc/models/allocation-expiration-date.md b/doc/models/allocation-expiration-date.md index 8d6fa733..d6f4dc96 100644 --- a/doc/models/allocation-expiration-date.md +++ b/doc/models/allocation-expiration-date.md @@ -11,11 +11,17 @@ | --- | --- | --- | --- | | `ExpiresAt` | `DateTimeOffset?` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Globalization; + +AllocationExpirationDate allocationExpirationDate = new AllocationExpirationDate { - "expires_at": "2016-03-13T12:52:32.123Z" -} + ExpiresAt = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), +}; ``` diff --git a/doc/models/allocation-preview-direction.md b/doc/models/allocation-preview-direction.md index 26731f4c..3e19be1b 100644 --- a/doc/models/allocation-preview-direction.md +++ b/doc/models/allocation-preview-direction.md @@ -12,3 +12,11 @@ | `Upgrade` | | `Downgrade` | +## Example + +```csharp +using AdvancedBilling.Standard.Models; + +AllocationPreviewDirection allocationPreviewDirection = AllocationPreviewDirection.Upgrade; +``` + diff --git a/doc/models/allocation-preview-item.md b/doc/models/allocation-preview-item.md index d7a9721c..79acfae8 100644 --- a/doc/models/allocation-preview-item.md +++ b/doc/models/allocation-preview-item.md @@ -21,22 +21,26 @@ | `UpgradeCharge` | [`CreditType?`](../../doc/models/credit-type.md) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided. | | `DowngradeCredit` | [`CreditType?`](../../doc/models/credit-type.md) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided. | | `PricePointId` | `int?` | Optional | - | -| `Interval` | `int?` | Optional | The numerical interval. i.e. an interval of ‘30’ coupled with an interval_unit of day would mean this component price point would renew every 30 days. This property is only available for sites with Multifrequency enabled. | +| `Interval` | `int?` | Optional | The numerical interval. e.g., an interval of ‘30’ coupled with an interval_unit of day would mean this component price point would renew every 30 days. This property is only available for sites with Multifrequency enabled. | | `IntervalUnit` | [`IntervalUnit?`](../../doc/models/interval-unit.md) | Optional | A string representing the interval unit for this component price point, either month or day. This property is only available for sites with Multifrequency enabled. | | `PreviousPricePointId` | `int?` | Optional | - | | `PricePointHandle` | `string` | Optional | - | | `PricePointName` | `string` | Optional | - | | `ComponentHandle` | `string` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using AdvancedBilling.Standard.Models.Containers; + +AllocationPreviewItem allocationPreviewItem = new AllocationPreviewItem { - "component_id": 54, - "subscription_id": 54, - "quantity": 78, - "previous_quantity": 192, - "memo": "memo6" -} + ComponentId = 176, + SubscriptionId = 176, + Quantity = AllocationPreviewItemQuantity.FromNumber(200), + PreviousQuantity = AllocationPreviewItemPreviousQuantity.FromNumber(30), + Memo = "memo8", +}; ``` diff --git a/doc/models/allocation-preview-line-item-kind.md b/doc/models/allocation-preview-line-item-kind.md index 7fb25c3f..c5bc02c1 100644 --- a/doc/models/allocation-preview-line-item-kind.md +++ b/doc/models/allocation-preview-line-item-kind.md @@ -16,3 +16,11 @@ A handle for the line item kind for allocation preview | `Coupon` | | `Tax` | +## Example + +```csharp +using AdvancedBilling.Standard.Models; + +AllocationPreviewLineItemKind allocationPreviewLineItemKind = AllocationPreviewLineItemKind.Coupon; +``` + diff --git a/doc/models/allocation-preview-line-item.md b/doc/models/allocation-preview-line-item.md index 77cfedf1..8007c6ef 100644 --- a/doc/models/allocation-preview-line-item.md +++ b/doc/models/allocation-preview-line-item.md @@ -17,17 +17,20 @@ | `TaxableAmountInCents` | `long?` | Optional | - | | `ComponentId` | `int?` | Optional | - | | `ComponentHandle` | `string` | Optional | - | -| `Direction` | [`AllocationPreviewDirection?`](../../doc/models/allocation-preview-direction.md) | Optional | Visible when using Fine-grained Component Control | +| `Direction` | [`AllocationPreviewDirection?`](../../doc/models/allocation-preview-direction.md) | Optional | Visible when using Fine-grained Component Control. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +AllocationPreviewLineItem allocationPreviewLineItem = new AllocationPreviewLineItem { - "transaction_type": "credit", - "kind": "quantity_based_component", - "amount_in_cents": 24, - "memo": "memo6", - "discount_amount_in_cents": 172 -} + TransactionType = LineItemTransactionType.Credit, + Kind = AllocationPreviewLineItemKind.QuantityBasedComponent, + AmountInCents = 236L, + Memo = "memo6", + DiscountAmountInCents = 40L, +}; ``` diff --git a/doc/models/allocation-preview-response.md b/doc/models/allocation-preview-response.md index fdff8ddf..a9335601 100644 --- a/doc/models/allocation-preview-response.md +++ b/doc/models/allocation-preview-response.md @@ -11,17 +11,26 @@ | --- | --- | --- | --- | | `AllocationPreview` | [`AllocationPreview`](../../doc/models/allocation-preview.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Globalization; + +AllocationPreviewResponse allocationPreviewResponse = new AllocationPreviewResponse { - "allocation_preview": { - "start_date": "2016-03-13T12:52:32.123Z", - "end_date": "2016-03-13T12:52:32.123Z", - "subtotal_in_cents": 240, - "total_tax_in_cents": 108, - "total_discount_in_cents": 142 - } -} + AllocationPreview = new AllocationPreview + { + StartDate = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + EndDate = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + SubtotalInCents = 240L, + TotalTaxInCents = 108L, + TotalDiscountInCents = 142L, + }, +}; ``` diff --git a/doc/models/allocation-preview.md b/doc/models/allocation-preview.md index 5bb19f1f..13b88eeb 100644 --- a/doc/models/allocation-preview.md +++ b/doc/models/allocation-preview.md @@ -23,15 +23,23 @@ | `PeriodType` | `string` | Optional | - | | `ExistingBalanceInCents` | `long?` | Optional | An integer representing the amount of the subscription's current balance | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Globalization; + +AllocationPreview allocationPreview = new AllocationPreview { - "start_date": "2016-03-13T12:52:32.123Z", - "end_date": "2016-03-13T12:52:32.123Z", - "subtotal_in_cents": 4, - "total_tax_in_cents": 128, - "total_discount_in_cents": 122 -} + StartDate = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + EndDate = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + SubtotalInCents = 140L, + TotalTaxInCents = 8L, + TotalDiscountInCents = 242L, +}; ``` diff --git a/doc/models/allocation-response.md b/doc/models/allocation-response.md index cc7b5a10..1f6157aa 100644 --- a/doc/models/allocation-response.md +++ b/doc/models/allocation-response.md @@ -11,17 +11,22 @@ | --- | --- | --- | --- | | `Allocation` | [`Allocation`](../../doc/models/allocation.md) | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using AdvancedBilling.Standard.Models.Containers; + +AllocationResponse allocationResponse = new AllocationResponse { - "allocation": { - "allocation_id": 238, - "component_id": 8, - "component_handle": "component_handle8", - "subscription_id": 8, - "quantity": 32 - } -} + Allocation = new Allocation + { + AllocationId = 238, + ComponentId = 8, + ComponentHandle = "component_handle8", + SubscriptionId = 8, + Quantity = AllocationQuantity.FromNumber(32), + }, +}; ``` diff --git a/doc/models/allocation-settings.md b/doc/models/allocation-settings.md index e6b99db1..aa8d2876 100644 --- a/doc/models/allocation-settings.md +++ b/doc/models/allocation-settings.md @@ -13,13 +13,16 @@ | `DowngradeCredit` | [`CreditType?`](../../doc/models/credit-type.md) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided. | | `AccrueCharge` | `string` | Optional | Either "true" or "false". | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +AllocationSettings allocationSettings = new AllocationSettings { - "upgrade_charge": "none", - "downgrade_credit": "prorated", - "accrue_charge": "accrue_charge0" -} + UpgradeCharge = CreditType.Prorated, + DowngradeCredit = CreditType.Prorated, + AccrueCharge = "accrue_charge2", +}; ``` diff --git a/doc/models/allocation.md b/doc/models/allocation.md index 1a20bdb0..e8802314 100644 --- a/doc/models/allocation.md +++ b/doc/models/allocation.md @@ -9,21 +9,21 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `AllocationId` | `int?` | Optional | The allocation unique id | -| `ComponentId` | `int?` | Optional | The integer component ID for the allocation. This references a component that you have created in your Product setup | -| `ComponentHandle` | `string` | Optional | The handle of the component. This references a component that you have created in your Product setup | -| `SubscriptionId` | `int?` | Optional | The integer subscription ID for the allocation. This references a unique subscription in your Site | +| `AllocationId` | `int?` | Optional | The allocation unique ID | +| `ComponentId` | `int?` | Optional | The integer component ID for the allocation. This references a component that you have created in your Product setup. | +| `ComponentHandle` | `string` | Optional | The handle of the component. This references a component that you have created in your Product setup. | +| `SubscriptionId` | `int?` | Optional | The integer subscription ID for the allocation. This references a unique subscription in your Site. | | `Quantity` | [`AllocationQuantity`](../../doc/models/containers/allocation-quantity.md) | Optional | This is a container for one-of cases. | | `PreviousQuantity` | [`AllocationPreviousQuantity`](../../doc/models/containers/allocation-previous-quantity.md) | Optional | This is a container for one-of cases. | | `Memo` | `string` | Optional | The memo passed when the allocation was created | -| `Timestamp` | `DateTimeOffset?` | Optional | The time that the allocation was recorded, in format and UTC timezone, i.e. 2012-11-20T22:00:37Z | +| `Timestamp` | `DateTimeOffset?` | Optional | The time that the allocation was recorded, in ISO 8601 format and UTC timezone, e.g., 2012-11-20T22:00:37Z | | `CreatedAt` | `DateTimeOffset?` | Optional | Timestamp indicating when this allocation was created | | `ProrationUpgradeScheme` | `string` | Optional | The scheme used if the proration was an upgrade. This is only present when the allocation was created mid-period. | | `ProrationDowngradeScheme` | `string` | Optional | The scheme used if the proration was a downgrade. This is only present when the allocation was created mid-period. | | `PricePointId` | `int?` | Optional | - | | `PricePointName` | `string` | Optional | - | | `PricePointHandle` | `string` | Optional | - | -| `Interval` | `int?` | Optional | The numerical interval. i.e. an interval of ‘30’ coupled with an interval_unit of day would mean this component price point would renew every 30 days. This property is only available for sites with Multifrequency enabled. | +| `Interval` | `int?` | Optional | The numerical interval. e.g., an interval of ‘30’ coupled with an interval_unit of day would mean this component price point would renew every 30 days. This property is only available for sites with Multifrequency enabled. | | `IntervalUnit` | [`IntervalUnit?`](../../doc/models/interval-unit.md) | Optional | A string representing the interval unit for this component price point, either month or day. This property is only available for sites with Multifrequency enabled. | | `PreviousPricePointId` | `int?` | Optional | - | | `AccrueCharge` | `bool?` | Optional | If the change in cost is an upgrade, this determines if the charge should accrue to the next renewal or if capture should be attempted immediately. | @@ -35,15 +35,19 @@ | `UsedQuantity` | `long?` | Optional | - | | `ChargeId` | `long?` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using AdvancedBilling.Standard.Models.Containers; + +Allocation allocation = new Allocation { - "allocation_id": 102, - "component_id": 144, - "component_handle": "component_handle0", - "subscription_id": 144, - "quantity": 168 -} + AllocationId = 238, + ComponentId = 8, + ComponentHandle = "component_handle8", + SubscriptionId = 8, + Quantity = AllocationQuantity.FromNumber(32), +}; ``` diff --git a/doc/models/apple-pay-payment-profile.md b/doc/models/apple-pay-payment-profile.md index d0fe267d..f2e8513e 100644 --- a/doc/models/apple-pay-payment-profile.md +++ b/doc/models/apple-pay-payment-profile.md @@ -12,7 +12,7 @@ | `Id` | `int?` | Optional | The Chargify-assigned ID of the Apple Pay payment profile. | | `FirstName` | `string` | Optional | The first name of the Apple Pay account holder | | `LastName` | `string` | Optional | The last name of the Apple Pay account holder | -| `CustomerId` | `int?` | Optional | The Chargify-assigned id for the customer record to which the Apple Pay account belongs | +| `CustomerId` | `int?` | Optional | The Chargify-assigned ID for the customer record to which the Apple Pay account belongs | | `CurrentVault` | [`ApplePayVault?`](../../doc/models/apple-pay-vault.md) | Optional | The vault that stores the payment profile with the provided vault_token. | | `VaultToken` | `string` | Optional | The “token” provided by your vault storage for an already stored payment profile | | `BillingAddress` | `string` | Optional | The current billing street address for the Apple Pay account | @@ -28,16 +28,19 @@ | `CreatedAt` | `DateTimeOffset?` | Optional | A timestamp indicating when this payment profile was created | | `UpdatedAt` | `DateTimeOffset?` | Optional | A timestamp indicating when this payment profile was last updated | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +ApplePayPaymentProfile applePayPaymentProfile = new ApplePayPaymentProfile { - "payment_type": "apple_pay", - "id": 60, - "first_name": "first_name2", - "last_name": "last_name0", - "customer_id": 98, - "current_vault": "braintree_blue" -} + PaymentType = PaymentType.ApplePay, + Id = 252, + FirstName = "first_name0", + LastName = "last_name8", + CustomerId = 34, + CurrentVault = ApplePayVault.BraintreeBlue, +}; ``` diff --git a/doc/models/apple-pay-vault.md b/doc/models/apple-pay-vault.md index ca51e9f1..436b48b0 100644 --- a/doc/models/apple-pay-vault.md +++ b/doc/models/apple-pay-vault.md @@ -13,3 +13,11 @@ The vault that stores the payment profile with the provided vault_token. | --- | | `BraintreeBlue` | +## Example + +```csharp +using AdvancedBilling.Standard.Models; + +ApplePayVault applePayVault = ApplePayVault.BraintreeBlue; +``` + diff --git a/doc/models/applied-credit-note-data.md b/doc/models/applied-credit-note-data.md index f76e289c..986099ed 100644 --- a/doc/models/applied-credit-note-data.md +++ b/doc/models/applied-credit-note-data.md @@ -12,12 +12,15 @@ | `Uid` | `string` | Optional | The UID of the credit note | | `Number` | `string` | Optional | The number of the credit note | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +AppliedCreditNoteData appliedCreditNoteData = new AppliedCreditNoteData { - "uid": "uid2", - "number": "number0" -} + Uid = "uid4", + Number = "number2", +}; ``` diff --git a/doc/models/apply-credit-note-event-data.md b/doc/models/apply-credit-note-event-data.md index 7efd712f..2e5a9db1 100644 --- a/doc/models/apply-credit-note-event-data.md +++ b/doc/models/apply-credit-note-event-data.md @@ -19,32 +19,47 @@ Example schema for an `apply_credit_note` event | `TransactionTime` | `DateTimeOffset?` | Optional | The time the credit note was applied, in ISO 8601 format, i.e. "2019-06-07T17:20:06Z" | | `Memo` | `string` | Optional | The credit note memo. | | `Role` | `string` | Optional | The role of the credit note (e.g. 'general') | -| `ConsolidatedInvoice` | `bool?` | Optional | Shows whether it was applied to consolidated invoice or not | +| `ConsolidatedInvoice` | `bool?` | Optional | Shows whether it was applied to consolidated invoice or not. | | `AppliedCreditNotes` | [`List`](../../doc/models/applied-credit-note-data.md) | Optional | List of credit notes applied to children invoices (if consolidated invoice) | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Collections.Generic; +using System.Globalization; + +ApplyCreditNoteEventData applyCreditNoteEventData = new ApplyCreditNoteEventData { - "uid": "uid2", - "credit_note_number": "credit_note_number4", - "credit_note_uid": "credit_note_uid4", - "original_amount": "original_amount6", - "applied_amount": "applied_amount6", - "transaction_time": "2016-03-13T12:52:32.123Z", - "memo": "memo6", - "role": "role4", - "consolidated_invoice": false, - "applied_credit_notes": [ + Uid = "uid0", + CreditNoteNumber = "credit_note_number6", + CreditNoteUid = "credit_note_uid4", + OriginalAmount = "original_amount4", + AppliedAmount = "applied_amount8", + TransactionTime = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + Memo = "memo4", + Role = "role4", + ConsolidatedInvoice = false, + AppliedCreditNotes = new List { - "uid": "uid4", - "number": "number8" + new AppliedCreditNoteData + { + Uid = "uid4", + Number = "number8", + }, + new AppliedCreditNoteData + { + Uid = "uid4", + Number = "number8", + }, + new AppliedCreditNoteData + { + Uid = "uid4", + Number = "number8", + }, }, - { - "uid": "uid4", - "number": "number8" - } - ] -} +}; ``` diff --git a/doc/models/apply-credit-note-event.md b/doc/models/apply-credit-note-event.md index ef6944cc..e906500b 100644 --- a/doc/models/apply-credit-note-event.md +++ b/doc/models/apply-credit-note-event.md @@ -15,49 +15,64 @@ | `EventType` | [`InvoiceEventType`](../../doc/models/invoice-event-type.md) | Required | **Default**: `InvoiceEventType.apply_credit_note` | | `EventData` | [`ApplyCreditNoteEventData`](../../doc/models/apply-credit-note-event-data.md) | Required | Example schema for an `apply_credit_note` event | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Collections.Generic; +using System.Globalization; + +ApplyCreditNoteEvent applyCreditNoteEvent = new ApplyCreditNoteEvent { - "id": 214, - "timestamp": "2016-03-13T12:52:32.123Z", - "invoice": { - "issue_date": "2024-01-01", - "due_date": "2024-01-01", - "paid_date": "2024-01-01", - "public_url_expires_on": "2024-01-21", - "id": 166, - "uid": "uid6", - "site_id": 92, - "customer_id": 204, - "subscription_id": 20 - }, - "event_type": "apply_credit_note", - "event_data": { - "uid": "uid6", - "credit_note_number": "credit_note_number0", - "credit_note_uid": "credit_note_uid0", - "original_amount": "original_amount0", - "applied_amount": "applied_amount2", - "transaction_time": "2016-03-13T12:52:32.123Z", - "memo": "memo0", - "role": "role0", - "consolidated_invoice": false, - "applied_credit_notes": [ - { - "uid": "uid4", - "number": "number8" - }, - { - "uid": "uid4", - "number": "number8" - }, - { - "uid": "uid4", - "number": "number8" - } - ] - } -} + Id = 86L, + Timestamp = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + Invoice = new Invoice + { + Id = 166L, + Uid = "uid6", + SiteId = 92, + CustomerId = 204, + SubscriptionId = 20, + IssueDate = DateTime.Parse("2024-01-01"), + DueDate = DateTime.Parse("2024-01-01"), + PaidDate = DateTime.Parse("2024-01-01"), + PublicUrlExpiresOn = DateTime.Parse("2024-01-21"), + }, + EventType = InvoiceEventType.ApplyCreditNote, + EventData = new ApplyCreditNoteEventData + { + Uid = "uid6", + CreditNoteNumber = "credit_note_number0", + CreditNoteUid = "credit_note_uid0", + OriginalAmount = "original_amount0", + AppliedAmount = "applied_amount2", + TransactionTime = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + Memo = "memo0", + Role = "role0", + ConsolidatedInvoice = false, + AppliedCreditNotes = new List + { + new AppliedCreditNoteData + { + Uid = "uid4", + Number = "number8", + }, + new AppliedCreditNoteData + { + Uid = "uid4", + Number = "number8", + }, + new AppliedCreditNoteData + { + Uid = "uid4", + Number = "number8", + }, + }, + }, +}; ``` diff --git a/doc/models/apply-debit-note-event-data.md b/doc/models/apply-debit-note-event-data.md index 636f3719..98700bc1 100644 --- a/doc/models/apply-debit-note-event-data.md +++ b/doc/models/apply-debit-note-event-data.md @@ -18,16 +18,22 @@ Example schema for an `apply_debit_note` event | `Memo` | `string` | Optional | The debit note memo. | | `TransactionTime` | `DateTimeOffset?` | Optional | The time the debit note was applied, in ISO 8601 format, i.e. "2019-06-07T17:20:06Z" | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Globalization; + +ApplyDebitNoteEventData applyDebitNoteEventData = new ApplyDebitNoteEventData { - "debit_note_number": "debit_note_number0", - "debit_note_uid": "debit_note_uid6", - "original_amount": "original_amount4", - "applied_amount": "applied_amount8", - "memo": "memo4", - "transaction_time": "2016-03-13T12:52:32.123Z" -} + DebitNoteNumber = "debit_note_number8", + DebitNoteUid = "debit_note_uid4", + OriginalAmount = "original_amount2", + AppliedAmount = "applied_amount0", + Memo = "memo2", + TransactionTime = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), +}; ``` diff --git a/doc/models/apply-debit-note-event.md b/doc/models/apply-debit-note-event.md index 3c479f43..57b1ca41 100644 --- a/doc/models/apply-debit-note-event.md +++ b/doc/models/apply-debit-note-event.md @@ -15,32 +15,42 @@ | `EventType` | [`InvoiceEventType`](../../doc/models/invoice-event-type.md) | Required | **Default**: `InvoiceEventType.apply_debit_note` | | `EventData` | [`ApplyDebitNoteEventData`](../../doc/models/apply-debit-note-event-data.md) | Required | Example schema for an `apply_debit_note` event | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Globalization; + +ApplyDebitNoteEvent applyDebitNoteEvent = new ApplyDebitNoteEvent { - "id": 164, - "timestamp": "2016-03-13T12:52:32.123Z", - "invoice": { - "issue_date": "2024-01-01", - "due_date": "2024-01-01", - "paid_date": "2024-01-01", - "public_url_expires_on": "2024-01-21", - "id": 166, - "uid": "uid6", - "site_id": 92, - "customer_id": 204, - "subscription_id": 20 - }, - "event_type": "apply_debit_note", - "event_data": { - "debit_note_number": "debit_note_number6", - "debit_note_uid": "debit_note_uid2", - "original_amount": "original_amount0", - "applied_amount": "applied_amount2", - "memo": "memo0", - "transaction_time": "2016-03-13T12:52:32.123Z" - } -} + Id = 180L, + Timestamp = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + Invoice = new Invoice + { + Id = 166L, + Uid = "uid6", + SiteId = 92, + CustomerId = 204, + SubscriptionId = 20, + IssueDate = DateTime.Parse("2024-01-01"), + DueDate = DateTime.Parse("2024-01-01"), + PaidDate = DateTime.Parse("2024-01-01"), + PublicUrlExpiresOn = DateTime.Parse("2024-01-21"), + }, + EventType = InvoiceEventType.ApplyDebitNote, + EventData = new ApplyDebitNoteEventData + { + DebitNoteNumber = "debit_note_number6", + DebitNoteUid = "debit_note_uid2", + OriginalAmount = "original_amount0", + AppliedAmount = "applied_amount2", + Memo = "memo0", + TransactionTime = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + }, +}; ``` diff --git a/doc/models/apply-payment-event-data.md b/doc/models/apply-payment-event-data.md index 55bf25ec..b224dd40 100644 --- a/doc/models/apply-payment-event-data.md +++ b/doc/models/apply-payment-event-data.md @@ -23,23 +23,33 @@ Example schema for an `apply_payment` event | `Prepayment` | `bool?` | Optional | - | | `External` | `bool?` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using AdvancedBilling.Standard.Models.Containers; +using System.Globalization; + +ApplyPaymentEventData applyPaymentEventData = new ApplyPaymentEventData { - "consolidation_level": "child", - "memo": "memo8", - "original_amount": "original_amount8", - "applied_amount": "applied_amount4", - "transaction_time": "2016-03-13T12:52:32.123Z", - "payment_method": { - "type": "apple_pay" - }, - "transaction_id": 196, - "parent_invoice_number": 174, - "remaining_prepayment_amount": "remaining_prepayment_amount6", - "prepayment": false, - "external": false -} + ConsolidationLevel = InvoiceConsolidationLevel.Child, + Memo = "memo0", + OriginalAmount = "original_amount0", + AppliedAmount = "applied_amount2", + TransactionTime = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + PaymentMethod = InvoiceEventPayment.FromPaymentMethodApplePay( + new PaymentMethodApplePay + { + Type = InvoiceEventPaymentMethod.ApplePay, + } + ), + TransactionId = 142, + ParentInvoiceNumber = 228, + RemainingPrepaymentAmount = "remaining_prepayment_amount4", + Prepayment = false, + External = false, +}; ``` diff --git a/doc/models/apply-payment-event.md b/doc/models/apply-payment-event.md index 679ce261..39aed9dd 100644 --- a/doc/models/apply-payment-event.md +++ b/doc/models/apply-payment-event.md @@ -15,39 +15,53 @@ | `EventType` | [`InvoiceEventType`](../../doc/models/invoice-event-type.md) | Required | **Default**: `InvoiceEventType.apply_payment` | | `EventData` | [`ApplyPaymentEventData`](../../doc/models/apply-payment-event-data.md) | Required | Example schema for an `apply_payment` event | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using AdvancedBilling.Standard.Models.Containers; +using System.Globalization; + +ApplyPaymentEvent applyPaymentEvent = new ApplyPaymentEvent { - "id": 234, - "timestamp": "2016-03-13T12:52:32.123Z", - "invoice": { - "issue_date": "2024-01-01", - "due_date": "2024-01-01", - "paid_date": "2024-01-01", - "public_url_expires_on": "2024-01-21", - "id": 166, - "uid": "uid6", - "site_id": 92, - "customer_id": 204, - "subscription_id": 20 - }, - "event_type": "apply_payment", - "event_data": { - "consolidation_level": "child", - "memo": "memo0", - "original_amount": "original_amount0", - "applied_amount": "applied_amount2", - "transaction_time": "2016-03-13T12:52:32.123Z", - "payment_method": { - "type": "apple_pay" + Id = 112L, + Timestamp = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + Invoice = new Invoice + { + Id = 166L, + Uid = "uid6", + SiteId = 92, + CustomerId = 204, + SubscriptionId = 20, + IssueDate = DateTime.Parse("2024-01-01"), + DueDate = DateTime.Parse("2024-01-01"), + PaidDate = DateTime.Parse("2024-01-01"), + PublicUrlExpiresOn = DateTime.Parse("2024-01-21"), + }, + EventType = InvoiceEventType.ApplyPayment, + EventData = new ApplyPaymentEventData + { + ConsolidationLevel = InvoiceConsolidationLevel.Child, + Memo = "memo0", + OriginalAmount = "original_amount0", + AppliedAmount = "applied_amount2", + TransactionTime = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + PaymentMethod = InvoiceEventPayment.FromPaymentMethodApplePay( + new PaymentMethodApplePay + { + Type = InvoiceEventPaymentMethod.ApplePay, + } + ), + TransactionId = 78, + ParentInvoiceNumber = 36, + RemainingPrepaymentAmount = "remaining_prepayment_amount6", + Prepayment = false, + External = false, }, - "transaction_id": 78, - "parent_invoice_number": 36, - "remaining_prepayment_amount": "remaining_prepayment_amount6", - "prepayment": false, - "external": false - } -} +}; ``` diff --git a/doc/models/attribute-error.md b/doc/models/attribute-error.md index 80f00481..8aad0257 100644 --- a/doc/models/attribute-error.md +++ b/doc/models/attribute-error.md @@ -11,14 +11,19 @@ | --- | --- | --- | --- | | `Attribute` | `List` | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Collections.Generic; + +AttributeError attributeError = new AttributeError { - "attribute": [ - "attribute6", - "attribute7" - ] -} + Attribute = new List + { + "attribute8", + "attribute7", + }, +}; ``` diff --git a/doc/models/auto-invite.md b/doc/models/auto-invite.md index 2ee5341e..989f4076 100644 --- a/doc/models/auto-invite.md +++ b/doc/models/auto-invite.md @@ -12,3 +12,11 @@ | `No` | Do not send the invitation email. | | `Yes` | Automatically send the invitation email. | +## Example + +```csharp +using AdvancedBilling.Standard.Models; + +AutoInvite autoInvite = AutoInvite.No; +``` + diff --git a/doc/models/auto-resume.md b/doc/models/auto-resume.md index 33d60aa7..161f294b 100644 --- a/doc/models/auto-resume.md +++ b/doc/models/auto-resume.md @@ -11,11 +11,17 @@ | --- | --- | --- | --- | | `AutomaticallyResumeAt` | `DateTimeOffset?` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Globalization; + +AutoResume autoResume = new AutoResume { - "automatically_resume_at": "2016-03-13T12:52:32.123Z" -} + AutomaticallyResumeAt = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), +}; ``` diff --git a/doc/models/available-actions.md b/doc/models/available-actions.md index a4961c2b..adbba90a 100644 --- a/doc/models/available-actions.md +++ b/doc/models/available-actions.md @@ -11,14 +11,18 @@ | --- | --- | --- | --- | | `SendEmail` | [`SendEmail`](../../doc/models/send-email.md) | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +AvailableActions availableActions = new AvailableActions { - "send_email": { - "can_execute": false, - "url": "url0" - } -} + SendEmail = new SendEmail + { + CanExecute = false, + Url = "url0", + }, +}; ``` diff --git a/doc/models/backport-invoice-event.md b/doc/models/backport-invoice-event.md index ac4a66ce..5e6963a5 100644 --- a/doc/models/backport-invoice-event.md +++ b/doc/models/backport-invoice-event.md @@ -15,35 +15,43 @@ | `EventType` | [`InvoiceEventType`](../../doc/models/invoice-event-type.md) | Required | **Default**: `InvoiceEventType.backport_invoice` | | `EventData` | [`Invoice`](../../doc/models/invoice.md) | Required | Example schema for an `backport_invoice` event | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Globalization; + +BackportInvoiceEvent backportInvoiceEvent = new BackportInvoiceEvent { - "id": 78, - "timestamp": "2016-03-13T12:52:32.123Z", - "invoice": { - "issue_date": "2024-01-01", - "due_date": "2024-01-01", - "paid_date": "2024-01-01", - "public_url_expires_on": "2024-01-21", - "id": 166, - "uid": "uid6", - "site_id": 92, - "customer_id": 204, - "subscription_id": 20 - }, - "event_type": "backport_invoice", - "event_data": { - "issue_date": "2024-01-01", - "due_date": "2024-01-01", - "paid_date": "2024-01-01", - "public_url_expires_on": "2024-01-21", - "id": 206, - "uid": "uid6", - "site_id": 132, - "customer_id": 244, - "subscription_id": 60 - } -} + Id = 210L, + Timestamp = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + Invoice = new Invoice + { + Id = 166L, + Uid = "uid6", + SiteId = 92, + CustomerId = 204, + SubscriptionId = 20, + IssueDate = DateTime.Parse("2024-01-01"), + DueDate = DateTime.Parse("2024-01-01"), + PaidDate = DateTime.Parse("2024-01-01"), + PublicUrlExpiresOn = DateTime.Parse("2024-01-21"), + }, + EventType = InvoiceEventType.BackportInvoice, + EventData = new Invoice + { + Id = 206L, + Uid = "uid6", + SiteId = 132, + CustomerId = 244, + SubscriptionId = 60, + IssueDate = DateTime.Parse("2024-01-01"), + DueDate = DateTime.Parse("2024-01-01"), + PaidDate = DateTime.Parse("2024-01-01"), + PublicUrlExpiresOn = DateTime.Parse("2024-01-21"), + }, +}; ``` diff --git a/doc/models/bank-account-attributes.md b/doc/models/bank-account-attributes.md index 8263ef29..639933ce 100644 --- a/doc/models/bank-account-attributes.md +++ b/doc/models/bank-account-attributes.md @@ -11,26 +11,29 @@ | --- | --- | --- | --- | | `ChargifyToken` | `string` | Optional | - | | `BankName` | `string` | Optional | (Required when creating a subscription with ACH or GoCardless) The name of the bank where the customer’s account resides | -| `BankRoutingNumber` | `string` | Optional | (Required when creating a subscription with ACH. Optional when creating a subscription with GoCardless). The routing number of the bank. It becomes bank_code while passing via GoCardless API | +| `BankRoutingNumber` | `string` | Optional | (Required when creating a subscription with ACH; optional when creating a subscription with GoCardless). The routing number of the bank. It becomes bank_code while passing via GoCardless API. | | `BankAccountNumber` | `string` | Optional | (Required when creating a subscription with ACH. Required when creating a subscription with GoCardless and bank_iban is blank) The customerʼs bank account number | | `BankAccountType` | [`BankAccountType?`](../../doc/models/bank-account-type.md) | Optional | Defaults to checking | -| `BankBranchCode` | `string` | Optional | (Optional when creating a subscription with GoCardless) Branch code. Alternatively, an IBAN can be provided | -| `BankIban` | `string` | Optional | (Optional when creating a subscription with GoCardless). International Bank Account Number. Alternatively, local bank details can be provided | +| `BankBranchCode` | `string` | Optional | (Optional when creating a subscription with GoCardless) Branch code. Alternatively, an IBAN can be provided. | +| `BankIban` | `string` | Optional | (Optional when creating a subscription with GoCardless). International Bank Account Number. Alternatively, local bank details can be provided. | | `BankAccountHolderType` | [`BankAccountHolderType?`](../../doc/models/bank-account-holder-type.md) | Optional | Defaults to personal | | `PaymentType` | [`PaymentType?`](../../doc/models/payment-type.md) | Optional | - | | `CurrentVault` | [`BankAccountVault?`](../../doc/models/bank-account-vault.md) | Optional | The vault that stores the payment profile with the provided vault_token. Use `bogus` for testing. | | `VaultToken` | `string` | Optional | - | | `CustomerVaultToken` | `string` | Optional | (only for Authorize.Net CIM storage or Square) The customerProfileId for the owner of the customerPaymentProfileId provided as the vault_token | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +BankAccountAttributes bankAccountAttributes = new BankAccountAttributes { - "chargify_token": "chargify_token0", - "bank_name": "bank_name2", - "bank_routing_number": "bank_routing_number8", - "bank_account_number": "bank_account_number4", - "bank_account_type": "checking" -} + ChargifyToken = "chargify_token0", + BankName = "bank_name2", + BankRoutingNumber = "bank_routing_number8", + BankAccountNumber = "bank_account_number4", + BankAccountType = BankAccountType.Checking, +}; ``` diff --git a/doc/models/bank-account-holder-type.md b/doc/models/bank-account-holder-type.md index b820e92d..5a95e62b 100644 --- a/doc/models/bank-account-holder-type.md +++ b/doc/models/bank-account-holder-type.md @@ -14,3 +14,11 @@ Defaults to personal | `Personal` | | `Business` | +## Example + +```csharp +using AdvancedBilling.Standard.Models; + +BankAccountHolderType bankAccountHolderType = BankAccountHolderType.Personal; +``` + diff --git a/doc/models/bank-account-payment-profile.md b/doc/models/bank-account-payment-profile.md index 503eda2c..58163b64 100644 --- a/doc/models/bank-account-payment-profile.md +++ b/doc/models/bank-account-payment-profile.md @@ -9,10 +9,10 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `Id` | `int?` | Optional | The Chargify-assigned ID of the stored bank account. This value can be used as an input to payment_profile_id when creating a subscription, in order to re-use a stored payment profile for the same customer | +| `Id` | `int?` | Optional | The Chargify-assigned ID of the stored bank account. This value can be used as an input to payment_profile_id when creating a subscription, in order to re-use a stored payment profile for the same customer. | | `FirstName` | `string` | Optional | The first name of the bank account holder | | `LastName` | `string` | Optional | The last name of the bank account holder | -| `CustomerId` | `int?` | Optional | The Chargify-assigned id for the customer record to which the bank account belongs | +| `CustomerId` | `int?` | Optional | The Chargify-assigned ID for the customer record to which the bank account belongs | | `CurrentVault` | [`BankAccountVault?`](../../doc/models/bank-account-vault.md) | Optional | The vault that stores the payment profile with the provided vault_token. Use `bogus` for testing. | | `VaultToken` | `string` | Optional | The "token" provided by your vault storage for an already stored payment profile | | `BillingAddress` | `string` | Optional | The current billing street address for the bank account | @@ -23,28 +23,31 @@ | `CustomerVaultToken` | `string` | Optional | (only for Authorize.Net CIM storage): the customerProfileId for the owner of the customerPaymentProfileId provided as the vault_token. | | `BillingAddress2` | `string` | Optional | The current billing street address, second line, for the bank account | | `BankName` | `string` | Optional | The bank where the account resides | -| `MaskedBankRoutingNumber` | `string` | Optional | A string representation of the stored bank routing number with all but the last 4 digits marked with X's (i.e. 'XXXXXXX1111'). payment_type will be bank_account | -| `MaskedBankAccountNumber` | `string` | Optional | A string representation of the stored bank account number with all but the last 4 digits marked with X's (i.e. 'XXXXXXX1111') | +| `MaskedBankRoutingNumber` | `string` | Optional | A string representation of the stored bank routing number with all but the last 4 digits marked with X's (i.e. 'XXXXXXX1111'). payment_type will be bank_account. | +| `MaskedBankAccountNumber` | `string` | Optional | A string representation of the stored bank account number with all but the last 4 digits marked with X's (i.e. 'XXXXXXX1111'). | | `BankAccountType` | [`BankAccountType?`](../../doc/models/bank-account-type.md) | Optional | Defaults to checking | | `BankAccountHolderType` | [`BankAccountHolderType?`](../../doc/models/bank-account-holder-type.md) | Optional | Defaults to personal | | `PaymentType` | [`PaymentType`](../../doc/models/payment-type.md) | Required | **Default**: `PaymentType.bank_account` | -| `Verified` | `bool?` | Optional | denotes whether a bank account has been verified by providing the amounts of two small deposits made into the account

**Default**: `false` | +| `Verified` | `bool?` | Optional | Denotes whether a bank account has been verified by providing the amounts of two small deposits made into the account.

**Default**: `false` | | `SiteGatewaySettingId` | `int?` | Optional | - | | `GatewayHandle` | `string` | Optional | - | | `CreatedAt` | `DateTimeOffset?` | Optional | A timestamp indicating when this payment profile was created | | `UpdatedAt` | `DateTimeOffset?` | Optional | A timestamp indicating when this payment profile was last updated | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +BankAccountPaymentProfile bankAccountPaymentProfile = new BankAccountPaymentProfile { - "payment_type": "bank_account", - "verified": false, - "id": 188, - "first_name": "first_name6", - "last_name": "last_name4", - "customer_id": 226, - "current_vault": "authorizenet" -} + PaymentType = PaymentType.BankAccount, + Id = 16, + FirstName = "first_name0", + LastName = "last_name8", + CustomerId = 54, + CurrentVault = BankAccountVault.Gocardless, + Verified = false, +}; ``` diff --git a/doc/models/bank-account-response.md b/doc/models/bank-account-response.md index 249b7a45..140f336e 100644 --- a/doc/models/bank-account-response.md +++ b/doc/models/bank-account-response.md @@ -11,19 +11,23 @@ | --- | --- | --- | --- | | `PaymentProfile` | [`BankAccountPaymentProfile`](../../doc/models/bank-account-payment-profile.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +BankAccountResponse bankAccountResponse = new BankAccountResponse { - "payment_profile": { - "payment_type": "bank_account", - "verified": false, - "id": 44, - "first_name": "first_name4", - "last_name": "last_name2", - "customer_id": 82, - "current_vault": "authorizenet" - } -} + PaymentProfile = new BankAccountPaymentProfile + { + PaymentType = PaymentType.BankAccount, + Id = 44, + FirstName = "first_name4", + LastName = "last_name2", + CustomerId = 82, + CurrentVault = BankAccountVault.Authorizenet, + Verified = false, + }, +}; ``` diff --git a/doc/models/bank-account-type.md b/doc/models/bank-account-type.md index ccce016c..b896ac38 100644 --- a/doc/models/bank-account-type.md +++ b/doc/models/bank-account-type.md @@ -14,3 +14,11 @@ Defaults to checking | `Checking` | | `Savings` | +## Example + +```csharp +using AdvancedBilling.Standard.Models; + +BankAccountType bankAccountType = BankAccountType.Checking; +``` + diff --git a/doc/models/bank-account-vault.md b/doc/models/bank-account-vault.md index cbef4ba6..fcd53c03 100644 --- a/doc/models/bank-account-vault.md +++ b/doc/models/bank-account-vault.md @@ -20,3 +20,11 @@ The vault that stores the payment profile with the provided vault_token. Use `bo | `Maxp` | | `StripeConnect` | +## Example + +```csharp +using AdvancedBilling.Standard.Models; + +BankAccountVault bankAccountVault = BankAccountVault.Maxp; +``` + diff --git a/doc/models/bank-account-verification-request.md b/doc/models/bank-account-verification-request.md index ba863a7a..3a079af0 100644 --- a/doc/models/bank-account-verification-request.md +++ b/doc/models/bank-account-verification-request.md @@ -11,14 +11,18 @@ | --- | --- | --- | --- | | `BankAccountVerification` | [`BankAccountVerification`](../../doc/models/bank-account-verification.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +BankAccountVerificationRequest bankAccountVerificationRequest = new BankAccountVerificationRequest { - "bank_account_verification": { - "deposit_1_in_cents": 244, - "deposit_2_in_cents": 6 - } -} + BankAccountVerification = new BankAccountVerification + { + Deposit1InCents = 244L, + Deposit2InCents = 6L, + }, +}; ``` diff --git a/doc/models/bank-account-verification.md b/doc/models/bank-account-verification.md index 43290ffb..844c5be5 100644 --- a/doc/models/bank-account-verification.md +++ b/doc/models/bank-account-verification.md @@ -12,12 +12,15 @@ | `Deposit1InCents` | `long?` | Optional | - | | `Deposit2InCents` | `long?` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +BankAccountVerification bankAccountVerification = new BankAccountVerification { - "deposit_1_in_cents": 142, - "deposit_2_in_cents": 132 -} + Deposit1InCents = 248L, + Deposit2InCents = 10L, +}; ``` diff --git a/doc/models/base-refund-error.md b/doc/models/base-refund-error.md index 908ed70a..38312982 100644 --- a/doc/models/base-refund-error.md +++ b/doc/models/base-refund-error.md @@ -11,24 +11,20 @@ | --- | --- | --- | --- | | `Base` | `object` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using AdvancedBilling.Standard.Utilities; +using System.Collections.Generic; + +BaseRefundError baseRefundError = new BaseRefundError { - "base": [ - { - "key1": "val1", - "key2": "val2" - }, + MBase = new List { - "key1": "val1", - "key2": "val2" + ApiHelper.JsonDeserialize("{\"key1\":\"val1\",\"key2\":\"val2\"}"), + ApiHelper.JsonDeserialize("{\"key1\":\"val1\",\"key2\":\"val2\"}"), }, - { - "key1": "val1", - "key2": "val2" - } - ] -} +}; ``` diff --git a/doc/models/base-string-error.md b/doc/models/base-string-error.md index 36c4f45b..536177d5 100644 --- a/doc/models/base-string-error.md +++ b/doc/models/base-string-error.md @@ -13,13 +13,19 @@ The error is base if it is not directly associated with a single attribute. | --- | --- | --- | --- | | `Base` | `List` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Collections.Generic; + +BaseStringError baseStringError = new BaseStringError { - "base": [ - "base3" - ] -} + MBase = new List + { + "base5", + "base6", + }, +}; ``` diff --git a/doc/models/basic-date-field.md b/doc/models/basic-date-field.md index ebcf891c..b485baa6 100644 --- a/doc/models/basic-date-field.md +++ b/doc/models/basic-date-field.md @@ -16,7 +16,9 @@ Allows to filter by `created_at` or `updated_at`. ## Example -``` -updated_at +```csharp +using AdvancedBilling.Standard.Models; + +BasicDateField basicDateField = BasicDateField.UpdatedAt; ``` diff --git a/doc/models/batch-job-response.md b/doc/models/batch-job-response.md index de667308..babb6b53 100644 --- a/doc/models/batch-job-response.md +++ b/doc/models/batch-job-response.md @@ -11,17 +11,26 @@ | --- | --- | --- | --- | | `Batchjob` | [`BatchJob`](../../doc/models/batch-job.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Globalization; + +BatchJobResponse batchJobResponse = new BatchJobResponse { - "batchjob": { - "id": 54, - "finished_at": "2016-03-13T12:52:32.123Z", - "row_count": 62, - "created_at": "2016-03-13T12:52:32.123Z", - "completed": "completed4" - } -} + Batchjob = new BatchJob + { + Id = 54, + FinishedAt = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + RowCount = 62, + CreatedAt = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + Completed = "completed4", + }, +}; ``` diff --git a/doc/models/batch-job.md b/doc/models/batch-job.md index 6d2c2d21..b03bc9a1 100644 --- a/doc/models/batch-job.md +++ b/doc/models/batch-job.md @@ -15,15 +15,23 @@ | `CreatedAt` | `DateTimeOffset?` | Optional | - | | `Completed` | `string` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Globalization; + +BatchJob batchJob = new BatchJob { - "id": 246, - "finished_at": "2016-03-13T12:52:32.123Z", - "row_count": 254, - "created_at": "2016-03-13T12:52:32.123Z", - "completed": "completed0" -} + Id = 60, + FinishedAt = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + RowCount = 68, + CreatedAt = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + Completed = "completed6", +}; ``` diff --git a/doc/models/billing-manifest-item.md b/doc/models/billing-manifest-item.md index a833f135..bbba0c05 100644 --- a/doc/models/billing-manifest-item.md +++ b/doc/models/billing-manifest-item.md @@ -24,15 +24,18 @@ | `PeriodRangeStart` | `string` | Optional | - | | `PeriodRangeEnd` | `string` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +BillingManifestItem billingManifestItem = new BillingManifestItem { - "transaction_type": "info_transaction", - "kind": "baseline", - "amount_in_cents": 216, - "memo": "memo4", - "discount_amount_in_cents": 236 -} + TransactionType = LineItemTransactionType.Payment, + Kind = BillingManifestLineItemKind.Trial, + AmountInCents = 148L, + Memo = "memo0", + DiscountAmountInCents = 88L, +}; ``` diff --git a/doc/models/billing-manifest-line-item-kind.md b/doc/models/billing-manifest-line-item-kind.md index dd5e0a15..f8f67ff2 100644 --- a/doc/models/billing-manifest-line-item-kind.md +++ b/doc/models/billing-manifest-line-item-kind.md @@ -18,3 +18,11 @@ A handle for the billing manifest line item kind | `Component` | | `Tax` | +## Example + +```csharp +using AdvancedBilling.Standard.Models; + +BillingManifestLineItemKind billingManifestLineItemKind = BillingManifestLineItemKind.Component; +``` + diff --git a/doc/models/billing-manifest.md b/doc/models/billing-manifest.md index fdfcebbb..1fe58865 100644 --- a/doc/models/billing-manifest.md +++ b/doc/models/billing-manifest.md @@ -19,37 +19,29 @@ | `PeriodType` | `string` | Optional | - | | `ExistingBalanceInCents` | `long?` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Collections.Generic; + +BillingManifest billingManifest = new BillingManifest { - "line_items": [ - { - "transaction_type": "credit", - "kind": "component", - "amount_in_cents": 24, - "memo": "memo2", - "discount_amount_in_cents": 172 - }, + LineItems = new List { - "transaction_type": "credit", - "kind": "component", - "amount_in_cents": 24, - "memo": "memo2", - "discount_amount_in_cents": 172 + new BillingManifestItem + { + TransactionType = LineItemTransactionType.Credit, + Kind = BillingManifestLineItemKind.Component, + AmountInCents = 24L, + Memo = "memo2", + DiscountAmountInCents = 172L, + }, }, - { - "transaction_type": "credit", - "kind": "component", - "amount_in_cents": 24, - "memo": "memo2", - "discount_amount_in_cents": 172 - } - ], - "total_in_cents": 192, - "total_discount_in_cents": 178, - "total_tax_in_cents": 172, - "subtotal_in_cents": 48 -} + TotalInCents = 96L, + TotalDiscountInCents = 174L, + TotalTaxInCents = 76L, + SubtotalInCents = 208L, +}; ``` diff --git a/doc/models/billing-schedule.md b/doc/models/billing-schedule.md index d0949ee5..5929a3da 100644 --- a/doc/models/billing-schedule.md +++ b/doc/models/billing-schedule.md @@ -13,11 +13,14 @@ Billing schedule settings for component allocations or usages on multi-frequency | --- | --- | --- | --- | | `InitialBillingAt` | `DateTime?` | Optional | Custom start date (ISO 8601 date, YYYY-MM-DD) for the component's first billing period. If omitted or null, billing aligns with the product schedule. If provided, date must be on or after the minimum allowed date for the subscription or component. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +BillingSchedule billingSchedule = new BillingSchedule { - "initial_billing_at": "2026-01-01" -} + InitialBillingAt = DateTime.Parse("2026-01-01"), +}; ``` diff --git a/doc/models/breakouts.md b/doc/models/breakouts.md index ff845816..a0e9ee75 100644 --- a/doc/models/breakouts.md +++ b/doc/models/breakouts.md @@ -14,14 +14,17 @@ | `UsageAmountInCents` | `long?` | Optional | - | | `UsageAmountFormatted` | `string` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +Breakouts breakouts = new Breakouts { - "plan_amount_in_cents": 68, - "plan_amount_formatted": "plan_amount_formatted2", - "usage_amount_in_cents": 176, - "usage_amount_formatted": "usage_amount_formatted0" -} + PlanAmountInCents = 254L, + PlanAmountFormatted = "plan_amount_formatted0", + UsageAmountInCents = 106L, + UsageAmountFormatted = "usage_amount_formatted8", +}; ``` diff --git a/doc/models/bulk-components-price-point-assignment.md b/doc/models/bulk-components-price-point-assignment.md index 65434a06..924c904b 100644 --- a/doc/models/bulk-components-price-point-assignment.md +++ b/doc/models/bulk-components-price-point-assignment.md @@ -11,16 +11,23 @@ | --- | --- | --- | --- | | `Components` | [`List`](../../doc/models/component-price-point-assignment.md) | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using AdvancedBilling.Standard.Models.Containers; +using System.Collections.Generic; + +BulkComponentsPricePointAssignment bulkComponentsPricePointAssignment = new BulkComponentsPricePointAssignment { - "components": [ + Components = new List { - "component_id": 108, - "price_point": "String5" - } - ] -} + new ComponentPricePointAssignment + { + ComponentId = 108, + PricePoint = ComponentPricePointAssignmentPricePoint.FromString("String5"), + }, + }, +}; ``` diff --git a/doc/models/bulk-create-product-price-points-request.md b/doc/models/bulk-create-product-price-points-request.md index 00de016b..9191a4c1 100644 --- a/doc/models/bulk-create-product-price-points-request.md +++ b/doc/models/bulk-create-product-price-points-request.md @@ -11,24 +11,30 @@ | --- | --- | --- | --- | | `PricePoints` | [`List`](../../doc/models/create-product-price-point.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Collections.Generic; + +BulkCreateProductPricePointsRequest bulkCreateProductPricePointsRequest = new BulkCreateProductPricePointsRequest { - "price_points": [ + PricePoints = new List { - "name": "name2", - "price_in_cents": 108, - "interval": 92, - "interval_unit": "day", - "use_site_exchange_rate": true, - "handle": "handle8", - "trial_price_in_cents": 196, - "trial_interval": 250, - "trial_interval_unit": "day", - "trial_type": "no_obligation" - } - ] -} + new CreateProductPricePoint + { + Name = "name2", + PriceInCents = 108L, + Interval = 92, + IntervalUnit = IntervalUnit.Day, + Handle = "handle8", + TrialPriceInCents = 196L, + TrialInterval = 250, + TrialIntervalUnit = IntervalUnit.Day, + TrialType = TrialType.NoObligation, + UseSiteExchangeRate = true, + }, + }, +}; ``` diff --git a/doc/models/bulk-create-product-price-points-response.md b/doc/models/bulk-create-product-price-points-response.md index 210835d7..ece9b0d4 100644 --- a/doc/models/bulk-create-product-price-points-response.md +++ b/doc/models/bulk-create-product-price-points-response.md @@ -11,19 +11,41 @@ | --- | --- | --- | --- | | `PricePoints` | [`List`](../../doc/models/product-price-point.md) | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Collections.Generic; + +BulkCreateProductPricePointsResponse bulkCreateProductPricePointsResponse = new BulkCreateProductPricePointsResponse { - "price_points": [ + PricePoints = new List { - "id": 40, - "name": "name2", - "handle": "handle8", - "price_in_cents": 108, - "interval": 92 - } - ] -} + new ProductPricePoint + { + Id = 40, + Name = "name2", + Handle = "handle8", + PriceInCents = 108L, + Interval = 92, + }, + new ProductPricePoint + { + Id = 40, + Name = "name2", + Handle = "handle8", + PriceInCents = 108L, + Interval = 92, + }, + new ProductPricePoint + { + Id = 40, + Name = "name2", + Handle = "handle8", + PriceInCents = 108L, + Interval = 92, + }, + }, +}; ``` diff --git a/doc/models/bulk-create-segments.md b/doc/models/bulk-create-segments.md index c0109cc3..4120f219 100644 --- a/doc/models/bulk-create-segments.md +++ b/doc/models/bulk-create-segments.md @@ -11,36 +11,47 @@ | --- | --- | --- | --- | | `Segments` | [`List`](../../doc/models/create-segment.md) | Optional | **Constraints**: *Maximum Items*: `2000` | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using AdvancedBilling.Standard.Models.Containers; +using System.Collections.Generic; + +BulkCreateSegments bulkCreateSegments = new BulkCreateSegments { - "segments": [ + Segments = new List { - "segment_property_1_value": "String3", - "segment_property_2_value": "String5", - "segment_property_3_value": "String3", - "segment_property_4_value": "String7", - "pricing_scheme": "stairstep", - "prices": [ - { - "starting_quantity": 64, - "ending_quantity": 38, - "unit_price": "String3" - }, + new CreateSegment { - "starting_quantity": 64, - "ending_quantity": 38, - "unit_price": "String3" + PricingScheme = PricingScheme.Stairstep, + SegmentProperty1Value = CreateSegmentSegmentProperty1Value.FromString("String3"), + SegmentProperty2Value = CreateSegmentSegmentProperty2Value.FromString("String5"), + SegmentProperty3Value = CreateSegmentSegmentProperty3Value.FromString("String3"), + SegmentProperty4Value = CreateSegmentSegmentProperty4Value.FromString("String7"), + Prices = new List + { + new CreateOrUpdateSegmentPrice + { + UnitPrice = CreateOrUpdateSegmentPriceUnitPrice.FromString("String3"), + StartingQuantity = 64, + EndingQuantity = 38, + }, + new CreateOrUpdateSegmentPrice + { + UnitPrice = CreateOrUpdateSegmentPriceUnitPrice.FromString("String3"), + StartingQuantity = 64, + EndingQuantity = 38, + }, + new CreateOrUpdateSegmentPrice + { + UnitPrice = CreateOrUpdateSegmentPriceUnitPrice.FromString("String3"), + StartingQuantity = 64, + EndingQuantity = 38, + }, + }, }, - { - "starting_quantity": 64, - "ending_quantity": 38, - "unit_price": "String3" - } - ] - } - ] -} + }, +}; ``` diff --git a/doc/models/bulk-update-segments-item.md b/doc/models/bulk-update-segments-item.md index 21af5799..e0bef385 100644 --- a/doc/models/bulk-update-segments-item.md +++ b/doc/models/bulk-update-segments-item.md @@ -13,19 +13,26 @@ | `PricingScheme` | [`PricingScheme`](../../doc/models/pricing-scheme.md) | Required | The identifier for the pricing scheme. See [Product Components](https://help.chargify.com/products/product-components.html) for an overview of pricing schemes. | | `Prices` | [`List`](../../doc/models/create-or-update-segment-price.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using AdvancedBilling.Standard.Models.Containers; +using System.Collections.Generic; + +BulkUpdateSegmentsItem bulkUpdateSegmentsItem = new BulkUpdateSegmentsItem { - "id": 180, - "pricing_scheme": "per_unit", - "prices": [ + Id = 220, + PricingScheme = PricingScheme.PerUnit, + Prices = new List { - "starting_quantity": 64, - "ending_quantity": 38, - "unit_price": "String3" - } - ] -} + new CreateOrUpdateSegmentPrice + { + UnitPrice = CreateOrUpdateSegmentPriceUnitPrice.FromString("String3"), + StartingQuantity = 64, + EndingQuantity = 38, + }, + }, +}; ``` diff --git a/doc/models/bulk-update-segments.md b/doc/models/bulk-update-segments.md index 55063d96..cf80a6a5 100644 --- a/doc/models/bulk-update-segments.md +++ b/doc/models/bulk-update-segments.md @@ -11,54 +11,70 @@ | --- | --- | --- | --- | | `Segments` | [`List`](../../doc/models/bulk-update-segments-item.md) | Optional | **Constraints**: *Maximum Items*: `1000` | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using AdvancedBilling.Standard.Models.Containers; +using System.Collections.Generic; + +BulkUpdateSegments bulkUpdateSegments = new BulkUpdateSegments { - "segments": [ + Segments = new List { - "id": 50, - "pricing_scheme": "stairstep", - "prices": [ + new BulkUpdateSegmentsItem { - "starting_quantity": 64, - "ending_quantity": 38, - "unit_price": "String3" + Id = 50, + PricingScheme = PricingScheme.Stairstep, + Prices = new List + { + new CreateOrUpdateSegmentPrice + { + UnitPrice = CreateOrUpdateSegmentPriceUnitPrice.FromString("String3"), + StartingQuantity = 64, + EndingQuantity = 38, + }, + new CreateOrUpdateSegmentPrice + { + UnitPrice = CreateOrUpdateSegmentPriceUnitPrice.FromString("String3"), + StartingQuantity = 64, + EndingQuantity = 38, + }, + new CreateOrUpdateSegmentPrice + { + UnitPrice = CreateOrUpdateSegmentPriceUnitPrice.FromString("String3"), + StartingQuantity = 64, + EndingQuantity = 38, + }, + }, }, + new BulkUpdateSegmentsItem { - "starting_quantity": 64, - "ending_quantity": 38, - "unit_price": "String3" + Id = 50, + PricingScheme = PricingScheme.Stairstep, + Prices = new List + { + new CreateOrUpdateSegmentPrice + { + UnitPrice = CreateOrUpdateSegmentPriceUnitPrice.FromString("String3"), + StartingQuantity = 64, + EndingQuantity = 38, + }, + new CreateOrUpdateSegmentPrice + { + UnitPrice = CreateOrUpdateSegmentPriceUnitPrice.FromString("String3"), + StartingQuantity = 64, + EndingQuantity = 38, + }, + new CreateOrUpdateSegmentPrice + { + UnitPrice = CreateOrUpdateSegmentPriceUnitPrice.FromString("String3"), + StartingQuantity = 64, + EndingQuantity = 38, + }, + }, }, - { - "starting_quantity": 64, - "ending_quantity": 38, - "unit_price": "String3" - } - ] }, - { - "id": 50, - "pricing_scheme": "stairstep", - "prices": [ - { - "starting_quantity": 64, - "ending_quantity": 38, - "unit_price": "String3" - }, - { - "starting_quantity": 64, - "ending_quantity": 38, - "unit_price": "String3" - }, - { - "starting_quantity": 64, - "ending_quantity": 38, - "unit_price": "String3" - } - ] - } - ] -} +}; ``` diff --git a/doc/models/calendar-billing.md b/doc/models/calendar-billing.md index 49883a9b..6e1d1a60 100644 --- a/doc/models/calendar-billing.md +++ b/doc/models/calendar-billing.md @@ -1,7 +1,7 @@ # Calendar Billing -(Optional). Cannot be used when also specifying next_billing_at +(Optional). Cannot be used when also specifying next_billing_at. ## Structure @@ -14,12 +14,16 @@ | `SnapDay` | [`CalendarBillingSnapDay`](../../doc/models/containers/calendar-billing-snap-day.md) | Optional | This is a container for one-of cases. | | `CalendarBillingFirstCharge` | [`FirstChargeType?`](../../doc/models/first-charge-type.md) | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using AdvancedBilling.Standard.Models.Containers; + +CalendarBilling calendarBilling = new CalendarBilling { - "snap_day": 210, - "calendar_billing_first_charge": "prorated" -} + SnapDay = CalendarBillingSnapDay.FromNumber(200), + CalendarBillingFirstCharge = FirstChargeType.Delayed, +}; ``` diff --git a/doc/models/cancel-grouped-subscriptions-request.md b/doc/models/cancel-grouped-subscriptions-request.md index dc4f365b..b0d8b593 100644 --- a/doc/models/cancel-grouped-subscriptions-request.md +++ b/doc/models/cancel-grouped-subscriptions-request.md @@ -11,11 +11,14 @@ | --- | --- | --- | --- | | `ChargeUnbilledUsage` | `bool?` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +CancelGroupedSubscriptionsRequest cancelGroupedSubscriptionsRequest = new CancelGroupedSubscriptionsRequest { - "charge_unbilled_usage": false -} + ChargeUnbilledUsage = false, +}; ``` diff --git a/doc/models/cancellation-method.md b/doc/models/cancellation-method.md index ee5676d9..fb4d12cc 100644 --- a/doc/models/cancellation-method.md +++ b/doc/models/cancellation-method.md @@ -18,3 +18,11 @@ The process used to cancel the subscription, if the subscription has been cancel | `Unknown` | | `Imported` | +## Example + +```csharp +using AdvancedBilling.Standard.Models; + +CancellationMethod cancellationMethod = CancellationMethod.MerchantUi; +``` + diff --git a/doc/models/cancellation-options.md b/doc/models/cancellation-options.md index f318c4b8..d0d91d19 100644 --- a/doc/models/cancellation-options.md +++ b/doc/models/cancellation-options.md @@ -12,18 +12,24 @@ | `CancellationMessage` | `string` | Optional | An indication as to why the subscription is being canceled. For your internal use. | | `ReasonCode` | `string` | Optional | The reason code associated with the cancellation. Use the [List Reason Codes](../../doc/controllers/reason-codes.md#list-reason-codes) endpoint to retrieve the reason codes associated with your site. | | `CancelAtEndOfPeriod` | `bool?` | Optional | When true, the subscription is cancelled at the current period end instead of immediately. To use this option, the Schedule Subscription Cancellation feature must be enabled on your site. | -| `ScheduledCancellationAt` | `DateTimeOffset?` | Optional | Schedules the cancellation on the provided date. This is option is not applicable for prepaid subscriptions. To use this option, the Schedule Subscription Cancellation feature must be enabled on your site. | +| `ScheduledCancellationAt` | `DateTimeOffset?` | Optional | Schedules the cancellation on the provided date. This option is not applicable for prepaid subscriptions. To use this option, the Schedule Subscription Cancellation feature must be enabled on your site. | | `RefundPrepaymentAccountBalance` | `bool?` | Optional | Applies to prepaid subscriptions. When true, which is the default, the remaining prepaid balance is refunded as part of cancellation processing. When false, prepaid balance is not refunded as part of cancellation processing. To use this option, the Schedule Subscription Cancellation feature must be enabled on your site. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Globalization; + +CancellationOptions cancellationOptions = new CancellationOptions { - "cancellation_message": "cancellation_message0", - "reason_code": "reason_code6", - "cancel_at_end_of_period": false, - "scheduled_cancellation_at": "2016-03-13T12:52:32.123Z", - "refund_prepayment_account_balance": false -} + CancellationMessage = "cancellation_message0", + ReasonCode = "reason_code6", + CancelAtEndOfPeriod = false, + ScheduledCancellationAt = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + RefundPrepaymentAccountBalance = false, +}; ``` diff --git a/doc/models/cancellation-request.md b/doc/models/cancellation-request.md index 2f615be4..56361fb8 100644 --- a/doc/models/cancellation-request.md +++ b/doc/models/cancellation-request.md @@ -11,17 +11,24 @@ | --- | --- | --- | --- | | `Subscription` | [`CancellationOptions`](../../doc/models/cancellation-options.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Globalization; + +CancellationRequest cancellationRequest = new CancellationRequest { - "subscription": { - "cancellation_message": "cancellation_message2", - "reason_code": "reason_code8", - "cancel_at_end_of_period": false, - "scheduled_cancellation_at": "2016-03-13T12:52:32.123Z", - "refund_prepayment_account_balance": false - } -} + Subscription = new CancellationOptions + { + CancellationMessage = "cancellation_message2", + ReasonCode = "reason_code8", + CancelAtEndOfPeriod = false, + ScheduledCancellationAt = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + RefundPrepaymentAccountBalance = false, + }, +}; ``` diff --git a/doc/models/card-type.md b/doc/models/card-type.md index 2acd7669..7d12b1b1 100644 --- a/doc/models/card-type.md +++ b/doc/models/card-type.md @@ -48,3 +48,11 @@ The type of card used. | `Solo` | | `Laser` | +## Example + +```csharp +using AdvancedBilling.Standard.Models; + +CardType cardType = CardType.Solo; +``` + diff --git a/doc/models/change-chargeback-status-event-data.md b/doc/models/change-chargeback-status-event-data.md index 6db57b7c..d79ccb19 100644 --- a/doc/models/change-chargeback-status-event-data.md +++ b/doc/models/change-chargeback-status-event-data.md @@ -13,11 +13,14 @@ Example schema for an `change_chargeback_status` event | --- | --- | --- | --- | | `ChargebackStatus` | [`ChargebackStatus`](../../doc/models/chargeback-status.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +ChangeChargebackStatusEventData changeChargebackStatusEventData = new ChangeChargebackStatusEventData { - "chargeback_status": "open" -} + ChargebackStatus = ChargebackStatus.Won, +}; ``` diff --git a/doc/models/change-chargeback-status-event.md b/doc/models/change-chargeback-status-event.md index f63c3352..2d17f248 100644 --- a/doc/models/change-chargeback-status-event.md +++ b/doc/models/change-chargeback-status-event.md @@ -15,27 +15,35 @@ | `EventType` | [`InvoiceEventType`](../../doc/models/invoice-event-type.md) | Required | **Default**: `InvoiceEventType.change_chargeback_status` | | `EventData` | [`ChangeChargebackStatusEventData`](../../doc/models/change-chargeback-status-event-data.md) | Required | Example schema for an `change_chargeback_status` event | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Globalization; + +ChangeChargebackStatusEvent changeChargebackStatusEvent = new ChangeChargebackStatusEvent { - "id": 214, - "timestamp": "2016-03-13T12:52:32.123Z", - "invoice": { - "issue_date": "2024-01-01", - "due_date": "2024-01-01", - "paid_date": "2024-01-01", - "public_url_expires_on": "2024-01-21", - "id": 166, - "uid": "uid6", - "site_id": 92, - "customer_id": 204, - "subscription_id": 20 - }, - "event_type": "change_chargeback_status", - "event_data": { - "chargeback_status": "won" - } -} + Id = 136L, + Timestamp = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + Invoice = new Invoice + { + Id = 166L, + Uid = "uid6", + SiteId = 92, + CustomerId = 204, + SubscriptionId = 20, + IssueDate = DateTime.Parse("2024-01-01"), + DueDate = DateTime.Parse("2024-01-01"), + PaidDate = DateTime.Parse("2024-01-01"), + PublicUrlExpiresOn = DateTime.Parse("2024-01-21"), + }, + EventType = InvoiceEventType.ChangeChargebackStatus, + EventData = new ChangeChargebackStatusEventData + { + ChargebackStatus = ChargebackStatus.Won, + }, +}; ``` diff --git a/doc/models/change-invoice-collection-method-event-data.md b/doc/models/change-invoice-collection-method-event-data.md index 739d8dcf..f9848759 100644 --- a/doc/models/change-invoice-collection-method-event-data.md +++ b/doc/models/change-invoice-collection-method-event-data.md @@ -14,12 +14,15 @@ Example schema for an `change_invoice_collection_method` event | `FromCollectionMethod` | `string` | Required | The previous collection method of the invoice. | | `ToCollectionMethod` | `string` | Required | The new collection method of the invoice. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +ChangeInvoiceCollectionMethodEventData changeInvoiceCollectionMethodEventData = new ChangeInvoiceCollectionMethodEventData { - "from_collection_method": "from_collection_method4", - "to_collection_method": "to_collection_method2" -} + FromCollectionMethod = "from_collection_method8", + ToCollectionMethod = "to_collection_method4", +}; ``` diff --git a/doc/models/change-invoice-collection-method-event.md b/doc/models/change-invoice-collection-method-event.md index 7018d764..ebfabc34 100644 --- a/doc/models/change-invoice-collection-method-event.md +++ b/doc/models/change-invoice-collection-method-event.md @@ -15,28 +15,36 @@ | `EventType` | [`InvoiceEventType`](../../doc/models/invoice-event-type.md) | Required | **Default**: `InvoiceEventType.change_invoice_collection_method` | | `EventData` | [`ChangeInvoiceCollectionMethodEventData`](../../doc/models/change-invoice-collection-method-event-data.md) | Required | Example schema for an `change_invoice_collection_method` event | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Globalization; + +ChangeInvoiceCollectionMethodEvent changeInvoiceCollectionMethodEvent = new ChangeInvoiceCollectionMethodEvent { - "id": 246, - "timestamp": "2016-03-13T12:52:32.123Z", - "invoice": { - "issue_date": "2024-01-01", - "due_date": "2024-01-01", - "paid_date": "2024-01-01", - "public_url_expires_on": "2024-01-21", - "id": 166, - "uid": "uid6", - "site_id": 92, - "customer_id": 204, - "subscription_id": 20 - }, - "event_type": "change_invoice_collection_method", - "event_data": { - "from_collection_method": "from_collection_method4", - "to_collection_method": "to_collection_method8" - } -} + Id = 110L, + Timestamp = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + Invoice = new Invoice + { + Id = 166L, + Uid = "uid6", + SiteId = 92, + CustomerId = 204, + SubscriptionId = 20, + IssueDate = DateTime.Parse("2024-01-01"), + DueDate = DateTime.Parse("2024-01-01"), + PaidDate = DateTime.Parse("2024-01-01"), + PublicUrlExpiresOn = DateTime.Parse("2024-01-21"), + }, + EventType = InvoiceEventType.ChangeInvoiceCollectionMethod, + EventData = new ChangeInvoiceCollectionMethodEventData + { + FromCollectionMethod = "from_collection_method4", + ToCollectionMethod = "to_collection_method8", + }, +}; ``` diff --git a/doc/models/change-invoice-status-event-data.md b/doc/models/change-invoice-status-event-data.md index 6ac3bda9..a6ff787d 100644 --- a/doc/models/change-invoice-status-event-data.md +++ b/doc/models/change-invoice-status-event-data.md @@ -17,15 +17,18 @@ Example schema for an `change_invoice_status` event | `ToStatus` | [`InvoiceStatus`](../../doc/models/invoice-status.md) | Required | The updated status of the invoice after changes have been made. See [Invoice Statuses](https://maxio.zendesk.com/hc/en-us/articles/24252287829645-Advanced-Billing-Invoices-Overview#invoice-statuses) for more. | | `ConsolidationLevel` | [`InvoiceConsolidationLevel?`](../../doc/models/invoice-consolidation-level.md) | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +ChangeInvoiceStatusEventData changeInvoiceStatusEventData = new ChangeInvoiceStatusEventData { - "gateway_trans_id": "gateway_trans_id2", - "amount": "amount2", - "from_status": "draft", - "to_status": "pending", - "consolidation_level": "none" -} + FromStatus = InvoiceStatus.Canceled, + ToStatus = InvoiceStatus.Processing, + GatewayTransId = "gateway_trans_id4", + Amount = "amount6", + ConsolidationLevel = InvoiceConsolidationLevel.Parent, +}; ``` diff --git a/doc/models/change-invoice-status-event.md b/doc/models/change-invoice-status-event.md index 79363388..037c4dd8 100644 --- a/doc/models/change-invoice-status-event.md +++ b/doc/models/change-invoice-status-event.md @@ -15,31 +15,39 @@ | `EventType` | [`InvoiceEventType`](../../doc/models/invoice-event-type.md) | Required | **Default**: `InvoiceEventType.change_invoice_status` | | `EventData` | [`ChangeInvoiceStatusEventData`](../../doc/models/change-invoice-status-event-data.md) | Required | Example schema for an `change_invoice_status` event | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Globalization; + +ChangeInvoiceStatusEvent changeInvoiceStatusEvent = new ChangeInvoiceStatusEvent { - "id": 92, - "timestamp": "2016-03-13T12:52:32.123Z", - "invoice": { - "issue_date": "2024-01-01", - "due_date": "2024-01-01", - "paid_date": "2024-01-01", - "public_url_expires_on": "2024-01-21", - "id": 166, - "uid": "uid6", - "site_id": 92, - "customer_id": 204, - "subscription_id": 20 - }, - "event_type": "change_invoice_status", - "event_data": { - "gateway_trans_id": "gateway_trans_id2", - "amount": "amount8", - "from_status": "open", - "to_status": "pending", - "consolidation_level": "child" - } -} + Id = 148L, + Timestamp = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + Invoice = new Invoice + { + Id = 166L, + Uid = "uid6", + SiteId = 92, + CustomerId = 204, + SubscriptionId = 20, + IssueDate = DateTime.Parse("2024-01-01"), + DueDate = DateTime.Parse("2024-01-01"), + PaidDate = DateTime.Parse("2024-01-01"), + PublicUrlExpiresOn = DateTime.Parse("2024-01-21"), + }, + EventType = InvoiceEventType.ChangeInvoiceStatus, + EventData = new ChangeInvoiceStatusEventData + { + FromStatus = InvoiceStatus.Open, + ToStatus = InvoiceStatus.Pending, + GatewayTransId = "gateway_trans_id2", + Amount = "amount8", + ConsolidationLevel = InvoiceConsolidationLevel.Child, + }, +}; ``` diff --git a/doc/models/chargeback-status.md b/doc/models/chargeback-status.md index d57bae0f..f87e5f61 100644 --- a/doc/models/chargeback-status.md +++ b/doc/models/chargeback-status.md @@ -16,3 +16,11 @@ The current chargeback status. | `Won` | | `Closed` | +## Example + +```csharp +using AdvancedBilling.Standard.Models; + +ChargebackStatus chargebackStatus = ChargebackStatus.Open; +``` + diff --git a/doc/models/chargify-ebb.md b/doc/models/chargify-ebb.md index 93a13382..a88d0f4f 100644 --- a/doc/models/chargify-ebb.md +++ b/doc/models/chargify-ebb.md @@ -16,15 +16,23 @@ | `SubscriptionId` | `int?` | Optional | Id of Maxio Advanced Billing Subscription which is connected to this event.
Provide `subscription_id` if you configured `chargify.subscription_id` as Subscription Identifier in your Event Stream. | | `SubscriptionReference` | `string` | Optional | Reference of Maxio Advanced Billing Subscription which is connected to this event.
Provide `subscription_reference` if you configured `chargify.subscription_reference` as Subscription Identifier in your Event Stream. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Globalization; + +ChargifyEBB chargifyEBB = new ChargifyEBB { - "timestamp": "2016-03-13T12:52:32.123Z", - "id": "id4", - "created_at": "2016-03-13T12:52:32.123Z", - "uniqueness_token": "uniqueness_token0", - "subscription_id": 200 -} + Timestamp = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + Id = "id2", + CreatedAt = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + UniquenessToken = "uniqueness_token8", + SubscriptionId = 224, +}; ``` diff --git a/doc/models/chjs-tokenization-failure.md b/doc/models/chjs-tokenization-failure.md index 0584af0e..26989d3e 100644 --- a/doc/models/chjs-tokenization-failure.md +++ b/doc/models/chjs-tokenization-failure.md @@ -12,16 +12,20 @@ | `Errors` | `string` | Required | - | | `PaymentProfileParams` | [`PaymentProfileParams`](../../doc/models/payment-profile-params.md) | Optional | PCI-safe cardholder fields only. Full card numbers, CVV, and billing address are never included. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +ChjsTokenizationFailure chjsTokenizationFailure = new ChjsTokenizationFailure { - "errors": "errors2", - "payment_profile_params": { - "first_name": "first_name2", - "last_name": "last_name0", - "card_type": "card_type2" - } -} + Errors = "errors2", + PaymentProfileParams = new PaymentProfileParams + { + FirstName = "first_name2", + LastName = "last_name0", + CardType = "card_type2", + }, +}; ``` diff --git a/doc/models/chjs-tokenization-success.md b/doc/models/chjs-tokenization-success.md index a23f03d2..f82baa83 100644 --- a/doc/models/chjs-tokenization-success.md +++ b/doc/models/chjs-tokenization-success.md @@ -12,17 +12,21 @@ | `PaymentProfile` | [`TokenizedPaymentProfile`](../../doc/models/tokenized-payment-profile.md) | Required | - | | `GatewayCustomerId` | `int?` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +ChjsTokenizationSuccess chjsTokenizationSuccess = new ChjsTokenizationSuccess { - "payment_profile": { - "id": 44, - "vault_token": "vault_token6", - "gateway_handle": "gateway_handle4", - "customer_vault_token": "customer_vault_token2" - }, - "gateway_customer_id": 44 -} + PaymentProfile = new TokenizedPaymentProfile + { + Id = 44, + VaultToken = "vault_token6", + GatewayHandle = "gateway_handle4", + CustomerVaultToken = "customer_vault_token2", + }, + GatewayCustomerId = 228, +}; ``` diff --git a/doc/models/cleanup-scope.md b/doc/models/cleanup-scope.md index 51cb5160..bfaa998b 100644 --- a/doc/models/cleanup-scope.md +++ b/doc/models/cleanup-scope.md @@ -14,3 +14,11 @@ all: Will clear all products, customers, and related subscriptions from the site | `All` | | `Customers` | +## Example + +```csharp +using AdvancedBilling.Standard.Models; + +CleanupScope cleanupScope = CleanupScope.All; +``` + diff --git a/doc/models/clone-component-price-point-request.md b/doc/models/clone-component-price-point-request.md index 7391b771..125ff30f 100644 --- a/doc/models/clone-component-price-point-request.md +++ b/doc/models/clone-component-price-point-request.md @@ -11,14 +11,18 @@ | --- | --- | --- | --- | | `PricePoint` | [`CloneComponentPricePoint`](../../doc/models/clone-component-price-point.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +CloneComponentPricePointRequest cloneComponentPricePointRequest = new CloneComponentPricePointRequest { - "price_point": { - "name": "name0", - "handle": "handle6" - } -} + PricePoint = new CloneComponentPricePoint + { + Name = "name0", + Handle = "handle6", + }, +}; ``` diff --git a/doc/models/clone-component-price-point.md b/doc/models/clone-component-price-point.md index e546915d..ddb914a9 100644 --- a/doc/models/clone-component-price-point.md +++ b/doc/models/clone-component-price-point.md @@ -12,12 +12,15 @@ | `Name` | `string` | Required | - | | `Handle` | `string` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +CloneComponentPricePoint cloneComponentPricePoint = new CloneComponentPricePoint { - "name": "name2", - "handle": "handle8" -} + Name = "name4", + Handle = "handle0", +}; ``` diff --git a/doc/models/collection-method-1.md b/doc/models/collection-method-1.md new file mode 100644 index 00000000..6e477e76 --- /dev/null +++ b/doc/models/collection-method-1.md @@ -0,0 +1,23 @@ + +# Collection Method 1 + +## Enumeration + +`CollectionMethod1` + +## Fields + +| Name | +| --- | +| `Automatic` | +| `Remittance` | +| `Prepaid` | + +## Example + +```csharp +using AdvancedBilling.Standard.Models; + +CollectionMethod1 collectionMethod1 = CollectionMethod1.Automatic; +``` + diff --git a/doc/models/collection-method.md b/doc/models/collection-method.md index 337df240..de4fd881 100644 --- a/doc/models/collection-method.md +++ b/doc/models/collection-method.md @@ -16,3 +16,11 @@ The type of payment collection to be used in the subscription. For legacy Statem | `Prepaid` | | `Invoice` | +## Example + +```csharp +using AdvancedBilling.Standard.Models; + +CollectionMethod collectionMethod = CollectionMethod.Automatic; +``` + diff --git a/doc/models/component-allocation-change.md b/doc/models/component-allocation-change.md index 58892ebb..37d0fb1c 100644 --- a/doc/models/component-allocation-change.md +++ b/doc/models/component-allocation-change.md @@ -17,17 +17,21 @@ | `AllocationId` | `int` | Required | - | | `AllocatedQuantity` | [`ComponentAllocationChangeAllocatedQuantity`](../../doc/models/containers/component-allocation-change-allocated-quantity.md) | Optional | This is a container for one-of cases. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using AdvancedBilling.Standard.Models.Containers; + +ComponentAllocationChange componentAllocationChange = new ComponentAllocationChange { - "previous_allocation": 94, - "new_allocation": 102, - "component_id": 88, - "component_handle": "component_handle8", - "memo": "memo2", - "allocation_id": 158, - "allocated_quantity": 104 -} + PreviousAllocation = 78, + NewAllocation = 118, + ComponentId = 72, + ComponentHandle = "component_handle8", + Memo = "memo2", + AllocationId = 174, + AllocatedQuantity = ComponentAllocationChangeAllocatedQuantity.FromNumber(88), +}; ``` diff --git a/doc/models/component-allocation-error-exception.md b/doc/models/component-allocation-error-exception.md index 6f674168..736659db 100644 --- a/doc/models/component-allocation-error-exception.md +++ b/doc/models/component-allocation-error-exception.md @@ -11,30 +11,20 @@ | --- | --- | --- | --- | | `Errors` | [`List`](../../doc/models/component-allocation-error-item.md) | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +try { - "errors": [ - { - "component_id": 236, - "message": "message0", - "kind": "kind8", - "on": "on0" - }, - { - "component_id": 236, - "message": "message0", - "kind": "kind8", - "on": "on0" - }, + // make the API call +} +catch (ApiException e) +{ + if (e is ComponentAllocationErrorException) { - "component_id": 236, - "message": "message0", - "kind": "kind8", - "on": "on0" + // TODO: Handle ComponentAllocationErrorException + Console.WriteLine(e.Message); } - ] } ``` diff --git a/doc/models/component-allocation-error-item.md b/doc/models/component-allocation-error-item.md index 9097c3a7..6fce3823 100644 --- a/doc/models/component-allocation-error-item.md +++ b/doc/models/component-allocation-error-item.md @@ -14,14 +14,17 @@ | `Kind` | `string` | Optional | - | | `On` | `string` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +ComponentAllocationErrorItem componentAllocationErrorItem = new ComponentAllocationErrorItem { - "component_id": 188, - "message": "message0", - "kind": "kind8", - "on": "on0" -} + ComponentId = 122, + Message = "message8", + Kind = "kind6", + On = "on8", +}; ``` diff --git a/doc/models/component-cost-data-rate-tier.md b/doc/models/component-cost-data-rate-tier.md index 9dbcea48..d27d532f 100644 --- a/doc/models/component-cost-data-rate-tier.md +++ b/doc/models/component-cost-data-rate-tier.md @@ -15,15 +15,18 @@ | `UnitPrice` | `string` | Optional | - | | `Amount` | `string` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +ComponentCostDataRateTier componentCostDataRateTier = new ComponentCostDataRateTier { - "starting_quantity": 132, - "ending_quantity": 106, - "quantity": "quantity0", - "unit_price": "unit_price2", - "amount": "amount6" -} + StartingQuantity = 204, + EndingQuantity = 178, + Quantity = "quantity4", + UnitPrice = "unit_price6", + Amount = "amount0", +}; ``` diff --git a/doc/models/component-cost-data.md b/doc/models/component-cost-data.md index 12800beb..f14e16ea 100644 --- a/doc/models/component-cost-data.md +++ b/doc/models/component-cost-data.md @@ -17,15 +17,18 @@ | `PricingScheme` | [`PricingScheme?`](../../doc/models/pricing-scheme.md) | Optional | The identifier for the pricing scheme. See [Product Components](https://help.chargify.com/products/product-components.html) for an overview of pricing schemes. | | `Tiers` | [`List`](../../doc/models/component-cost-data-rate-tier.md) | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +ComponentCostData componentCostData = new ComponentCostData { - "component_code_id": 16, - "price_point_id": 186, - "product_id": 250, - "quantity": "quantity8", - "amount": "amount4" -} + ComponentCodeId = 40, + PricePointId = 210, + ProductId = 18, + Quantity = "quantity4", + Amount = "amount0", +}; ``` diff --git a/doc/models/component-currency-price.md b/doc/models/component-currency-price.md index ce63f92d..67a19a65 100644 --- a/doc/models/component-currency-price.md +++ b/doc/models/component-currency-price.md @@ -16,15 +16,18 @@ | `PriceId` | `int?` | Optional | - | | `PricePointId` | `int?` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +ComponentCurrencyPrice componentCurrencyPrice = new ComponentCurrencyPrice { - "id": 4, - "currency": "currency8", - "price": "price4", - "formatted_price": "formatted_price6", - "price_id": 162 -} + Id = 128, + Currency = "currency2", + Price = "price4", + FormattedPrice = "formatted_price6", + PriceId = 38, +}; ``` diff --git a/doc/models/component-currency-prices-response.md b/doc/models/component-currency-prices-response.md index 5b74cb71..b857bd13 100644 --- a/doc/models/component-currency-prices-response.md +++ b/doc/models/component-currency-prices-response.md @@ -11,19 +11,25 @@ | --- | --- | --- | --- | | `CurrencyPrices` | [`List`](../../doc/models/component-currency-price.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Collections.Generic; + +ComponentCurrencyPricesResponse componentCurrencyPricesResponse = new ComponentCurrencyPricesResponse { - "currency_prices": [ + CurrencyPrices = new List { - "id": 50, - "currency": "currency8", - "price": "price4", - "formatted_price": "formatted_price6", - "price_id": 116 - } - ] -} + new ComponentCurrencyPrice + { + Id = 50, + Currency = "currency8", + Price = "price4", + FormattedPrice = "formatted_price6", + PriceId = 116, + }, + }, +}; ``` diff --git a/doc/models/component-custom-price.md b/doc/models/component-custom-price.md index ad4b7f22..5158260d 100644 --- a/doc/models/component-custom-price.md +++ b/doc/models/component-custom-price.md @@ -12,10 +12,10 @@ Create or update custom pricing unique to the subscription. Used in place of `pr | Name | Type | Tags | Description | | --- | --- | --- | --- | | `TaxIncluded` | `bool?` | Optional | Whether or not the price point includes tax | -| `PricingScheme` | [`PricingScheme?`](../../doc/models/pricing-scheme.md) | Optional | Omit for On/Off components | -| `Interval` | `int?` | Optional | The numerical interval. i.e. an interval of ‘30’ coupled with an interval_unit of day would mean this component price point would renew every 30 days. This property is only available for sites with Multifrequency enabled. | +| `PricingScheme` | [`PricingScheme?`](../../doc/models/pricing-scheme.md) | Optional | Omit for On/Off components. | +| `Interval` | `int?` | Optional | The numerical interval. e.g., an interval of ‘30’ coupled with an interval_unit of day would mean this component price point would renew every 30 days. This property is only available for sites with Multifrequency enabled. | | `IntervalUnit` | [`IntervalUnit?`](../../doc/models/interval-unit.md) | Optional | A string representing the interval unit for this component price point, either month or day. This property is only available for sites with Multifrequency enabled. | -| `ListPricePointId` | `int?` | Optional | Optional id of the price point to use for list price calculations when
overriding the customer price. | +| `ListPricePointId` | `int?` | Optional | (Optional) Id of the price point to use for list price calculations when
overriding the customer price. | | `UseDefaultListPrice` | `bool?` | Optional | When true, list price calculations will continue to use the default price point even when a `custom_price` is supplied. | | `Prices` | [`List`](../../doc/models/price.md) | Required | On/off components only need one price bracket starting at 1. | | `RenewPrepaidAllocation` | `bool?` | Optional | Applicable only to prepaid usage components. Controls whether the allocated quantity renews each period. | @@ -23,22 +23,29 @@ Create or update custom pricing unique to the subscription. Used in place of `pr | `ExpirationInterval` | `int?` | Optional | Applicable only when rollover is enabled. Number of `expiration_interval_unit`s after which rollover amounts expire. | | `ExpirationIntervalUnit` | [`ExpirationIntervalUnit?`](../../doc/models/expiration-interval-unit.md) | Optional | Applicable only when rollover is enabled. Interval unit for rollover expiration (month or day). | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using AdvancedBilling.Standard.Models.Containers; +using System.Collections.Generic; + +ComponentCustomPrice componentCustomPrice = new ComponentCustomPrice { - "prices": [ + Prices = new List { - "starting_quantity": 242, - "ending_quantity": 40, - "unit_price": 23.26 - } - ], - "tax_included": false, - "pricing_scheme": "stairstep", - "interval": 162, - "interval_unit": "day", - "list_price_point_id": 146 -} + new Price + { + StartingQuantity = PriceStartingQuantity.FromNumber(242), + UnitPrice = PriceUnitPrice.FromPrecision(23.26), + EndingQuantity = PriceEndingQuantity.FromNumber(40), + }, + }, + TaxIncluded = false, + PricingScheme = PricingScheme.Stairstep, + Interval = 58, + IntervalUnit = IntervalUnit.Day, + ListPricePointId = 182, +}; ``` diff --git a/doc/models/component-kind.md b/doc/models/component-kind.md index 915b0b68..b802943c 100644 --- a/doc/models/component-kind.md +++ b/doc/models/component-kind.md @@ -17,3 +17,11 @@ A handle for the component type | `PrepaidUsageComponent` | | `EventBasedComponent` | +## Example + +```csharp +using AdvancedBilling.Standard.Models; + +ComponentKind componentKind = ComponentKind.PrepaidUsageComponent; +``` + diff --git a/doc/models/component-price-point-assignment.md b/doc/models/component-price-point-assignment.md index 4e364c14..d5a225c9 100644 --- a/doc/models/component-price-point-assignment.md +++ b/doc/models/component-price-point-assignment.md @@ -12,12 +12,16 @@ | `ComponentId` | `int?` | Optional | - | | `PricePoint` | [`ComponentPricePointAssignmentPricePoint`](../../doc/models/containers/component-price-point-assignment-price-point.md) | Optional | This is a container for one-of cases. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using AdvancedBilling.Standard.Models.Containers; + +ComponentPricePointAssignment componentPricePointAssignment = new ComponentPricePointAssignment { - "component_id": 114, - "price_point": "String9" -} + ComponentId = 190, + PricePoint = ComponentPricePointAssignmentPricePoint.FromString("String7"), +}; ``` diff --git a/doc/models/component-price-point-currency-overage-response.md b/doc/models/component-price-point-currency-overage-response.md index f70c101a..bf1dc678 100644 --- a/doc/models/component-price-point-currency-overage-response.md +++ b/doc/models/component-price-point-currency-overage-response.md @@ -11,17 +11,21 @@ | --- | --- | --- | --- | | `PricePoint` | [`CurrencyOveragePrices`](../../doc/models/currency-overage-prices.md) | Required | Extends a component price point with currency overage prices. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +ComponentPricePointCurrencyOverageResponse componentPricePointCurrencyOverageResponse = new ComponentPricePointCurrencyOverageResponse { - "price_point": { - "id": 248, - "type": "default", - "default": false, - "name": "name0", - "pricing_scheme": "per_unit" - } -} + PricePoint = new CurrencyOveragePrices + { + Id = 248, + Type = PricePointType.Default, + MDefault = false, + Name = "name0", + PricingScheme = PricingScheme.PerUnit, + }, +}; ``` diff --git a/doc/models/component-price-point-error-exception.md b/doc/models/component-price-point-error-exception.md index f62b4165..a817179c 100644 --- a/doc/models/component-price-point-error-exception.md +++ b/doc/models/component-price-point-error-exception.md @@ -11,22 +11,20 @@ | --- | --- | --- | --- | | `Errors` | [`List`](../../doc/models/component-price-point-error-item.md) | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +try { - "errors": [ - { - "component_id": 236, - "message": "message0", - "price_point": 122 - }, + // make the API call +} +catch (ApiException e) +{ + if (e is ComponentPricePointErrorException) { - "component_id": 236, - "message": "message0", - "price_point": 122 + // TODO: Handle ComponentPricePointErrorException + Console.WriteLine(e.Message); } - ] } ``` diff --git a/doc/models/component-price-point-error-item.md b/doc/models/component-price-point-error-item.md index 911844a1..d6f3d332 100644 --- a/doc/models/component-price-point-error-item.md +++ b/doc/models/component-price-point-error-item.md @@ -13,13 +13,16 @@ | `Message` | `string` | Optional | - | | `PricePoint` | `int?` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +ComponentPricePointErrorItem componentPricePointErrorItem = new ComponentPricePointErrorItem { - "component_id": 206, - "message": "message4", - "price_point": 152 -} + ComponentId = 174, + Message = "message2", + PricePoint = 72, +}; ``` diff --git a/doc/models/component-price-point-item.md b/doc/models/component-price-point-item.md index 403ceadc..e7169ae9 100644 --- a/doc/models/component-price-point-item.md +++ b/doc/models/component-price-point-item.md @@ -12,19 +12,22 @@ | `Name` | `string` | Optional | - | | `Handle` | `string` | Optional | - | | `PricingScheme` | [`PricingScheme?`](../../doc/models/pricing-scheme.md) | Optional | The identifier for the pricing scheme. See [Product Components](https://help.chargify.com/products/product-components.html) for an overview of pricing schemes. | -| `Interval` | `int?` | Optional | The numerical interval. i.e. an interval of ‘30’ coupled with an interval_unit of day would mean this component price point would renew every 30 days. This property is only available for sites with Multifrequency enabled. | +| `Interval` | `int?` | Optional | The numerical interval. e.g., an interval of ‘30’ coupled with an interval_unit of day would mean this component price point would renew every 30 days. This property is only available for sites with Multifrequency enabled. | | `IntervalUnit` | [`IntervalUnit?`](../../doc/models/interval-unit.md) | Optional | A string representing the interval unit for this component price point, either month or day. This property is only available for sites with Multifrequency enabled. | | `Prices` | [`List`](../../doc/models/price.md) | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +ComponentPricePointItem componentPricePointItem = new ComponentPricePointItem { - "name": "name6", - "handle": "handle2", - "pricing_scheme": "per_unit", - "interval": 196, - "interval_unit": "day" -} + Name = "name8", + Handle = "handle4", + PricingScheme = PricingScheme.Stairstep, + Interval = 138, + IntervalUnit = IntervalUnit.Day, +}; ``` diff --git a/doc/models/component-price-point-response.md b/doc/models/component-price-point-response.md index 2724eb9a..31d5b3fc 100644 --- a/doc/models/component-price-point-response.md +++ b/doc/models/component-price-point-response.md @@ -11,17 +11,21 @@ | --- | --- | --- | --- | | `PricePoint` | [`ComponentPricePoint`](../../doc/models/component-price-point.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +ComponentPricePointResponse componentPricePointResponse = new ComponentPricePointResponse { - "price_point": { - "id": 248, - "type": "default", - "default": false, - "name": "name0", - "pricing_scheme": "per_unit" - } -} + PricePoint = new ComponentPricePoint + { + Id = 248, + Type = PricePointType.Default, + MDefault = false, + Name = "name0", + PricingScheme = PricingScheme.PerUnit, + }, +}; ``` diff --git a/doc/models/component-price-point.md b/doc/models/component-price-point.md index 933604ad..7146d670 100644 --- a/doc/models/component-price-point.md +++ b/doc/models/component-price-point.md @@ -11,7 +11,7 @@ | --- | --- | --- | --- | | `Id` | `int?` | Optional | - | | `Type` | [`PricePointType?`](../../doc/models/price-point-type.md) | Optional | Price point type. We expose the following types:

1. **default**: a price point that is marked as a default price for a certain product.
2. **custom**: a custom price point.
3. **catalog**: a price point that is **not** marked as a default price for a certain product and is **not** a custom one. | -| `Default` | `bool?` | Optional | Note: Refer to type attribute instead | +| `Default` | `bool?` | Optional | Note: Refer to type attribute instead. | | `Name` | `string` | Optional | - | | `PricingScheme` | [`PricingScheme?`](../../doc/models/pricing-scheme.md) | Optional | The identifier for the pricing scheme. See [Product Components](https://help.chargify.com/products/product-components.html) for an overview of pricing schemes. | | `ComponentId` | `int?` | Optional | - | @@ -23,7 +23,7 @@ | `UseSiteExchangeRate` | `bool?` | Optional | Whether to use the site level exchange rate or define your own prices for each currency if you have multiple currencies defined on the site. Defaults to true during creation. | | `SubscriptionId` | `int?` | Optional | (only used for Custom Pricing - ie. when the price point's type is `custom`) The id of the subscription that the custom price point is for. | | `TaxIncluded` | `bool?` | Optional | - | -| `Interval` | `int?` | Optional | The numerical interval. i.e. an interval of ‘30’ coupled with an interval_unit of day would mean this component price point would renew every 30 days. This property is only available for sites with Multifrequency enabled. | +| `Interval` | `int?` | Optional | The numerical interval. e.g., an interval of ‘30’ coupled with an interval_unit of day would mean this component price point would renew every 30 days. This property is only available for sites with Multifrequency enabled. | | `IntervalUnit` | [`IntervalUnit?`](../../doc/models/interval-unit.md) | Optional | A string representing the interval unit for this component price point, either month or day. This property is only available for sites with Multifrequency enabled. | | `CurrencyPrices` | [`List`](../../doc/models/component-currency-price.md) | Optional | An array of currency pricing data is available when multiple currencies are defined for the site. It varies based on the use_site_exchange_rate setting for the price point. This parameter is present only in the response of read endpoints, after including the appropriate query parameter. The clone endpoint always returns currency prices if they are present. | | `OveragePrices` | [`List`](../../doc/models/component-price.md) | Optional | Applicable only to prepaid usage components. An array of overage price brackets. | @@ -33,15 +33,18 @@ | `ExpirationInterval` | `int?` | Optional | Applicable only to prepaid usage components where rollover_prepaid_remainder is true. The number of `expiration_interval_unit`s after which rollover amounts should expire. | | `ExpirationIntervalUnit` | [`ExpirationIntervalUnit?`](../../doc/models/expiration-interval-unit.md) | Optional | Applicable only to prepaid usage components where rollover_prepaid_remainder is true. A string representing the expiration interval unit for this component, either month or day. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +ComponentPricePoint componentPricePoint = new ComponentPricePoint { - "id": 190, - "type": "custom", - "default": false, - "name": "name2", - "pricing_scheme": "stairstep" -} + Id = 122, + Type = PricePointType.Catalog, + MDefault = false, + Name = "name2", + PricingScheme = PricingScheme.Stairstep, +}; ``` diff --git a/doc/models/component-price-points-response.md b/doc/models/component-price-points-response.md index ffeb2109..541c5805 100644 --- a/doc/models/component-price-points-response.md +++ b/doc/models/component-price-points-response.md @@ -12,32 +12,48 @@ | `PricePoints` | [`List`](../../doc/models/component-price-point.md) | Optional | - | | `Meta` | [`ListPublicKeysMeta`](../../doc/models/list-public-keys-meta.md) | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Collections.Generic; + +ComponentPricePointsResponse componentPricePointsResponse = new ComponentPricePointsResponse { - "price_points": [ + PricePoints = new List { - "id": 40, - "type": "default", - "default": false, - "name": "name2", - "pricing_scheme": "per_unit" + new ComponentPricePoint + { + Id = 40, + Type = PricePointType.Default, + MDefault = false, + Name = "name2", + PricingScheme = PricingScheme.PerUnit, + }, + new ComponentPricePoint + { + Id = 40, + Type = PricePointType.Default, + MDefault = false, + Name = "name2", + PricingScheme = PricingScheme.PerUnit, + }, + new ComponentPricePoint + { + Id = 40, + Type = PricePointType.Default, + MDefault = false, + Name = "name2", + PricingScheme = PricingScheme.PerUnit, + }, }, + Meta = new ListPublicKeysMeta { - "id": 40, - "type": "default", - "default": false, - "name": "name2", - "pricing_scheme": "per_unit" - } - ], - "meta": { - "total_count": 150, - "current_page": 126, - "total_pages": 138, - "per_page": 152 - } -} + TotalCount = 150, + CurrentPage = 126, + TotalPages = 138, + PerPage = 152, + }, +}; ``` diff --git a/doc/models/component-price.md b/doc/models/component-price.md index ed3968a3..ce7c38f3 100644 --- a/doc/models/component-price.md +++ b/doc/models/component-price.md @@ -18,15 +18,18 @@ | `FormattedUnitPrice` | `string` | Optional | - | | `SegmentId` | `int?` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +ComponentPrice componentPrice = new ComponentPrice { - "id": 234, - "component_id": 88, - "starting_quantity": 104, - "ending_quantity": 78, - "unit_price": "unit_price0" -} + Id = 18, + ComponentId = 128, + StartingQuantity = 64, + EndingQuantity = 218, + UnitPrice = "unit_price4", +}; ``` diff --git a/doc/models/component-response.md b/doc/models/component-response.md index 58ef3066..2abc9659 100644 --- a/doc/models/component-response.md +++ b/doc/models/component-response.md @@ -11,18 +11,22 @@ | --- | --- | --- | --- | | `Component` | [`Component`](../../doc/models/component.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +ComponentResponse componentResponse = new ComponentResponse { - "component": { - "item_category": "Business Software", - "id": 80, - "name": "name8", - "handle": "handle4", - "pricing_scheme": "per_unit", - "unit_name": "unit_name0" - } -} + Component = new Component + { + Id = 80, + Name = "name8", + Handle = "handle4", + PricingScheme = PricingScheme.PerUnit, + UnitName = "unit_name0", + ItemCategory = ItemCategory.EnumBusinessSoftware, + }, +}; ``` diff --git a/doc/models/component.md b/doc/models/component.md index 4feb88f3..0f531597 100644 --- a/doc/models/component.md +++ b/doc/models/component.md @@ -10,15 +10,15 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | | `Id` | `int?` | Optional | The unique ID assigned to the component by Chargify. This ID can be used to fetch the component from the API. | -| `Name` | `string` | Optional | The name of the Component, suitable for display on statements. i.e. Text Messages. | +| `Name` | `string` | Optional | The name of the Component, suitable for display on statements. e.g., Text Messages. | | `Handle` | `string` | Optional | The component API handle | | `PricingScheme` | [`PricingScheme?`](../../doc/models/pricing-scheme.md) | Optional | - | -| `UnitName` | `string` | Optional | The name of the unit that the component’s usage is measured in. i.e. message | +| `UnitName` | `string` | Optional | The name of the unit that the component’s usage is measured in. e.g., message | | `UnitPrice` | `string` | Optional | The amount the customer will be charged per unit. This field is only populated for ‘per_unit’ pricing schemes, otherwise it may be null. | | `ProductFamilyId` | `int?` | Optional | The id of the Product Family to which the Component belongs | | `ProductFamilyName` | `string` | Optional | The name of the Product Family to which the Component belongs | | `ProductFamilyHandle` | `string` | Optional | The handle of the Product Family to which the Component belongs | -| `PricePerUnitInCents` | `long?` | Optional | deprecated - use unit_price instead | +| `PricePerUnitInCents` | `long?` | Optional | deprecated - use unit_price instead. | | `Kind` | [`ComponentKind?`](../../doc/models/component-kind.md) | Optional | A handle for the component type | | `Archived` | `bool?` | Optional | Boolean flag describing whether a component is archived or not. | | `Description` | `string` | Optional | The description of the component. | @@ -42,19 +42,23 @@ | `UseSiteExchangeRate` | `bool?` | Optional | - | | `AccountingCode` | `string` | Optional | E.g. Internal ID or SKU Number | | `EventBasedBillingMetricId` | `int?` | Optional | (Only for Event Based Components) This is an ID of a metric attached to the component. This metric is used to bill upon collected events. | -| `Interval` | `int?` | Optional | The numerical interval. i.e. an interval of ‘30’ coupled with an interval_unit of day would mean this component's default price point would renew every 30 days. This property is only available for sites with Multifrequency enabled. | +| `Interval` | `int?` | Optional | The numerical interval. e.g., an interval of ‘30’ coupled with an interval_unit of day would mean this component’s default price point would renew every 30 days. This property is only available for sites with Multifrequency enabled. | | `IntervalUnit` | [`IntervalUnit?`](../../doc/models/interval-unit.md) | Optional | A string representing the interval unit for this component's default price point, either month or day. This property is only available for sites with Multifrequency enabled. | +| `UnspscCode` | `string` | Optional | (Optional) Custom UNSPSC commodity code for Level 3/CEDP payment data. When set, this value is sent as the commodity code on invoice line items for this component instead of the default derived from item_category. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +Component component = new Component { - "item_category": "Business Software", - "id": 24, - "name": "name2", - "handle": "handle8", - "pricing_scheme": "per_unit", - "unit_name": "unit_name4" -} + Id = 80, + Name = "name8", + Handle = "handle4", + PricingScheme = PricingScheme.PerUnit, + UnitName = "unit_name0", + ItemCategory = ItemCategory.EnumBusinessSoftware, +}; ``` diff --git a/doc/models/compounding-strategy.md b/doc/models/compounding-strategy.md index 2bb80c64..2bb77e9e 100644 --- a/doc/models/compounding-strategy.md +++ b/doc/models/compounding-strategy.md @@ -14,3 +14,11 @@ Applicable only to stackable coupons. For `compound`, Percentage-based discounts | `Compound` | | `Fullprice` | +## Example + +```csharp +using AdvancedBilling.Standard.Models; + +CompoundingStrategy compoundingStrategy = CompoundingStrategy.Compound; +``` + diff --git a/doc/models/consolidated-invoice.md b/doc/models/consolidated-invoice.md index 39cd41e8..a0fad0af 100644 --- a/doc/models/consolidated-invoice.md +++ b/doc/models/consolidated-invoice.md @@ -11,26 +11,41 @@ | --- | --- | --- | --- | | `Invoices` | [`List`](../../doc/models/invoice.md) | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Collections.Generic; + +ConsolidatedInvoice consolidatedInvoice = new ConsolidatedInvoice { - "invoices": [ + Invoices = new List { - "id": 196, - "uid": "uid6", - "site_id": 122, - "customer_id": 234, - "subscription_id": 50 + new Invoice + { + Id = 196L, + Uid = "uid6", + SiteId = 122, + CustomerId = 234, + SubscriptionId = 50, + }, + new Invoice + { + Id = 196L, + Uid = "uid6", + SiteId = 122, + CustomerId = 234, + SubscriptionId = 50, + }, + new Invoice + { + Id = 196L, + Uid = "uid6", + SiteId = 122, + CustomerId = 234, + SubscriptionId = 50, + }, }, - { - "id": 196, - "uid": "uid6", - "site_id": 122, - "customer_id": 234, - "subscription_id": 50 - } - ] -} +}; ``` diff --git a/doc/models/containers/create-subscription-component-unit-balance.md b/doc/models/containers/create-subscription-component-unit-balance.md new file mode 100644 index 00000000..82dde9fc --- /dev/null +++ b/doc/models/containers/create-subscription-component-unit-balance.md @@ -0,0 +1,34 @@ + +# Create Subscription Component Unit Balance + +## Class Name + +`CreateSubscriptionComponentUnitBalance` + +## Cases + +| Type | Factory Method | +| --- | --- | +| `int` | CreateSubscriptionComponentUnitBalance.FromNumber(int number) | +| `string` | CreateSubscriptionComponentUnitBalance.FromString(string mString) | + +## int + +### Initialization Code + +#### Example + +```csharp +CreateSubscriptionComponentUnitBalance value = CreateSubscriptionComponentUnitBalance.FromNumber(0); +``` + +## string + +### Initialization Code + +#### Example + +```csharp +CreateSubscriptionComponentUnitBalance value = CreateSubscriptionComponentUnitBalance.FromString("String0"); +``` + diff --git a/doc/models/containers/event-event-specific-data.md b/doc/models/containers/event-event-specific-data.md index 759e85cd..ba894032 100644 --- a/doc/models/containers/event-event-specific-data.md +++ b/doc/models/containers/event-event-specific-data.md @@ -126,7 +126,7 @@ EventEventSpecificData value = EventEventSpecificData.FromMeteredUsage( new MeteredUsage { PreviousUnitBalance = "previous_unit_balance6", - NewUnitBalance = 80, + NewUnitBalance = MeteredUsageNewUnitBalance.FromNumber(2), UsageQuantity = 42, ComponentId = 4, ComponentHandle = "component_handle8", @@ -147,8 +147,8 @@ EventEventSpecificData value = EventEventSpecificData.FromPrepaidUsage( { PreviousUnitBalance = "previous_unit_balance0", PreviousOverageUnitBalance = "previous_overage_unit_balance4", - NewUnitBalance = 252, - NewOverageUnitBalance = 224, + NewUnitBalance = PrepaidUsageNewUnitBalance.FromNumber(174), + NewOverageUnitBalance = PrepaidUsageNewOverageUnitBalance.FromNumber(146), UsageQuantity = 214, OverageUsageQuantity = 106, ComponentId = 176, diff --git a/doc/models/containers/get-one-time-token-request-payment-profile.md b/doc/models/containers/get-one-time-token-request-payment-profile.md new file mode 100644 index 00000000..4e89e9c7 --- /dev/null +++ b/doc/models/containers/get-one-time-token-request-payment-profile.md @@ -0,0 +1,75 @@ + +# Get One Time Token Request Payment Profile + +## Class Name + +`GetOneTimeTokenRequestPaymentProfile` + +## Cases + +| Type | Factory Method | +| --- | --- | +| [`GetOneTimeTokenPaymentProfile`](../../../doc/models/get-one-time-token-payment-profile.md) | GetOneTimeTokenRequestPaymentProfile.FromGetOneTimeTokenPaymentProfile(GetOneTimeTokenPaymentProfile getOneTimeTokenPaymentProfile) | +| [`GetOneTimeTokenBankAccountPaymentProfile`](../../../doc/models/get-one-time-token-bank-account-payment-profile.md) | GetOneTimeTokenRequestPaymentProfile.FromGetOneTimeTokenBankAccountPaymentProfile(GetOneTimeTokenBankAccountPaymentProfile getOneTimeTokenBankAccountPaymentProfile) | + +## GetOneTimeTokenPaymentProfile + +### Initialization Code + +#### Example + +```csharp +GetOneTimeTokenRequestPaymentProfile value = GetOneTimeTokenRequestPaymentProfile.FromGetOneTimeTokenPaymentProfile( + new GetOneTimeTokenPaymentProfile + { + FirstName = "first_name2", + LastName = "last_name0", + MaskedCardNumber = "masked_card_number0", + CardType = CardType.Routex, + ExpirationMonth = 187.78, + ExpirationYear = 164.44, + CurrentVault = CreditCardVault.BraintreeBlue, + VaultToken = "vault_token4", + BillingAddress = "billing_address4", + BillingCity = "billing_city0", + BillingCountry = "billing_country6", + BillingState = "billing_state6", + BillingZip = "billing_zip0", + PaymentType = "payment_type2", + Disabled = false, + SiteGatewaySettingId = 232, + } +); +``` + +## GetOneTimeTokenBankAccountPaymentProfile + +### Initialization Code + +#### Example + +```csharp +GetOneTimeTokenRequestPaymentProfile value = GetOneTimeTokenRequestPaymentProfile.FromGetOneTimeTokenBankAccountPaymentProfile( + new GetOneTimeTokenBankAccountPaymentProfile + { + FirstName = "first_name8", + LastName = "last_name6", + CurrentVault = BankAccountVault.Maxp, + VaultToken = "vault_token0", + BillingAddress = "billing_address0", + BillingCity = "billing_city4", + BillingCountry = "billing_country2", + BillingState = "billing_state8", + BillingZip = "billing_zip6", + BankName = "bank_name6", + MaskedBankRoutingNumber = "masked_bank_routing_number6", + MaskedBankAccountNumber = "masked_bank_account_number0", + BankAccountType = BankAccountType.Checking, + BankAccountHolderType = BankAccountHolderType.Personal, + PaymentType = "payment_type2", + Disabled = false, + SiteGatewaySettingId = 254, + } +); +``` + diff --git a/doc/models/containers/list-subscriptions-input-product.md b/doc/models/containers/list-subscriptions-input-product.md new file mode 100644 index 00000000..acaab7b0 --- /dev/null +++ b/doc/models/containers/list-subscriptions-input-product.md @@ -0,0 +1,34 @@ + +# List Subscriptions Input Product + +## Class Name + +`ListSubscriptionsInputProduct` + +## Cases + +| Type | Factory Method | +| --- | --- | +| `int` | ListSubscriptionsInputProduct.FromNumber(int number) | +| `string` | ListSubscriptionsInputProduct.FromString(string mString) | + +## int + +### Initialization Code + +#### Example + +```csharp +ListSubscriptionsInputProduct value = ListSubscriptionsInputProduct.FromNumber(0); +``` + +## string + +### Initialization Code + +#### Example + +```csharp +ListSubscriptionsInputProduct value = ListSubscriptionsInputProduct.FromString("String0"); +``` + diff --git a/doc/models/containers/metered-usage-new-unit-balance.md b/doc/models/containers/metered-usage-new-unit-balance.md new file mode 100644 index 00000000..29a8f896 --- /dev/null +++ b/doc/models/containers/metered-usage-new-unit-balance.md @@ -0,0 +1,34 @@ + +# Metered Usage New Unit Balance + +## Class Name + +`MeteredUsageNewUnitBalance` + +## Cases + +| Type | Factory Method | +| --- | --- | +| `int` | MeteredUsageNewUnitBalance.FromNumber(int number) | +| `string` | MeteredUsageNewUnitBalance.FromString(string mString) | + +## int + +### Initialization Code + +#### Example + +```csharp +MeteredUsageNewUnitBalance value = MeteredUsageNewUnitBalance.FromNumber(0); +``` + +## string + +### Initialization Code + +#### Example + +```csharp +MeteredUsageNewUnitBalance value = MeteredUsageNewUnitBalance.FromString("String0"); +``` + diff --git a/doc/models/containers/prepaid-usage-new-overage-unit-balance.md b/doc/models/containers/prepaid-usage-new-overage-unit-balance.md new file mode 100644 index 00000000..41c52fa2 --- /dev/null +++ b/doc/models/containers/prepaid-usage-new-overage-unit-balance.md @@ -0,0 +1,34 @@ + +# Prepaid Usage New Overage Unit Balance + +## Class Name + +`PrepaidUsageNewOverageUnitBalance` + +## Cases + +| Type | Factory Method | +| --- | --- | +| `int` | PrepaidUsageNewOverageUnitBalance.FromNumber(int number) | +| `string` | PrepaidUsageNewOverageUnitBalance.FromString(string mString) | + +## int + +### Initialization Code + +#### Example + +```csharp +PrepaidUsageNewOverageUnitBalance value = PrepaidUsageNewOverageUnitBalance.FromNumber(0); +``` + +## string + +### Initialization Code + +#### Example + +```csharp +PrepaidUsageNewOverageUnitBalance value = PrepaidUsageNewOverageUnitBalance.FromString("String0"); +``` + diff --git a/doc/models/containers/prepaid-usage-new-unit-balance.md b/doc/models/containers/prepaid-usage-new-unit-balance.md new file mode 100644 index 00000000..6eba2e39 --- /dev/null +++ b/doc/models/containers/prepaid-usage-new-unit-balance.md @@ -0,0 +1,34 @@ + +# Prepaid Usage New Unit Balance + +## Class Name + +`PrepaidUsageNewUnitBalance` + +## Cases + +| Type | Factory Method | +| --- | --- | +| `int` | PrepaidUsageNewUnitBalance.FromNumber(int number) | +| `string` | PrepaidUsageNewUnitBalance.FromString(string mString) | + +## int + +### Initialization Code + +#### Example + +```csharp +PrepaidUsageNewUnitBalance value = PrepaidUsageNewUnitBalance.FromNumber(0); +``` + +## string + +### Initialization Code + +#### Example + +```csharp +PrepaidUsageNewUnitBalance value = PrepaidUsageNewUnitBalance.FromString("String0"); +``` + diff --git a/doc/models/containers/subscription-component-unit-balance.md b/doc/models/containers/subscription-component-unit-balance.md new file mode 100644 index 00000000..08e3f618 --- /dev/null +++ b/doc/models/containers/subscription-component-unit-balance.md @@ -0,0 +1,34 @@ + +# Subscription Component Unit Balance + +## Class Name + +`SubscriptionComponentUnitBalance` + +## Cases + +| Type | Factory Method | +| --- | --- | +| `int` | SubscriptionComponentUnitBalance.FromNumber(int number) | +| `string` | SubscriptionComponentUnitBalance.FromString(string mString) | + +## int + +### Initialization Code + +#### Example + +```csharp +SubscriptionComponentUnitBalance value = SubscriptionComponentUnitBalance.FromNumber(0); +``` + +## string + +### Initialization Code + +#### Example + +```csharp +SubscriptionComponentUnitBalance value = SubscriptionComponentUnitBalance.FromString("String0"); +``` + diff --git a/doc/models/containers/update-invoice-item-component-id.md b/doc/models/containers/update-invoice-item-component-id.md new file mode 100644 index 00000000..2d14b918 --- /dev/null +++ b/doc/models/containers/update-invoice-item-component-id.md @@ -0,0 +1,34 @@ + +# Update Invoice Item Component Id + +## Class Name + +`UpdateInvoiceItemComponentId` + +## Cases + +| Type | Factory Method | +| --- | --- | +| `string` | UpdateInvoiceItemComponentId.FromString(string mString) | +| `int` | UpdateInvoiceItemComponentId.FromNumber(int number) | + +## string + +### Initialization Code + +#### Example + +```csharp +UpdateInvoiceItemComponentId value = UpdateInvoiceItemComponentId.FromString("String0"); +``` + +## int + +### Initialization Code + +#### Example + +```csharp +UpdateInvoiceItemComponentId value = UpdateInvoiceItemComponentId.FromNumber(0); +``` + diff --git a/doc/models/containers/update-invoice-item-price-point-id.md b/doc/models/containers/update-invoice-item-price-point-id.md new file mode 100644 index 00000000..9f73108d --- /dev/null +++ b/doc/models/containers/update-invoice-item-price-point-id.md @@ -0,0 +1,34 @@ + +# Update Invoice Item Price Point Id + +## Class Name + +`UpdateInvoiceItemPricePointId` + +## Cases + +| Type | Factory Method | +| --- | --- | +| `string` | UpdateInvoiceItemPricePointId.FromString(string mString) | +| `int` | UpdateInvoiceItemPricePointId.FromNumber(int number) | + +## string + +### Initialization Code + +#### Example + +```csharp +UpdateInvoiceItemPricePointId value = UpdateInvoiceItemPricePointId.FromString("String0"); +``` + +## int + +### Initialization Code + +#### Example + +```csharp +UpdateInvoiceItemPricePointId value = UpdateInvoiceItemPricePointId.FromNumber(0); +``` + diff --git a/doc/models/containers/update-invoice-item-product-id.md b/doc/models/containers/update-invoice-item-product-id.md new file mode 100644 index 00000000..ca3aaa2d --- /dev/null +++ b/doc/models/containers/update-invoice-item-product-id.md @@ -0,0 +1,34 @@ + +# Update Invoice Item Product Id + +## Class Name + +`UpdateInvoiceItemProductId` + +## Cases + +| Type | Factory Method | +| --- | --- | +| `string` | UpdateInvoiceItemProductId.FromString(string mString) | +| `int` | UpdateInvoiceItemProductId.FromNumber(int number) | + +## string + +### Initialization Code + +#### Example + +```csharp +UpdateInvoiceItemProductId value = UpdateInvoiceItemProductId.FromString("String0"); +``` + +## int + +### Initialization Code + +#### Example + +```csharp +UpdateInvoiceItemProductId value = UpdateInvoiceItemProductId.FromNumber(0); +``` + diff --git a/doc/models/containers/update-invoice-item-product-price-point-id.md b/doc/models/containers/update-invoice-item-product-price-point-id.md new file mode 100644 index 00000000..22dd1f40 --- /dev/null +++ b/doc/models/containers/update-invoice-item-product-price-point-id.md @@ -0,0 +1,34 @@ + +# Update Invoice Item Product Price Point Id + +## Class Name + +`UpdateInvoiceItemProductPricePointId` + +## Cases + +| Type | Factory Method | +| --- | --- | +| `string` | UpdateInvoiceItemProductPricePointId.FromString(string mString) | +| `int` | UpdateInvoiceItemProductPricePointId.FromNumber(int number) | + +## string + +### Initialization Code + +#### Example + +```csharp +UpdateInvoiceItemProductPricePointId value = UpdateInvoiceItemProductPricePointId.FromString("String0"); +``` + +## int + +### Initialization Code + +#### Example + +```csharp +UpdateInvoiceItemProductPricePointId value = UpdateInvoiceItemProductPricePointId.FromNumber(0); +``` + diff --git a/doc/models/containers/update-invoice-item-quantity.md b/doc/models/containers/update-invoice-item-quantity.md new file mode 100644 index 00000000..0d4a8a20 --- /dev/null +++ b/doc/models/containers/update-invoice-item-quantity.md @@ -0,0 +1,34 @@ + +# Update Invoice Item Quantity + +## Class Name + +`UpdateInvoiceItemQuantity` + +## Cases + +| Type | Factory Method | +| --- | --- | +| `double` | UpdateInvoiceItemQuantity.FromPrecision(double precision) | +| `string` | UpdateInvoiceItemQuantity.FromString(string mString) | + +## double + +### Initialization Code + +#### Example + +```csharp +UpdateInvoiceItemQuantity value = UpdateInvoiceItemQuantity.FromPrecision(0); +``` + +## string + +### Initialization Code + +#### Example + +```csharp +UpdateInvoiceItemQuantity value = UpdateInvoiceItemQuantity.FromString("String0"); +``` + diff --git a/doc/models/containers/update-invoice-item-unit-price.md b/doc/models/containers/update-invoice-item-unit-price.md new file mode 100644 index 00000000..76767443 --- /dev/null +++ b/doc/models/containers/update-invoice-item-unit-price.md @@ -0,0 +1,34 @@ + +# Update Invoice Item Unit Price + +## Class Name + +`UpdateInvoiceItemUnitPrice` + +## Cases + +| Type | Factory Method | +| --- | --- | +| `double` | UpdateInvoiceItemUnitPrice.FromPrecision(double precision) | +| `string` | UpdateInvoiceItemUnitPrice.FromString(string mString) | + +## double + +### Initialization Code + +#### Example + +```csharp +UpdateInvoiceItemUnitPrice value = UpdateInvoiceItemUnitPrice.FromPrecision(0); +``` + +## string + +### Initialization Code + +#### Example + +```csharp +UpdateInvoiceItemUnitPrice value = UpdateInvoiceItemUnitPrice.FromString("String0"); +``` + diff --git a/doc/models/contract.md b/doc/models/contract.md index 4077ce04..062c723c 100644 --- a/doc/models/contract.md +++ b/doc/models/contract.md @@ -16,19 +16,23 @@ Contract linked to the scheduled renewal configuration. | `Number` | `string` | Optional | - | | `Register` | [`Register`](../../doc/models/register.md) | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +Contract contract = new Contract { - "id": 136, - "maxio_id": "maxio_id8", - "number": "number6", - "register": { - "id": 54, - "maxio_id": "maxio_id4", - "name": "name2", - "currency_code": "currency_code2" - } -} + Id = 112, + MaxioId = "maxio_id6", + Number = "number2", + Register = new Register + { + Id = 54, + MaxioId = "maxio_id4", + Name = "name2", + CurrencyCode = "currency_code2", + }, +}; ``` diff --git a/doc/models/count-response.md b/doc/models/count-response.md index 593ef6ff..39ca01c1 100644 --- a/doc/models/count-response.md +++ b/doc/models/count-response.md @@ -11,11 +11,14 @@ | --- | --- | --- | --- | | `Count` | `int?` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +CountResponse countResponse = new CountResponse { - "count": 60 -} + Count = 56, +}; ``` diff --git a/doc/models/coupon-currency-request.md b/doc/models/coupon-currency-request.md index 3802cfb4..8a8dc156 100644 --- a/doc/models/coupon-currency-request.md +++ b/doc/models/coupon-currency-request.md @@ -11,16 +11,22 @@ | --- | --- | --- | --- | | `CurrencyPrices` | [`List`](../../doc/models/update-coupon-currency.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Collections.Generic; + +CouponCurrencyRequest couponCurrencyRequest = new CouponCurrencyRequest { - "currency_prices": [ + CurrencyPrices = new List { - "currency": "currency8", - "price": 78 - } - ] -} + new UpdateCouponCurrency + { + Currency = "currency8", + Price = 78, + }, + }, +}; ``` diff --git a/doc/models/coupon-currency-response.md b/doc/models/coupon-currency-response.md index e53dcf49..2a7ff9cd 100644 --- a/doc/models/coupon-currency-response.md +++ b/doc/models/coupon-currency-response.md @@ -11,30 +11,24 @@ | --- | --- | --- | --- | | `CurrencyPrices` | [`List`](../../doc/models/coupon-currency.md) | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Collections.Generic; + +CouponCurrencyResponse couponCurrencyResponse = new CouponCurrencyResponse { - "currency_prices": [ - { - "id": 50, - "currency": "currency8", - "price": 233.74, - "coupon_id": 224 - }, + CurrencyPrices = new List { - "id": 50, - "currency": "currency8", - "price": 233.74, - "coupon_id": 224 + new CouponCurrency + { + Id = 50, + Currency = "currency8", + Price = 233.74, + CouponId = 224, + }, }, - { - "id": 50, - "currency": "currency8", - "price": 233.74, - "coupon_id": 224 - } - ] -} +}; ``` diff --git a/doc/models/coupon-currency.md b/doc/models/coupon-currency.md index 4012c995..0b79138e 100644 --- a/doc/models/coupon-currency.md +++ b/doc/models/coupon-currency.md @@ -14,14 +14,17 @@ | `Price` | `double?` | Optional | - | | `CouponId` | `int?` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +CouponCurrency couponCurrency = new CouponCurrency { - "id": 228, - "currency": "currency8", - "price": 169.96, - "coupon_id": 210 -} + Id = 202, + Currency = "currency0", + Price = 14.62, + CouponId = 184, +}; ``` diff --git a/doc/models/coupon-payload.md b/doc/models/coupon-payload.md index 25030a16..5b98682d 100644 --- a/doc/models/coupon-payload.md +++ b/doc/models/coupon-payload.md @@ -10,10 +10,10 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | | `Name` | `string` | Optional | Required when creating a new coupon. This name is not displayed to customers and is limited to 255 characters. | -| `Code` | `string` | Optional | Required when creating a new coupon. The code is limited to 255 characters. May contain uppercase alphanumeric characters and these special characters (which allow for email addresses to be used): “%”, “@”, “+”, “-”, “_”, and “.” | +| `Code` | `string` | Optional | Required when creating a new coupon. The code is limited to 255 characters. May contain uppercase alphanumeric characters and these special characters (which allow for email addresses to be used): “%”, “@”, “+”, “-”, “_”, and “.”. | | `Description` | `string` | Optional | Required when creating a new coupon. A description of the coupon that can be displayed to customers in transactions and on statements. The description is limited to 255 characters. | | `Percentage` | [`CouponPayloadPercentage`](../../doc/models/containers/coupon-payload-percentage.md) | Optional | This is a container for one-of cases. | -| `AmountInCents` | `long?` | Optional | Required when creating a new flat amount coupon. Can't be used together with percentage. Flat USD discount | +| `AmountInCents` | `long?` | Optional | Required when creating a new flat amount coupon. Can't be used together with percentage. Flat USD discount. | | `AllowNegativeBalance` | `bool?` | Optional | If set to true, discount is not limited (credits will carry forward to next billing). Can't be used together with restrictions. | | `Recurring` | `bool?` | Optional | - | | `EndDate` | `DateTime?` | Optional | After the end of the given day, this coupon code will be invalid for new signups. Recurring discounts started before this date will continue to recur even after this date. | @@ -24,15 +24,19 @@ | `ApplyOnCancelAtEndOfPeriod` | `bool?` | Optional | - | | `ApplyOnSubscriptionExpiration` | `bool?` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using AdvancedBilling.Standard.Models.Containers; + +CouponPayload couponPayload = new CouponPayload { - "name": "name8", - "code": "code6", - "description": "description8", - "percentage": "String7", - "amount_in_cents": 110 -} + Name = "name8", + Code = "code6", + Description = "description2", + Percentage = CouponPayloadPercentage.FromString("String7"), + AmountInCents = 124L, +}; ``` diff --git a/doc/models/coupon-request.md b/doc/models/coupon-request.md index 82ac5b68..0e3bff13 100644 --- a/doc/models/coupon-request.md +++ b/doc/models/coupon-request.md @@ -10,26 +10,36 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | | `Coupon` | [`CouponPayload`](../../doc/models/coupon-payload.md) | Optional | - | -| `RestrictedProducts` | `Dictionary` | Optional | An object where the keys are product IDs or handles (prefixed with 'handle:'), and the values are booleans indicating if the coupon should be applicable to the product | -| `RestrictedComponents` | `Dictionary` | Optional | An object where the keys are component IDs or handles (prefixed with 'handle:'), and the values are booleans indicating if the coupon should be applicable to the component | +| `RestrictedProducts` | `Dictionary` | Optional | An object where the keys are product IDs or handles (prefixed with 'handle:'), and the values are booleans indicating if the coupon should be applicable to the product. | +| `RestrictedComponents` | `Dictionary` | Optional | An object where the keys are component IDs or handles (prefixed with 'handle:'), and the values are booleans indicating if the coupon should be applicable to the component. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using AdvancedBilling.Standard.Models.Containers; +using System.Collections.Generic; + +CouponRequest couponRequest = new CouponRequest { - "coupon": { - "name": "name4", - "code": "code2", - "description": "description6", - "percentage": "String3", - "amount_in_cents": 230 - }, - "restricted_products": { - "key0": true - }, - "restricted_components": { - "key0": true - } -} + Coupon = new CouponPayload + { + Name = "name4", + Code = "code2", + Description = "description6", + Percentage = CouponPayloadPercentage.FromString("String3"), + AmountInCents = 230L, + }, + RestrictedProducts = new Dictionary + { + ["key0"] = true, + ["key1"] = false, + }, + RestrictedComponents = new Dictionary + { + ["key0"] = true, + ["key1"] = false, + }, +}; ``` diff --git a/doc/models/coupon-response.md b/doc/models/coupon-response.md index a5df47ee..f3cfed8a 100644 --- a/doc/models/coupon-response.md +++ b/doc/models/coupon-response.md @@ -11,17 +11,21 @@ | --- | --- | --- | --- | | `Coupon` | [`Coupon`](../../doc/models/coupon.md) | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +CouponResponse couponResponse = new CouponResponse { - "coupon": { - "id": 196, - "name": "name4", - "code": "code2", - "description": "description6", - "amount": 97.66 - } -} + Coupon = new Coupon + { + Id = 196, + Name = "name4", + Code = "code2", + Description = "description6", + Amount = 97.66, + }, +}; ``` diff --git a/doc/models/coupon-restriction.md b/doc/models/coupon-restriction.md index af5c4667..98d96b40 100644 --- a/doc/models/coupon-restriction.md +++ b/doc/models/coupon-restriction.md @@ -15,15 +15,18 @@ | `Name` | `string` | Optional | - | | `Handle` | `string` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +CouponRestriction couponRestriction = new CouponRestriction { - "id": 180, - "item_type": "Component", - "item_id": 184, - "name": "name4", - "handle": "handle0" -} + Id = 66, + ItemType = RestrictionType.Component, + ItemId = 214, + Name = "name0", + Handle = "handle6", +}; ``` diff --git a/doc/models/coupon-subcodes-response.md b/doc/models/coupon-subcodes-response.md index 294293ac..d71e9ff0 100644 --- a/doc/models/coupon-subcodes-response.md +++ b/doc/models/coupon-subcodes-response.md @@ -13,23 +13,27 @@ | `DuplicateCodes` | `List` | Optional | - | | `InvalidCodes` | `List` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Collections.Generic; + +CouponSubcodesResponse couponSubcodesResponse = new CouponSubcodesResponse { - "created_codes": [ - "created_codes1", - "created_codes2" - ], - "duplicate_codes": [ - "duplicate_codes8", - "duplicate_codes7" - ], - "invalid_codes": [ - "invalid_codes0", - "invalid_codes9", - "invalid_codes8" - ] -} + CreatedCodes = new List + { + "created_codes7", + }, + DuplicateCodes = new List + { + "duplicate_codes8", + }, + InvalidCodes = new List + { + "invalid_codes4", + "invalid_codes3", + }, +}; ``` diff --git a/doc/models/coupon-subcodes.md b/doc/models/coupon-subcodes.md index 2fae7f88..d6da1b49 100644 --- a/doc/models/coupon-subcodes.md +++ b/doc/models/coupon-subcodes.md @@ -11,13 +11,19 @@ | --- | --- | --- | --- | | `Codes` | `List` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Collections.Generic; + +CouponSubcodes couponSubcodes = new CouponSubcodes { - "codes": [ - "codes8" - ] -} + Codes = new List + { + "codes8", + "codes9", + }, +}; ``` diff --git a/doc/models/coupon-usage.md b/doc/models/coupon-usage.md index ed707a08..1de60664 100644 --- a/doc/models/coupon-usage.md +++ b/doc/models/coupon-usage.md @@ -14,18 +14,21 @@ | `Signups` | `int?` | Optional | Number of times the coupon has been applied | | `Savings` | `int?` | Optional | Dollar amount of customer savings as a result of the coupon. | | `SavingsInCents` | `long?` | Optional | Dollar amount of customer savings as a result of the coupon. | -| `Revenue` | `int?` | Optional | Total revenue of the all subscriptions that have received a discount from this coupon. | -| `RevenueInCents` | `long?` | Optional | Total revenue of the all subscriptions that have received a discount from this coupon. | +| `Revenue` | `int?` | Optional | Total revenue of all subscriptions that have received a discount from this coupon. | +| `RevenueInCents` | `long?` | Optional | Total revenue of all subscriptions that have received a discount from this coupon. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +CouponUsage couponUsage = new CouponUsage { - "id": 14, - "name": "name0", - "signups": 34, - "savings": 52, - "savings_in_cents": 138 -} + Id = 240, + Name = "name8", + Signups = 4, + Savings = 22, + SavingsInCents = 108L, +}; ``` diff --git a/doc/models/coupon.md b/doc/models/coupon.md index fba91bc8..65710f2b 100644 --- a/doc/models/coupon.md +++ b/doc/models/coupon.md @@ -41,15 +41,18 @@ | `CouponRestrictions` | [`List`](../../doc/models/coupon-restriction.md) | Optional | - | | `CurrencyPrices` | [`List`](../../doc/models/coupon-currency.md) | Optional | Returned in read, find, and list endpoints if the query parameter is provided. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +Coupon coupon = new Coupon { - "id": 22, - "name": "name2", - "code": "code0", - "description": "description2", - "amount": 62.64 -} + Id = 196, + Name = "name4", + Code = "code2", + Description = "description6", + Amount = 97.66, +}; ``` diff --git a/doc/models/create-allocation-request.md b/doc/models/create-allocation-request.md index abfa9f1d..722e593d 100644 --- a/doc/models/create-allocation-request.md +++ b/doc/models/create-allocation-request.md @@ -11,18 +11,22 @@ | --- | --- | --- | --- | | `Allocation` | [`CreateAllocation`](../../doc/models/create-allocation.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +CreateAllocationRequest createAllocationRequest = new CreateAllocationRequest { - "allocation": { - "quantity": 228.94, - "decimal_quantity": "decimal_quantity6", - "previous_quantity": 254.04, - "decimal_previous_quantity": "decimal_previous_quantity8", - "component_id": 8, - "memo": "memo2" - } -} + Allocation = new CreateAllocation + { + Quantity = 228.94, + DecimalQuantity = "decimal_quantity6", + PreviousQuantity = 254.04, + DecimalPreviousQuantity = "decimal_previous_quantity8", + ComponentId = 8, + Memo = "memo2", + }, +}; ``` diff --git a/doc/models/create-allocation.md b/doc/models/create-allocation.md index f1d4b957..25dedbd4 100644 --- a/doc/models/create-allocation.md +++ b/doc/models/create-allocation.md @@ -9,7 +9,7 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `Quantity` | `double` | Required | The allocated quantity to which to set the line-items allocated quantity. By default, this is an integer. If decimal allocations are enabled for the component, it will be a decimal number. For On/Off components, use 1for on and 0 for off. | +| `Quantity` | `double` | Required | The allocated quantity to which to set the line-items allocated quantity. By default, this is an integer. If decimal allocations are enabled for the component, it will be a decimal number. For On/Off components, use 1 for on and 0 for off. | | `DecimalQuantity` | `string` | Optional | Decimal representation of the allocated quantity. Only valid when decimal
allocations are enabled for the component. | | `PreviousQuantity` | `double?` | Optional | The quantity that was in effect before this allocation. Responses always
include this value; it may be supplied on preview requests to ensure the
expected change is evaluated. | | `DecimalPreviousQuantity` | `string` | Optional | Decimal representation of `previous_quantity`. Only valid when decimal
allocations are enabled for the component. | @@ -25,16 +25,19 @@ | `BillingSchedule` | [`BillingSchedule`](../../doc/models/billing-schedule.md) | Optional | Billing schedule settings for component allocations or usages on multi-frequency subscriptions. Use this to start a component's billing period on a custom date instead of aligning with the product charge schedule. | | `CustomPrice` | [`ComponentCustomPrice`](../../doc/models/component-custom-price.md) | Optional | Create or update custom pricing unique to the subscription. Used in place of `price_point_id`. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +CreateAllocation createAllocation = new CreateAllocation { - "quantity": 8.06, - "decimal_quantity": "decimal_quantity4", - "previous_quantity": 218.92, - "decimal_previous_quantity": "decimal_previous_quantity0", - "component_id": 192, - "memo": "memo4" -} + Quantity = 6.56, + DecimalQuantity = "decimal_quantity6", + PreviousQuantity = 35.58, + DecimalPreviousQuantity = "decimal_previous_quantity0", + ComponentId = 42, + Memo = "memo4", +}; ``` diff --git a/doc/models/create-component-price-point-request.md b/doc/models/create-component-price-point-request.md index 1b5a026c..04088586 100644 --- a/doc/models/create-component-price-point-request.md +++ b/doc/models/create-component-price-point-request.md @@ -11,26 +11,36 @@ | --- | --- | --- | --- | | `PricePoint` | [`CreateComponentPricePointRequestPricePoint`](../../doc/models/containers/create-component-price-point-request-price-point.md) | Required | This is a container for any-of cases. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using AdvancedBilling.Standard.Models.Containers; +using System.Collections.Generic; + +CreateComponentPricePointRequest createComponentPricePointRequest = new CreateComponentPricePointRequest { - "price_point": { - "name": "name0", - "pricing_scheme": "per_unit", - "prices": [ - { - "starting_quantity": 242, - "ending_quantity": 40, - "unit_price": 23.26 - } - ], - "use_site_exchange_rate": true, - "handle": "handle6", - "tax_included": false, - "interval": 24, - "interval_unit": "day" - } -} + PricePoint = CreateComponentPricePointRequestPricePoint.FromCreateComponentPricePoint( + new CreateComponentPricePoint + { + Name = "name0", + PricingScheme = PricingScheme.PerUnit, + Prices = new List + { + new Price + { + StartingQuantity = PriceStartingQuantity.FromNumber(242), + UnitPrice = PriceUnitPrice.FromPrecision(23.26), + EndingQuantity = PriceEndingQuantity.FromNumber(40), + }, + }, + Handle = "handle6", + UseSiteExchangeRate = true, + TaxIncluded = false, + Interval = 24, + IntervalUnit = IntervalUnit.Day, + } + ), +}; ``` diff --git a/doc/models/create-component-price-point.md b/doc/models/create-component-price-point.md index da73cc7b..b8ff6c13 100644 --- a/doc/models/create-component-price-point.md +++ b/doc/models/create-component-price-point.md @@ -15,27 +15,34 @@ | `Prices` | [`List`](../../doc/models/price.md) | Required | - | | `UseSiteExchangeRate` | `bool?` | Optional | Whether to use the site level exchange rate or define your own prices for each currency if you have multiple currencies defined on the site. Setting not supported when creating price points in bulk.

**Default**: `true` | | `TaxIncluded` | `bool?` | Optional | Whether or not the price point includes tax. Setting not supported when creating price points in bulk. | -| `Interval` | `int?` | Optional | The numerical interval. i.e. an interval of ‘30’ coupled with an interval_unit of day would mean this price point would renew every 30 days. This property is only available for sites with Multifrequency enabled. | +| `Interval` | `int?` | Optional | The numerical interval. e.g., an interval of ‘30’ coupled with an interval_unit of day would mean this price point would renew every 30 days. This property is only available for sites with Multifrequency enabled. | | `IntervalUnit` | [`IntervalUnit?`](../../doc/models/interval-unit.md) | Optional | A string representing the interval unit for this price point, either month or day. This property is only available for sites with Multifrequency enabled. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using AdvancedBilling.Standard.Models.Containers; +using System.Collections.Generic; + +CreateComponentPricePoint createComponentPricePoint = new CreateComponentPricePoint { - "name": "name0", - "pricing_scheme": "per_unit", - "prices": [ + Name = "name4", + PricingScheme = PricingScheme.PerUnit, + Prices = new List { - "starting_quantity": 242, - "ending_quantity": 40, - "unit_price": 23.26 - } - ], - "use_site_exchange_rate": true, - "handle": "handle6", - "tax_included": false, - "interval": 24, - "interval_unit": "day" -} + new Price + { + StartingQuantity = PriceStartingQuantity.FromNumber(242), + UnitPrice = PriceUnitPrice.FromPrecision(23.26), + EndingQuantity = PriceEndingQuantity.FromNumber(40), + }, + }, + Handle = "handle0", + UseSiteExchangeRate = true, + TaxIncluded = false, + Interval = 140, + IntervalUnit = IntervalUnit.Day, +}; ``` diff --git a/doc/models/create-component-price-points-request.md b/doc/models/create-component-price-points-request.md index cbb222b6..87aca38b 100644 --- a/doc/models/create-component-price-points-request.md +++ b/doc/models/create-component-price-points-request.md @@ -11,64 +11,51 @@ | --- | --- | --- | --- | | `PricePoints` | [`List`](../../doc/models/containers/create-component-price-points-request-price-points.md) | Required | This is List of a container for any-of cases. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using AdvancedBilling.Standard.Models.Containers; +using System.Collections.Generic; + +CreateComponentPricePointsRequest createComponentPricePointsRequest = new CreateComponentPricePointsRequest { - "price_points": [ + PricePoints = new List { - "name": "name0", - "handle": "handle6", - "pricing_scheme": "per_unit", - "prices": [ - { - "starting_quantity": 242, - "ending_quantity": 40, - "unit_price": 23.26 - }, - { - "starting_quantity": 242, - "ending_quantity": 40, - "unit_price": 23.26 - }, - { - "starting_quantity": 242, - "ending_quantity": 40, - "unit_price": 23.26 - } - ], - "use_site_exchange_rate": false, - "tax_included": false, - "interval": 24, - "interval_unit": "day" + CreateComponentPricePointsRequestPricePoints.FromCreateComponentPricePoint( + new CreateComponentPricePoint + { + Name = "name0", + PricingScheme = PricingScheme.PerUnit, + Prices = new List + { + new Price + { + StartingQuantity = PriceStartingQuantity.FromNumber(242), + UnitPrice = PriceUnitPrice.FromPrecision(23.26), + EndingQuantity = PriceEndingQuantity.FromNumber(40), + }, + new Price + { + StartingQuantity = PriceStartingQuantity.FromNumber(242), + UnitPrice = PriceUnitPrice.FromPrecision(23.26), + EndingQuantity = PriceEndingQuantity.FromNumber(40), + }, + new Price + { + StartingQuantity = PriceStartingQuantity.FromNumber(242), + UnitPrice = PriceUnitPrice.FromPrecision(23.26), + EndingQuantity = PriceEndingQuantity.FromNumber(40), + }, + }, + Handle = "handle6", + UseSiteExchangeRate = false, + TaxIncluded = false, + Interval = 24, + IntervalUnit = IntervalUnit.Day, + } + ), }, - { - "name": "name0", - "handle": "handle6", - "pricing_scheme": "per_unit", - "prices": [ - { - "starting_quantity": 242, - "ending_quantity": 40, - "unit_price": 23.26 - }, - { - "starting_quantity": 242, - "ending_quantity": 40, - "unit_price": 23.26 - }, - { - "starting_quantity": 242, - "ending_quantity": 40, - "unit_price": 23.26 - } - ], - "use_site_exchange_rate": false, - "tax_included": false, - "interval": 24, - "interval_unit": "day" - } - ] -} +}; ``` diff --git a/doc/models/create-credit-note-event.md b/doc/models/create-credit-note-event.md index 91ad4723..f96d070a 100644 --- a/doc/models/create-credit-note-event.md +++ b/doc/models/create-credit-note-event.md @@ -15,31 +15,39 @@ | `EventType` | [`InvoiceEventType`](../../doc/models/invoice-event-type.md) | Required | **Default**: `InvoiceEventType.create_credit_note` | | `EventData` | [`CreditNote`](../../doc/models/credit-note.md) | Required | Example schema for an `create_credit_note` event | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Globalization; + +CreateCreditNoteEvent createCreditNoteEvent = new CreateCreditNoteEvent { - "id": 28, - "timestamp": "2016-03-13T12:52:32.123Z", - "invoice": { - "issue_date": "2024-01-01", - "due_date": "2024-01-01", - "paid_date": "2024-01-01", - "public_url_expires_on": "2024-01-21", - "id": 166, - "uid": "uid6", - "site_id": 92, - "customer_id": 204, - "subscription_id": 20 - }, - "event_type": "create_credit_note", - "event_data": { - "uid": "uid6", - "site_id": 132, - "customer_id": 244, - "subscription_id": 60, - "number": "number6" - } -} + Id = 82L, + Timestamp = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + Invoice = new Invoice + { + Id = 166L, + Uid = "uid6", + SiteId = 92, + CustomerId = 204, + SubscriptionId = 20, + IssueDate = DateTime.Parse("2024-01-01"), + DueDate = DateTime.Parse("2024-01-01"), + PaidDate = DateTime.Parse("2024-01-01"), + PublicUrlExpiresOn = DateTime.Parse("2024-01-21"), + }, + EventType = InvoiceEventType.CreateCreditNote, + EventData = new CreditNote + { + Uid = "uid6", + SiteId = 132, + CustomerId = 244, + SubscriptionId = 60, + Number = "number6", + }, +}; ``` diff --git a/doc/models/create-currency-price.md b/doc/models/create-currency-price.md index a5e703f6..6ab7f224 100644 --- a/doc/models/create-currency-price.md +++ b/doc/models/create-currency-price.md @@ -13,13 +13,16 @@ | `Price` | `double?` | Optional | Price for the price level in this currency | | `PriceId` | `int?` | Optional | ID of the price that this corresponds with | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +CreateCurrencyPrice createCurrencyPrice = new CreateCurrencyPrice { - "currency": "currency2", - "price": 10.4, - "price_id": 54 -} + Currency = "currency2", + Price = 54.8, + PriceId = 142, +}; ``` diff --git a/doc/models/create-currency-prices-request.md b/doc/models/create-currency-prices-request.md index 6cce6019..7df0b321 100644 --- a/doc/models/create-currency-prices-request.md +++ b/doc/models/create-currency-prices-request.md @@ -11,17 +11,23 @@ | --- | --- | --- | --- | | `CurrencyPrices` | [`List`](../../doc/models/create-currency-price.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Collections.Generic; + +CreateCurrencyPricesRequest createCurrencyPricesRequest = new CreateCurrencyPricesRequest { - "currency_prices": [ + CurrencyPrices = new List { - "currency": "currency8", - "price": 233.74, - "price_id": 116 - } - ] -} + new CreateCurrencyPrice + { + Currency = "currency8", + Price = 233.74, + PriceId = 116, + }, + }, +}; ``` diff --git a/doc/models/create-customer-request.md b/doc/models/create-customer-request.md index 3d7dce2e..6c358257 100644 --- a/doc/models/create-customer-request.md +++ b/doc/models/create-customer-request.md @@ -11,20 +11,24 @@ | --- | --- | --- | --- | | `Customer` | [`CreateCustomer`](../../doc/models/create-customer.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +CreateCustomerRequest createCustomerRequest = new CreateCustomerRequest { - "customer": { - "first_name": "first_name0", - "last_name": "last_name8", - "email": "email6", - "cc_emails": "cc_emails0", - "organization": "organization6", - "reference": "reference4", - "address": "address6", - "address_2": "address_24" - } -} + Customer = new CreateCustomer + { + FirstName = "first_name0", + LastName = "last_name8", + Email = "email6", + CcEmails = "cc_emails0", + Organization = "organization6", + Reference = "reference4", + Address = "address6", + Address2 = "address_24", + }, +}; ``` diff --git a/doc/models/create-customer.md b/doc/models/create-customer.md index 60ee122e..65955606 100644 --- a/doc/models/create-customer.md +++ b/doc/models/create-customer.md @@ -25,22 +25,27 @@ | `Locale` | `string` | Optional | Set a specific language on a customer record. | | `VatNumber` | `string` | Optional | - | | `TaxExempt` | `bool?` | Optional | - | +| `Surcharging` | `bool?` | Optional | Whether surcharging is enabled for the customer. Defaults to `true` when omitted. Only applied on sites where surcharging control is enabled. | | `TaxExemptReason` | `string` | Optional | - | | `ParentId` | `int?` | Optional | The parent ID in Chargify if applicable. Parent is another Customer object. | | `SalesforceId` | `string` | Optional | The Salesforce ID of the customer | +| `BrandingThemeId` | `int?` | Optional | The ID of the Branding Theme assigned to this customer as the customer's default Branding Theme. This customer-level Branding Theme is used when a subscription does not have its own subscription-level Branding Theme. Available only when Branding Themes are enabled for the site. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +CreateCustomer createCustomer = new CreateCustomer { - "first_name": "first_name8", - "last_name": "last_name6", - "email": "email8", - "cc_emails": "cc_emails8", - "organization": "organization2", - "reference": "reference4", - "address": "address4", - "address_2": "address_22" -} + FirstName = "first_name0", + LastName = "last_name8", + Email = "email6", + CcEmails = "cc_emails0", + Organization = "organization6", + Reference = "reference4", + Address = "address6", + Address2 = "address_24", +}; ``` diff --git a/doc/models/create-debit-note-event.md b/doc/models/create-debit-note-event.md index 19b75a49..70e96388 100644 --- a/doc/models/create-debit-note-event.md +++ b/doc/models/create-debit-note-event.md @@ -15,31 +15,39 @@ | `EventType` | [`InvoiceEventType`](../../doc/models/invoice-event-type.md) | Required | **Default**: `InvoiceEventType.create_debit_note` | | `EventData` | [`DebitNote`](../../doc/models/debit-note.md) | Required | Example schema for an `create_debit_note` event | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Globalization; + +CreateDebitNoteEvent createDebitNoteEvent = new CreateDebitNoteEvent { - "id": 98, - "timestamp": "2016-03-13T12:52:32.123Z", - "invoice": { - "issue_date": "2024-01-01", - "due_date": "2024-01-01", - "paid_date": "2024-01-01", - "public_url_expires_on": "2024-01-21", - "id": 166, - "uid": "uid6", - "site_id": 92, - "customer_id": 204, - "subscription_id": 20 - }, - "event_type": "create_debit_note", - "event_data": { - "uid": "uid6", - "site_id": 132, - "customer_id": 244, - "subscription_id": 60, - "number": 64 - } -} + Id = 176L, + Timestamp = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + Invoice = new Invoice + { + Id = 166L, + Uid = "uid6", + SiteId = 92, + CustomerId = 204, + SubscriptionId = 20, + IssueDate = DateTime.Parse("2024-01-01"), + DueDate = DateTime.Parse("2024-01-01"), + PaidDate = DateTime.Parse("2024-01-01"), + PublicUrlExpiresOn = DateTime.Parse("2024-01-21"), + }, + EventType = InvoiceEventType.CreateDebitNote, + EventData = new DebitNote + { + Uid = "uid6", + SiteId = 132, + CustomerId = 244, + SubscriptionId = 60, + Number = 64, + }, +}; ``` diff --git a/doc/models/create-ebb-component.md b/doc/models/create-ebb-component.md index 35b334c7..82be6340 100644 --- a/doc/models/create-ebb-component.md +++ b/doc/models/create-ebb-component.md @@ -11,35 +11,45 @@ | --- | --- | --- | --- | | `EventBasedComponent` | [`EBBComponent`](../../doc/models/ebb-component.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using AdvancedBilling.Standard.Models.Containers; +using System.Collections.Generic; + +CreateEBBComponent createEBBComponent = new CreateEBBComponent { - "event_based_component": { - "name": "name8", - "unit_name": "unit_name0", - "description": "description8", - "handle": "handle4", - "taxable": false, - "pricing_scheme": "stairstep", - "prices": [ - { - "starting_quantity": 242, - "ending_quantity": 40, - "unit_price": 23.26 - } - ], - "price_points": [ - { - "name": "name2", - "handle": "handle8", - "pricing_scheme": "per_unit", - "interval": 92, - "interval_unit": "day" - } - ], - "event_based_billing_metric_id": 68 - } -} + EventBasedComponent = new EBBComponent + { + Name = "name8", + UnitName = "unit_name0", + PricingScheme = PricingScheme.Stairstep, + EventBasedBillingMetricId = 68, + Description = "description8", + Handle = "handle4", + Taxable = false, + Prices = new List + { + new Price + { + StartingQuantity = PriceStartingQuantity.FromNumber(242), + UnitPrice = PriceUnitPrice.FromPrecision(23.26), + EndingQuantity = PriceEndingQuantity.FromNumber(40), + }, + }, + PricePoints = new List + { + new ComponentPricePointItem + { + Name = "name2", + Handle = "handle8", + PricingScheme = PricingScheme.PerUnit, + Interval = 92, + IntervalUnit = IntervalUnit.Day, + }, + }, + }, +}; ``` diff --git a/doc/models/create-invoice-address.md b/doc/models/create-invoice-address.md index 420aa30b..530b8535 100644 --- a/doc/models/create-invoice-address.md +++ b/doc/models/create-invoice-address.md @@ -21,15 +21,18 @@ Overrides the default address. | `Zip` | `string` | Optional | - | | `Country` | `string` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +CreateInvoiceAddress createInvoiceAddress = new CreateInvoiceAddress { - "first_name": "first_name4", - "last_name": "last_name2", - "phone": "phone6", - "address": "address0", - "address_2": "address_28" -} + FirstName = "first_name6", + LastName = "last_name4", + Phone = "phone4", + Address = "address2", + Address2 = "address_20", +}; ``` diff --git a/doc/models/create-invoice-coupon.md b/doc/models/create-invoice-coupon.md index 1b94012d..b708b267 100644 --- a/doc/models/create-invoice-coupon.md +++ b/doc/models/create-invoice-coupon.md @@ -17,15 +17,19 @@ | `ProductFamilyId` | [`CreateInvoiceCouponProductFamilyId`](../../doc/models/containers/create-invoice-coupon-product-family-id.md) | Optional | This is a container for one-of cases. | | `CompoundingStrategy` | [`CompoundingStrategy?`](../../doc/models/compounding-strategy.md) | Optional | Applicable only to stackable coupons. For `compound`, Percentage-based discounts will be calculated against the remaining price, after prior discounts have been calculated. For `full-price`, Percentage-based discounts will always be calculated against the original item price, before other discounts are applied. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using AdvancedBilling.Standard.Models.Containers; + +CreateInvoiceCoupon createInvoiceCoupon = new CreateInvoiceCoupon { - "percentage": 50.0, - "code": "code4", - "subcode": "subcode8", - "amount": "String9", - "description": "description4" -} + Code = "code8", + Subcode = "subcode4", + Percentage = CreateInvoiceCouponPercentage.FromPrecision(50), + Amount = CreateInvoiceCouponAmount.FromString("String9"), + Description = "description0", +}; ``` diff --git a/doc/models/create-invoice-item.md b/doc/models/create-invoice-item.md index 7d424a25..6f4c7427 100644 --- a/doc/models/create-invoice-item.md +++ b/doc/models/create-invoice-item.md @@ -22,15 +22,19 @@ | `ProductPricePointId` | [`CreateInvoiceItemProductPricePointId`](../../doc/models/containers/create-invoice-item-product-price-point-id.md) | Optional | This is a container for one-of cases. | | `Description` | `string` | Optional | **Constraints**: *Maximum Length*: `255` | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using AdvancedBilling.Standard.Models.Containers; + +CreateInvoiceItem createInvoiceItem = new CreateInvoiceItem { - "title": "title2", - "quantity": 154.86, - "unit_price": 138.08, - "taxable": false, - "tax_code": "tax_code4" -} + Title = "title8", + Quantity = CreateInvoiceItemQuantity.FromPrecision(107.22), + UnitPrice = CreateInvoiceItemUnitPrice.FromPrecision(90.44), + Taxable = false, + TaxCode = "tax_code0", +}; ``` diff --git a/doc/models/create-invoice-payment-application.md b/doc/models/create-invoice-payment-application.md index 1b970f24..1035593d 100644 --- a/doc/models/create-invoice-payment-application.md +++ b/doc/models/create-invoice-payment-application.md @@ -12,12 +12,15 @@ | `InvoiceUid` | `string` | Required | Unique identifier for the invoice. It has the prefix "inv_" followed by alphanumeric characters. | | `Amount` | `string` | Required | Dollar amount of the invoice payment (eg. "10.50" => $10.50). | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +CreateInvoicePaymentApplication createInvoicePaymentApplication = new CreateInvoicePaymentApplication { - "invoice_uid": "invoice_uid4", - "amount": "amount6" -} + InvoiceUid = "invoice_uid6", + Amount = "amount8", +}; ``` diff --git a/doc/models/create-invoice-payment-request.md b/doc/models/create-invoice-payment-request.md index 1daad8b5..3cd180ae 100644 --- a/doc/models/create-invoice-payment-request.md +++ b/doc/models/create-invoice-payment-request.md @@ -12,18 +12,23 @@ | `Payment` | [`CreateInvoicePayment`](../../doc/models/create-invoice-payment.md) | Required | - | | `Type` | [`InvoicePaymentType?`](../../doc/models/invoice-payment-type.md) | Optional | The type of payment to be applied to an Invoice. Defaults to external. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using AdvancedBilling.Standard.Models.Containers; + +CreateInvoicePaymentRequest createInvoicePaymentRequest = new CreateInvoicePaymentRequest { - "payment": { - "amount": "String9", - "memo": "memo0", - "method": "ach", - "details": "details6", - "payment_profile_id": 42 - }, - "type": "external" -} + Payment = new CreateInvoicePayment + { + Amount = CreateInvoicePaymentAmount.FromString("String9"), + Memo = "memo0", + Method = InvoicePaymentMethodType.Ach, + Details = "details6", + PaymentProfileId = 42, + }, + Type = InvoicePaymentType.External, +}; ``` diff --git a/doc/models/create-invoice-payment.md b/doc/models/create-invoice-payment.md index 37bc3181..d565a734 100644 --- a/doc/models/create-invoice-payment.md +++ b/doc/models/create-invoice-payment.md @@ -16,15 +16,19 @@ | `PaymentProfileId` | `int?` | Optional | The ID of the payment profile to be used for the payment. | | `ReceivedOn` | `DateTime?` | Optional | Date reflecting when the payment was received from a customer. Must be in the past. Applicable only to
`external` payments. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using AdvancedBilling.Standard.Models.Containers; + +CreateInvoicePayment createInvoicePayment = new CreateInvoicePayment { - "amount": "String9", - "memo": "memo0", - "method": "cash", - "details": "details6", - "payment_profile_id": 122 -} + Amount = CreateInvoicePaymentAmount.FromString("String7"), + Memo = "memo8", + Method = InvoicePaymentMethodType.Ach, + Details = "details4", + PaymentProfileId = 30, +}; ``` diff --git a/doc/models/create-invoice-request.md b/doc/models/create-invoice-request.md index c59610e7..8afe5131 100644 --- a/doc/models/create-invoice-request.md +++ b/doc/models/create-invoice-request.md @@ -11,40 +11,50 @@ | --- | --- | --- | --- | | `Invoice` | [`CreateInvoice`](../../doc/models/create-invoice.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using AdvancedBilling.Standard.Models.Containers; +using System.Collections.Generic; + +CreateInvoiceRequest createInvoiceRequest = new CreateInvoiceRequest { - "invoice": { - "issue_date": "2024-01-01", - "status": "draft", - "line_items": [ - { - "title": "title4", - "quantity": 56.68, - "unit_price": 39.9, - "taxable": false, - "tax_code": "tax_code6" - }, - { - "title": "title4", - "quantity": 56.68, - "unit_price": 39.9, - "taxable": false, - "tax_code": "tax_code6" - }, - { - "title": "title4", - "quantity": 56.68, - "unit_price": 39.9, - "taxable": false, - "tax_code": "tax_code6" - } - ], - "net_terms": 144, - "payment_instructions": "payment_instructions6", - "memo": "memo0" - } -} + Invoice = new CreateInvoice + { + LineItems = new List + { + new CreateInvoiceItem + { + Title = "title4", + Quantity = CreateInvoiceItemQuantity.FromPrecision(56.68), + UnitPrice = CreateInvoiceItemUnitPrice.FromPrecision(39.9), + Taxable = false, + TaxCode = "tax_code6", + }, + new CreateInvoiceItem + { + Title = "title4", + Quantity = CreateInvoiceItemQuantity.FromPrecision(56.68), + UnitPrice = CreateInvoiceItemUnitPrice.FromPrecision(39.9), + Taxable = false, + TaxCode = "tax_code6", + }, + new CreateInvoiceItem + { + Title = "title4", + Quantity = CreateInvoiceItemQuantity.FromPrecision(56.68), + UnitPrice = CreateInvoiceItemUnitPrice.FromPrecision(39.9), + Taxable = false, + TaxCode = "tax_code6", + }, + }, + IssueDate = DateTime.Parse("2024-01-01"), + NetTerms = 144, + PaymentInstructions = "payment_instructions6", + Memo = "memo0", + Status = CreateInvoiceStatus.Draft, + }, +}; ``` diff --git a/doc/models/create-invoice-status.md b/doc/models/create-invoice-status.md index 6afef48f..c62bf306 100644 --- a/doc/models/create-invoice-status.md +++ b/doc/models/create-invoice-status.md @@ -14,7 +14,9 @@ ## Example -``` -draft +```csharp +using AdvancedBilling.Standard.Models; + +CreateInvoiceStatus createInvoiceStatus = CreateInvoiceStatus.Draft; ``` diff --git a/doc/models/create-invoice.md b/doc/models/create-invoice.md index ae1947f4..504cb204 100644 --- a/doc/models/create-invoice.md +++ b/doc/models/create-invoice.md @@ -14,30 +14,45 @@ | `NetTerms` | `int?` | Optional | 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. | | `PaymentInstructions` | `string` | Optional | - | | `Memo` | `string` | Optional | A custom memo can be sent to override the site's default. | -| `SellerAddress` | [`CreateInvoiceAddress`](../../doc/models/create-invoice-address.md) | Optional | Overrides the defaults for the site | -| `BillingAddress` | [`CreateInvoiceAddress`](../../doc/models/create-invoice-address.md) | Optional | Overrides the default for the customer | -| `ShippingAddress` | [`CreateInvoiceAddress`](../../doc/models/create-invoice-address.md) | Optional | Overrides the default for the customer | +| `SellerAddress` | [`CreateInvoiceAddress`](../../doc/models/create-invoice-address.md) | Optional | Overrides the defaults for the site. | +| `BillingAddress` | [`CreateInvoiceAddress`](../../doc/models/create-invoice-address.md) | Optional | Overrides the default for the customer. | +| `ShippingAddress` | [`CreateInvoiceAddress`](../../doc/models/create-invoice-address.md) | Optional | Overrides the default for the customer. | | `Coupons` | [`List`](../../doc/models/create-invoice-coupon.md) | Optional | - | | `Status` | [`CreateInvoiceStatus?`](../../doc/models/create-invoice-status.md) | Optional | **Default**: `CreateInvoiceStatus.open` | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using AdvancedBilling.Standard.Models.Containers; +using System.Collections.Generic; + +CreateInvoice createInvoice = new CreateInvoice { - "issue_date": "2024-01-01", - "status": "draft", - "line_items": [ + LineItems = new List { - "title": "title4", - "quantity": 56.68, - "unit_price": 39.9, - "taxable": false, - "tax_code": "tax_code6" - } - ], - "net_terms": 18, - "payment_instructions": "payment_instructions0", - "memo": "memo6" -} + new CreateInvoiceItem + { + Title = "title4", + Quantity = CreateInvoiceItemQuantity.FromPrecision(56.68), + UnitPrice = CreateInvoiceItemUnitPrice.FromPrecision(39.9), + Taxable = false, + TaxCode = "tax_code6", + }, + new CreateInvoiceItem + { + Title = "title4", + Quantity = CreateInvoiceItemQuantity.FromPrecision(56.68), + UnitPrice = CreateInvoiceItemUnitPrice.FromPrecision(39.9), + Taxable = false, + TaxCode = "tax_code6", + }, + }, + IssueDate = DateTime.Parse("2024-01-01"), + NetTerms = 202, + PaymentInstructions = "payment_instructions2", + Memo = "memo8", + Status = CreateInvoiceStatus.Draft, +}; ``` diff --git a/doc/models/create-metadata-request.md b/doc/models/create-metadata-request.md index 5a0acd56..eb108b1d 100644 --- a/doc/models/create-metadata-request.md +++ b/doc/models/create-metadata-request.md @@ -11,16 +11,22 @@ | --- | --- | --- | --- | | `Metadata` | [`List`](../../doc/models/create-metadata.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Collections.Generic; + +CreateMetadataRequest createMetadataRequest = new CreateMetadataRequest { - "metadata": [ + Metadata = new List { - "name": "name6", - "value": "value8" - } - ] -} + new CreateMetadata + { + Name = "name6", + MValue = "value8", + }, + }, +}; ``` diff --git a/doc/models/create-metadata.md b/doc/models/create-metadata.md index a718384c..fba4ac1f 100644 --- a/doc/models/create-metadata.md +++ b/doc/models/create-metadata.md @@ -12,12 +12,15 @@ | `Name` | `string` | Optional | - | | `MValue` | `string` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +CreateMetadata createMetadata = new CreateMetadata { - "name": "name4", - "value": "value6" -} + Name = "name0", + MValue = "value2", +}; ``` diff --git a/doc/models/create-metafield.md b/doc/models/create-metafield.md index 876bd68a..d1dbc65c 100644 --- a/doc/models/create-metafield.md +++ b/doc/models/create-metafield.md @@ -11,26 +11,32 @@ | --- | --- | --- | --- | | `Name` | `string` | Optional | - | | `Scope` | [`MetafieldScope`](../../doc/models/metafield-scope.md) | Optional | Warning: When updating a metafield's scope attribute, all scope attributes must be passed. Partially complete scope attributes will override the existing settings. | -| `InputType` | [`MetafieldInput?`](../../doc/models/metafield-input.md) | Optional | Indicates the type of metafield. A text metafield allows any string value. Dropdown and radio metafields have a set of values that can be selected. Defaults to 'text'. | +| `InputType` | [`MetafieldInput?`](../../doc/models/metafield-input.md) | Optional | Indicates the type of metafield. A text metafield allows any string value. Dropdown and radio metafields have a set of values that can be selected. Defaults to 'text'. | | `Enum` | `List` | Optional | Only applicable when input_type is radio or dropdown. Empty strings will not be submitted. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Collections.Generic; + +CreateMetafield createMetafield = new CreateMetafield { - "name": "my_field", - "scope": { - "csv": "0", - "invoices": "0", - "statements": "0", - "portal": "0", - "public_show": "0", - "public_edit": "0" - }, - "input_type": "text", - "enum": [ - "string" - ] -} + Name = "my_field", + Scope = new MetafieldScope + { + Csv = IncludeOption.Exclude, + Invoices = IncludeOption.Exclude, + Statements = IncludeOption.Exclude, + Portal = IncludeOption.Exclude, + PublicShow = IncludeOption.Exclude, + PublicEdit = IncludeOption.Exclude, + }, + InputType = MetafieldInput.Text, + MEnum = new List + { + "string", + }, +}; ``` diff --git a/doc/models/create-metafields-request.md b/doc/models/create-metafields-request.md index e2e816e3..5e050f53 100644 --- a/doc/models/create-metafields-request.md +++ b/doc/models/create-metafields-request.md @@ -11,25 +11,35 @@ | --- | --- | --- | --- | | `Metafields` | [`CreateMetafieldsRequestMetafields`](../../doc/models/containers/create-metafields-request-metafields.md) | Required | This is a container for one-of cases. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using AdvancedBilling.Standard.Models.Containers; +using System.Collections.Generic; + +CreateMetafieldsRequest createMetafieldsRequest = new CreateMetafieldsRequest { - "metafields": { - "name": "my_field", - "scope": { - "csv": "0", - "invoices": "0", - "statements": "0", - "portal": "0", - "public_show": "0", - "public_edit": "0" - }, - "input_type": "text", - "enum": [ - "string" - ] - } -} + Metafields = CreateMetafieldsRequestMetafields.FromCreateMetafield( + new CreateMetafield + { + Name = "my_field", + Scope = new MetafieldScope + { + Csv = IncludeOption.Exclude, + Invoices = IncludeOption.Exclude, + Statements = IncludeOption.Exclude, + Portal = IncludeOption.Exclude, + PublicShow = IncludeOption.Exclude, + PublicEdit = IncludeOption.Exclude, + }, + InputType = MetafieldInput.Text, + MEnum = new List + { + "string", + }, + } + ), +}; ``` diff --git a/doc/models/create-metered-component.md b/doc/models/create-metered-component.md index 7573cef3..f903348b 100644 --- a/doc/models/create-metered-component.md +++ b/doc/models/create-metered-component.md @@ -11,58 +11,72 @@ | --- | --- | --- | --- | | `MeteredComponent` | [`MeteredComponent`](../../doc/models/metered-component.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using AdvancedBilling.Standard.Models.Containers; +using System.Collections.Generic; + +CreateMeteredComponent createMeteredComponent = new CreateMeteredComponent { - "metered_component": { - "name": "name0", - "unit_name": "unit_name2", - "description": "description0", - "handle": "handle6", - "taxable": false, - "pricing_scheme": "stairstep", - "prices": [ - { - "starting_quantity": 242, - "ending_quantity": 40, - "unit_price": 23.26 - }, - { - "starting_quantity": 242, - "ending_quantity": 40, - "unit_price": 23.26 - }, - { - "starting_quantity": 242, - "ending_quantity": 40, - "unit_price": 23.26 - } - ], - "price_points": [ - { - "name": "name2", - "handle": "handle8", - "pricing_scheme": "per_unit", - "interval": 92, - "interval_unit": "day" - }, - { - "name": "name2", - "handle": "handle8", - "pricing_scheme": "per_unit", - "interval": 92, - "interval_unit": "day" - }, - { - "name": "name2", - "handle": "handle8", - "pricing_scheme": "per_unit", - "interval": 92, - "interval_unit": "day" - } - ] - } -} + MeteredComponent = new MeteredComponent + { + Name = "name0", + UnitName = "unit_name2", + PricingScheme = PricingScheme.Stairstep, + Description = "description0", + Handle = "handle6", + Taxable = false, + Prices = new List + { + new Price + { + StartingQuantity = PriceStartingQuantity.FromNumber(242), + UnitPrice = PriceUnitPrice.FromPrecision(23.26), + EndingQuantity = PriceEndingQuantity.FromNumber(40), + }, + new Price + { + StartingQuantity = PriceStartingQuantity.FromNumber(242), + UnitPrice = PriceUnitPrice.FromPrecision(23.26), + EndingQuantity = PriceEndingQuantity.FromNumber(40), + }, + new Price + { + StartingQuantity = PriceStartingQuantity.FromNumber(242), + UnitPrice = PriceUnitPrice.FromPrecision(23.26), + EndingQuantity = PriceEndingQuantity.FromNumber(40), + }, + }, + PricePoints = new List + { + new ComponentPricePointItem + { + Name = "name2", + Handle = "handle8", + PricingScheme = PricingScheme.PerUnit, + Interval = 92, + IntervalUnit = IntervalUnit.Day, + }, + new ComponentPricePointItem + { + Name = "name2", + Handle = "handle8", + PricingScheme = PricingScheme.PerUnit, + Interval = 92, + IntervalUnit = IntervalUnit.Day, + }, + new ComponentPricePointItem + { + Name = "name2", + Handle = "handle8", + PricingScheme = PricingScheme.PerUnit, + Interval = 92, + IntervalUnit = IntervalUnit.Day, + }, + }, + }, +}; ``` diff --git a/doc/models/create-multi-invoice-payment-request.md b/doc/models/create-multi-invoice-payment-request.md index 94153ecb..ada2dbd3 100644 --- a/doc/models/create-multi-invoice-payment-request.md +++ b/doc/models/create-multi-invoice-payment-request.md @@ -11,23 +11,31 @@ | --- | --- | --- | --- | | `Payment` | [`CreateMultiInvoicePayment`](../../doc/models/create-multi-invoice-payment.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using AdvancedBilling.Standard.Models.Containers; +using System.Collections.Generic; + +CreateMultiInvoicePaymentRequest createMultiInvoicePaymentRequest = new CreateMultiInvoicePaymentRequest { - "payment": { - "amount": "String9", - "applications": [ - { - "invoice_uid": "invoice_uid8", - "amount": "amount0" - } - ], - "memo": "memo0", - "details": "details6", - "method": "ach", - "received_on": "received_on8" - } -} + Payment = new CreateMultiInvoicePayment + { + Amount = CreateMultiInvoicePaymentAmount.FromString("String9"), + Applications = new List + { + new CreateInvoicePaymentApplication + { + InvoiceUid = "invoice_uid8", + Amount = "amount0", + }, + }, + Memo = "memo0", + Details = "details6", + Method = InvoicePaymentMethodType.Ach, + ReceivedOn = "received_on8", + }, +}; ``` diff --git a/doc/models/create-multi-invoice-payment.md b/doc/models/create-multi-invoice-payment.md index 0ec21644..d9797f51 100644 --- a/doc/models/create-multi-invoice-payment.md +++ b/doc/models/create-multi-invoice-payment.md @@ -16,21 +16,28 @@ | `ReceivedOn` | `string` | Optional | Date reflecting when the payment was received from a customer. Must be in the past. | | `Applications` | [`List`](../../doc/models/create-invoice-payment-application.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using AdvancedBilling.Standard.Models.Containers; +using System.Collections.Generic; + +CreateMultiInvoicePayment createMultiInvoicePayment = new CreateMultiInvoicePayment { - "amount": "String7", - "applications": [ + Amount = CreateMultiInvoicePaymentAmount.FromString("String9"), + Applications = new List { - "invoice_uid": "invoice_uid8", - "amount": "amount0" - } - ], - "memo": "memo8", - "details": "details4", - "method": "credit_card", - "received_on": "received_on6" -} + new CreateInvoicePaymentApplication + { + InvoiceUid = "invoice_uid8", + Amount = "amount0", + }, + }, + Memo = "memo0", + Details = "details6", + Method = InvoicePaymentMethodType.Ach, + ReceivedOn = "received_on8", +}; ``` diff --git a/doc/models/create-offer-component.md b/doc/models/create-offer-component.md index 6a02a8ea..d73c69c4 100644 --- a/doc/models/create-offer-component.md +++ b/doc/models/create-offer-component.md @@ -13,13 +13,16 @@ | `PricePointId` | `int?` | Optional | - | | `StartingQuantity` | `int?` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +CreateOfferComponent createOfferComponent = new CreateOfferComponent { - "component_id": 242, - "price_point_id": 10, - "starting_quantity": 50 -} + ComponentId = 252, + PricePointId = 20, + StartingQuantity = 196, +}; ``` diff --git a/doc/models/create-offer-request.md b/doc/models/create-offer-request.md index f9358e25..9def6b48 100644 --- a/doc/models/create-offer-request.md +++ b/doc/models/create-offer-request.md @@ -11,32 +11,41 @@ | --- | --- | --- | --- | | `Offer` | [`CreateOffer`](../../doc/models/create-offer.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Collections.Generic; + +CreateOfferRequest createOfferRequest = new CreateOfferRequest { - "offer": { - "name": "name4", - "handle": "handle0", - "description": "description6", - "product_id": 30, - "product_price_point_id": 150, - "components": [ - { - "component_id": 108, - "price_point_id": 124, - "starting_quantity": 84 - }, - { - "component_id": 108, - "price_point_id": 124, - "starting_quantity": 84 - } - ], - "coupons": [ - "coupons6" - ] - } -} + Offer = new CreateOffer + { + Name = "name4", + Handle = "handle0", + ProductId = 30, + Description = "description6", + ProductPricePointId = 150, + Components = new List + { + new CreateOfferComponent + { + ComponentId = 108, + PricePointId = 124, + StartingQuantity = 84, + }, + new CreateOfferComponent + { + ComponentId = 108, + PricePointId = 124, + StartingQuantity = 84, + }, + }, + Coupons = new List + { + "coupons6", + }, + }, +}; ``` diff --git a/doc/models/create-offer.md b/doc/models/create-offer.md index 871c6947..aae74e99 100644 --- a/doc/models/create-offer.md +++ b/doc/models/create-offer.md @@ -17,30 +17,46 @@ | `Components` | [`List`](../../doc/models/create-offer-component.md) | Optional | - | | `Coupons` | `List` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Collections.Generic; + +CreateOffer createOffer = new CreateOffer { - "name": "name4", - "handle": "handle0", - "description": "description4", - "product_id": 208, - "product_price_point_id": 132, - "components": [ + Name = "name6", + Handle = "handle2", + ProductId = 66, + Description = "description6", + ProductPricePointId = 246, + Components = new List { - "component_id": 108, - "price_point_id": 124, - "starting_quantity": 84 + new CreateOfferComponent + { + ComponentId = 108, + PricePointId = 124, + StartingQuantity = 84, + }, + new CreateOfferComponent + { + ComponentId = 108, + PricePointId = 124, + StartingQuantity = 84, + }, + new CreateOfferComponent + { + ComponentId = 108, + PricePointId = 124, + StartingQuantity = 84, + }, }, + Coupons = new List { - "component_id": 108, - "price_point_id": 124, - "starting_quantity": 84 - } - ], - "coupons": [ - "coupons4" - ] -} + "coupons6", + "coupons5", + "coupons4", + }, +}; ``` diff --git a/doc/models/create-on-off-component.md b/doc/models/create-on-off-component.md index 82fd9d99..459f184b 100644 --- a/doc/models/create-on-off-component.md +++ b/doc/models/create-on-off-component.md @@ -11,19 +11,24 @@ | --- | --- | --- | --- | | `OnOffComponent` | [`OnOffComponent`](../../doc/models/on-off-component.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using AdvancedBilling.Standard.Models.Containers; + +CreateOnOffComponent createOnOffComponent = new CreateOnOffComponent { - "on_off_component": { - "name": "name6", - "description": "description6", - "handle": "handle2", - "taxable": false, - "upgrade_charge": "full", - "downgrade_credit": "full", - "unit_price": "String5" - } -} + OnOffComponent = new OnOffComponent + { + Name = "name6", + UnitPrice = OnOffComponentUnitPrice.FromString("String5"), + Description = "description6", + Handle = "handle2", + Taxable = false, + UpgradeCharge = CreditType.Full, + DowngradeCredit = CreditType.Full, + }, +}; ``` diff --git a/doc/models/create-or-update-endpoint-request.md b/doc/models/create-or-update-endpoint-request.md index 98747d16..53115209 100644 --- a/doc/models/create-or-update-endpoint-request.md +++ b/doc/models/create-or-update-endpoint-request.md @@ -1,7 +1,7 @@ # Create or Update Endpoint Request -Used to Create or Update Endpoint +Used to Create or Update Endpoint. ## Structure @@ -11,18 +11,24 @@ Used to Create or Update Endpoint | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `Endpoint` | [`CreateOrUpdateEndpoint`](../../doc/models/create-or-update-endpoint.md) | Required | Used to Create or Update Endpoint | +| `Endpoint` | [`CreateOrUpdateEndpoint`](../../doc/models/create-or-update-endpoint.md) | Required | Used to Create or Update Endpoint. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Collections.Generic; + +CreateOrUpdateEndpointRequest createOrUpdateEndpointRequest = new CreateOrUpdateEndpointRequest { - "endpoint": { - "url": "url2", - "webhook_subscriptions": [ - "subscription_prepayment_account_balance_changed" - ] - } -} + Endpoint = new CreateOrUpdateEndpoint + { + Url = "url2", + WebhookSubscriptions = new List + { + WebhookSubscription.StatementClosed, + }, + }, +}; ``` diff --git a/doc/models/create-or-update-endpoint.md b/doc/models/create-or-update-endpoint.md index 33f78397..6c81e4aa 100644 --- a/doc/models/create-or-update-endpoint.md +++ b/doc/models/create-or-update-endpoint.md @@ -1,7 +1,7 @@ # Create or Update Endpoint -Used to Create or Update Endpoint +Used to Create or Update Endpoint. ## Structure @@ -14,14 +14,21 @@ Used to Create or Update Endpoint | `Url` | `string` | Required | - | | `WebhookSubscriptions` | [`List`](../../doc/models/webhook-subscription.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Collections.Generic; + +CreateOrUpdateEndpoint createOrUpdateEndpoint = new CreateOrUpdateEndpoint { - "url": "url8", - "webhook_subscriptions": [ - "refund_success" - ] -} + Url = "url4", + WebhookSubscriptions = new List + { + WebhookSubscription.TrialEndNotice, + WebhookSubscription.SubscriptionStateChange, + WebhookSubscription.SubscriptionProductChangeScheduled, + }, +}; ``` diff --git a/doc/models/create-or-update-product-request.md b/doc/models/create-or-update-product-request.md index c0610b5f..49762160 100644 --- a/doc/models/create-or-update-product-request.md +++ b/doc/models/create-or-update-product-request.md @@ -11,22 +11,26 @@ | --- | --- | --- | --- | | `Product` | [`CreateOrUpdateProduct`](../../doc/models/create-or-update-product.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +CreateOrUpdateProductRequest createOrUpdateProductRequest = new CreateOrUpdateProductRequest { - "product": { - "name": "name0", - "handle": "handle6", - "description": "description0", - "accounting_code": "accounting_code6", - "require_credit_card": false, - "price_in_cents": 54, - "interval": 186, - "interval_unit": "day", - "trial_price_in_cents": 34, - "trial_interval": 88 - } -} + Product = new CreateOrUpdateProduct + { + Name = "name0", + Description = "description0", + PriceInCents = 54L, + Interval = 186, + IntervalUnit = IntervalUnit.Day, + Handle = "handle6", + AccountingCode = "accounting_code6", + RequireCreditCard = false, + TrialPriceInCents = 34L, + TrialInterval = 88, + }, +}; ``` diff --git a/doc/models/create-or-update-product.md b/doc/models/create-or-update-product.md index dc771e43..5baeb8a7 100644 --- a/doc/models/create-or-update-product.md +++ b/doc/models/create-or-update-product.md @@ -15,31 +15,35 @@ | `AccountingCode` | `string` | Optional | E.g. Internal ID or SKU Number | | `RequireCreditCard` | `bool?` | Optional | Deprecated value that can be ignored unless you have legacy hosted pages. For Public Signup Page users, read this attribute from under the signup page. | | `PriceInCents` | `long` | Required | The product price, in integer cents | -| `Interval` | `int` | Required | The numerical interval. i.e. an interval of ‘30’ coupled with an interval_unit of day would mean this product would renew every 30 days | +| `Interval` | `int` | Required | The numerical interval. e.g., an interval of ‘30’ coupled with an interval_unit of day would mean this product would renew every 30 days. | | `IntervalUnit` | [`IntervalUnit`](../../doc/models/interval-unit.md) | Required | A string representing the interval unit for this product, either month or day | | `TrialPriceInCents` | `long?` | Optional | The product trial price, in integer cents | -| `TrialInterval` | `int?` | Optional | The numerical trial interval. i.e. an interval of ‘30’ coupled with a trial_interval_unit of day would mean this product trial would last 30 days. | +| `TrialInterval` | `int?` | Optional | The numerical trial interval. e.g., an interval of ‘30’ coupled with a trial_interval_unit of day would mean this product trial would last 30 days. | | `TrialIntervalUnit` | [`IntervalUnit?`](../../doc/models/interval-unit.md) | Optional | A string representing the trial interval unit for this product, either month or day | -| `TrialType` | [`TrialType?`](../../doc/models/trial-type.md) | Optional | Indicates how a trial is handled when the trail period ends and there is no credit card on file. For `no_obligation`, the subscription transitions to a Trial Ended state. Maxio will not send any emails or statements. For `payment_expected`, the subscription transitions to a Past Due state. Maxio will send normal dunning emails and statements according to your other settings. | -| `ExpirationInterval` | `int?` | Optional | The numerical expiration interval. i.e. an expiration_interval of ‘30’ coupled with an expiration_interval_unit of day would mean this product would expire after 30 days. | +| `TrialType` | [`TrialType?`](../../doc/models/trial-type.md) | Optional | Indicates how a trial is handled when the trial period ends and there is no credit card on file. For `no_obligation`, the subscription transitions to a Trial Ended state. Maxio will not send any emails or statements. For `payment_expected`, the subscription transitions to a Past Due state. Maxio will send normal dunning emails and statements according to your other settings. | +| `ExpirationInterval` | `int?` | Optional | The numerical expiration interval. e.g., an expiration_interval of ‘30’ coupled with an expiration_interval_unit of day would mean this product would expire after 30 days. | | `ExpirationIntervalUnit` | [`ExpirationIntervalUnit?`](../../doc/models/expiration-interval-unit.md) | Optional | A string representing the expiration interval unit for this product, either month, day or never | | `AutoCreateSignupPage` | `bool?` | Optional | - | | `TaxCode` | `string` | Optional | A string representing the tax code related to the product type. This is especially important when using AvaTax to tax based on locale. This attribute has a max length of 25 characters. | +| `UnspscCode` | `string` | Optional | (Optional) Custom UNSPSC commodity code for Level 3/CEDP payment data. When set, this value is sent as the commodity code on invoice line items for this product instead of the default derived from item_category. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +CreateOrUpdateProduct createOrUpdateProduct = new CreateOrUpdateProduct { - "name": "name8", - "handle": "handle4", - "description": "description8", - "accounting_code": "accounting_code4", - "require_credit_card": false, - "price_in_cents": 190, - "interval": 174, - "interval_unit": "day", - "trial_price_in_cents": 22, - "trial_interval": 76 -} + Name = "name6", + Description = "description4", + PriceInCents = 138L, + Interval = 154, + IntervalUnit = IntervalUnit.Day, + Handle = "handle2", + AccountingCode = "accounting_code2", + RequireCreditCard = false, + TrialPriceInCents = 50L, + TrialInterval = 252, +}; ``` diff --git a/doc/models/create-or-update-segment-price.md b/doc/models/create-or-update-segment-price.md index 41aef34a..85cd722e 100644 --- a/doc/models/create-or-update-segment-price.md +++ b/doc/models/create-or-update-segment-price.md @@ -13,13 +13,17 @@ | `EndingQuantity` | `int?` | Optional | - | | `UnitPrice` | [`CreateOrUpdateSegmentPriceUnitPrice`](../../doc/models/containers/create-or-update-segment-price-unit-price.md) | Required | This is a container for one-of cases. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using AdvancedBilling.Standard.Models.Containers; + +CreateOrUpdateSegmentPrice createOrUpdateSegmentPrice = new CreateOrUpdateSegmentPrice { - "starting_quantity": 78, - "ending_quantity": 52, - "unit_price": "String7" -} + UnitPrice = CreateOrUpdateSegmentPriceUnitPrice.FromString("String9"), + StartingQuantity = 98, + EndingQuantity = 184, +}; ``` diff --git a/doc/models/create-payment-profile-request.md b/doc/models/create-payment-profile-request.md index c7df9f26..15839e3a 100644 --- a/doc/models/create-payment-profile-request.md +++ b/doc/models/create-payment-profile-request.md @@ -11,18 +11,22 @@ | --- | --- | --- | --- | | `PaymentProfile` | [`CreatePaymentProfile`](../../doc/models/create-payment-profile.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +CreatePaymentProfileRequest createPaymentProfileRequest = new CreatePaymentProfileRequest { - "payment_profile": { - "chargify_token": "tok_9g6hw85pnpt6knmskpwp4ttt", - "full_number": "5424000000000015", - "id": 44, - "payment_type": "credit_card", - "first_name": "first_name4", - "last_name": "last_name2" - } -} + PaymentProfile = new CreatePaymentProfile + { + ChargifyToken = "tok_9g6hw85pnpt6knmskpwp4ttt", + Id = 44, + PaymentType = PaymentType.CreditCard, + FirstName = "first_name4", + LastName = "last_name2", + FullNumber = "5424000000000015", + }, +}; ``` diff --git a/doc/models/create-payment-profile.md b/doc/models/create-payment-profile.md index c3e16e2e..cf19997a 100644 --- a/doc/models/create-payment-profile.md +++ b/doc/models/create-payment-profile.md @@ -19,12 +19,12 @@ | `CardType` | [`CardType?`](../../doc/models/card-type.md) | Optional | The type of card used. | | `ExpirationMonth` | [`CreatePaymentProfileExpirationMonth`](../../doc/models/containers/create-payment-profile-expiration-month.md) | Optional | This is a container for one-of cases. | | `ExpirationYear` | [`CreatePaymentProfileExpirationYear`](../../doc/models/containers/create-payment-profile-expiration-year.md) | Optional | This is a container for one-of cases. | -| `BillingAddress` | `string` | Optional | The credit card or bank account billing street address (i.e. 123 Main St.). This value is merely passed through to the payment gateway. | -| `BillingAddress2` | `string` | Optional | Second line of the customer’s billing address i.e. Apt. 100 | -| `BillingCity` | `string` | Optional | The credit card or bank account billing address city (i.e. “Boston”). This value is merely passed through to the payment gateway. | -| `BillingState` | `string` | Optional | The credit card or bank account billing address state (i.e. MA). This value is merely passed through to the payment gateway. This must conform to the [ISO_3166-1](https://en.wikipedia.org/wiki/ISO_3166-1#Current_codes) in order to be valid for tax locale purposes. | -| `BillingCountry` | `string` | Optional | The credit card or bank account billing address country, required in [ISO_3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format (i.e. “US”). This value is merely passed through to the payment gateway. Some gateways require country codes in a specific format. Check your gateway’s documentation. If creating an ACH subscription, only US is supported at this time. | -| `BillingZip` | `string` | Optional | The credit card or bank account billing address zip code (i.e. 12345). This value is merely passed through to the payment gateway. | +| `BillingAddress` | `string` | Optional | The credit card or bank account billing street address (e.g., 123 Main St.). This value is merely passed through to the payment gateway. | +| `BillingAddress2` | `string` | Optional | Second line of the customer’s billing address e.g., Apt. 100 | +| `BillingCity` | `string` | Optional | The credit card or bank account billing address city (e.g., “Boston”). This value is merely passed through to the payment gateway. | +| `BillingState` | `string` | Optional | The credit card or bank account billing address state (e.g., MA). This value is merely passed through to the payment gateway. This must conform to the [ISO_3166-1](https://en.wikipedia.org/wiki/ISO_3166-1#Current_codes) in order to be valid for tax locale purposes. | +| `BillingCountry` | `string` | Optional | “The credit card or bank account billing address country, required in [ISO_3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format (e.g., “US”). This value is merely passed through to the payment gateway. Some gateways require country codes in a specific format. Check your gateway’s documentation. If creating an ACH subscription, only US is supported at this time.” | +| `BillingZip` | `string` | Optional | The credit card or bank account billing address zip code (e.g., 12345). This value is merely passed through to the payment gateway. | | `CurrentVault` | [`AllVaults?`](../../doc/models/all-vaults.md) | Optional | The vault that stores the payment profile with the provided `vault_token`. Use `bogus` for testing. | | `VaultToken` | `string` | Optional | The “token” provided by your vault storage for an already stored payment profile | | `CustomerVaultToken` | `string` | Optional | (only for Authorize.Net CIM storage or Square) The customerProfileId for the owner of the customerPaymentProfileId provided as the vault_token | @@ -34,24 +34,27 @@ | `GatewayHandle` | `string` | Optional | This attribute is only available if MultiGateway feature is enabled for your Site. This feature is in the Private Beta currently. gateway_handle is used to directly select a gateway where a payment profile will be stored in. Every connected gateway must have a unique gateway handle specified. Read [Multigateway description](https://chargify.zendesk.com/hc/en-us/articles/4407761759643#connecting-with-multiple-gateways) to learn more about new concepts that MultiGateway introduces and the default behavior when this attribute is not passed. | | `Cvv` | `string` | Optional | The 3- or 4-digit Card Verification Value. This value is merely passed through to the payment gateway. | | `BankName` | `string` | Optional | (Required when creating with ACH or GoCardless, optional with Stripe Direct Debit). The name of the bank where the customerʼs account resides | -| `BankIban` | `string` | Optional | (Optional when creating with GoCardless, required with Stripe Direct Debit). International Bank Account Number. Alternatively, local bank details can be provided | -| `BankRoutingNumber` | `string` | Optional | (Required when creating with ACH. Optional when creating a subscription with GoCardless). The routing number of the bank. It becomes bank_code while passing via GoCardless API | +| `BankIban` | `string` | Optional | (Optional when creating with GoCardless, required with Stripe Direct Debit). International Bank Account Number. Alternatively, local bank details can be provided. | +| `BankRoutingNumber` | `string` | Optional | (Required when creating with ACH. Optional when creating a subscription with GoCardless). The routing number of the bank. It becomes bank_code while passing via GoCardless API. | | `BankAccountNumber` | `string` | Optional | (Required when creating with ACH, GoCardless, Stripe BECS or BACS Direct Debit, and bank_iban is blank) The customerʼs bank account number | -| `BankBranchCode` | `string` | Optional | (Optional when creating with GoCardless, required with Stripe BECS or BACS Direct Debit) Branch/Sort code. Alternatively, an IBAN can be provided | +| `BankBranchCode` | `string` | Optional | (Optional when creating with GoCardless, required with Stripe BECS or BACS Direct Debit) Branch/Sort code. Alternatively, an IBAN can be provided. | | `BankAccountType` | [`BankAccountType?`](../../doc/models/bank-account-type.md) | Optional | Defaults to checking | | `BankAccountHolderType` | [`BankAccountHolderType?`](../../doc/models/bank-account-holder-type.md) | Optional | Defaults to personal | | `LastFour` | `string` | Optional | (Optional) Used for creating subscription with payment profile imported using vault_token, for proper display in Advanced Billing UI | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +CreatePaymentProfile createPaymentProfile = new CreatePaymentProfile { - "chargify_token": "tok_9g6hw85pnpt6knmskpwp4ttt", - "full_number": "5424000000000015", - "id": 76, - "payment_type": "credit_card", - "first_name": "first_name8", - "last_name": "last_name6" -} + ChargifyToken = "tok_9g6hw85pnpt6knmskpwp4ttt", + Id = 124, + PaymentType = PaymentType.CreditCard, + FirstName = "first_name6", + LastName = "last_name4", + FullNumber = "5424000000000015", +}; ``` diff --git a/doc/models/create-payment.md b/doc/models/create-payment.md index 283cb710..5f3f8c01 100644 --- a/doc/models/create-payment.md +++ b/doc/models/create-payment.md @@ -14,14 +14,17 @@ | `PaymentDetails` | `string` | Required | - | | `PaymentMethod` | [`InvoicePaymentMethodType`](../../doc/models/invoice-payment-method-type.md) | Required | The type of payment method used. Defaults to other. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +CreatePayment createPayment = new CreatePayment { - "amount": "amount6", - "memo": "memo8", - "payment_details": "payment_details4", - "payment_method": "cash" -} + Amount = "amount6", + Memo = "memo8", + PaymentDetails = "payment_details4", + PaymentMethod = InvoicePaymentMethodType.CreditCard, +}; ``` diff --git a/doc/models/create-prepaid-component.md b/doc/models/create-prepaid-component.md index fe840a19..f63d643d 100644 --- a/doc/models/create-prepaid-component.md +++ b/doc/models/create-prepaid-component.md @@ -11,36 +11,47 @@ | --- | --- | --- | --- | | `PrepaidUsageComponent` | [`PrepaidUsageComponent`](../../doc/models/prepaid-usage-component.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using AdvancedBilling.Standard.Models.Containers; +using System.Collections.Generic; + +CreatePrepaidComponent createPrepaidComponent = new CreatePrepaidComponent { - "prepaid_usage_component": { - "name": "name2", - "unit_name": "unit_name4", - "description": "description2", - "handle": "handle8", - "taxable": false, - "pricing_scheme": "per_unit", - "prices": [ - { - "starting_quantity": 242, - "ending_quantity": 40, - "unit_price": 23.26 - } - ], - "upgrade_charge": "full", - "overage_pricing": { - "pricing_scheme": "stairstep", - "prices": [ + PrepaidUsageComponent = new PrepaidUsageComponent + { + Name = "name2", + UnitName = "unit_name4", + PricingScheme = PricingScheme.PerUnit, + OveragePricing = new OveragePricing + { + PricingScheme = PricingScheme.Stairstep, + Prices = new List + { + new Price + { + StartingQuantity = PriceStartingQuantity.FromNumber(242), + UnitPrice = PriceUnitPrice.FromPrecision(23.26), + EndingQuantity = PriceEndingQuantity.FromNumber(40), + }, + }, + }, + Description = "description2", + Handle = "handle8", + Taxable = false, + Prices = new List { - "starting_quantity": 242, - "ending_quantity": 40, - "unit_price": 23.26 - } - ] - } - } -} + new Price + { + StartingQuantity = PriceStartingQuantity.FromNumber(242), + UnitPrice = PriceUnitPrice.FromPrecision(23.26), + EndingQuantity = PriceEndingQuantity.FromNumber(40), + }, + }, + UpgradeCharge = CreditType.Full, + }, +}; ``` diff --git a/doc/models/create-prepaid-usage-component-price-point.md b/doc/models/create-prepaid-usage-component-price-point.md index 61bae9b9..72060e69 100644 --- a/doc/models/create-prepaid-usage-component-price-point.md +++ b/doc/models/create-prepaid-usage-component-price-point.md @@ -15,39 +15,49 @@ | `Prices` | [`List`](../../doc/models/price.md) | Required | - | | `OveragePricing` | [`OveragePricing`](../../doc/models/overage-pricing.md) | Required | - | | `UseSiteExchangeRate` | `bool?` | Optional | Whether to use the site level exchange rate or define your own prices for each currency if you have multiple currencies defined on the site.

**Default**: `true` | -| `RolloverPrepaidRemainder` | `bool?` | Optional | (only for prepaid usage components) Boolean which controls whether or not remaining units should be rolled over to the next period | -| `RenewPrepaidAllocation` | `bool?` | Optional | (only for prepaid usage components) Boolean which controls whether or not the allocated quantity should be renewed at the beginning of each period | -| `ExpirationInterval` | `double?` | Optional | (only for prepaid usage components where rollover_prepaid_remainder is true) The number of `expiration_interval_unit`s after which rollover amounts should expire | -| `ExpirationIntervalUnit` | [`ExpirationIntervalUnit?`](../../doc/models/expiration-interval-unit.md) | Optional | (only for prepaid usage components where rollover_prepaid_remainder is true) A string representing the expiration interval unit for this component, either month or day | +| `RolloverPrepaidRemainder` | `bool?` | Optional | (only for prepaid usage components) Boolean which controls whether or not remaining units should be rolled over to the next period. | +| `RenewPrepaidAllocation` | `bool?` | Optional | (only for prepaid usage components) Boolean which controls whether or not the allocated quantity should be renewed at the beginning of each period. | +| `ExpirationInterval` | `double?` | Optional | (only for prepaid usage components where rollover_prepaid_remainder is true) The number of `expiration_interval_unit`s after which rollover amounts should expire. | +| `ExpirationIntervalUnit` | [`ExpirationIntervalUnit?`](../../doc/models/expiration-interval-unit.md) | Optional | (only for prepaid usage components where rollover_prepaid_remainder is true) A string representing the expiration interval unit for this component, either month or day. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using AdvancedBilling.Standard.Models.Containers; +using System.Collections.Generic; + +CreatePrepaidUsageComponentPricePoint createPrepaidUsageComponentPricePoint = new CreatePrepaidUsageComponentPricePoint { - "name": "name0", - "pricing_scheme": "per_unit", - "prices": [ + Name = "name2", + PricingScheme = PricingScheme.PerUnit, + Prices = new List + { + new Price + { + StartingQuantity = PriceStartingQuantity.FromNumber(242), + UnitPrice = PriceUnitPrice.FromPrecision(23.26), + EndingQuantity = PriceEndingQuantity.FromNumber(40), + }, + }, + OveragePricing = new OveragePricing { - "starting_quantity": 242, - "ending_quantity": 40, - "unit_price": 23.26 - } - ], - "overage_pricing": { - "pricing_scheme": "stairstep", - "prices": [ - { - "starting_quantity": 242, - "ending_quantity": 40, - "unit_price": 23.26 - } - ] - }, - "use_site_exchange_rate": true, - "handle": "handle6", - "rollover_prepaid_remainder": false, - "renew_prepaid_allocation": false, - "expiration_interval": 101.18 -} + PricingScheme = PricingScheme.Stairstep, + Prices = new List + { + new Price + { + StartingQuantity = PriceStartingQuantity.FromNumber(242), + UnitPrice = PriceUnitPrice.FromPrecision(23.26), + EndingQuantity = PriceEndingQuantity.FromNumber(40), + }, + }, + }, + Handle = "handle8", + UseSiteExchangeRate = true, + RolloverPrepaidRemainder = false, + RenewPrepaidAllocation = false, + ExpirationInterval = 165.7, +}; ``` diff --git a/doc/models/create-prepayment-method.md b/doc/models/create-prepayment-method.md index 2f15e906..c94a7051 100644 --- a/doc/models/create-prepayment-method.md +++ b/doc/models/create-prepayment-method.md @@ -1,7 +1,7 @@ # Create Prepayment 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. +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. ## Enumeration @@ -20,3 +20,11 @@ | `CreditCardOnFile` | | `Other` | +## Example + +```csharp +using AdvancedBilling.Standard.Models; + +CreatePrepaymentMethod createPrepaymentMethod = CreatePrepaymentMethod.Check; +``` + diff --git a/doc/models/create-prepayment-request.md b/doc/models/create-prepayment-request.md index d61e3d6b..3221d222 100644 --- a/doc/models/create-prepayment-request.md +++ b/doc/models/create-prepayment-request.md @@ -11,17 +11,21 @@ | --- | --- | --- | --- | | `Prepayment` | [`CreatePrepayment`](../../doc/models/create-prepayment.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +CreatePrepaymentRequest createPrepaymentRequest = new CreatePrepaymentRequest { - "prepayment": { - "amount": 11.6, - "details": "details8", - "memo": "memo2", - "method": "money_order", - "payment_profile_id": 240 - } -} + Prepayment = new CreatePrepayment + { + Amount = 11.6, + Details = "details8", + Memo = "memo2", + Method = CreatePrepaymentMethod.MoneyOrder, + PaymentProfileId = 240, + }, +}; ``` diff --git a/doc/models/create-prepayment-response.md b/doc/models/create-prepayment-response.md index dc35da6e..81e978d7 100644 --- a/doc/models/create-prepayment-response.md +++ b/doc/models/create-prepayment-response.md @@ -11,17 +11,24 @@ | --- | --- | --- | --- | | `Prepayment` | [`CreatedPrepayment`](../../doc/models/created-prepayment.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Globalization; + +CreatePrepaymentResponse createPrepaymentResponse = new CreatePrepaymentResponse { - "prepayment": { - "id": 38, - "subscription_id": 148, - "amount_in_cents": 124, - "memo": "memo2", - "created_at": "2016-03-13T12:52:32.123Z" - } -} + Prepayment = new CreatedPrepayment + { + Id = 38L, + SubscriptionId = 148, + AmountInCents = 124L, + Memo = "memo2", + CreatedAt = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + }, +}; ``` diff --git a/doc/models/create-prepayment.md b/doc/models/create-prepayment.md index d7431caf..6d81cf8f 100644 --- a/doc/models/create-prepayment.md +++ b/doc/models/create-prepayment.md @@ -12,18 +12,21 @@ | `Amount` | `double` | Required | - | | `Details` | `string` | Required | - | | `Memo` | `string` | Required | - | -| `Method` | [`CreatePrepaymentMethod`](../../doc/models/create-prepayment-method.md) | Required | :- 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. | +| `Method` | [`CreatePrepaymentMethod`](../../doc/models/create-prepayment-method.md) | Required | 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. | | `PaymentProfileId` | `int?` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +CreatePrepayment createPrepayment = new CreatePrepayment { - "amount": 23.92, - "details": "details6", - "memo": "memo0", - "method": "credit_card_on_file", - "payment_profile_id": 240 -} + Amount = 73.78, + Details = "details6", + Memo = "memo0", + Method = CreatePrepaymentMethod.PaypalAccount, + PaymentProfileId = 58, +}; ``` diff --git a/doc/models/create-product-currency-price.md b/doc/models/create-product-currency-price.md index ffef8889..19dcf1a1 100644 --- a/doc/models/create-product-currency-price.md +++ b/doc/models/create-product-currency-price.md @@ -13,13 +13,16 @@ | `Price` | `int` | Required | Price for the given role. | | `Role` | [`CurrencyPriceRole`](../../doc/models/currency-price-role.md) | Required | Role for the price. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +CreateProductCurrencyPrice createProductCurrencyPrice = new CreateProductCurrencyPrice { - "currency": "currency0", - "price": 222, - "role": "baseline" -} + Currency = "currency2", + Price = 78, + Role = CurrencyPriceRole.Baseline, +}; ``` diff --git a/doc/models/create-product-currency-prices-request.md b/doc/models/create-product-currency-prices-request.md index f47c3e69..e51d520a 100644 --- a/doc/models/create-product-currency-prices-request.md +++ b/doc/models/create-product-currency-prices-request.md @@ -11,17 +11,23 @@ | --- | --- | --- | --- | | `CurrencyPrices` | [`List`](../../doc/models/create-product-currency-price.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Collections.Generic; + +CreateProductCurrencyPricesRequest createProductCurrencyPricesRequest = new CreateProductCurrencyPricesRequest { - "currency_prices": [ + CurrencyPrices = new List { - "currency": "currency8", - "price": 78, - "role": "initial" - } - ] -} + new CreateProductCurrencyPrice + { + Currency = "currency8", + Price = 78, + Role = CurrencyPriceRole.Initial, + }, + }, +}; ``` diff --git a/doc/models/create-product-family-request.md b/doc/models/create-product-family-request.md index 92b56501..24216f93 100644 --- a/doc/models/create-product-family-request.md +++ b/doc/models/create-product-family-request.md @@ -11,15 +11,20 @@ | --- | --- | --- | --- | | `ProductFamily` | [`CreateProductFamily`](../../doc/models/create-product-family.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +CreateProductFamilyRequest createProductFamilyRequest = new CreateProductFamilyRequest { - "product_family": { - "name": "name0", - "handle": "handle6", - "description": "description0" - } -} + ProductFamily = new CreateProductFamily + { + Name = "name0", + Handle = "handle6", + Description = "description0", + Surcharging = false, + }, +}; ``` diff --git a/doc/models/create-product-family.md b/doc/models/create-product-family.md index 4e5b5ed0..f36778c7 100644 --- a/doc/models/create-product-family.md +++ b/doc/models/create-product-family.md @@ -12,14 +12,19 @@ | `Name` | `string` | Required | - | | `Handle` | `string` | Optional | - | | `Description` | `string` | Optional | - | +| `Surcharging` | `bool?` | Optional | Whether surcharging applies to this product family. Defaults to `true` when omitted. Only applied on sites where surcharging is enabled. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +CreateProductFamily createProductFamily = new CreateProductFamily { - "name": "name6", - "handle": "handle2", - "description": "description6" -} + Name = "name0", + Handle = "handle6", + Description = "description0", + Surcharging = false, +}; ``` diff --git a/doc/models/create-product-price-point-request.md b/doc/models/create-product-price-point-request.md index 73c1fbf1..f64ca9dd 100644 --- a/doc/models/create-product-price-point-request.md +++ b/doc/models/create-product-price-point-request.md @@ -11,22 +11,26 @@ | --- | --- | --- | --- | | `PricePoint` | [`CreateProductPricePoint`](../../doc/models/create-product-price-point.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +CreateProductPricePointRequest createProductPricePointRequest = new CreateProductPricePointRequest { - "price_point": { - "name": "name0", - "price_in_cents": 196, - "interval": 44, - "interval_unit": "day", - "use_site_exchange_rate": true, - "handle": "handle6", - "trial_price_in_cents": 108, - "trial_interval": 202, - "trial_interval_unit": "day", - "trial_type": "no_obligation" - } -} + PricePoint = new CreateProductPricePoint + { + Name = "name0", + PriceInCents = 196L, + Interval = 44, + IntervalUnit = IntervalUnit.Day, + Handle = "handle6", + TrialPriceInCents = 108L, + TrialInterval = 202, + TrialIntervalUnit = IntervalUnit.Day, + TrialType = TrialType.NoObligation, + UseSiteExchangeRate = true, + }, +}; ``` diff --git a/doc/models/create-product-price-point.md b/doc/models/create-product-price-point.md index 6a70ffe4..b65222ef 100644 --- a/doc/models/create-product-price-point.md +++ b/doc/models/create-product-price-point.md @@ -12,32 +12,35 @@ | `Name` | `string` | Required | The product price point name | | `Handle` | `string` | Optional | The product price point API handle | | `PriceInCents` | `long` | Required | The product price point price, in integer cents | -| `Interval` | `int` | Required | The numerical interval. i.e. an interval of ‘30’ coupled with an interval_unit of day would mean this product price point would renew every 30 days | +| `Interval` | `int` | Required | The numerical interval. e.g., an interval of ‘30’ coupled with an interval_unit of day would mean this product price point would renew every 30 days. | | `IntervalUnit` | [`IntervalUnit`](../../doc/models/interval-unit.md) | Required | A string representing the interval unit for this product price point, either month or day | | `TrialPriceInCents` | `long?` | Optional | The product price point trial price, in integer cents | -| `TrialInterval` | `int?` | Optional | The numerical trial interval. i.e. an interval of ‘30’ coupled with a trial_interval_unit of day would mean this product price point trial would last 30 days. | +| `TrialInterval` | `int?` | Optional | The numerical trial interval. e.g., an interval of ‘30’ coupled with a trial_interval_unit of day would mean this product price point trial would last 30 days. | | `TrialIntervalUnit` | [`IntervalUnit?`](../../doc/models/interval-unit.md) | Optional | A string representing the trial interval unit for this product price point, either month or day | -| `TrialType` | [`TrialType?`](../../doc/models/trial-type.md) | Optional | Indicates how a trial is handled when the trail period ends and there is no credit card on file. For `no_obligation`, the subscription transitions to a Trial Ended state. Maxio will not send any emails or statements. For `payment_expected`, the subscription transitions to a Past Due state. Maxio will send normal dunning emails and statements according to your other settings. | +| `TrialType` | [`TrialType?`](../../doc/models/trial-type.md) | Optional | Indicates how a trial is handled when the trial period ends and there is no credit card on file. For `no_obligation`, the subscription transitions to a Trial Ended state. Maxio will not send any emails or statements. For `payment_expected`, the subscription transitions to a Past Due state. Maxio will send normal dunning emails and statements according to your other settings. | | `InitialChargeInCents` | `long?` | Optional | The product price point initial charge, in integer cents | | `InitialChargeAfterTrial` | `bool?` | Optional | - | -| `ExpirationInterval` | `int?` | Optional | The numerical expiration interval. i.e. an expiration_interval of ‘30’ coupled with an expiration_interval_unit of day would mean this product price point would expire after 30 days. | +| `ExpirationInterval` | `int?` | Optional | The numerical expiration interval. e.g., an expiration_interval of ‘30’ coupled with an expiration_interval_unit of day would mean this product price point would expire after 30 days. | | `ExpirationIntervalUnit` | [`ExpirationIntervalUnit?`](../../doc/models/expiration-interval-unit.md) | Optional | A string representing the expiration interval unit for this product price point, either month, day or never | | `UseSiteExchangeRate` | `bool?` | Optional | Whether or not to use the site's exchange rate or define your own pricing when your site has multiple currencies defined.

**Default**: `true` | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +CreateProductPricePoint createProductPricePoint = new CreateProductPricePoint { - "name": "name6", - "price_in_cents": 216, - "interval": 200, - "interval_unit": "day", - "use_site_exchange_rate": true, - "handle": "handle2", - "trial_price_in_cents": 48, - "trial_interval": 102, - "trial_interval_unit": "day", - "trial_type": "no_obligation" -} + Name = "name6", + PriceInCents = 180L, + Interval = 60, + IntervalUnit = IntervalUnit.Day, + Handle = "handle2", + TrialPriceInCents = 92L, + TrialInterval = 218, + TrialIntervalUnit = IntervalUnit.Day, + TrialType = TrialType.NoObligation, + UseSiteExchangeRate = true, +}; ``` diff --git a/doc/models/create-quantity-based-component.md b/doc/models/create-quantity-based-component.md index b8ea3c6e..6b988574 100644 --- a/doc/models/create-quantity-based-component.md +++ b/doc/models/create-quantity-based-component.md @@ -11,31 +11,40 @@ | --- | --- | --- | --- | | `QuantityBasedComponent` | [`QuantityBasedComponent`](../../doc/models/quantity-based-component.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using AdvancedBilling.Standard.Models.Containers; +using System.Collections.Generic; + +CreateQuantityBasedComponent createQuantityBasedComponent = new CreateQuantityBasedComponent { - "quantity_based_component": { - "name": "name0", - "unit_name": "unit_name2", - "description": "description0", - "handle": "handle6", - "taxable": false, - "pricing_scheme": "stairstep", - "prices": [ - { - "starting_quantity": 242, - "ending_quantity": 40, - "unit_price": 23.26 - }, - { - "starting_quantity": 242, - "ending_quantity": 40, - "unit_price": 23.26 - } - ], - "upgrade_charge": "prorated" - } -} + QuantityBasedComponent = new QuantityBasedComponent + { + Name = "name0", + UnitName = "unit_name2", + PricingScheme = PricingScheme.Stairstep, + Description = "description0", + Handle = "handle6", + Taxable = false, + Prices = new List + { + new Price + { + StartingQuantity = PriceStartingQuantity.FromNumber(242), + UnitPrice = PriceUnitPrice.FromPrecision(23.26), + EndingQuantity = PriceEndingQuantity.FromNumber(40), + }, + new Price + { + StartingQuantity = PriceStartingQuantity.FromNumber(242), + UnitPrice = PriceUnitPrice.FromPrecision(23.26), + EndingQuantity = PriceEndingQuantity.FromNumber(40), + }, + }, + UpgradeCharge = CreditType.Prorated, + }, +}; ``` diff --git a/doc/models/create-reason-code-request.md b/doc/models/create-reason-code-request.md index 369ec6eb..4fe2786c 100644 --- a/doc/models/create-reason-code-request.md +++ b/doc/models/create-reason-code-request.md @@ -11,15 +11,19 @@ | --- | --- | --- | --- | | `ReasonCode` | [`CreateReasonCode`](../../doc/models/create-reason-code.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +CreateReasonCodeRequest createReasonCodeRequest = new CreateReasonCodeRequest { - "reason_code": { - "code": "code4", - "description": "description6", - "position": 14 - } -} + ReasonCode = new CreateReasonCode + { + Code = "code4", + Description = "description6", + Position = 14, + }, +}; ``` diff --git a/doc/models/create-reason-code.md b/doc/models/create-reason-code.md index b3e6f4c4..7d70f481 100644 --- a/doc/models/create-reason-code.md +++ b/doc/models/create-reason-code.md @@ -13,13 +13,16 @@ | `Description` | `string` | Required | The friendly summary of what the code signifies | | `Position` | `int?` | Optional | The order that code appears in lists | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +CreateReasonCode createReasonCode = new CreateReasonCode { - "code": "code4", - "description": "description6", - "position": 86 -} + Code = "code4", + Description = "description6", + Position = 40, +}; ``` diff --git a/doc/models/create-segment-request.md b/doc/models/create-segment-request.md index 89e694ca..c44667e3 100644 --- a/doc/models/create-segment-request.md +++ b/doc/models/create-segment-request.md @@ -11,34 +11,44 @@ | --- | --- | --- | --- | | `Segment` | [`CreateSegment`](../../doc/models/create-segment.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using AdvancedBilling.Standard.Models.Containers; +using System.Collections.Generic; + +CreateSegmentRequest createSegmentRequest = new CreateSegmentRequest { - "segment": { - "segment_property_1_value": "String1", - "segment_property_2_value": "String3", - "segment_property_3_value": "String1", - "segment_property_4_value": "String5", - "pricing_scheme": "stairstep", - "prices": [ - { - "starting_quantity": 64, - "ending_quantity": 38, - "unit_price": "String3" - }, - { - "starting_quantity": 64, - "ending_quantity": 38, - "unit_price": "String3" - }, - { - "starting_quantity": 64, - "ending_quantity": 38, - "unit_price": "String3" - } - ] - } -} + Segment = new CreateSegment + { + PricingScheme = PricingScheme.Stairstep, + SegmentProperty1Value = CreateSegmentSegmentProperty1Value.FromString("String1"), + SegmentProperty2Value = CreateSegmentSegmentProperty2Value.FromString("String3"), + SegmentProperty3Value = CreateSegmentSegmentProperty3Value.FromString("String1"), + SegmentProperty4Value = CreateSegmentSegmentProperty4Value.FromString("String5"), + Prices = new List + { + new CreateOrUpdateSegmentPrice + { + UnitPrice = CreateOrUpdateSegmentPriceUnitPrice.FromString("String3"), + StartingQuantity = 64, + EndingQuantity = 38, + }, + new CreateOrUpdateSegmentPrice + { + UnitPrice = CreateOrUpdateSegmentPriceUnitPrice.FromString("String3"), + StartingQuantity = 64, + EndingQuantity = 38, + }, + new CreateOrUpdateSegmentPrice + { + UnitPrice = CreateOrUpdateSegmentPriceUnitPrice.FromString("String3"), + StartingQuantity = 64, + EndingQuantity = 38, + }, + }, + }, +}; ``` diff --git a/doc/models/create-segment.md b/doc/models/create-segment.md index 231763f1..64cbfdda 100644 --- a/doc/models/create-segment.md +++ b/doc/models/create-segment.md @@ -16,32 +16,35 @@ | `PricingScheme` | [`PricingScheme`](../../doc/models/pricing-scheme.md) | Required | The identifier for the pricing scheme. See [Product Components](https://help.chargify.com/products/product-components.html) for an overview of pricing schemes. | | `Prices` | [`List`](../../doc/models/create-or-update-segment-price.md) | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using AdvancedBilling.Standard.Models.Containers; +using System.Collections.Generic; + +CreateSegment createSegment = new CreateSegment { - "segment_property_1_value": "String9", - "segment_property_2_value": "String1", - "segment_property_3_value": "String3", - "segment_property_4_value": "String3", - "pricing_scheme": "per_unit", - "prices": [ - { - "starting_quantity": 64, - "ending_quantity": 38, - "unit_price": "String3" - }, + PricingScheme = PricingScheme.Stairstep, + SegmentProperty1Value = CreateSegmentSegmentProperty1Value.FromString("String7"), + SegmentProperty2Value = CreateSegmentSegmentProperty2Value.FromString("String9"), + SegmentProperty3Value = CreateSegmentSegmentProperty3Value.FromString("String5"), + SegmentProperty4Value = CreateSegmentSegmentProperty4Value.FromString("String1"), + Prices = new List { - "starting_quantity": 64, - "ending_quantity": 38, - "unit_price": "String3" + new CreateOrUpdateSegmentPrice + { + UnitPrice = CreateOrUpdateSegmentPriceUnitPrice.FromString("String3"), + StartingQuantity = 64, + EndingQuantity = 38, + }, + new CreateOrUpdateSegmentPrice + { + UnitPrice = CreateOrUpdateSegmentPriceUnitPrice.FromString("String3"), + StartingQuantity = 64, + EndingQuantity = 38, + }, }, - { - "starting_quantity": 64, - "ending_quantity": 38, - "unit_price": "String3" - } - ] -} +}; ``` diff --git a/doc/models/create-signup-proforma-preview-include.md b/doc/models/create-signup-proforma-preview-include.md index 5330e39c..21de1915 100644 --- a/doc/models/create-signup-proforma-preview-include.md +++ b/doc/models/create-signup-proforma-preview-include.md @@ -13,7 +13,9 @@ ## Example -``` -next_proforma_invoice +```csharp +using AdvancedBilling.Standard.Models; + +CreateSignupProformaPreviewInclude createSignupProformaPreviewInclude = CreateSignupProformaPreviewInclude.NextProformaInvoice; ``` diff --git a/doc/models/create-subscription-component.md b/doc/models/create-subscription-component.md index 37198519..a8e5eae2 100644 --- a/doc/models/create-subscription-component.md +++ b/doc/models/create-subscription-component.md @@ -11,21 +11,25 @@ | --- | --- | --- | --- | | `ComponentId` | [`CreateSubscriptionComponentComponentId`](../../doc/models/containers/create-subscription-component-component-id.md) | Optional | This is a container for one-of cases. | | `Enabled` | `bool?` | Optional | Used for on/off components only. | -| `UnitBalance` | `int?` | Optional | Used for metered and events based components. | +| `UnitBalance` | [`CreateSubscriptionComponentUnitBalance`](../../doc/models/containers/create-subscription-component-unit-balance.md) | Optional | This is a container for one-of cases. | | `AllocatedQuantity` | [`CreateSubscriptionComponentAllocatedQuantity`](../../doc/models/containers/create-subscription-component-allocated-quantity.md) | Optional | This is a container for one-of cases. | | `Quantity` | `int?` | Optional | Deprecated. Use `allocated_quantity` instead. | | `PricePointId` | [`CreateSubscriptionComponentPricePointId`](../../doc/models/containers/create-subscription-component-price-point-id.md) | Optional | This is a container for one-of cases. | | `CustomPrice` | [`ComponentCustomPrice`](../../doc/models/component-custom-price.md) | Optional | Create or update custom pricing unique to the subscription. Used in place of `price_point_id`. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using AdvancedBilling.Standard.Models.Containers; + +CreateSubscriptionComponent createSubscriptionComponent = new CreateSubscriptionComponent { - "component_id": 8, - "enabled": false, - "unit_balance": 144, - "allocated_quantity": 102, - "quantity": 188 -} + ComponentId = CreateSubscriptionComponentComponentId.FromNumber(210), + Enabled = false, + UnitBalance = CreateSubscriptionComponentUnitBalance.FromNumber(12), + AllocatedQuantity = CreateSubscriptionComponentAllocatedQuantity.FromNumber(48), + Quantity = 134, +}; ``` diff --git a/doc/models/create-subscription-group-request.md b/doc/models/create-subscription-group-request.md index b6e8ecc9..f389566d 100644 --- a/doc/models/create-subscription-group-request.md +++ b/doc/models/create-subscription-group-request.md @@ -11,17 +11,23 @@ | --- | --- | --- | --- | | `SubscriptionGroup` | [`CreateSubscriptionGroup`](../../doc/models/create-subscription-group.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Collections.Generic; + +CreateSubscriptionGroupRequest createSubscriptionGroupRequest = new CreateSubscriptionGroupRequest { - "subscription_group": { - "subscription_id": 36, - "member_ids": [ - 164, - 165 - ] - } -} + SubscriptionGroup = new CreateSubscriptionGroup + { + SubscriptionId = 36, + MemberIds = new List + { + 164, + 165, + }, + }, +}; ``` diff --git a/doc/models/create-subscription-group.md b/doc/models/create-subscription-group.md index f0d39e53..bfd2c47c 100644 --- a/doc/models/create-subscription-group.md +++ b/doc/models/create-subscription-group.md @@ -12,14 +12,19 @@ | `SubscriptionId` | `int` | Required | - | | `MemberIds` | `List` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Collections.Generic; + +CreateSubscriptionGroup createSubscriptionGroup = new CreateSubscriptionGroup { - "subscription_id": 38, - "member_ids": [ - 162 - ] -} + SubscriptionId = 204, + MemberIds = new List + { + 48, + }, +}; ``` diff --git a/doc/models/create-subscription-request.md b/doc/models/create-subscription-request.md index 9acc90ee..94ba3d2d 100644 --- a/doc/models/create-subscription-request.md +++ b/doc/models/create-subscription-request.md @@ -11,33 +11,41 @@ | --- | --- | --- | --- | | `Subscription` | [`CreateSubscription`](../../doc/models/create-subscription.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using AdvancedBilling.Standard.Models.Containers; +using System.Collections.Generic; + +CreateSubscriptionRequest createSubscriptionRequest = new CreateSubscriptionRequest { - "subscription": { - "defer_signup": false, - "metafields": { - "custom_field_name_1": "custom_field_value_1", - "custom_field_name_2": "custom_field_value_2" + Subscription = new CreateSubscription + { + ProductHandle = "product_handle6", + ProductId = 206, + ProductPricePointHandle = "product_price_point_handle2", + ProductPricePointId = 130, + CustomPrice = new SubscriptionCustomPrice + { + PriceInCents = SubscriptionCustomPricePriceInCents.FromString("String3"), + Interval = SubscriptionCustomPriceInterval.FromString("String3"), + IntervalUnit = IntervalUnit.Day, + Name = "name4", + Handle = "handle0", + TrialPriceInCents = SubscriptionCustomPriceTrialPriceInCents.FromString("String3"), + TrialInterval = SubscriptionCustomPriceTrialInterval.FromString("String5"), + TrialIntervalUnit = IntervalUnit.Day, + }, + DeferSignup = false, + Metafields = new Dictionary + { + ["custom_field_name_1"] = "custom_field_value_1", + ["custom_field_name_2"] = "custom_field_value_2", + }, + DunningCommunicationDelayEnabled = false, + DunningCommunicationDelayTimeZone = "\"Eastern Time (US & Canada)\"", }, - "dunning_communication_delay_enabled": false, - "dunning_communication_delay_time_zone": "\"Eastern Time (US & Canada)\"", - "product_handle": "product_handle6", - "product_id": 206, - "product_price_point_handle": "product_price_point_handle2", - "product_price_point_id": 130, - "custom_price": { - "name": "name4", - "handle": "handle0", - "price_in_cents": "String3", - "interval": "String3", - "interval_unit": "day", - "trial_price_in_cents": "String3", - "trial_interval": "String5", - "trial_interval_unit": "day" - } - } -} +}; ``` diff --git a/doc/models/create-subscription.md b/doc/models/create-subscription.md index 5f3f7afc..526615c3 100644 --- a/doc/models/create-subscription.md +++ b/doc/models/create-subscription.md @@ -20,19 +20,20 @@ | `ReceivesInvoiceEmails` | `string` | Optional | (Optional) Default: True - Whether or not this subscription is set to receive emails related to this subscription. | | `NetTerms` | `string` | Optional | (Optional) Default: null The number of days after renewal (on invoice billing) that a subscription is due. A value between 0 (due immediately) and 180. | | `CustomerId` | `int?` | Optional | The ID of an existing customer within Chargify. Required, unless a `customer_reference` or a set of `customer_attributes` is given. | +| `BrandingThemeId` | `int?` | Optional | The ID of the Branding Theme to assign to this subscription. When set, this subscription-level Branding Theme is used instead of the customer's default Branding Theme for subscription-related documents and communications that use subscription theming. Pass null or an empty value to clear the subscription-level Branding Theme. Available only when Branding Themes are enabled for the site. Not returned in the response. | | `NextBillingAt` | `DateTimeOffset?` | Optional | (Optional) Set this attribute to a future date/time to sync imported subscriptions to your existing renewal schedule. See the notes on “Date/Time Format” in our [subscription import documentation](https://maxio.zendesk.com/hc/en-us/articles/24251489107213-Advanced-Billing-Subscription-Imports#date-format). If you provide a next_billing_at timestamp that is in the future, no trial or initial charges will be applied when you create the subscription. In fact, no payment will be captured at all. The first payment will be captured, according to the prices defined by the product, near the time specified by next_billing_at. If you do not provide a value for next_billing_at, any trial and/or initial charges will be assessed and charged at the time of subscription creation. If the card cannot be successfully charged, the subscription will not be created. See further notes in the section on Importing Subscriptions. | | `InitialBillingAt` | `DateTimeOffset?` | Optional | (Optional) Set this attribute to a future date/time to create a subscription in the Awaiting Signup state, rather than Active or Trialing. You can omit the initial_billing_at date to activate the subscription immediately. In the Awaiting Signup state, a subscription behaves like any other. It can be canceled, allocated to, or have its billing date changed. etc. When the initial_billing_at date hits, the subscription will transition to the expected state. If the product has a trial, the subscription will enter a trial, otherwise it will go active. Setup fees will be respected either before or after the trial, as configured on the price point. If the payment is due at the initial_billing_at and it fails the subscription will be immediately canceled. See the [subscription import](https://maxio.zendesk.com/hc/en-us/articles/24251489107213-Advanced-Billing-Subscription-Imports#date-format) documentation for more information about Date/Time Formats. | -| `DeferSignup` | `bool?` | Optional | (Optional) Set this attribute to true to create the subscription in the Awaiting Signup Date state. Use this when you want to create a subscription that has an unknown first billing date. When the first billing date is known, update a subscription and set the `initial_billing_at` date. The subscription moves to the Awaiting Signup state with a scheduled initial billing date. You can omit the initial_billing_at date to activate the subscription immediately. See [Subscription States](https://maxio-chargify.zendesk.com/hc/en-us/articles/5404222005773-Subscription-States) for more information.

**Default**: `false` | +| `DeferSignup` | `bool?` | Optional | (Optional) Set this attribute to true to create the subscription in the Awaiting Signup Date state. Use this when you want to create a subscription that has an unknown first billing date. When the first billing date is known, update a subscription and set the `initial_billing_at` date. The subscription moves to the Awaiting Signup state with a scheduled initial billing date. You can omit the initial_billing_at date to activate the subscription immediately. See [Subscription States](https://maxio-chargify.zendesk.com/hc/en-us/articles/5404222005773-Subscription-States) for more information.

**Default**: `false` | | `StoredCredentialTransactionId` | `int?` | Optional | For European sites subject to PSD2 and using 3D Secure, this can be used to reference a previous transaction for the customer. This will ensure the card will be charged successfully at renewal. | | `SalesRepId` | `int?` | Optional | - | -| `PaymentProfileId` | `int?` | Optional | The Payment Profile ID of an existing card or bank account, which belongs to an existing customer to use for payment for this subscription. If the card, bank account, or customer does not exist already, or if you want to use a new (unstored) card or bank account for the subscription, use `payment_profile_attributes` instead to create a new payment profile along with the subscription. (This value is available on an existing subscription via the API as `credit_card` > id or `bank_account` > id) | +| `PaymentProfileId` | `int?` | Optional | The Payment Profile ID of an existing card or bank account, which belongs to an existing customer to use for payment for this subscription. If the card, bank account, or customer does not exist already, or if you want to use a new (unstored) card or bank account for the subscription, use `payment_profile_attributes` instead to create a new payment profile along with the subscription. (This value is available on an existing subscription via the API as `credit_card` > id or `bank_account` > id.) | | `Reference` | `string` | Optional | The reference value (provided by your app) for the subscription itself. | | `CustomerAttributes` | [`CustomerAttributes`](../../doc/models/customer-attributes.md) | Optional | - | | `PaymentProfileAttributes` | [`PaymentProfileAttributes`](../../doc/models/payment-profile-attributes.md) | Optional | alias to credit_card_attributes | | `CreditCardAttributes` | [`PaymentProfileAttributes`](../../doc/models/payment-profile-attributes.md) | Optional | Credit Card data to create a new Subscription. Interchangeable with `payment_profile_attributes` property. | | `BankAccountAttributes` | [`BankAccountAttributes`](../../doc/models/bank-account-attributes.md) | Optional | - | | `Components` | [`List`](../../doc/models/create-subscription-component.md) | Optional | (Optional) An array of component ids and quantities to be added to the subscription. See [Components](https://maxio.zendesk.com/hc/en-us/articles/24261141522189-Components-Overview) for more information. | -| `CalendarBilling` | [`CalendarBilling`](../../doc/models/calendar-billing.md) | Optional | (Optional). Cannot be used when also specifying next_billing_at | +| `CalendarBilling` | [`CalendarBilling`](../../doc/models/calendar-billing.md) | Optional | (Optional). Cannot be used when also specifying next_billing_at. | | `Metafields` | `Dictionary` | Optional | (Optional) A set of key/value pairs representing custom fields and their values. Metafields will be created “on-the-fly” in your site for a given key, if they have not been created yet. | | `CustomerReference` | `string` | Optional | The reference value (provided by your app) of an existing customer within Chargify. Required, unless a `customer_id` or a set of `customer_attributes` is given. | | `Group` | [`GroupSettings`](../../doc/models/group-settings.md) | Optional | - | @@ -60,31 +61,38 @@ | `DunningCommunicationDelayTimeZone` | `string` | Optional | Time zone for the Dunning Communication Delay feature. | | `SkipBillingManifestTaxes` | `bool?` | Optional | Valid only for the Subscription Preview endpoint. When set to `true` it skips calculating taxes for the current and next billing manifests. Defaults to `false` when not provided. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using AdvancedBilling.Standard.Models.Containers; +using System.Collections.Generic; + +CreateSubscription createSubscription = new CreateSubscription { - "defer_signup": false, - "metafields": { - "custom_field_name_1": "custom_field_value_1", - "custom_field_name_2": "custom_field_value_2" - }, - "dunning_communication_delay_enabled": false, - "dunning_communication_delay_time_zone": "\"Eastern Time (US & Canada)\"", - "product_handle": "product_handle6", - "product_id": 212, - "product_price_point_handle": "product_price_point_handle0", - "product_price_point_id": 136, - "custom_price": { - "name": "name4", - "handle": "handle0", - "price_in_cents": "String3", - "interval": "String3", - "interval_unit": "day", - "trial_price_in_cents": "String3", - "trial_interval": "String5", - "trial_interval_unit": "day" - } -} + ProductHandle = "product_handle4", + ProductId = 82, + ProductPricePointHandle = "product_price_point_handle2", + ProductPricePointId = 6, + CustomPrice = new SubscriptionCustomPrice + { + PriceInCents = SubscriptionCustomPricePriceInCents.FromString("String3"), + Interval = SubscriptionCustomPriceInterval.FromString("String3"), + IntervalUnit = IntervalUnit.Day, + Name = "name4", + Handle = "handle0", + TrialPriceInCents = SubscriptionCustomPriceTrialPriceInCents.FromString("String3"), + TrialInterval = SubscriptionCustomPriceTrialInterval.FromString("String5"), + TrialIntervalUnit = IntervalUnit.Day, + }, + DeferSignup = false, + Metafields = new Dictionary + { + ["custom_field_name_1"] = "custom_field_value_1", + ["custom_field_name_2"] = "custom_field_value_2", + }, + DunningCommunicationDelayEnabled = false, + DunningCommunicationDelayTimeZone = "\"Eastern Time (US & Canada)\"", +}; ``` diff --git a/doc/models/create-usage-request.md b/doc/models/create-usage-request.md index 210534d1..11a32d67 100644 --- a/doc/models/create-usage-request.md +++ b/doc/models/create-usage-request.md @@ -11,37 +11,48 @@ | --- | --- | --- | --- | | `Usage` | [`CreateUsage`](../../doc/models/create-usage.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using AdvancedBilling.Standard.Models.Containers; +using System.Collections.Generic; + +CreateUsageRequest createUsageRequest = new CreateUsageRequest { - "usage": { - "quantity": 162.34, - "price_point_id": "price_point_id0", - "memo": "memo2", - "billing_schedule": { - "initial_billing_at": "2016-03-13" - }, - "custom_price": { - "tax_included": false, - "pricing_scheme": "stairstep", - "interval": 66, - "interval_unit": "day", - "list_price_point_id": 174, - "prices": [ + Usage = new CreateUsage + { + Quantity = 162.34, + PricePointId = "price_point_id0", + Memo = "memo2", + BillingSchedule = new BillingSchedule { - "starting_quantity": 242, - "ending_quantity": 40, - "unit_price": 23.26 + InitialBillingAt = DateTime.Parse("2016-03-13"), }, + CustomPrice = new ComponentCustomPrice { - "starting_quantity": 242, - "ending_quantity": 40, - "unit_price": 23.26 - } - ] - } - } -} + Prices = new List + { + new Price + { + StartingQuantity = PriceStartingQuantity.FromNumber(242), + UnitPrice = PriceUnitPrice.FromPrecision(23.26), + EndingQuantity = PriceEndingQuantity.FromNumber(40), + }, + new Price + { + StartingQuantity = PriceStartingQuantity.FromNumber(242), + UnitPrice = PriceUnitPrice.FromPrecision(23.26), + EndingQuantity = PriceEndingQuantity.FromNumber(40), + }, + }, + TaxIncluded = false, + PricingScheme = PricingScheme.Stairstep, + Interval = 66, + IntervalUnit = IntervalUnit.Day, + ListPricePointId = 174, + }, + }, +}; ``` diff --git a/doc/models/create-usage.md b/doc/models/create-usage.md index 1a25c822..9d2138c3 100644 --- a/doc/models/create-usage.md +++ b/doc/models/create-usage.md @@ -15,35 +15,45 @@ | `BillingSchedule` | [`BillingSchedule`](../../doc/models/billing-schedule.md) | Optional | Billing schedule settings for component allocations or usages on multi-frequency subscriptions. Use this to start a component's billing period on a custom date instead of aligning with the product charge schedule. | | `CustomPrice` | [`ComponentCustomPrice`](../../doc/models/component-custom-price.md) | Optional | Create or update custom pricing unique to the subscription. Used in place of `price_point_id`. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using AdvancedBilling.Standard.Models.Containers; +using System.Collections.Generic; + +CreateUsage createUsage = new CreateUsage { - "quantity": 23.44, - "price_point_id": "price_point_id0", - "memo": "memo2", - "billing_schedule": { - "initial_billing_at": "2016-03-13" - }, - "custom_price": { - "tax_included": false, - "pricing_scheme": "stairstep", - "interval": 66, - "interval_unit": "day", - "list_price_point_id": 174, - "prices": [ - { - "starting_quantity": 242, - "ending_quantity": 40, - "unit_price": 23.26 - }, - { - "starting_quantity": 242, - "ending_quantity": 40, - "unit_price": 23.26 - } - ] - } -} + Quantity = 204.7, + PricePointId = "price_point_id4", + Memo = "memo8", + BillingSchedule = new BillingSchedule + { + InitialBillingAt = DateTime.Parse("2016-03-13"), + }, + CustomPrice = new ComponentCustomPrice + { + Prices = new List + { + new Price + { + StartingQuantity = PriceStartingQuantity.FromNumber(242), + UnitPrice = PriceUnitPrice.FromPrecision(23.26), + EndingQuantity = PriceEndingQuantity.FromNumber(40), + }, + new Price + { + StartingQuantity = PriceStartingQuantity.FromNumber(242), + UnitPrice = PriceUnitPrice.FromPrecision(23.26), + EndingQuantity = PriceEndingQuantity.FromNumber(40), + }, + }, + TaxIncluded = false, + PricingScheme = PricingScheme.Stairstep, + Interval = 66, + IntervalUnit = IntervalUnit.Day, + ListPricePointId = 174, + }, +}; ``` diff --git a/doc/models/created-prepayment.md b/doc/models/created-prepayment.md index 0bab4a98..36a4e44e 100644 --- a/doc/models/created-prepayment.md +++ b/doc/models/created-prepayment.md @@ -17,15 +17,21 @@ | `StartingBalanceInCents` | `long?` | Optional | **Constraints**: `>= 0` | | `EndingBalanceInCents` | `long?` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Globalization; + +CreatedPrepayment createdPrepayment = new CreatedPrepayment { - "id": 110, - "subscription_id": 220, - "amount_in_cents": 196, - "memo": "memo6", - "created_at": "2016-03-13T12:52:32.123Z" -} + Id = 186L, + SubscriptionId = 40, + AmountInCents = 240L, + Memo = "memo6", + CreatedAt = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), +}; ``` diff --git a/doc/models/credit-account-balance-changed.md b/doc/models/credit-account-balance-changed.md index 7838eacf..31da4c2a 100644 --- a/doc/models/credit-account-balance-changed.md +++ b/doc/models/credit-account-balance-changed.md @@ -15,15 +15,21 @@ | `CurrencyCode` | `string` | Required | - | | `AtTime` | `DateTimeOffset` | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Globalization; + +CreditAccountBalanceChanged creditAccountBalanceChanged = new CreditAccountBalanceChanged { - "reason": "reason8", - "service_credit_account_balance_in_cents": 10, - "service_credit_balance_change_in_cents": 116, - "currency_code": "currency_code8", - "at_time": "2016-03-13T12:52:32.123Z" -} + Reason = "reason4", + ServiceCreditAccountBalanceInCents = 216L, + ServiceCreditBalanceChangeInCents = 166L, + CurrencyCode = "currency_code6", + AtTime = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), +}; ``` diff --git a/doc/models/credit-card-attributes.md b/doc/models/credit-card-attributes.md index 91617b56..2ef5f853 100644 --- a/doc/models/credit-card-attributes.md +++ b/doc/models/credit-card-attributes.md @@ -13,13 +13,16 @@ | `ExpirationMonth` | `string` | Optional | - | | `ExpirationYear` | `string` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +CreditCardAttributes creditCardAttributes = new CreditCardAttributes { - "full_number": "full_number0", - "expiration_month": "expiration_month6", - "expiration_year": "expiration_year0" -} + FullNumber = "full_number8", + ExpirationMonth = "expiration_month8", + ExpirationYear = "expiration_year2", +}; ``` diff --git a/doc/models/credit-card-payment-profile.md b/doc/models/credit-card-payment-profile.md index 7cd89cb8..41bc9561 100644 --- a/doc/models/credit-card-payment-profile.md +++ b/doc/models/credit-card-payment-profile.md @@ -12,10 +12,10 @@ | `Id` | `int?` | Optional | The Chargify-assigned ID of the stored card. This value can be used as an input to payment_profile_id when creating a subscription, in order to re-use a stored payment profile for the same customer. | | `FirstName` | `string` | Optional | The first name of the card holder. | | `LastName` | `string` | Optional | The last name of the card holder. | -| `MaskedCardNumber` | `string` | Optional | A string representation of the credit card number with all but the last 4 digits masked with X’s (i.e. ‘XXXX-XXXX-XXXX-1234’). | +| `MaskedCardNumber` | `string` | Optional | A string representation of the credit card number with all but the last 4 digits masked with X’s (e.g., ‘XXXX-XXXX-XXXX-1234’). | | `CardType` | [`CardType?`](../../doc/models/card-type.md) | Optional | The type of card used. | | `ExpirationMonth` | `int?` | Optional | An integer representing the expiration month of the card(1 – 12). | -| `ExpirationYear` | `int?` | Optional | An integer representing the 4-digit expiration year of the card(i.e. ‘2012’). | +| `ExpirationYear` | `int?` | Optional | An integer representing the 4-digit expiration year of the card(e.g., ‘2012’). | | `CustomerId` | `int?` | Optional | The Chargify-assigned id for the customer record to which the card belongs. | | `CurrentVault` | [`CreditCardVault?`](../../doc/models/credit-card-vault.md) | Optional | The vault that stores the payment profile with the provided `vault_token`. Use `bogus` for testing. | | `VaultToken` | `string` | Optional | The “token” provided by your vault storage for an already stored payment profile. | @@ -28,36 +28,39 @@ | `BillingAddress2` | `string` | Optional | The current billing street address, second line, for the card. | | `PaymentType` | [`PaymentType`](../../doc/models/payment-type.md) | Required | **Default**: `PaymentType.credit_card` | | `Disabled` | `bool?` | Optional | - | -| `ChargifyToken` | `string` | Optional | Token received after sending billing information using Maxio.js (formerly Chargify.js). This token will only be received if passed as a sole attribute of credit_card_attributes (i.e. tok_9g6hw85pnpt6knmskpwp4ttt) | +| `ChargifyToken` | `string` | Optional | Token received after sending billing information using Maxio.js (formerly Chargify.js). This token will only be received if passed as a sole attribute of credit_card_attributes (e.g., tok_9g6hw85pnpt6knmskpwp4ttt). | | `SiteGatewaySettingId` | `int?` | Optional | - | | `GatewayHandle` | `string` | Optional | An identifier of connected gateway. | | `CreatedAt` | `DateTimeOffset?` | Optional | A timestamp indicating when this payment profile was created | | `UpdatedAt` | `DateTimeOffset?` | Optional | A timestamp indicating when this payment profile was last updated | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +CreditCardPaymentProfile creditCardPaymentProfile = new CreditCardPaymentProfile { - "id": 10088716, - "first_name": "Test", - "last_name": "Subscription", - "masked_card_number": "XXXX-XXXX-XXXX-1", - "card_type": "bogus", - "expiration_month": 1, - "expiration_year": 2022, - "customer_id": 14543792, - "current_vault": "bogus", - "vault_token": "1", - "billing_address": "123 Montana Way", - "billing_city": "Billings", - "billing_state": "MT", - "billing_zip": "59101", - "billing_country": "US", - "customer_vault_token": null, - "billing_address_2": "", - "payment_type": "credit_card", - "site_gateway_setting_id": 1, - "gateway_handle": null -} + PaymentType = PaymentType.CreditCard, + Id = 10088716, + FirstName = "Test", + LastName = "Subscription", + MaskedCardNumber = "XXXX-XXXX-XXXX-1", + CardType = CardType.Bogus, + ExpirationMonth = 1, + ExpirationYear = 2022, + CustomerId = 14543792, + CurrentVault = CreditCardVault.Bogus, + VaultToken = "1", + BillingAddress = "123 Montana Way", + BillingCity = "Billings", + BillingState = "MT", + BillingZip = "59101", + BillingCountry = "US", + CustomerVaultToken = "customer_vault_token2", + BillingAddress2 = "", + SiteGatewaySettingId = 1, + GatewayHandle = "gateway_handle8", +}; ``` diff --git a/doc/models/credit-card-vault.md b/doc/models/credit-card-vault.md index e2156056..5baa6382 100644 --- a/doc/models/credit-card-vault.md +++ b/doc/models/credit-card-vault.md @@ -45,3 +45,11 @@ The vault that stores the payment profile with the provided `vault_token`. Use ` | `Unipaas` | | `Wirecard` | +## Example + +```csharp +using AdvancedBilling.Standard.Models; + +CreditCardVault creditCardVault = CreditCardVault.Unipaas; +``` + diff --git a/doc/models/credit-note-application.md b/doc/models/credit-note-application.md index a0076881..7e256d01 100644 --- a/doc/models/credit-note-application.md +++ b/doc/models/credit-note-application.md @@ -15,15 +15,21 @@ | `Memo` | `string` | Optional | - | | `AppliedAmount` | `string` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Globalization; + +CreditNoteApplication creditNoteApplication = new CreditNoteApplication { - "uid": "uid0", - "transaction_time": "2016-03-13T12:52:32.123Z", - "invoice_uid": "invoice_uid0", - "memo": "memo4", - "applied_amount": "applied_amount8" -} + Uid = "uid0", + TransactionTime = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + InvoiceUid = "invoice_uid0", + Memo = "memo4", + AppliedAmount = "applied_amount8", +}; ``` diff --git a/doc/models/credit-note-line-item.md b/doc/models/credit-note-line-item.md index b056f44e..f15ecc16 100644 --- a/doc/models/credit-note-line-item.md +++ b/doc/models/credit-note-line-item.md @@ -13,7 +13,7 @@ | `Title` | `string` | Optional | A short descriptor for the credit given by this line. | | `Description` | `string` | Optional | Detailed description for the credit given by this line. May include proration details in plain text.

Note: this string may contain line breaks that are hints for the best display format on the credit note. | | `Quantity` | `string` | Optional | The quantity or count of units credited by the line item.

This is a decimal number represented as a string. (See "About Decimal Numbers".) | -| `UnitPrice` | `string` | Optional | The price per unit for the line item.

When tiered pricing was used (i.e. not every unit was actually priced at the same price) this will be the blended average cost per unit and the `tiered_unit_price` field will be set to `true`. | +| `UnitPrice` | `string` | Optional | The price per unit for the line item.

When tiered pricing was used (i.e., not every unit was actually priced at the same price) this will be the blended average cost per unit and the `tiered_unit_price` field will be set to `true`. | | `SubtotalAmount` | `string` | Optional | The line subtotal, generally calculated as `quantity * unit_price`. This is the canonical amount of record for the line - when rounding differences are in play, `subtotal_amount` takes precedence over the value derived from `quantity * unit_price` (which may not have the proper precision to exactly equal this amount). | | `DiscountAmount` | `string` | Optional | The approximate discount of just this line.

The value is approximated in cases where rounding errors make it difficult to apportion exactly a total discount among many lines. Several lines may have been summed prior to applying the discount to arrive at `discount_amount` for the invoice - backing that out to the discount on a single line may introduce rounding or precision errors. | | `TaxAmount` | `string` | Optional | The approximate tax of just this line.

The value is approximated in cases where rounding errors make it difficult to apportion exactly a total tax among many lines. Several lines may have been summed prior to applying the tax rate to arrive at `tax_amount` for the invoice - backing that out to the tax on a single line may introduce rounding or precision errors. | @@ -30,15 +30,18 @@ | `CustomItem` | `bool?` | Optional | - | | `PrepaidAllocationExpiresAt` | `DateTime?` | Optional | The date a prepaid allocation is set to expire. Only present on line items representing prepaid component allocations. The format is `"YYYY-MM-DD"`. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +CreditNoteLineItem creditNoteLineItem = new CreditNoteLineItem { - "uid": "uid4", - "title": "title0", - "description": "description6", - "quantity": "quantity0", - "unit_price": "unit_price2" -} + Uid = "uid0", + Title = "title6", + Description = "description0", + Quantity = "quantity6", + UnitPrice = "unit_price8", +}; ``` diff --git a/doc/models/credit-note-status.md b/doc/models/credit-note-status.md index 45f47344..ab37429e 100644 --- a/doc/models/credit-note-status.md +++ b/doc/models/credit-note-status.md @@ -14,3 +14,11 @@ Current status of the credit note. | `Open` | | `Applied` | +## Example + +```csharp +using AdvancedBilling.Standard.Models; + +CreditNoteStatus creditNoteStatus = CreditNoteStatus.Open; +``` + diff --git a/doc/models/credit-note.md b/doc/models/credit-note.md index 1c822c77..f185493e 100644 --- a/doc/models/credit-note.md +++ b/doc/models/credit-note.md @@ -21,13 +21,13 @@ | `Currency` | `string` | Optional | The ISO 4217 currency code (3 character string) representing the currency of the credit note amount fields. | | `Memo` | `string` | Optional | The memo printed on credit note, which is a description of the reason for the credit. | | `Seller` | [`InvoiceSeller`](../../doc/models/invoice-seller.md) | Optional | Information about the seller (merchant) listed on the masthead of the credit note. | -| `Customer` | [`InvoiceCustomer`](../../doc/models/invoice-customer.md) | Optional | Information about the customer who is owner or recipient the credited subscription. | +| `Customer` | [`InvoiceCustomer`](../../doc/models/invoice-customer.md) | Optional | Information about the customer who is owner or recipient of the credited subscription. | | `BillingAddress` | [`InvoiceAddress`](../../doc/models/invoice-address.md) | Optional | The billing address of the credit subscription. | | `ShippingAddress` | [`InvoiceAddress`](../../doc/models/invoice-address.md) | Optional | The shipping address of the credited subscription. | | `SubtotalAmount` | `string` | Optional | Subtotal of the credit note, which is the sum of all line items before discounts or taxes. Note that this is a positive amount representing the credit back to the customer. | -| `DiscountAmount` | `string` | Optional | Total discount applied to the credit note. Note that this is a positive amount representing the discount amount being credited back to the customer (i.e. a credit on an earlier discount). For example, if the original purchase was $1.00 and the original discount was $0.10, a credit of $0.50 of the original purchase (half) would have a discount credit of $0.05 (also half). | -| `TaxAmount` | `string` | Optional | Total tax of the credit note. Note that this is a positive amount representing a previously taxex amount being credited back to the customer (i.e. a credit of an earlier tax). For example, if the original purchase was $1.00 and the original tax was $0.10, a credit of $0.50 of the original purchase (half) would also have a tax credit of $0.05 (also half). | -| `TotalAmount` | `string` | Optional | The credit note total, which is `subtotal_amount - discount_amount + tax_amount`.' | +| `DiscountAmount` | `string` | Optional | Total discount applied to the credit note. Note that this is a positive amount representing the discount amount being credited back to the customer (i.e., a credit on an earlier discount). For example, if the original purchase was $1.00 and the original discount was $0.10, a credit of $0.50 of the original purchase (half) would have a discount credit of $0.05 (also half). | +| `TaxAmount` | `string` | Optional | Total tax of the credit note. Note that this is a positive amount representing a previously taxed amount being credited back to the customer (i.e., a credit of an earlier tax). For example, if the original purchase was $1.00 and the original tax was $0.10, a credit of $0.50 of the original purchase (half) would also have a tax credit of $0.05 (also half). | +| `TotalAmount` | `string` | Optional | The credit note total, which is `subtotal_amount - discount_amount + tax_amount`. | | `AppliedAmount` | `string` | Optional | The amount of the credit note that has already been applied to invoices. | | `RemainingAmount` | `string` | Optional | The amount of the credit note remaining to be applied to invoices, which is `total_amount - applied_amount`. | | `LineItems` | [`List`](../../doc/models/credit-note-line-item.md) | Optional | Line items on the credit note. | @@ -35,17 +35,20 @@ | `Taxes` | [`List`](../../doc/models/invoice-tax.md) | Optional | - | | `Applications` | [`List`](../../doc/models/credit-note-application.md) | Optional | - | | `Refunds` | [`List`](../../doc/models/invoice-refund.md) | Optional | - | -| `OriginInvoices` | [`List`](../../doc/models/origin-invoice.md) | Optional | An array of origin invoices for the credit note. Learn more about [Origin Invoice from our docs](https://maxio.zendesk.com/hc/en-us/articles/24252261284749-Credit-Notes-Proration#origin-invoices) | +| `OriginInvoices` | [`List`](../../doc/models/origin-invoice.md) | Optional | An array of origin invoices for the credit note. Learn more about [Origin Invoice from our docs](https://maxio.zendesk.com/hc/en-us/articles/24252261284749-Credit-Notes-Proration#origin-invoices). | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +CreditNote creditNote = new CreditNote { - "uid": "uid2", - "site_id": 218, - "customer_id": 74, - "subscription_id": 146, - "number": "number0" -} + Uid = "uid6", + SiteId = 20, + CustomerId = 132, + SubscriptionId = 204, + Number = "number4", +}; ``` diff --git a/doc/models/credit-scheme-request.md b/doc/models/credit-scheme-request.md index 0fed3865..a689c5d1 100644 --- a/doc/models/credit-scheme-request.md +++ b/doc/models/credit-scheme-request.md @@ -11,11 +11,14 @@ | --- | --- | --- | --- | | `CreditScheme` | [`CreditScheme`](../../doc/models/credit-scheme.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +CreditSchemeRequest creditSchemeRequest = new CreditSchemeRequest { - "credit_scheme": "credit" -} + CreditScheme = CreditScheme.Credit, +}; ``` diff --git a/doc/models/credit-scheme.md b/doc/models/credit-scheme.md index 1e2e746f..d1e8c5e8 100644 --- a/doc/models/credit-scheme.md +++ b/doc/models/credit-scheme.md @@ -13,3 +13,11 @@ | `Credit` | | `Refund` | +## Example + +```csharp +using AdvancedBilling.Standard.Models; + +CreditScheme creditScheme = CreditScheme.None; +``` + diff --git a/doc/models/credit-type.md b/doc/models/credit-type.md index 3fc68dda..561146ca 100644 --- a/doc/models/credit-type.md +++ b/doc/models/credit-type.md @@ -15,3 +15,11 @@ The type of credit to be created when upgrading/downgrading. Defaults to the com | `Prorated` | | `None` | +## Example + +```csharp +using AdvancedBilling.Standard.Models; + +CreditType creditType = CreditType.Prorated; +``` + diff --git a/doc/models/currency-overage-prices.md b/doc/models/currency-overage-prices.md index c9955957..3c1b9042 100644 --- a/doc/models/currency-overage-prices.md +++ b/doc/models/currency-overage-prices.md @@ -13,7 +13,7 @@ Extends a component price point with currency overage prices. | --- | --- | --- | --- | | `Id` | `int?` | Optional | - | | `Type` | [`PricePointType?`](../../doc/models/price-point-type.md) | Optional | Price point type. We expose the following types:

1. **default**: a price point that is marked as a default price for a certain product.
2. **custom**: a custom price point.
3. **catalog**: a price point that is **not** marked as a default price for a certain product and is **not** a custom one. | -| `Default` | `bool?` | Optional | Note: Refer to type attribute instead | +| `Default` | `bool?` | Optional | Note: Refer to type attribute instead. | | `Name` | `string` | Optional | - | | `PricingScheme` | [`PricingScheme?`](../../doc/models/pricing-scheme.md) | Optional | The identifier for the pricing scheme. See [Product Components](https://help.chargify.com/products/product-components.html) for an overview of pricing schemes. | | `ComponentId` | `int?` | Optional | - | @@ -25,7 +25,7 @@ Extends a component price point with currency overage prices. | `UseSiteExchangeRate` | `bool?` | Optional | Whether to use the site level exchange rate or define your own prices for each currency if you have multiple currencies defined on the site. Defaults to true during creation. | | `SubscriptionId` | `int?` | Optional | (only used for Custom Pricing - ie. when the price point's type is `custom`) The id of the subscription that the custom price point is for. | | `TaxIncluded` | `bool?` | Optional | - | -| `Interval` | `int?` | Optional | The numerical interval. i.e. an interval of ‘30’ coupled with an interval_unit of day would mean this component price point would renew every 30 days. This property is only available for sites with Multifrequency enabled. | +| `Interval` | `int?` | Optional | The numerical interval. e.g., an interval of ‘30’ coupled with an interval_unit of day would mean this component price point would renew every 30 days. This property is only available for sites with Multifrequency enabled. | | `IntervalUnit` | [`IntervalUnit?`](../../doc/models/interval-unit.md) | Optional | A string representing the interval unit for this component price point, either month or day. This property is only available for sites with Multifrequency enabled. | | `CurrencyPrices` | [`List`](../../doc/models/component-currency-price.md) | Optional | An array of currency pricing data is available when multiple currencies are defined for the site. It varies based on the use_site_exchange_rate setting for the price point. This parameter is present only in the response of read endpoints, after including the appropriate query parameter. The clone endpoint always returns currency prices if they are present. | | `OveragePrices` | [`List`](../../doc/models/component-price.md) | Optional | Applicable only to prepaid usage components. An array of overage price brackets. | @@ -36,15 +36,18 @@ Extends a component price point with currency overage prices. | `ExpirationIntervalUnit` | [`ExpirationIntervalUnit?`](../../doc/models/expiration-interval-unit.md) | Optional | Applicable only to prepaid usage components where rollover_prepaid_remainder is true. A string representing the expiration interval unit for this component, either month or day. | | `CurrencyOveragePrices` | [`List`](../../doc/models/component-currency-price.md) | Optional | Applicable only to prepaid usage components. An array of currency pricing data for overage prices. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +CurrencyOveragePrices currencyOveragePrices = new CurrencyOveragePrices { - "id": 50, - "type": "catalog", - "default": false, - "name": "name8", - "pricing_scheme": "stairstep" -} + Id = 96, + Type = PricePointType.Catalog, + MDefault = false, + Name = "name0", + PricingScheme = PricingScheme.PerUnit, +}; ``` diff --git a/doc/models/currency-price-role.md b/doc/models/currency-price-role.md index 91332999..1027a48a 100644 --- a/doc/models/currency-price-role.md +++ b/doc/models/currency-price-role.md @@ -15,3 +15,11 @@ Role for the price. | `Trial` | | `Initial` | +## Example + +```csharp +using AdvancedBilling.Standard.Models; + +CurrencyPriceRole currencyPriceRole = CurrencyPriceRole.Initial; +``` + diff --git a/doc/models/currency-price.md b/doc/models/currency-price.md index 61db015a..8f0bddbc 100644 --- a/doc/models/currency-price.md +++ b/doc/models/currency-price.md @@ -18,15 +18,18 @@ | `ProductPricePointId` | `int?` | Optional | - | | `Role` | [`CurrencyPriceRole?`](../../doc/models/currency-price-role.md) | Optional | Role for the price. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +CurrencyPrice currencyPrice = new CurrencyPrice { - "id": 88, - "currency": "currency6", - "price": 41.36, - "formatted_price": "formatted_price4", - "price_id": 178 -} + Id = 208, + Currency = "currency4", + Price = 70.88, + FormattedPrice = "formatted_price2", + PriceId = 214, +}; ``` diff --git a/doc/models/currency-prices-response.md b/doc/models/currency-prices-response.md index cdcb6787..d44bb983 100644 --- a/doc/models/currency-prices-response.md +++ b/doc/models/currency-prices-response.md @@ -11,19 +11,25 @@ | --- | --- | --- | --- | | `CurrencyPrices` | [`List`](../../doc/models/currency-price.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Collections.Generic; + +CurrencyPricesResponse currencyPricesResponse = new CurrencyPricesResponse { - "currency_prices": [ + CurrencyPrices = new List { - "id": 50, - "currency": "currency8", - "price": 233.74, - "formatted_price": "formatted_price6", - "price_id": 116 - } - ] -} + new CurrencyPrice + { + Id = 50, + Currency = "currency8", + Price = 233.74, + FormattedPrice = "formatted_price6", + PriceId = 116, + }, + }, +}; ``` diff --git a/doc/models/custom-field-owner.md b/doc/models/custom-field-owner.md index 4fbe607e..aba1cfa0 100644 --- a/doc/models/custom-field-owner.md +++ b/doc/models/custom-field-owner.md @@ -12,3 +12,11 @@ | `Customer` | | `Subscription` | +## Example + +```csharp +using AdvancedBilling.Standard.Models; + +CustomFieldOwner customFieldOwner = CustomFieldOwner.Customer; +``` + diff --git a/doc/models/custom-field-value-change.md b/doc/models/custom-field-value-change.md index 4d360501..58718efc 100644 --- a/doc/models/custom-field-value-change.md +++ b/doc/models/custom-field-value-change.md @@ -17,17 +17,20 @@ | `ResourceType` | `string` | Required | - | | `ResourceId` | `int` | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +CustomFieldValueChange customFieldValueChange = new CustomFieldValueChange { - "event_type": "event_type2", - "metafield_name": "metafield_name6", - "metafield_id": 78, - "old_value": "old_value2", - "new_value": "new_value8", - "resource_type": "resource_type2", - "resource_id": 74 -} + EventType = "event_type8", + MetafieldName = "metafield_name2", + MetafieldId = 138, + OldValue = "old_value6", + NewValue = "new_value2", + ResourceType = "resource_type6", + ResourceId = 14, +}; ``` diff --git a/doc/models/customer-attributes.md b/doc/models/customer-attributes.md index 407f4343..964f8fe9 100644 --- a/doc/models/customer-attributes.md +++ b/doc/models/customer-attributes.md @@ -12,37 +12,43 @@ | `FirstName` | `string` | Optional | The first name of the customer. Required when creating a customer via attributes. | | `LastName` | `string` | Optional | The last name of the customer. Required when creating a customer via attributes. | | `Email` | `string` | Optional | The email address of the customer. Required when creating a customer via attributes. | -| `CcEmails` | `string` | Optional | A list of emails that should be cc’d on all customer communications. Optional. | -| `Organization` | `string` | Optional | The organization/company of the customer. Optional. | -| `Reference` | `string` | Optional | A customer “reference”, or unique identifier from your app, stored in Chargify. Can be used so that you may reference your customer’s within Chargify using the same unique value you use in your application. Optional. | -| `Address` | `string` | Optional | (Optional) The customer’s shipping street address (i.e. “123 Main St.”). | -| `Address2` | `string` | Optional | (Optional) Second line of the customer’s shipping address i.e. “Apt. 100” | -| `City` | `string` | Optional | (Optional) The customer’s shipping address city (i.e. “Boston”). | -| `State` | `string` | Optional | (Optional) The customer’s shipping address state (i.e. “MA”). This must conform to the [ISO_3166-1](https://en.wikipedia.org/wiki/ISO_3166-1#Current_codes) in order to be valid for tax locale purposes. | -| `Zip` | `string` | Optional | (Optional) The customer’s shipping address zip code (i.e. “12345”). | -| `Country` | `string` | Optional | (Optional) The customer shipping address country, required in [ISO_3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format (i.e. “US”). | +| `CcEmails` | `string` | Optional | (Optional) A list of emails that should be cc’d on all customer communications. | +| `Organization` | `string` | Optional | (Optional) The organization/company of the customer. | +| `Reference` | `string` | Optional | (Optional) A customer “reference”, or unique identifier from your app, stored in Chargify. Can be used so that you may reference your customer’s within Chargify using the same unique value you use in your application. | +| `Address` | `string` | Optional | (Optional) The customer’s shipping street address (e.g., “123 Main St.”). | +| `Address2` | `string` | Optional | (Optional) Second line of the customer’s shipping address e.g., “Apt. 100” | +| `City` | `string` | Optional | (Optional) The customer’s shipping address city (e.g., “Boston”). | +| `State` | `string` | Optional | “(Optional) The customer’s shipping address state (e.g., “MA”). This must conform to the [ISO_3166-1](https://en.wikipedia.org/wiki/ISO_3166-1#Current_codes) in order to be valid for tax locale purposes.” | +| `Zip` | `string` | Optional | (Optional) The customer’s shipping address zip code (e.g., “12345”). | +| `Country` | `string` | Optional | “(Optional) The customer shipping address country, required in [ISO_3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format (e.g., “US”).” | | `Phone` | `string` | Optional | (Optional) The phone number of the customer. | | `Verified` | `bool?` | Optional | - | | `TaxExempt` | `bool?` | Optional | (Optional) The tax_exempt status of the customer. Acceptable values are true or 1 for true and false or 0 for false. | -| `VatNumber` | `string` | Optional | (Optional) Supplying the VAT number allows EU customer’s to opt-out of the Value Added Tax assuming the merchant address and customer billing address are not within the same EU country. It’s important to omit the country code from the VAT number upon entry. Otherwise, taxes will be assessed upon the purchase. | +| `Surcharging` | `bool?` | Optional | (Optional) Whether surcharging is enabled for the customer. Defaults to `true` when omitted. Only applied on sites where surcharging control is enabled. | +| `VatNumber` | `string` | Optional | (Optional) Supplying the VAT number allows EU customers to opt-out of the Value Added Tax assuming the merchant address and customer billing address are not within the same EU country. It’s important to omit the country code from the VAT number upon entry. Otherwise, taxes will be assessed upon the purchase. | | `Metafields` | `Dictionary` | Optional | (Optional) A set of key/value pairs representing custom fields and their values. Metafields will be created “on-the-fly” in your site for a given key, if they have not been created yet. | | `ParentId` | `int?` | Optional | The parent ID in Chargify if applicable. Parent is another Customer object. | | `SalesforceId` | `string` | Optional | (Optional) The Salesforce ID of the customer. | | `DefaultAutoRenewalProfileId` | `int?` | Optional | (Optional) The default auto-renewal profile ID for the customer | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Collections.Generic; + +CustomerAttributes customerAttributes = new CustomerAttributes { - "metafields": { - "custom_field_name_1": "custom_field_value_1", - "custom_field_name_2": "custom_field_value_2" - }, - "first_name": "first_name4", - "last_name": "last_name2", - "email": "email2", - "cc_emails": "cc_emails6", - "organization": "organization8" -} + FirstName = "first_name2", + LastName = "last_name0", + Email = "email4", + CcEmails = "cc_emails2", + Organization = "organization6", + Metafields = new Dictionary + { + ["custom_field_name_1"] = "custom_field_value_1", + ["custom_field_name_2"] = "custom_field_value_2", + }, +}; ``` diff --git a/doc/models/customer-change.md b/doc/models/customer-change.md index 106525d3..02d29f23 100644 --- a/doc/models/customer-change.md +++ b/doc/models/customer-change.md @@ -14,97 +14,118 @@ | `BillingAddress` | [`AddressChange`](../../doc/models/address-change.md) | Optional | - | | `CustomFields` | [`CustomerCustomFieldsChange`](../../doc/models/customer-custom-fields-change.md) | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Collections.Generic; + +CustomerChange customerChange = new CustomerChange { - "payer": { - "before": { - "first_name": "first_name0", - "last_name": "last_name8", - "organization": "organization4", - "email": "email6" + Payer = new CustomerPayerChange + { + Before = new InvoicePayerChange + { + FirstName = "first_name0", + LastName = "last_name8", + Organization = "organization4", + Email = "email6", + }, + After = new InvoicePayerChange + { + FirstName = "first_name2", + LastName = "last_name0", + Organization = "organization4", + Email = "email4", + }, + }, + ShippingAddress = new AddressChange + { + Before = new InvoiceAddress + { + Street = "street0", + Line2 = "line24", + City = "city0", + State = "state6", + Zip = "zip4", + }, + After = new InvoiceAddress + { + Street = "street2", + Line2 = "line26", + City = "city8", + State = "state2", + Zip = "zip4", + }, }, - "after": { - "first_name": "first_name2", - "last_name": "last_name0", - "organization": "organization4", - "email": "email4" - } - }, - "shipping_address": { - "before": { - "street": "street0", - "line2": "line24", - "city": "city0", - "state": "state6", - "zip": "zip4" + BillingAddress = new AddressChange + { + Before = new InvoiceAddress + { + Street = "street0", + Line2 = "line24", + City = "city0", + State = "state6", + Zip = "zip4", + }, + After = new InvoiceAddress + { + Street = "street2", + Line2 = "line26", + City = "city8", + State = "state2", + Zip = "zip4", + }, }, - "after": { - "street": "street2", - "line2": "line26", - "city": "city8", - "state": "state2", - "zip": "zip4" - } - }, - "billing_address": { - "before": { - "street": "street0", - "line2": "line24", - "city": "city0", - "state": "state6", - "zip": "zip4" + CustomFields = new CustomerCustomFieldsChange + { + Before = new List + { + new InvoiceCustomField + { + OwnerId = 26, + OwnerType = CustomFieldOwner.Customer, + Name = "name0", + MValue = "value2", + MetadatumId = 26, + }, + new InvoiceCustomField + { + OwnerId = 26, + OwnerType = CustomFieldOwner.Customer, + Name = "name0", + MValue = "value2", + MetadatumId = 26, + }, + }, + After = new List + { + new InvoiceCustomField + { + OwnerId = 130, + OwnerType = CustomFieldOwner.Customer, + Name = "name2", + MValue = "value4", + MetadatumId = 130, + }, + new InvoiceCustomField + { + OwnerId = 130, + OwnerType = CustomFieldOwner.Customer, + Name = "name2", + MValue = "value4", + MetadatumId = 130, + }, + new InvoiceCustomField + { + OwnerId = 130, + OwnerType = CustomFieldOwner.Customer, + Name = "name2", + MValue = "value4", + MetadatumId = 130, + }, + }, }, - "after": { - "street": "street2", - "line2": "line26", - "city": "city8", - "state": "state2", - "zip": "zip4" - } - }, - "custom_fields": { - "before": [ - { - "owner_id": 26, - "owner_type": "Customer", - "name": "name0", - "value": "value2", - "metadatum_id": 26 - }, - { - "owner_id": 26, - "owner_type": "Customer", - "name": "name0", - "value": "value2", - "metadatum_id": 26 - } - ], - "after": [ - { - "owner_id": 130, - "owner_type": "Customer", - "name": "name2", - "value": "value4", - "metadatum_id": 130 - }, - { - "owner_id": 130, - "owner_type": "Customer", - "name": "name2", - "value": "value4", - "metadatum_id": 130 - }, - { - "owner_id": 130, - "owner_type": "Customer", - "name": "name2", - "value": "value4", - "metadatum_id": 130 - } - ] - } -} +}; ``` diff --git a/doc/models/customer-changes-preview-response.md b/doc/models/customer-changes-preview-response.md index d2e897a4..0f25ee01 100644 --- a/doc/models/customer-changes-preview-response.md +++ b/doc/models/customer-changes-preview-response.md @@ -11,99 +11,121 @@ | --- | --- | --- | --- | | `Changes` | [`CustomerChange`](../../doc/models/customer-change.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Collections.Generic; + +CustomerChangesPreviewResponse customerChangesPreviewResponse = new CustomerChangesPreviewResponse { - "changes": { - "payer": { - "before": { - "first_name": "first_name0", - "last_name": "last_name8", - "organization": "organization4", - "email": "email6" - }, - "after": { - "first_name": "first_name2", - "last_name": "last_name0", - "organization": "organization4", - "email": "email4" - } - }, - "shipping_address": { - "before": { - "street": "street0", - "line2": "line24", - "city": "city0", - "state": "state6", - "zip": "zip4" - }, - "after": { - "street": "street2", - "line2": "line26", - "city": "city8", - "state": "state2", - "zip": "zip4" - } - }, - "billing_address": { - "before": { - "street": "street0", - "line2": "line24", - "city": "city0", - "state": "state6", - "zip": "zip4" - }, - "after": { - "street": "street2", - "line2": "line26", - "city": "city8", - "state": "state2", - "zip": "zip4" - } - }, - "custom_fields": { - "before": [ + Changes = new CustomerChange + { + Payer = new CustomerPayerChange { - "owner_id": 26, - "owner_type": "Customer", - "name": "name0", - "value": "value2", - "metadatum_id": 26 + Before = new InvoicePayerChange + { + FirstName = "first_name0", + LastName = "last_name8", + Organization = "organization4", + Email = "email6", + }, + After = new InvoicePayerChange + { + FirstName = "first_name2", + LastName = "last_name0", + Organization = "organization4", + Email = "email4", + }, }, + ShippingAddress = new AddressChange { - "owner_id": 26, - "owner_type": "Customer", - "name": "name0", - "value": "value2", - "metadatum_id": 26 - } - ], - "after": [ - { - "owner_id": 130, - "owner_type": "Customer", - "name": "name2", - "value": "value4", - "metadatum_id": 130 + Before = new InvoiceAddress + { + Street = "street0", + Line2 = "line24", + City = "city0", + State = "state6", + Zip = "zip4", + }, + After = new InvoiceAddress + { + Street = "street2", + Line2 = "line26", + City = "city8", + State = "state2", + Zip = "zip4", + }, }, + BillingAddress = new AddressChange { - "owner_id": 130, - "owner_type": "Customer", - "name": "name2", - "value": "value4", - "metadatum_id": 130 + Before = new InvoiceAddress + { + Street = "street0", + Line2 = "line24", + City = "city0", + State = "state6", + Zip = "zip4", + }, + After = new InvoiceAddress + { + Street = "street2", + Line2 = "line26", + City = "city8", + State = "state2", + Zip = "zip4", + }, }, + CustomFields = new CustomerCustomFieldsChange { - "owner_id": 130, - "owner_type": "Customer", - "name": "name2", - "value": "value4", - "metadatum_id": 130 - } - ] - } - } -} + Before = new List + { + new InvoiceCustomField + { + OwnerId = 26, + OwnerType = CustomFieldOwner.Customer, + Name = "name0", + MValue = "value2", + MetadatumId = 26, + }, + new InvoiceCustomField + { + OwnerId = 26, + OwnerType = CustomFieldOwner.Customer, + Name = "name0", + MValue = "value2", + MetadatumId = 26, + }, + }, + After = new List + { + new InvoiceCustomField + { + OwnerId = 130, + OwnerType = CustomFieldOwner.Customer, + Name = "name2", + MValue = "value4", + MetadatumId = 130, + }, + new InvoiceCustomField + { + OwnerId = 130, + OwnerType = CustomFieldOwner.Customer, + Name = "name2", + MValue = "value4", + MetadatumId = 130, + }, + new InvoiceCustomField + { + OwnerId = 130, + OwnerType = CustomFieldOwner.Customer, + Name = "name2", + MValue = "value4", + MetadatumId = 130, + }, + }, + }, + }, +}; ``` diff --git a/doc/models/customer-custom-fields-change.md b/doc/models/customer-custom-fields-change.md index ce534468..e3ce0343 100644 --- a/doc/models/customer-custom-fields-change.md +++ b/doc/models/customer-custom-fields-change.md @@ -12,28 +12,36 @@ | `Before` | [`List`](../../doc/models/invoice-custom-field.md) | Required | - | | `After` | [`List`](../../doc/models/invoice-custom-field.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Collections.Generic; + +CustomerCustomFieldsChange customerCustomFieldsChange = new CustomerCustomFieldsChange { - "before": [ + Before = new List { - "owner_id": 26, - "owner_type": "Customer", - "name": "name0", - "value": "value2", - "metadatum_id": 26 - } - ], - "after": [ + new InvoiceCustomField + { + OwnerId = 26, + OwnerType = CustomFieldOwner.Customer, + Name = "name0", + MValue = "value2", + MetadatumId = 26, + }, + }, + After = new List { - "owner_id": 130, - "owner_type": "Customer", - "name": "name2", - "value": "value4", - "metadatum_id": 130 - } - ] -} + new InvoiceCustomField + { + OwnerId = 130, + OwnerType = CustomFieldOwner.Customer, + Name = "name2", + MValue = "value4", + MetadatumId = 130, + }, + }, +}; ``` diff --git a/doc/models/customer-error-response-exception.md b/doc/models/customer-error-response-exception.md index 79ae625a..d643be39 100644 --- a/doc/models/customer-error-response-exception.md +++ b/doc/models/customer-error-response-exception.md @@ -11,13 +11,20 @@ | --- | --- | --- | --- | | `Errors` | [`CustomerErrorResponseErrors`](../../doc/models/containers/customer-error-response-errors.md) | Optional | This is a container for one-of cases. | -## Example (as JSON) +## Example -```json +```csharp +try { - "errors": { - "customer": "customer8" - } + // make the API call +} +catch (ApiException e) +{ + if (e is CustomerErrorResponseException) + { + // TODO: Handle CustomerErrorResponseException + Console.WriteLine(e.Message); + } } ``` diff --git a/doc/models/customer-error.md b/doc/models/customer-error.md index 9f23a44a..03eb513f 100644 --- a/doc/models/customer-error.md +++ b/doc/models/customer-error.md @@ -11,11 +11,14 @@ | --- | --- | --- | --- | | `Customer` | `string` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +CustomerError customerError = new CustomerError { - "customer": "customer8" -} + Customer = "customer8", +}; ``` diff --git a/doc/models/customer-payer-change.md b/doc/models/customer-payer-change.md index c9ae2cda..8f92bc08 100644 --- a/doc/models/customer-payer-change.md +++ b/doc/models/customer-payer-change.md @@ -12,22 +12,27 @@ | `Before` | [`InvoicePayerChange`](../../doc/models/invoice-payer-change.md) | Required | - | | `After` | [`InvoicePayerChange`](../../doc/models/invoice-payer-change.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +CustomerPayerChange customerPayerChange = new CustomerPayerChange { - "before": { - "first_name": "first_name0", - "last_name": "last_name8", - "organization": "organization4", - "email": "email6" - }, - "after": { - "first_name": "first_name2", - "last_name": "last_name0", - "organization": "organization4", - "email": "email4" - } -} + Before = new InvoicePayerChange + { + FirstName = "first_name0", + LastName = "last_name8", + Organization = "organization4", + Email = "email6", + }, + After = new InvoicePayerChange + { + FirstName = "first_name2", + LastName = "last_name0", + Organization = "organization4", + Email = "email4", + }, +}; ``` diff --git a/doc/models/customer-response.md b/doc/models/customer-response.md index 507885ce..2bf1a024 100644 --- a/doc/models/customer-response.md +++ b/doc/models/customer-response.md @@ -11,17 +11,21 @@ | --- | --- | --- | --- | | `Customer` | [`Customer`](../../doc/models/customer.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +CustomerResponse customerResponse = new CustomerResponse { - "customer": { - "first_name": "first_name0", - "last_name": "last_name8", - "email": "email6", - "cc_emails": "cc_emails0", - "organization": "organization6" - } -} + Customer = new Customer + { + FirstName = "first_name0", + LastName = "last_name8", + Email = "email6", + CcEmails = "cc_emails0", + Organization = "organization6", + }, +}; ``` diff --git a/doc/models/customer.md b/doc/models/customer.md index 887584b3..23b83957 100644 --- a/doc/models/customer.md +++ b/doc/models/customer.md @@ -12,18 +12,18 @@ | `FirstName` | `string` | Optional | The first name of the customer | | `LastName` | `string` | Optional | The last name of the customer | | `Email` | `string` | Optional | The email address of the customer | -| `CcEmails` | `string` | Optional | A comma-separated list of emails that should be cc’d on all customer communications (i.e. “joe@example.com, sue@example.com”) | +| `CcEmails` | `string` | Optional | “A comma-separated list of emails that should be cc’d on all customer communications (e.g., “joe@example.com, sue@example.com”)” | | `Organization` | `string` | Optional | The organization of the customer. If no value, `null` or empty string is provided, `organization` will be populated with the customer's first and last name, separated with a space. | | `Reference` | `string` | Optional | The unique identifier used within your own application for this customer | | `Id` | `int?` | Optional | The customer ID in Chargify | | `CreatedAt` | `DateTimeOffset?` | Optional | The timestamp in which the customer object was created in Chargify | | `UpdatedAt` | `DateTimeOffset?` | Optional | The timestamp in which the customer object was last edited | -| `Address` | `string` | Optional | The customer’s shipping street address (i.e. “123 Main St.”) | -| `Address2` | `string` | Optional | Second line of the customer’s shipping address i.e. “Apt. 100” | -| `City` | `string` | Optional | The customer’s shipping address city (i.e. “Boston”) | -| `State` | `string` | Optional | The customer’s shipping address state (i.e. “MA”) | +| `Address` | `string` | Optional | The customer’s shipping street address (e.g., “123 Main St.”) | +| `Address2` | `string` | Optional | Second line of the customer’s shipping address e.g., “Apt. 100” | +| `City` | `string` | Optional | The customer’s shipping address city (e.g., “Boston”) | +| `State` | `string` | Optional | The customer’s shipping address state (e.g., “MA”) | | `StateName` | `string` | Optional | The customer's full name of state | -| `Zip` | `string` | Optional | The customer’s shipping address zip code (i.e. “12345”) | +| `Zip` | `string` | Optional | The customer’s shipping address zip code (e.g., “12345”) | | `Country` | `string` | Optional | The customer shipping address country | | `CountryName` | `string` | Optional | The customer's full name of country | | `Phone` | `string` | Optional | The phone number of the customer | @@ -32,6 +32,7 @@ | `PortalInviteLastSentAt` | `DateTimeOffset?` | Optional | The timestamp of when the Billing Portal invite was last sent at | | `PortalInviteLastAcceptedAt` | `DateTimeOffset?` | Optional | The timestamp of when the Billing Portal invite was last accepted | | `TaxExempt` | `bool?` | Optional | The tax exempt status for the customer. Acceptable values are true or 1 for true and false or 0 for false. | +| `Surcharging` | `bool?` | Optional | Whether surcharging is enabled for the customer. Only included on sites where surcharging control is enabled. | | `VatNumber` | `string` | Optional | The VAT business identification number for the customer. This number is used to determine VAT tax opt out rules. It is not validated when added or updated on a customer record. Instead, it is validated via VIES before calculating taxes. Only valid business identification numbers will allow for VAT opt out. | | `ParentId` | `int?` | Optional | The parent ID in Chargify if applicable. Parent is another Customer object. | | `Locale` | `string` | Optional | The locale for the customer to identify language-region | @@ -40,16 +41,20 @@ | `TaxExemptReason` | `string` | Optional | The Tax Exemption Reason Code for the customer | | `DefaultAutoRenewalProfileId` | `int?` | Optional | The default auto-renewal profile ID for the customer | | `Maxioid` | `string` | Optional | The Maxio-generated unique identifier for the customer. | +| `BrandingThemeId` | `int?` | Optional | The ID of the Branding Theme assigned to this customer as the customer's default Branding Theme. This customer-level Branding Theme is used when a subscription does not have its own subscription-level Branding Theme. Available only when Branding Themes are enabled for the site. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +Customer customer = new Customer { - "first_name": "first_name8", - "last_name": "last_name6", - "email": "email8", - "cc_emails": "cc_emails2", - "organization": "organization8" -} + FirstName = "first_name0", + LastName = "last_name8", + Email = "email6", + CcEmails = "cc_emails0", + Organization = "organization6", +}; ``` diff --git a/doc/models/debit-note-role.md b/doc/models/debit-note-role.md index d4bc83dd..df1284d6 100644 --- a/doc/models/debit-note-role.md +++ b/doc/models/debit-note-role.md @@ -14,3 +14,11 @@ The role of the debit note. | `Chargeback` | | `Refund` | +## Example + +```csharp +using AdvancedBilling.Standard.Models; + +DebitNoteRole debitNoteRole = DebitNoteRole.Chargeback; +``` + diff --git a/doc/models/debit-note-status.md b/doc/models/debit-note-status.md index 42e4a81c..10ab6845 100644 --- a/doc/models/debit-note-status.md +++ b/doc/models/debit-note-status.md @@ -16,3 +16,11 @@ Current status of the debit note. | `Banished` | | `Paid` | +## Example + +```csharp +using AdvancedBilling.Standard.Models; + +DebitNoteStatus debitNoteStatus = DebitNoteStatus.Open; +``` + diff --git a/doc/models/debit-note.md b/doc/models/debit-note.md index 9cea95e9..8c133f3e 100644 --- a/doc/models/debit-note.md +++ b/doc/models/debit-note.md @@ -13,10 +13,10 @@ | `SiteId` | `int?` | Optional | ID of the site to which the debit note belongs. | | `CustomerId` | `int?` | Optional | ID of the customer to which the debit note belongs. | | `SubscriptionId` | `int?` | Optional | ID of the subscription that generated the debit note. | -| `Number` | `int?` | Optional | A unique, identifier that appears on the debit note and in places it is referenced. | +| `Number` | `int?` | Optional | A unique identifier that appears on the debit note and in places it is referenced. | | `SequenceNumber` | `int?` | Optional | A monotonically increasing number assigned to debit notes as they are created. | | `OriginCreditNoteUid` | `string` | Optional | Unique identifier for the connected credit note. It is generated automatically by Chargify and has the prefix "cn_" followed by alphanumeric characters.

While the UID is long and not appropriate to show to customers, the number is usually shorter and consumable by the customer and the merchant alike. | -| `OriginCreditNoteNumber` | `string` | Optional | A unique, identifying string of the connected credit note. | +| `OriginCreditNoteNumber` | `string` | Optional | A unique identifying string of the connected credit note. | | `IssueDate` | `DateTime?` | Optional | Date the document was issued to the customer. This is the date that the document was made available for payment.

The format is "YYYY-MM-DD". | | `AppliedDate` | `DateTime?` | Optional | Debit notes are applied to invoices to offset invoiced amounts - they adjust the amount due. This field is the date the debit note document became fully applied to the invoice.

The format is "YYYY-MM-DD". | | `DueDate` | `DateTime?` | Optional | Date the document is due for payment. The format is "YYYY-MM-DD". | @@ -25,7 +25,7 @@ | `Role` | [`DebitNoteRole?`](../../doc/models/debit-note-role.md) | Optional | The role of the debit note. | | `Currency` | `string` | Optional | The ISO 4217 currency code (3 character string) representing the currency of the credit note amount fields. | | `Seller` | [`InvoiceSeller`](../../doc/models/invoice-seller.md) | Optional | Information about the seller (merchant) listed on the masthead of the debit note. | -| `Customer` | [`InvoiceCustomer`](../../doc/models/invoice-customer.md) | Optional | Information about the customer who is owner or recipient the debited subscription. | +| `Customer` | [`InvoiceCustomer`](../../doc/models/invoice-customer.md) | Optional | Information about the customer who is the owner or recipient of the debited subscription. | | `BillingAddress` | [`InvoiceAddress`](../../doc/models/invoice-address.md) | Optional | The billing address of the debited subscription. | | `ShippingAddress` | [`InvoiceAddress`](../../doc/models/invoice-address.md) | Optional | The shipping address of the debited subscription. | | `LineItems` | [`List`](../../doc/models/credit-note-line-item.md) | Optional | Line items on the debit note. | @@ -33,15 +33,18 @@ | `Taxes` | [`List`](../../doc/models/invoice-tax.md) | Optional | - | | `Refunds` | [`List`](../../doc/models/invoice-refund.md) | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +DebitNote debitNote = new DebitNote { - "uid": "uid2", - "site_id": 112, - "customer_id": 224, - "subscription_id": 40, - "number": 172 -} + Uid = "uid2", + SiteId = 196, + CustomerId = 52, + SubscriptionId = 124, + Number = 0, +}; ``` diff --git a/doc/models/deduct-service-credit-request.md b/doc/models/deduct-service-credit-request.md index 3a512203..0a7f0c8a 100644 --- a/doc/models/deduct-service-credit-request.md +++ b/doc/models/deduct-service-credit-request.md @@ -11,14 +11,19 @@ | --- | --- | --- | --- | | `Deduction` | [`DeductServiceCredit`](../../doc/models/deduct-service-credit.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using AdvancedBilling.Standard.Models.Containers; + +DeductServiceCreditRequest deductServiceCreditRequest = new DeductServiceCreditRequest { - "deduction": { - "amount": "String9", - "memo": "memo0" - } -} + Deduction = new DeductServiceCredit + { + Amount = DeductServiceCreditAmount.FromString("String9"), + Memo = "memo0", + }, +}; ``` diff --git a/doc/models/deduct-service-credit.md b/doc/models/deduct-service-credit.md index 5d7e3d96..a7d332b2 100644 --- a/doc/models/deduct-service-credit.md +++ b/doc/models/deduct-service-credit.md @@ -12,12 +12,16 @@ | `Amount` | [`DeductServiceCreditAmount`](../../doc/models/containers/deduct-service-credit-amount.md) | Required | This is a container for one-of cases. | | `Memo` | `string` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using AdvancedBilling.Standard.Models.Containers; + +DeductServiceCredit deductServiceCredit = new DeductServiceCredit { - "amount": "String1", - "memo": "memo2" -} + Amount = DeductServiceCreditAmount.FromString("String5"), + Memo = "memo6", +}; ``` diff --git a/doc/models/delayed-cancellation-response.md b/doc/models/delayed-cancellation-response.md index c1438745..d8612ed0 100644 --- a/doc/models/delayed-cancellation-response.md +++ b/doc/models/delayed-cancellation-response.md @@ -11,11 +11,14 @@ | --- | --- | --- | --- | | `Message` | `string` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +DelayedCancellationResponse delayedCancellationResponse = new DelayedCancellationResponse { - "message": "message8" -} + Message = "message4", +}; ``` diff --git a/doc/models/delete-subscription-group-response.md b/doc/models/delete-subscription-group-response.md index b780f9e7..748572dd 100644 --- a/doc/models/delete-subscription-group-response.md +++ b/doc/models/delete-subscription-group-response.md @@ -12,12 +12,15 @@ | `Uid` | `string` | Optional | - | | `Deleted` | `bool?` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +DeleteSubscriptionGroupResponse deleteSubscriptionGroupResponse = new DeleteSubscriptionGroupResponse { - "uid": "uid4", - "deleted": false -} + Uid = "uid0", + Deleted = false, +}; ``` diff --git a/doc/models/deliver-proforma-invoice-request.md b/doc/models/deliver-proforma-invoice-request.md index 53347352..5af2d612 100644 --- a/doc/models/deliver-proforma-invoice-request.md +++ b/doc/models/deliver-proforma-invoice-request.md @@ -13,21 +13,29 @@ | `CcRecipientEmails` | `List` | Optional | - | | `BccRecipientEmails` | `List` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Collections.Generic; + +DeliverProformaInvoiceRequest deliverProformaInvoiceRequest = new DeliverProformaInvoiceRequest { - "recipient_emails": [ - "recipient_emails9" - ], - "cc_recipient_emails": [ - "cc_recipient_emails8" - ], - "bcc_recipient_emails": [ - "bcc_recipient_emails2", - "bcc_recipient_emails3", - "bcc_recipient_emails4" - ] -} + RecipientEmails = new List + { + "recipient_emails3", + "recipient_emails4", + }, + CcRecipientEmails = new List + { + "cc_recipient_emails2", + "cc_recipient_emails1", + "cc_recipient_emails0", + }, + BccRecipientEmails = new List + { + "bcc_recipient_emails6", + }, +}; ``` diff --git a/doc/models/direction.md b/doc/models/direction.md index 356aa18f..900763a7 100644 --- a/doc/models/direction.md +++ b/doc/models/direction.md @@ -12,3 +12,11 @@ | `Asc` | | `Desc` | +## Example + +```csharp +using AdvancedBilling.Standard.Models; + +Direction direction = Direction.Asc; +``` + diff --git a/doc/models/discount-type.md b/doc/models/discount-type.md index b08252c9..c8b73ab4 100644 --- a/doc/models/discount-type.md +++ b/doc/models/discount-type.md @@ -12,3 +12,11 @@ | `Amount` | | `Percent` | +## Example + +```csharp +using AdvancedBilling.Standard.Models; + +DiscountType discountType = DiscountType.Amount; +``` + diff --git a/doc/models/downgrade-credit-credit-type.md b/doc/models/downgrade-credit-credit-type.md index 3b0e9c92..50881ee2 100644 --- a/doc/models/downgrade-credit-credit-type.md +++ b/doc/models/downgrade-credit-credit-type.md @@ -21,3 +21,11 @@ The type of credit to be created when upgrading/downgrading. Defaults to the com | `Prorated` | | `None` | +## Example + +```csharp +using AdvancedBilling.Standard.Models; + +DowngradeCreditCreditType downgradeCreditCreditType = DowngradeCreditCreditType.Full; +``` + diff --git a/doc/models/dunner-data.md b/doc/models/dunner-data.md index 2bc2d4c3..f49d7ead 100644 --- a/doc/models/dunner-data.md +++ b/doc/models/dunner-data.md @@ -16,16 +16,24 @@ | `Attempts` | `int` | Required | - | | `LastAttemptedAt` | `DateTimeOffset` | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Globalization; + +DunnerData dunnerData = new DunnerData { - "state": "state4", - "subscription_id": 126, - "revenue_at_risk_in_cents": 30, - "created_at": "2016-03-13T12:52:32.123Z", - "attempts": 110, - "last_attempted_at": "2016-03-13T12:52:32.123Z" -} + State = "state4", + SubscriptionId = 230, + RevenueAtRiskInCents = 134L, + CreatedAt = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + Attempts = 6, + LastAttemptedAt = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), +}; ``` diff --git a/doc/models/dunning-step-data.md b/doc/models/dunning-step-data.md index 41d8afea..3255bf43 100644 --- a/doc/models/dunning-step-data.md +++ b/doc/models/dunning-step-data.md @@ -18,18 +18,21 @@ | `SendSms` | `bool` | Required | - | | `SmsBody` | `string` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +DunningStepData dunningStepData = new DunningStepData { - "day_threshold": 88, - "action": "action4", - "email_body": "email_body4", - "email_subject": "email_subject4", - "send_email": false, - "send_bcc_email": false, - "send_sms": false, - "sms_body": "sms_body0" -} + DayThreshold = 206, + Action = "action6", + SendEmail = false, + SendBccEmail = false, + SendSms = false, + EmailBody = "email_body6", + EmailSubject = "email_subject6", + SmsBody = "sms_body8", +}; ``` diff --git a/doc/models/dunning-step-reached.md b/doc/models/dunning-step-reached.md index e2817263..d65d9019 100644 --- a/doc/models/dunning-step-reached.md +++ b/doc/models/dunning-step-reached.md @@ -13,38 +13,49 @@ | `CurrentStep` | [`DunningStepData`](../../doc/models/dunning-step-data.md) | Required | - | | `NextStep` | [`DunningStepData`](../../doc/models/dunning-step-data.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Globalization; + +DunningStepReached dunningStepReached = new DunningStepReached { - "dunner": { - "state": "state8", - "subscription_id": 194, - "revenue_at_risk_in_cents": 98, - "created_at": "2016-03-13T12:52:32.123Z", - "attempts": 42, - "last_attempted_at": "2016-03-13T12:52:32.123Z" - }, - "current_step": { - "day_threshold": 198, - "action": "action4", - "email_body": "email_body4", - "email_subject": "email_subject6", - "send_email": false, - "send_bcc_email": false, - "send_sms": false, - "sms_body": "sms_body0" - }, - "next_step": { - "day_threshold": 30, - "action": "action4", - "email_body": "email_body4", - "email_subject": "email_subject4", - "send_email": false, - "send_bcc_email": false, - "send_sms": false, - "sms_body": "sms_body0" - } -} + Dunner = new DunnerData + { + State = "state8", + SubscriptionId = 194, + RevenueAtRiskInCents = 98L, + CreatedAt = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + Attempts = 42, + LastAttemptedAt = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + }, + CurrentStep = new DunningStepData + { + DayThreshold = 198, + Action = "action4", + SendEmail = false, + SendBccEmail = false, + SendSms = false, + EmailBody = "email_body4", + EmailSubject = "email_subject6", + SmsBody = "sms_body0", + }, + NextStep = new DunningStepData + { + DayThreshold = 30, + Action = "action4", + SendEmail = false, + SendBccEmail = false, + SendSms = false, + EmailBody = "email_body4", + EmailSubject = "email_subject4", + SmsBody = "sms_body0", + }, +}; ``` diff --git a/doc/models/ebb-component.md b/doc/models/ebb-component.md index ab4f1bdb..d6f034e9 100644 --- a/doc/models/ebb-component.md +++ b/doc/models/ebb-component.md @@ -9,10 +9,10 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `Name` | `string` | Required | A name for this component that is suitable for showing customers and displaying on billing statements, ie. "Minutes". | -| `UnitName` | `string` | Required | The name of the unit of measurement for the component. It should be singular since it will be automatically pluralized when necessary. i.e. “message”, which may then be shown as “5 messages” on a subscription’s component line-item | +| `Name` | `string` | Required | A name for this component that is suitable for showing customers and displaying on billing statements, i.e., "Minutes". | +| `UnitName` | `string` | Required | “The name of the unit of measurement for the component. It should be singular since it will be automatically pluralized when necessary. i.e., “message”, which may then be shown as “5 messages” on a subscription’s component line-item” | | `Description` | `string` | Optional | A description for the component that will be displayed to the user on the hosted signup page. | -| `Handle` | `string` | Optional | A unique identifier for your use that can be used to retrieve this component is subsequent requests. Must start with a letter or number and may only contain lowercase letters, numbers, or the characters '.', ':', '-', or '_'.

**Constraints**: *Pattern*: `^[a-z0-9][a-z0-9\-_:.]*$` | +| `Handle` | `string` | Optional | A unique identifier for your use that can be used to retrieve this component in subsequent requests. Must start with a letter or number and may only contain lowercase letters, numbers, or the characters '.', ':', '-', or '_'.

**Constraints**: *Pattern*: `^[a-z0-9][a-z0-9\-_:.]*$` | | `Taxable` | `bool?` | Optional | Boolean flag describing whether a component is taxable or not. | | `PricingScheme` | [`PricingScheme`](../../doc/models/pricing-scheme.md) | Required | The identifier for the pricing scheme. See [Product Components](https://help.chargify.com/products/product-components.html) for an overview of pricing schemes. | | `Prices` | [`List`](../../doc/models/price.md) | Optional | (Not required for ‘per_unit’ pricing schemes) One or more price brackets. See [Price Bracket Rules](https://maxio.zendesk.com/hc/en-us/articles/24261149166733-Component-Pricing-Schemes#price-bracket-rules) for an overview of how price brackets work for different pricing schemes. | @@ -21,36 +21,68 @@ | `TaxCode` | `string` | Optional | 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. | | `HideDateRangeOnInvoice` | `bool?` | Optional | (Only available on Relationship Invoicing sites) Boolean flag describing if the service date range should show for the component on generated invoices. | | `EventBasedBillingMetricId` | `int` | Required | The ID of an event based billing metric that will be attached to this component. | -| `Interval` | `int?` | Optional | The numerical interval. i.e. an interval of ‘30’ coupled with an interval_unit of day would mean this component's default price point would renew every 30 days. This property is only available for sites with Multifrequency enabled. | +| `Interval` | `int?` | Optional | The numerical interval. i.e., an interval of ‘30’ coupled with an interval_unit of day would mean this component's default price point would renew every 30 days. This property is only available for sites with Multifrequency enabled. | | `IntervalUnit` | [`IntervalUnit?`](../../doc/models/interval-unit.md) | Optional | A string representing the interval unit for this component's default price point, either month or day. This property is only available for sites with Multifrequency enabled. | +| `UnspscCode` | `string` | Optional | (Optional) Custom UNSPSC commodity code for Level 3/CEDP payment data. When set, this value is sent as the commodity code on invoice line items for this component instead of the default derived from item_category. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using AdvancedBilling.Standard.Models.Containers; +using System.Collections.Generic; + +EBBComponent eBBComponent = new EBBComponent { - "name": "name0", - "unit_name": "unit_name2", - "description": "description0", - "handle": "handle6", - "taxable": false, - "pricing_scheme": "per_unit", - "prices": [ + Name = "name0", + UnitName = "unit_name2", + PricingScheme = PricingScheme.Stairstep, + EventBasedBillingMetricId = 36, + Description = "description0", + Handle = "handle6", + Taxable = false, + Prices = new List { - "starting_quantity": 242, - "ending_quantity": 40, - "unit_price": 23.26 - } - ], - "price_points": [ + new Price + { + StartingQuantity = PriceStartingQuantity.FromNumber(242), + UnitPrice = PriceUnitPrice.FromPrecision(23.26), + EndingQuantity = PriceEndingQuantity.FromNumber(40), + }, + new Price + { + StartingQuantity = PriceStartingQuantity.FromNumber(242), + UnitPrice = PriceUnitPrice.FromPrecision(23.26), + EndingQuantity = PriceEndingQuantity.FromNumber(40), + }, + }, + PricePoints = new List { - "name": "name2", - "handle": "handle8", - "pricing_scheme": "per_unit", - "interval": 92, - "interval_unit": "day" - } - ], - "event_based_billing_metric_id": 190 -} + new ComponentPricePointItem + { + Name = "name2", + Handle = "handle8", + PricingScheme = PricingScheme.PerUnit, + Interval = 92, + IntervalUnit = IntervalUnit.Day, + }, + new ComponentPricePointItem + { + Name = "name2", + Handle = "handle8", + PricingScheme = PricingScheme.PerUnit, + Interval = 92, + IntervalUnit = IntervalUnit.Day, + }, + new ComponentPricePointItem + { + Name = "name2", + Handle = "handle8", + PricingScheme = PricingScheme.PerUnit, + Interval = 92, + IntervalUnit = IntervalUnit.Day, + }, + }, +}; ``` diff --git a/doc/models/ebb-event.md b/doc/models/ebb-event.md index f82e99c6..824cca40 100644 --- a/doc/models/ebb-event.md +++ b/doc/models/ebb-event.md @@ -11,28 +11,21 @@ | --- | --- | --- | --- | | `Chargify` | [`ChargifyEBB`](../../doc/models/chargify-ebb.md) | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Globalization; + +EBBEvent eBBEvent = new EBBEvent { - "chargify": { - "subscription_id": 1, - "timestamp": "2020-02-27T17:45:50-05:00", - "id": "id6", - "created_at": "2016-03-13T12:52:32.123Z", - "uniqueness_token": "uniqueness_token2" - }, - "messages": 150, - "country": "US", - "customer": { - "name": "John", - "lastName": "Doe", - "address": { - "street": "Maple Street", - "zip": 4888, - "state": "MA" - } - } -} + Chargify = new ChargifyEBB + { + Timestamp = DateTime.ParseExact("2020-02-27T17:45:50-05:00", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + SubscriptionId = 1, + }, +}; ``` diff --git a/doc/models/enable-webhooks-request.md b/doc/models/enable-webhooks-request.md index 317c4289..4d0d2e82 100644 --- a/doc/models/enable-webhooks-request.md +++ b/doc/models/enable-webhooks-request.md @@ -11,11 +11,14 @@ | --- | --- | --- | --- | | `WebhooksEnabled` | `bool` | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +EnableWebhooksRequest enableWebhooksRequest = new EnableWebhooksRequest { - "webhooks_enabled": false -} + WebhooksEnabled = false, +}; ``` diff --git a/doc/models/enable-webhooks-response.md b/doc/models/enable-webhooks-response.md index 1e4c2a43..c352ec95 100644 --- a/doc/models/enable-webhooks-response.md +++ b/doc/models/enable-webhooks-response.md @@ -11,11 +11,14 @@ | --- | --- | --- | --- | | `WebhooksEnabled` | `bool?` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +EnableWebhooksResponse enableWebhooksResponse = new EnableWebhooksResponse { - "webhooks_enabled": false -} + WebhooksEnabled = false, +}; ``` diff --git a/doc/models/endpoint-response.md b/doc/models/endpoint-response.md index e2d544c9..414dc57b 100644 --- a/doc/models/endpoint-response.md +++ b/doc/models/endpoint-response.md @@ -11,19 +11,25 @@ | --- | --- | --- | --- | | `Endpoint` | [`Endpoint`](../../doc/models/endpoint.md) | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Collections.Generic; + +EndpointResponse endpointResponse = new EndpointResponse { - "endpoint": { - "id": 202, - "url": "url2", - "site_id": 128, - "status": "status0", - "webhook_subscriptions": [ - "webhook_subscriptions4" - ] - } -} + Endpoint = new Endpoint + { + Id = 202, + Url = "url2", + SiteId = 128, + Status = "status0", + WebhookSubscriptions = new List + { + "webhook_subscriptions4", + }, + }, +}; ``` diff --git a/doc/models/endpoint.md b/doc/models/endpoint.md index 4bbf05cf..cb858767 100644 --- a/doc/models/endpoint.md +++ b/doc/models/endpoint.md @@ -15,18 +15,22 @@ | `Status` | `string` | Optional | - | | `WebhookSubscriptions` | `List` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Collections.Generic; + +Endpoint endpoint = new Endpoint { - "id": 196, - "url": "url2", - "site_id": 122, - "status": "status0", - "webhook_subscriptions": [ - "webhook_subscriptions4", - "webhook_subscriptions3" - ] -} + Id = 202, + Url = "url2", + SiteId = 128, + Status = "status0", + WebhookSubscriptions = new List + { + "webhook_subscriptions4", + }, +}; ``` diff --git a/doc/models/error-array-map-response-exception.md b/doc/models/error-array-map-response-exception.md index e4241286..9fb5a97b 100644 --- a/doc/models/error-array-map-response-exception.md +++ b/doc/models/error-array-map-response-exception.md @@ -11,16 +11,20 @@ | --- | --- | --- | --- | | `Errors` | `object` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +try { - "errors": { - "key0": { - "key1": "val1", - "key2": "val2" + // make the API call +} +catch (ApiException e) +{ + if (e is ErrorArrayMapResponseException) + { + // TODO: Handle ErrorArrayMapResponseException + Console.WriteLine(e.Message); } - } } ``` diff --git a/doc/models/error-list-response-exception.md b/doc/models/error-list-response-exception.md index e54ad200..5ba79e67 100644 --- a/doc/models/error-list-response-exception.md +++ b/doc/models/error-list-response-exception.md @@ -13,15 +13,20 @@ Error which contains list of messages. | --- | --- | --- | --- | | `Errors` | `List` | Required | - | -## Example (as JSON) +## Example -```json +```csharp +try { - "errors": [ - "errors5", - "errors6", - "errors7" - ] + // make the API call +} +catch (ApiException e) +{ + if (e is ErrorListResponseException) + { + // TODO: Handle ErrorListResponseException + Console.WriteLine(e.Message); + } } ``` diff --git a/doc/models/error-string-map-response-exception.md b/doc/models/error-string-map-response-exception.md index 732a6d68..8bfc5ee3 100644 --- a/doc/models/error-string-map-response-exception.md +++ b/doc/models/error-string-map-response-exception.md @@ -11,14 +11,20 @@ | --- | --- | --- | --- | | `Errors` | `Dictionary` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +try { - "errors": { - "key0": "errors3", - "key1": "errors4" - } + // make the API call +} +catch (ApiException e) +{ + if (e is ErrorStringMapResponseException) + { + // TODO: Handle ErrorStringMapResponseException + Console.WriteLine(e.Message); + } } ``` diff --git a/doc/models/errors.md b/doc/models/errors.md index 91d077be..cf269758 100644 --- a/doc/models/errors.md +++ b/doc/models/errors.md @@ -12,18 +12,26 @@ | `PerPage` | `List` | Optional | - | | `PricePoint` | `List` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Collections.Generic; + +Errors errors = new Errors { - "per_page": [ - "per_page7", - "per_page8" - ], - "price_point": [ - "price_point6", - "price_point7" - ] -} + PerPage = new List + { + "per_page1", + "per_page2", + "per_page3", + }, + PricePoint = new List + { + "price_point0", + "price_point9", + "price_point8", + }, +}; ``` diff --git a/doc/models/event-based-billing-list-segments-errors-exception.md b/doc/models/event-based-billing-list-segments-errors-exception.md index 9814b948..fd755f94 100644 --- a/doc/models/event-based-billing-list-segments-errors-exception.md +++ b/doc/models/event-based-billing-list-segments-errors-exception.md @@ -11,22 +11,20 @@ | --- | --- | --- | --- | | `Errors` | [`Errors`](../../doc/models/errors.md) | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +try { - "errors": { - "per_page": [ - "per_page1", - "per_page2", - "per_page3" - ], - "price_point": [ - "price_point0", - "price_point9", - "price_point8" - ] - } + // make the API call +} +catch (ApiException e) +{ + if (e is EventBasedBillingListSegmentsErrorsException) + { + // TODO: Handle EventBasedBillingListSegmentsErrorsException + Console.WriteLine(e.Message); + } } ``` diff --git a/doc/models/event-based-billing-segment-error.md b/doc/models/event-based-billing-segment-error.md index ec663851..a23dab14 100644 --- a/doc/models/event-based-billing-segment-error.md +++ b/doc/models/event-based-billing-segment-error.md @@ -11,20 +11,20 @@ | --- | --- | --- | --- | | `Segments` | `object` | Required | The key of the object would be a number (an index in the request array) where the error occurred. In the value object, the key represents the field and the value is an array with error messages. In most cases, this object would contain just one key. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using AdvancedBilling.Standard.Utilities; +using System.Collections.Generic; + +EventBasedBillingSegmentError eventBasedBillingSegmentError = new EventBasedBillingSegmentError { - "segments": { - "key0": { - "key1": "val1", - "key2": "val2" + Segments = new Dictionary + { + ["key0"] = ApiHelper.JsonDeserialize("{\"key1\":\"val1\",\"key2\":\"val2\"}"), + ["key1"] = ApiHelper.JsonDeserialize("{\"key1\":\"val1\",\"key2\":\"val2\"}"), }, - "key1": { - "key1": "val1", - "key2": "val2" - } - } -} +}; ``` diff --git a/doc/models/event-based-billing-segment-errors-exception.md b/doc/models/event-based-billing-segment-errors-exception.md index a5615dc5..f6007fb6 100644 --- a/doc/models/event-based-billing-segment-errors-exception.md +++ b/doc/models/event-based-billing-segment-errors-exception.md @@ -11,24 +11,20 @@ | --- | --- | --- | --- | | `Errors` | `object` | Optional | The key of the object would be a number (an index in the request array) where the error occurred. In the value object, the key represents the field and the value is an array with error messages. In most cases, this object would contain just one key. | -## Example (as JSON) +## Example -```json +```csharp +try { - "errors": { - "key0": { - "key1": "val1", - "key2": "val2" - }, - "key1": { - "key1": "val1", - "key2": "val2" - }, - "key2": { - "key1": "val1", - "key2": "val2" + // make the API call +} +catch (ApiException e) +{ + if (e is EventBasedBillingSegmentErrorsException) + { + // TODO: Handle EventBasedBillingSegmentErrorsException + Console.WriteLine(e.Message); } - } } ``` diff --git a/doc/models/event-based-billing-segment-exception.md b/doc/models/event-based-billing-segment-exception.md index efe06ad7..d408ba24 100644 --- a/doc/models/event-based-billing-segment-exception.md +++ b/doc/models/event-based-billing-segment-exception.md @@ -11,18 +11,20 @@ | --- | --- | --- | --- | | `Errors` | [`EventBasedBillingSegmentError`](../../doc/models/event-based-billing-segment-error.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +try { - "errors": { - "segments": { - "key0": { - "key1": "val1", - "key2": "val2" - } + // make the API call +} +catch (ApiException e) +{ + if (e is EventBasedBillingSegmentException) + { + // TODO: Handle EventBasedBillingSegmentException + Console.WriteLine(e.Message); } - } } ``` diff --git a/doc/models/event-key.md b/doc/models/event-key.md index 351618c0..462eadf1 100644 --- a/doc/models/event-key.md +++ b/doc/models/event-key.md @@ -21,6 +21,7 @@ | `RenewalFailure` | | `SubscriptionStateChange` | | `SubscriptionProductChange` | +| `SubscriptionProductChangeScheduled` | | `PendingCancellationChange` | | `ExpiringCard` | | `CustomerUpdate` | @@ -93,3 +94,11 @@ | `SubscriptionTermRenewalActivated` | | `SubscriptionTermRenewalRemoved` | +## Example + +```csharp +using AdvancedBilling.Standard.Models; + +EventKey eventKey = EventKey.SubscriptionGroupSignupSuccess; +``` + diff --git a/doc/models/event-response.md b/doc/models/event-response.md index d617241c..9a3359f3 100644 --- a/doc/models/event-response.md +++ b/doc/models/event-response.md @@ -11,34 +11,38 @@ | --- | --- | --- | --- | | `Event` | [`Event`](../../doc/models/event.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using AdvancedBilling.Standard.Models.Containers; +using System.Globalization; + +EventResponse eventResponse = new EventResponse { - "event": { - "id": 242, - "key": "maxio_payments_direct_debit_payment_rejected", - "message": "message0", - "subscription_id": 96, - "customer_id": 24, - "created_at": "2016-03-13T12:52:32.123Z", - "event_specific_data": { - "previous_unit_balance": null, - "previous_overage_unit_balance": null, - "new_unit_balance": null, - "new_overage_unit_balance": null, - "usage_quantity": null, - "overage_usage_quantity": null, - "component_id": null, - "component_handle": null, - "memo": null, - "allocation_details": [ - null - ], - "previous_product_id": 126, - "new_product_id": 12 - } - } -} + MEvent = new Event + { + Id = 242L, + Key = EventKey.SubscriptionRemovedFromGroup, + Message = "message0", + SubscriptionId = 96, + CustomerId = 24, + CreatedAt = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + EventSpecificData = EventEventSpecificData.FromSubscriptionProductChange( + new SubscriptionProductChange + { + PreviousProductId = 126, + NewProductId = 12, + PreviousProductPricePointId = 250, + NewProductPricePointId = 244, + EffectiveAt = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + } + ), + }, +}; ``` diff --git a/doc/models/event.md b/doc/models/event.md index 30048080..2518ed75 100644 --- a/doc/models/event.md +++ b/doc/models/event.md @@ -17,32 +17,35 @@ | `CreatedAt` | `DateTimeOffset` | Required | - | | `EventSpecificData` | [`EventEventSpecificData`](../../doc/models/containers/event-event-specific-data.md) | Required | This is a container for one-of cases. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using AdvancedBilling.Standard.Models.Containers; +using System.Globalization; + +Event mEvent = new Event { - "id": 40, - "key": "subscription_group_signup_success", - "message": "message8", - "subscription_id": 150, - "customer_id": 78, - "created_at": "2016-03-13T12:52:32.123Z", - "event_specific_data": { - "previous_unit_balance": null, - "previous_overage_unit_balance": null, - "new_unit_balance": null, - "new_overage_unit_balance": null, - "usage_quantity": null, - "overage_usage_quantity": null, - "component_id": null, - "component_handle": null, - "memo": null, - "allocation_details": [ - null - ], - "previous_product_id": 126, - "new_product_id": 12 - } -} + Id = 174L, + Key = EventKey.SubscriptionGroupCardUpdate, + Message = "message4", + SubscriptionId = 28, + CustomerId = 212, + CreatedAt = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + EventSpecificData = EventEventSpecificData.FromSubscriptionProductChange( + new SubscriptionProductChange + { + PreviousProductId = 126, + NewProductId = 12, + PreviousProductPricePointId = 250, + NewProductPricePointId = 244, + EffectiveAt = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + } + ), +}; ``` diff --git a/doc/models/expiration-interval-unit.md b/doc/models/expiration-interval-unit.md index c0ee210b..8fdc7a14 100644 --- a/doc/models/expiration-interval-unit.md +++ b/doc/models/expiration-interval-unit.md @@ -13,3 +13,11 @@ | `Month` | | `Never` | +## Example + +```csharp +using AdvancedBilling.Standard.Models; + +ExpirationIntervalUnit expirationIntervalUnit = ExpirationIntervalUnit.Never; +``` + diff --git a/doc/models/failed-payment-action.md b/doc/models/failed-payment-action.md index 9a6a809b..88b5ae8d 100644 --- a/doc/models/failed-payment-action.md +++ b/doc/models/failed-payment-action.md @@ -5,7 +5,7 @@ Action taken when payment for an invoice fails: - `leave_open_invoice` - prepayments and credits applied to invoice; invoice status set to "open"; email sent to the customer for the issued invoice (if setting applies); payment failure recorded in the invoice history. This is the default option. - `rollback_to_pending` - prepayments and credits not applied; invoice remains in "pending" status; no email sent to the customer; payment failure recorded in the invoice history. -- `initiate_dunning` - prepayments and credits applied to the invoice; invoice status set to "open"; email sent to the customer for the issued invoice (if setting applies); payment failure recorded in the invoice history; subscription will most likely go into "past_due" or "canceled" state (depending upon net terms and dunning settings). +- `initiate_dunning` - prepayments and credits applied to the invoice; invoice status set to "open"; email sent to the customer for the issued invoice (if setting applies); payment failure recorded in the invoice history; subscription will most likely go into "past_due" or "canceled" state (depending upon net terms and dunning settings). ## Enumeration @@ -19,3 +19,11 @@ Action taken when payment for an invoice fails: | `RollbackToPending` | | `InitiateDunning` | +## Example + +```csharp +using AdvancedBilling.Standard.Models; + +FailedPaymentAction failedPaymentAction = FailedPaymentAction.LeaveOpenInvoice; +``` + diff --git a/doc/models/failed-payment-event-data.md b/doc/models/failed-payment-event-data.md index 0d127321..69ed493f 100644 --- a/doc/models/failed-payment-event-data.md +++ b/doc/models/failed-payment-event-data.md @@ -17,15 +17,18 @@ Example schema for an `failed_payment` event | `PaymentMethod` | [`InvoicePaymentMethodType`](../../doc/models/invoice-payment-method-type.md) | Required | - | | `TransactionId` | `int` | Required | The transaction ID of the failed payment. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +FailedPaymentEventData failedPaymentEventData = new FailedPaymentEventData { - "amount_in_cents": 128, - "applied_amount": 154, - "memo": "memo2", - "payment_method": "credit_card", - "transaction_id": 170 -} + AmountInCents = 34, + AppliedAmount = 196, + PaymentMethod = InvoicePaymentMethodType.Ach, + TransactionId = 76, + Memo = "memo0", +}; ``` diff --git a/doc/models/failed-payment-event.md b/doc/models/failed-payment-event.md index 622eb4c3..a980d748 100644 --- a/doc/models/failed-payment-event.md +++ b/doc/models/failed-payment-event.md @@ -15,31 +15,39 @@ | `EventType` | [`InvoiceEventType`](../../doc/models/invoice-event-type.md) | Required | **Default**: `InvoiceEventType.failed_payment` | | `EventData` | [`FailedPaymentEventData`](../../doc/models/failed-payment-event-data.md) | Required | Example schema for an `failed_payment` event | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Globalization; + +FailedPaymentEvent failedPaymentEvent = new FailedPaymentEvent { - "id": 120, - "timestamp": "2016-03-13T12:52:32.123Z", - "invoice": { - "issue_date": "2024-01-01", - "due_date": "2024-01-01", - "paid_date": "2024-01-01", - "public_url_expires_on": "2024-01-21", - "id": 166, - "uid": "uid6", - "site_id": 92, - "customer_id": 204, - "subscription_id": 20 - }, - "event_type": "failed_payment", - "event_data": { - "amount_in_cents": 220, - "applied_amount": 194, - "memo": "memo0", - "payment_method": "cash", - "transaction_id": 78 - } -} + Id = 186L, + Timestamp = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + Invoice = new Invoice + { + Id = 166L, + Uid = "uid6", + SiteId = 92, + CustomerId = 204, + SubscriptionId = 20, + IssueDate = DateTime.Parse("2024-01-01"), + DueDate = DateTime.Parse("2024-01-01"), + PaidDate = DateTime.Parse("2024-01-01"), + PublicUrlExpiresOn = DateTime.Parse("2024-01-21"), + }, + EventType = InvoiceEventType.FailedPayment, + EventData = new FailedPaymentEventData + { + AmountInCents = 220, + AppliedAmount = 194, + PaymentMethod = InvoicePaymentMethodType.Cash, + TransactionId = 78, + Memo = "memo0", + }, +}; ``` diff --git a/doc/models/first-charge-type.md b/doc/models/first-charge-type.md index c35a7c93..04cc6cb5 100644 --- a/doc/models/first-charge-type.md +++ b/doc/models/first-charge-type.md @@ -13,3 +13,11 @@ | `Immediate` | | `Delayed` | +## Example + +```csharp +using AdvancedBilling.Standard.Models; + +FirstChargeType firstChargeType = FirstChargeType.Delayed; +``` + diff --git a/doc/models/full-subscription-group-response.md b/doc/models/full-subscription-group-response.md index 72ef2695..ca097aa9 100644 --- a/doc/models/full-subscription-group-response.md +++ b/doc/models/full-subscription-group-response.md @@ -22,19 +22,24 @@ | `Customer` | [`SubscriptionGroupCustomer`](../../doc/models/subscription-group-customer.md) | Optional | - | | `AccountBalances` | [`SubscriptionGroupBalances`](../../doc/models/subscription-group-balances.md) | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Collections.Generic; + +FullSubscriptionGroupResponse fullSubscriptionGroupResponse = new FullSubscriptionGroupResponse { - "uid": "uid8", - "scheme": 90, - "customer_id": 110, - "payment_profile_id": 18, - "subscription_ids": [ - 220, - 221, - 222 - ] -} + Uid = "uid6", + Scheme = 80, + CustomerId = 100, + PaymentProfileId = 8, + SubscriptionIds = new List + { + 210, + 211, + 212, + }, +}; ``` diff --git a/doc/models/get-one-time-token-bank-account-payment-profile.md b/doc/models/get-one-time-token-bank-account-payment-profile.md new file mode 100644 index 00000000..18ec41c3 --- /dev/null +++ b/doc/models/get-one-time-token-bank-account-payment-profile.md @@ -0,0 +1,67 @@ + +# Get One Time Token Bank Account Payment Profile + +## Structure + +`GetOneTimeTokenBankAccountPaymentProfile` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `Id` | `string` | Optional | - | +| `FirstName` | `string` | Required | **Constraints**: *Minimum Length*: `1` | +| `LastName` | `string` | Required | **Constraints**: *Minimum Length*: `1` | +| `CustomerId` | `string` | Optional | - | +| `CurrentVault` | [`BankAccountVault`](../../doc/models/bank-account-vault.md) | Required | The vault that stores the payment profile with the provided vault_token. Use `bogus` for testing. | +| `VaultToken` | `string` | Required | **Constraints**: *Minimum Length*: `1` | +| `BillingAddress` | `string` | Required | **Constraints**: *Minimum Length*: `1` | +| `BillingAddress2` | `string` | Optional | - | +| `BillingCity` | `string` | Required | **Constraints**: *Minimum Length*: `1` | +| `BillingCountry` | `string` | Required | **Constraints**: *Minimum Length*: `1` | +| `BillingState` | `string` | Required | **Constraints**: *Minimum Length*: `1` | +| `BillingZip` | `string` | Required | **Constraints**: *Minimum Length*: `1` | +| `BankName` | `string` | Required | **Constraints**: *Minimum Length*: `1` | +| `MaskedBankRoutingNumber` | `string` | Required | **Constraints**: *Minimum Length*: `1` | +| `MaskedBankAccountNumber` | `string` | Required | **Constraints**: *Minimum Length*: `1` | +| `BankAccountType` | [`BankAccountType`](../../doc/models/bank-account-type.md) | Required | Defaults to checking | +| `BankAccountHolderType` | [`BankAccountHolderType`](../../doc/models/bank-account-holder-type.md) | Required | Defaults to personal | +| `PaymentType` | `string` | Required | **Constraints**: *Minimum Length*: `1` | +| `Disabled` | `bool` | Required | - | +| `SiteGatewaySettingId` | `int` | Required | - | +| `CustomerVaultToken` | `string` | Optional | - | +| `GatewayHandle` | `string` | Optional | - | +| `Verified` | `bool?` | Optional | - | + +## Example + +```csharp +using AdvancedBilling.Standard.Models; + +GetOneTimeTokenBankAccountPaymentProfile getOneTimeTokenBankAccountPaymentProfile = new GetOneTimeTokenBankAccountPaymentProfile +{ + FirstName = "first_name0", + LastName = "last_name8", + CurrentVault = BankAccountVault.Maxp, + VaultToken = "vault_token2", + BillingAddress = "billing_address2", + BillingCity = "billing_city8", + BillingCountry = "billing_country4", + BillingState = "billing_state6", + BillingZip = "billing_zip8", + BankName = "bank_name4", + MaskedBankRoutingNumber = "masked_bank_routing_number4", + MaskedBankAccountNumber = "masked_bank_account_number2", + BankAccountType = BankAccountType.Checking, + BankAccountHolderType = BankAccountHolderType.Personal, + PaymentType = "payment_type0", + Disabled = false, + SiteGatewaySettingId = 246, + Id = "id0", + CustomerId = "customer_id8", + BillingAddress2 = "billing_address_22", + CustomerVaultToken = "customer_vault_token8", + GatewayHandle = "gateway_handle2", +}; +``` + diff --git a/doc/models/get-one-time-token-payment-profile.md b/doc/models/get-one-time-token-payment-profile.md index 84b8d665..96a8b7d4 100644 --- a/doc/models/get-one-time-token-payment-profile.md +++ b/doc/models/get-one-time-token-payment-profile.md @@ -31,31 +31,34 @@ | `CustomerVaultToken` | `string` | Optional | - | | `GatewayHandle` | `string` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +GetOneTimeTokenPaymentProfile getOneTimeTokenPaymentProfile = new GetOneTimeTokenPaymentProfile { - "id": "id2", - "first_name": "first_name2", - "last_name": "last_name0", - "masked_card_number": "masked_card_number0", - "card_type": "routex", - "expiration_month": 187.78, - "expiration_year": 164.44, - "customer_id": "customer_id0", - "current_vault": "braintree_blue", - "vault_token": "vault_token4", - "billing_address": "billing_address4", - "billing_address_2": "billing_address_24", - "billing_city": "billing_city0", - "billing_country": "billing_country6", - "billing_state": "billing_state6", - "billing_zip": "billing_zip0", - "payment_type": "payment_type2", - "disabled": false, - "site_gateway_setting_id": 232, - "customer_vault_token": "customer_vault_token0", - "gateway_handle": "gateway_handle4" -} + FirstName = "first_name4", + LastName = "last_name2", + MaskedCardNumber = "masked_card_number2", + CardType = CardType.MaestroNoLuhn, + ExpirationMonth = 28.3, + ExpirationYear = 4.96, + CurrentVault = CreditCardVault.TrustCommerce, + VaultToken = "vault_token6", + BillingAddress = "billing_address6", + BillingCity = "billing_city2", + BillingCountry = "billing_country8", + BillingState = "billing_state2", + BillingZip = "billing_zip2", + PaymentType = "payment_type6", + Disabled = false, + SiteGatewaySettingId = 156, + Id = "id4", + CustomerId = "customer_id2", + BillingAddress2 = "billing_address_26", + CustomerVaultToken = "customer_vault_token2", + GatewayHandle = "gateway_handle6", +}; ``` diff --git a/doc/models/get-one-time-token-request.md b/doc/models/get-one-time-token-request.md index 30aad92b..439460c8 100644 --- a/doc/models/get-one-time-token-request.md +++ b/doc/models/get-one-time-token-request.md @@ -9,35 +9,42 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `PaymentProfile` | [`GetOneTimeTokenPaymentProfile`](../../doc/models/get-one-time-token-payment-profile.md) | Required | - | +| `PaymentProfile` | [`GetOneTimeTokenRequestPaymentProfile`](../../doc/models/containers/get-one-time-token-request-payment-profile.md) | Required | This is a container for any-of cases. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using AdvancedBilling.Standard.Models.Containers; + +GetOneTimeTokenRequest getOneTimeTokenRequest = new GetOneTimeTokenRequest { - "payment_profile": { - "id": "id4", - "first_name": "first_name4", - "last_name": "last_name2", - "masked_card_number": "masked_card_number2", - "card_type": "bogus", - "expiration_month": 133.5, - "expiration_year": 156.84, - "customer_id": "customer_id2", - "current_vault": "stripe", - "vault_token": "vault_token6", - "billing_address": "billing_address4", - "billing_address_2": "billing_address_26", - "billing_city": "billing_city8", - "billing_country": "billing_country2", - "billing_state": "billing_state2", - "billing_zip": "billing_zip2", - "payment_type": "payment_type6", - "disabled": false, - "site_gateway_setting_id": 104, - "customer_vault_token": "customer_vault_token2", - "gateway_handle": "gateway_handle4" - } -} + PaymentProfile = GetOneTimeTokenRequestPaymentProfile.FromGetOneTimeTokenPaymentProfile( + new GetOneTimeTokenPaymentProfile + { + FirstName = "first_name2", + LastName = "last_name0", + MaskedCardNumber = "masked_card_number0", + CardType = CardType.Routex, + ExpirationMonth = 187.78, + ExpirationYear = 164.44, + CurrentVault = CreditCardVault.BraintreeBlue, + VaultToken = "vault_token4", + BillingAddress = "billing_address4", + BillingCity = "billing_city0", + BillingCountry = "billing_country6", + BillingState = "billing_state6", + BillingZip = "billing_zip0", + PaymentType = "payment_type2", + Disabled = false, + SiteGatewaySettingId = 232, + Id = "id2", + CustomerId = "customer_id0", + BillingAddress2 = "billing_address_24", + CustomerVaultToken = "customer_vault_token0", + GatewayHandle = "gateway_handle4", + } + ), +}; ``` diff --git a/doc/models/group-billing.md b/doc/models/group-billing.md index 8fdd5886..21e579bb 100644 --- a/doc/models/group-billing.md +++ b/doc/models/group-billing.md @@ -1,7 +1,7 @@ # Group Billing -Optional attributes related to billing date and accrual. Note: Only applicable for new subscriptions. +(Optional) Attributes related to billing date and accrual. Note: Only applicable for new subscriptions. ## Structure @@ -15,13 +15,16 @@ Optional attributes related to billing date and accrual. Note: Only applicable f | `AlignDate` | `bool?` | Optional | A flag indicating whether or not to align the billing date of the new subscription with the billing date of the primary subscription of the hierarchy's default subscription group. Required to be true if prorate is also true.

**Default**: `false` | | `Prorate` | `bool?` | Optional | A flag indicating whether or not to prorate billing of the new subscription for the current period. A value of true is ignored unless align_date is also true.

**Default**: `false` | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +GroupBilling groupBilling = new GroupBilling { - "accrue": false, - "align_date": false, - "prorate": false -} + Accrue = false, + AlignDate = false, + Prorate = false, +}; ``` diff --git a/doc/models/group-settings.md b/doc/models/group-settings.md index 5304f17b..8b131fe5 100644 --- a/doc/models/group-settings.md +++ b/doc/models/group-settings.md @@ -10,21 +10,26 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | | `Target` | [`GroupTarget`](../../doc/models/group-target.md) | Required | Attributes of the target customer who will be the responsible payer of the created subscription. Required. | -| `Billing` | [`GroupBilling`](../../doc/models/group-billing.md) | Optional | Optional attributes related to billing date and accrual. Note: Only applicable for new subscriptions. | +| `Billing` | [`GroupBilling`](../../doc/models/group-billing.md) | Optional | (Optional) Attributes related to billing date and accrual. Note: Only applicable for new subscriptions. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +GroupSettings groupSettings = new GroupSettings { - "target": { - "type": "parent", - "id": 236 - }, - "billing": { - "accrue": false, - "align_date": false, - "prorate": false - } -} + Target = new GroupTarget + { + Type = GroupTargetType.Parent, + Id = 236, + }, + Billing = new GroupBilling + { + Accrue = false, + AlignDate = false, + Prorate = false, + }, +}; ``` diff --git a/doc/models/group-status.md b/doc/models/group-status.md new file mode 100644 index 00000000..0230f9a8 --- /dev/null +++ b/doc/models/group-status.md @@ -0,0 +1,22 @@ + +# Group Status + +## Enumeration + +`GroupStatus` + +## Fields + +| Name | +| --- | +| `Ungrouped` | +| `Grouped` | + +## Example + +```csharp +using AdvancedBilling.Standard.Models; + +GroupStatus groupStatus = GroupStatus.Ungrouped; +``` + diff --git a/doc/models/group-target-type.md b/doc/models/group-target-type.md index bce9ce84..f5d7c453 100644 --- a/doc/models/group-target-type.md +++ b/doc/models/group-target-type.md @@ -17,3 +17,11 @@ The type of object indicated by the id attribute. | `Parent` | | `Eldest` | +## Example + +```csharp +using AdvancedBilling.Standard.Models; + +GroupTargetType groupTargetType = GroupTargetType.Self; +``` + diff --git a/doc/models/group-target.md b/doc/models/group-target.md index f9f4d35c..3b528a16 100644 --- a/doc/models/group-target.md +++ b/doc/models/group-target.md @@ -12,14 +12,17 @@ Attributes of the target customer who will be the responsible payer of the creat | Name | Type | Tags | Description | | --- | --- | --- | --- | | `Type` | [`GroupTargetType`](../../doc/models/group-target-type.md) | Required | The type of object indicated by the id attribute. | -| `Id` | `int?` | Optional | The id of the target customer or subscription to group the existing subscription with. Ignored and should not be included if type is "self" , "parent", or "eldest" | +| `Id` | `int?` | Optional | The id of the target customer or subscription to group the existing subscription with. Ignored and should not be included if type is "self", "parent", or "eldest". | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +GroupTarget groupTarget = new GroupTarget { - "type": "self", - "id": 134 -} + Type = GroupTargetType.Parent, + Id = 234, +}; ``` diff --git a/doc/models/group-type.md b/doc/models/group-type.md index 97c0dfbc..46ad4bde 100644 --- a/doc/models/group-type.md +++ b/doc/models/group-type.md @@ -12,3 +12,11 @@ | `SingleCustomer` | | `MultipleCustomers` | +## Example + +```csharp +using AdvancedBilling.Standard.Models; + +GroupType groupType = GroupType.SingleCustomer; +``` + diff --git a/doc/models/historic-usage.md b/doc/models/historic-usage.md index 0b9729c1..bd6fbee7 100644 --- a/doc/models/historic-usage.md +++ b/doc/models/historic-usage.md @@ -1,7 +1,7 @@ # Historic Usage -Optional for Event Based Components. If the `include=historic_usages` query param is provided, the last ten billing periods will be returned. +(Optional) For Event Based Components. If the `include=historic_usages` query param is provided, the last ten billing periods will be returned. ## Structure @@ -15,13 +15,21 @@ Optional for Event Based Components. If the `include=historic_usages` query para | `BillingPeriodStartsAt` | `DateTimeOffset?` | Optional | Start date of billing period | | `BillingPeriodEndsAt` | `DateTimeOffset?` | Optional | End date of billing period | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Globalization; + +HistoricUsage historicUsage = new HistoricUsage { - "total_usage_quantity": 26.6, - "billing_period_starts_at": "2016-03-13T12:52:32.123Z", - "billing_period_ends_at": "2016-03-13T12:52:32.123Z" -} + TotalUsageQuantity = 140.74, + BillingPeriodStartsAt = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + BillingPeriodEndsAt = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), +}; ``` diff --git a/doc/models/include-not-null.md b/doc/models/include-not-null.md index 3b297da0..cebc1134 100644 --- a/doc/models/include-not-null.md +++ b/doc/models/include-not-null.md @@ -15,7 +15,9 @@ Passed as a parameter to list methods to return only non null values. ## Example -``` -not_null +```csharp +using AdvancedBilling.Standard.Models; + +IncludeNotNull includeNotNull = IncludeNotNull.NotNull; ``` diff --git a/doc/models/include-null-or-not-null.md b/doc/models/include-null-or-not-null.md index c9209811..04eb8253 100644 --- a/doc/models/include-null-or-not-null.md +++ b/doc/models/include-null-or-not-null.md @@ -16,7 +16,9 @@ Allows to filter by `not_null` or `null`. ## Example -``` -not_null +```csharp +using AdvancedBilling.Standard.Models; + +IncludeNullOrNotNull includeNullOrNotNull = IncludeNullOrNotNull.NotNull; ``` diff --git a/doc/models/include-option.md b/doc/models/include-option.md index 41d05156..3660e558 100644 --- a/doc/models/include-option.md +++ b/doc/models/include-option.md @@ -12,3 +12,11 @@ | `Exclude` | | `Include` | +## Example + +```csharp +using AdvancedBilling.Standard.Models; + +IncludeOption includeOption = IncludeOption.Exclude; +``` + diff --git a/doc/models/interval-unit.md b/doc/models/interval-unit.md index 94829529..e6f189a8 100644 --- a/doc/models/interval-unit.md +++ b/doc/models/interval-unit.md @@ -12,3 +12,11 @@ | `Day` | | `Month` | +## Example + +```csharp +using AdvancedBilling.Standard.Models; + +IntervalUnit intervalUnit = IntervalUnit.Day; +``` + diff --git a/doc/models/invoice-address.md b/doc/models/invoice-address.md index 56861749..923404fe 100644 --- a/doc/models/invoice-address.md +++ b/doc/models/invoice-address.md @@ -16,15 +16,18 @@ | `Zip` | `string` | Optional | - | | `Country` | `string` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +InvoiceAddress invoiceAddress = new InvoiceAddress { - "street": "street0", - "line2": "line24", - "city": "city0", - "state": "state6", - "zip": "zip4" -} + Street = "street2", + Line2 = "line26", + City = "city2", + State = "state8", + Zip = "zip6", +}; ``` diff --git a/doc/models/invoice-avatax-details.md b/doc/models/invoice-avatax-details.md index 1f461ec1..7dca1d84 100644 --- a/doc/models/invoice-avatax-details.md +++ b/doc/models/invoice-avatax-details.md @@ -15,15 +15,23 @@ | `CommitDate` | `DateTimeOffset?` | Optional | - | | `ModifyDate` | `DateTimeOffset?` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Globalization; + +InvoiceAvataxDetails invoiceAvataxDetails = new InvoiceAvataxDetails { - "id": 112, - "status": "status2", - "document_code": "document_code0", - "commit_date": "2016-03-13T12:52:32.123Z", - "modify_date": "2016-03-13T12:52:32.123Z" -} + Id = 184L, + Status = "status2", + DocumentCode = "document_code4", + CommitDate = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + ModifyDate = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), +}; ``` diff --git a/doc/models/invoice-balance-item.md b/doc/models/invoice-balance-item.md index 2499b3c1..2dc8490e 100644 --- a/doc/models/invoice-balance-item.md +++ b/doc/models/invoice-balance-item.md @@ -13,13 +13,16 @@ | `Number` | `string` | Optional | - | | `OutstandingAmount` | `string` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +InvoiceBalanceItem invoiceBalanceItem = new InvoiceBalanceItem { - "uid": "uid8", - "number": "number6", - "outstanding_amount": "outstanding_amount6" -} + Uid = "uid8", + Number = "number6", + OutstandingAmount = "outstanding_amount6", +}; ``` diff --git a/doc/models/invoice-consolidation-level.md b/doc/models/invoice-consolidation-level.md index 9afb1551..242a2cbc 100644 --- a/doc/models/invoice-consolidation-level.md +++ b/doc/models/invoice-consolidation-level.md @@ -1,7 +1,7 @@ # Invoice Consolidation Level -Consolidation level of the invoice, which is applicable to invoice consolidation. It will hold one of the following values: +Consolidation level of the invoice, which is applicable to invoice consolidation. It will hold one of the following values: * "none": A normal invoice with no consolidation. * "child": An invoice segment which has been combined into a consolidated invoice. @@ -23,3 +23,11 @@ See also the [invoice consolidation documentation](https://maxio.zendesk.com/hc/ | `Child` | | `Parent` | +## Example + +```csharp +using AdvancedBilling.Standard.Models; + +InvoiceConsolidationLevel invoiceConsolidationLevel = InvoiceConsolidationLevel.None; +``` + diff --git a/doc/models/invoice-credit.md b/doc/models/invoice-credit.md index a8e4c7a2..b83d231e 100644 --- a/doc/models/invoice-credit.md +++ b/doc/models/invoice-credit.md @@ -17,15 +17,21 @@ | `OriginalAmount` | `string` | Optional | - | | `AppliedAmount` | `string` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Globalization; + +InvoiceCredit invoiceCredit = new InvoiceCredit { - "uid": "uid6", - "credit_note_number": "credit_note_number0", - "credit_note_uid": "credit_note_uid0", - "transaction_time": "2016-03-13T12:52:32.123Z", - "memo": "memo0" -} + Uid = "uid8", + CreditNoteNumber = "credit_note_number2", + CreditNoteUid = "credit_note_uid2", + TransactionTime = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + Memo = "memo2", +}; ``` diff --git a/doc/models/invoice-custom-field.md b/doc/models/invoice-custom-field.md index 61a41c97..2cb38f82 100644 --- a/doc/models/invoice-custom-field.md +++ b/doc/models/invoice-custom-field.md @@ -15,15 +15,18 @@ | `MValue` | `string` | Optional | **Constraints**: *Minimum Length*: `1` | | `MetadatumId` | `int?` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +InvoiceCustomField invoiceCustomField = new InvoiceCustomField { - "owner_id": 142, - "owner_type": "Customer", - "name": "name0", - "value": "value2", - "metadatum_id": 142 -} + OwnerId = 14, + OwnerType = CustomFieldOwner.Customer, + Name = "name0", + MValue = "value2", + MetadatumId = 14, +}; ``` diff --git a/doc/models/invoice-customer.md b/doc/models/invoice-customer.md index 98d9152a..b378a4e8 100644 --- a/doc/models/invoice-customer.md +++ b/doc/models/invoice-customer.md @@ -1,7 +1,7 @@ # Invoice Customer -Information about the customer who is owner or recipient the invoiced subscription. +Information about the customer who is owner or recipient of the invoiced subscription. ## Structure @@ -19,15 +19,18 @@ Information about the customer who is owner or recipient the invoiced subscripti | `VatNumber` | `string` | Optional | - | | `Reference` | `string` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +InvoiceCustomer invoiceCustomer = new InvoiceCustomer { - "chargify_id": 236, - "first_name": "first_name0", - "last_name": "last_name8", - "organization": "organization4", - "email": "email6" -} + ChargifyId = 82, + FirstName = "first_name2", + LastName = "last_name0", + Organization = "organization6", + Email = "email4", +}; ``` diff --git a/doc/models/invoice-date-field.md b/doc/models/invoice-date-field.md index 350228c9..c688c877 100644 --- a/doc/models/invoice-date-field.md +++ b/doc/models/invoice-date-field.md @@ -17,7 +17,9 @@ ## Example -``` -issue_date +```csharp +using AdvancedBilling.Standard.Models; + +InvoiceDateField invoiceDateField = InvoiceDateField.UpdatedAt; ``` diff --git a/doc/models/invoice-debit.md b/doc/models/invoice-debit.md index a9fefaad..c9f2f82e 100644 --- a/doc/models/invoice-debit.md +++ b/doc/models/invoice-debit.md @@ -18,15 +18,21 @@ | `OriginalAmount` | `string` | Optional | - | | `AppliedAmount` | `string` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Globalization; + +InvoiceDebit invoiceDebit = new InvoiceDebit { - "uid": "uid2", - "debit_note_number": "debit_note_number2", - "debit_note_uid": "debit_note_uid8", - "role": "chargeback", - "transaction_time": "2016-03-13T12:52:32.123Z" -} + Uid = "uid8", + DebitNoteNumber = "debit_note_number8", + DebitNoteUid = "debit_note_uid4", + Role = DebitNoteRole.Chargeback, + TransactionTime = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), +}; ``` diff --git a/doc/models/invoice-discount-breakout.md b/doc/models/invoice-discount-breakout.md index 8406b998..46344000 100644 --- a/doc/models/invoice-discount-breakout.md +++ b/doc/models/invoice-discount-breakout.md @@ -13,13 +13,16 @@ | `EligibleAmount` | `string` | Optional | - | | `DiscountAmount` | `string` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +InvoiceDiscountBreakout invoiceDiscountBreakout = new InvoiceDiscountBreakout { - "uid": "uid8", - "eligible_amount": "eligible_amount0", - "discount_amount": "discount_amount8" -} + Uid = "uid0", + EligibleAmount = "eligible_amount2", + DiscountAmount = "discount_amount4", +}; ``` diff --git a/doc/models/invoice-discount-source-type.md b/doc/models/invoice-discount-source-type.md index fe7f4087..7dae6635 100644 --- a/doc/models/invoice-discount-source-type.md +++ b/doc/models/invoice-discount-source-type.md @@ -13,3 +13,11 @@ | `Referral` | | `EnumAdHocCoupon` | +## Example + +```csharp +using AdvancedBilling.Standard.Models; + +InvoiceDiscountSourceType invoiceDiscountSourceType = InvoiceDiscountSourceType.Referral; +``` + diff --git a/doc/models/invoice-discount-type.md b/doc/models/invoice-discount-type.md index 186af0a5..a5f61f5b 100644 --- a/doc/models/invoice-discount-type.md +++ b/doc/models/invoice-discount-type.md @@ -13,3 +13,11 @@ | `FlatAmount` | | `Rollover` | +## Example + +```csharp +using AdvancedBilling.Standard.Models; + +InvoiceDiscountType invoiceDiscountType = InvoiceDiscountType.Percentage; +``` + diff --git a/doc/models/invoice-discount.md b/doc/models/invoice-discount.md index b2c69190..89bd67da 100644 --- a/doc/models/invoice-discount.md +++ b/doc/models/invoice-discount.md @@ -22,15 +22,18 @@ | `TransactionId` | `int?` | Optional | - | | `LineItemBreakouts` | [`List`](../../doc/models/invoice-discount-breakout.md) | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +InvoiceDiscount invoiceDiscount = new InvoiceDiscount { - "uid": "uid0", - "title": "title4", - "description": "description0", - "code": "code8", - "source_type": "Coupon" -} + Uid = "uid4", + Title = "title0", + Description = "description6", + Code = "code2", + SourceType = InvoiceDiscountSourceType.Coupon, +}; ``` diff --git a/doc/models/invoice-display-settings.md b/doc/models/invoice-display-settings.md index 38abe96e..35abe8b8 100644 --- a/doc/models/invoice-display-settings.md +++ b/doc/models/invoice-display-settings.md @@ -12,12 +12,15 @@ | `HideZeroSubtotalLines` | `bool?` | Optional | - | | `IncludeDiscountsOnLines` | `bool?` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +InvoiceDisplaySettings invoiceDisplaySettings = new InvoiceDisplaySettings { - "hide_zero_subtotal_lines": false, - "include_discounts_on_lines": false -} + HideZeroSubtotalLines = false, + IncludeDiscountsOnLines = false, +}; ``` diff --git a/doc/models/invoice-event-payment-method.md b/doc/models/invoice-event-payment-method.md index 56503b33..848e7483 100644 --- a/doc/models/invoice-event-payment-method.md +++ b/doc/models/invoice-event-payment-method.md @@ -15,3 +15,11 @@ | `External` | | `PaypalAccount` | +## Example + +```csharp +using AdvancedBilling.Standard.Models; + +InvoiceEventPaymentMethod invoiceEventPaymentMethod = InvoiceEventPaymentMethod.CreditCard; +``` + diff --git a/doc/models/invoice-event-type.md b/doc/models/invoice-event-type.md index a6318ab4..ac9652bd 100644 --- a/doc/models/invoice-event-type.md +++ b/doc/models/invoice-event-type.md @@ -27,3 +27,11 @@ Invoice Event Type | `FailedPayment` | | `ChangeChargebackStatus` | +## Example + +```csharp +using AdvancedBilling.Standard.Models; + +InvoiceEventType invoiceEventType = InvoiceEventType.CreateCreditNote; +``` + diff --git a/doc/models/invoice-issued.md b/doc/models/invoice-issued.md index c470b3a9..67390cbd 100644 --- a/doc/models/invoice-issued.md +++ b/doc/models/invoice-issued.md @@ -25,33 +25,39 @@ | `ConsolidationLevel` | `string` | Required | - | | `LineItems` | [`List`](../../doc/models/invoice-line-item-event-data.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Collections.Generic; + +InvoiceIssued invoiceIssued = new InvoiceIssued { - "uid": "uid4", - "number": "number8", - "role": "role2", - "due_date": "2016-03-13", - "issue_date": "issue_date0", - "paid_date": "paid_date6", - "due_amount": "due_amount6", - "paid_amount": "paid_amount4", - "tax_amount": "tax_amount2", - "refund_amount": "refund_amount0", - "total_amount": "total_amount0", - "status_amount": "status_amount4", - "product_name": "product_name0", - "consolidation_level": "consolidation_level4", - "line_items": [ + Uid = "uid8", + Number = "number4", + Role = "role8", + DueDate = DateTime.Parse("2016-03-13"), + IssueDate = "issue_date4", + PaidDate = "paid_date8", + DueAmount = "due_amount0", + PaidAmount = "paid_amount0", + TaxAmount = "tax_amount8", + RefundAmount = "refund_amount6", + TotalAmount = "total_amount4", + StatusAmount = "status_amount8", + ProductName = "product_name4", + ConsolidationLevel = "consolidation_level0", + LineItems = new List { - "uid": "uid8", - "title": "title4", - "description": "description8", - "quantity": 102, - "quantity_delta": 204 - } - ] -} + new InvoiceLineItemEventData + { + Uid = "uid8", + Title = "title4", + Description = "description8", + Quantity = 102, + QuantityDelta = 204, + }, + }, +}; ``` diff --git a/doc/models/invoice-line-item-component-cost-data.md b/doc/models/invoice-line-item-component-cost-data.md index a1e9ef10..dd78961c 100644 --- a/doc/models/invoice-line-item-component-cost-data.md +++ b/doc/models/invoice-line-item-component-cost-data.md @@ -11,33 +11,33 @@ | --- | --- | --- | --- | | `Rates` | [`List`](../../doc/models/component-cost-data.md) | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Collections.Generic; + +InvoiceLineItemComponentCostData invoiceLineItemComponentCostData = new InvoiceLineItemComponentCostData { - "rates": [ - { - "component_code_id": 116, - "price_point_id": 226, - "product_id": 94, - "quantity": "quantity0", - "amount": "amount6" - }, + Rates = new List { - "component_code_id": 116, - "price_point_id": 226, - "product_id": 94, - "quantity": "quantity0", - "amount": "amount6" + new ComponentCostData + { + ComponentCodeId = 116, + PricePointId = 226, + ProductId = 94, + Quantity = "quantity0", + Amount = "amount6", + }, + new ComponentCostData + { + ComponentCodeId = 116, + PricePointId = 226, + ProductId = 94, + Quantity = "quantity0", + Amount = "amount6", + }, }, - { - "component_code_id": 116, - "price_point_id": 226, - "product_id": 94, - "quantity": "quantity0", - "amount": "amount6" - } - ] -} +}; ``` diff --git a/doc/models/invoice-line-item-event-data.md b/doc/models/invoice-line-item-event-data.md index 30278b0c..026841a5 100644 --- a/doc/models/invoice-line-item-event-data.md +++ b/doc/models/invoice-line-item-event-data.md @@ -30,15 +30,18 @@ | `BillingScheduleItemId` | `int?` | Optional | - | | `CustomItem` | `bool?` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +InvoiceLineItemEventData invoiceLineItemEventData = new InvoiceLineItemEventData { - "uid": "uid4", - "title": "title0", - "description": "description6", - "quantity": 40, - "quantity_delta": 114 -} + Uid = "uid4", + Title = "title0", + Description = "description4", + Quantity = 190, + QuantityDelta = 36, +}; ``` diff --git a/doc/models/invoice-line-item-pricing-detail.md b/doc/models/invoice-line-item-pricing-detail.md index d0b9dffa..1d22bfed 100644 --- a/doc/models/invoice-line-item-pricing-detail.md +++ b/doc/models/invoice-line-item-pricing-detail.md @@ -12,12 +12,15 @@ | `Label` | `string` | Optional | - | | `Amount` | `string` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +InvoiceLineItemPricingDetail invoiceLineItemPricingDetail = new InvoiceLineItemPricingDetail { - "label": "label0", - "amount": "amount2" -} + Label = "label4", + Amount = "amount6", +}; ``` diff --git a/doc/models/invoice-line-item.md b/doc/models/invoice-line-item.md index eaa11ab2..d3d5b184 100644 --- a/doc/models/invoice-line-item.md +++ b/doc/models/invoice-line-item.md @@ -9,19 +9,19 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `Uid` | `string` | Optional | Unique identifier for the line item. Useful when cross-referencing the line against individual discounts in the `discounts` or `taxes` lists. | +| `Uid` | `string` | Optional | Unique identifier for the line item. Useful when cross-referencing the line against individual discounts in the `discounts` or `taxes` lists. | | `Title` | `string` | Optional | A short descriptor for the charge or item represented by this line. | -| `Description` | `string` | Optional | Detailed description for the charge or item represented by this line. May include proration details in plain text.

Note: this string may contain line breaks that are hints for the best display format on the invoice. | +| `Description` | `string` | Optional | Detailed description for the charge or item represented by this line. May include proration details in plain text.

Note: this string may contain line breaks that are hints for the best display format on the invoice. | | `Quantity` | `string` | Optional | The quantity or count of units billed by the line item.

This is a decimal number represented as a string. (See "About Decimal Numbers".) | -| `UnitPrice` | `string` | Optional | The price per unit for the line item.

When tiered pricing was used (i.e. not every unit was actually priced at the same price) this will be the blended average cost per unit and the `tiered_unit_price` field will be set to `true`. | +| `UnitPrice` | `string` | Optional | The price per unit for the line item.

When tiered pricing was used (i.e., not every unit was actually priced at the same price) this will be the blended average cost per unit and the `tiered_unit_price` field will be set to `true`. | | `SubtotalAmount` | `string` | Optional | The line subtotal, generally calculated as `quantity * unit_price`. This is the canonical amount of record for the line - when rounding differences are in play, `subtotal_amount` takes precedence over the value derived from `quantity * unit_price` (which may not have the proper precision to exactly equal this amount). | | `DiscountAmount` | `string` | Optional | The approximate discount applied to just this line.

The value is approximated in cases where rounding errors make it difficult to apportion exactly a total discount among many lines. Several lines may have been summed prior to applying the discount to arrive at `discount_amount` for the invoice - backing that out to the discount on a single line may introduce rounding or precision errors. | | `TaxAmount` | `string` | Optional | The approximate tax applied to just this line.

The value is approximated in cases where rounding errors make it difficult to apportion exactly a total tax among many lines. Several lines may have been summed prior to applying the tax rate to arrive at `tax_amount` for the invoice - backing that out to the tax on a single line may introduce rounding or precision errors. | | `TaxIncluded` | `bool?` | Optional | Whether the unit price for this line item is tax-inclusive.

When `true`, `unit_price` already includes tax and `tax_amount` represents the portion of the price attributable to tax. When `false`, any applicable tax is added on top of the price.

The value is inherited from the source price point's `tax_included` setting. Custom or ad-hoc line items (which have no associated price point) always return `false`. | -| `TotalAmount` | `string` | Optional | The non-canonical total amount for the line.

`subtotal_amount` is the canonical amount for a line. The invoice `total_amount` is derived from the sum of the line `subtotal_amount`s and discounts or taxes applied thereafter. Therefore, due to rounding or precision errors, the sum of line `total_amount`s may not equal the invoice `total_amount`. | +| `TotalAmount` | `string` | Optional | The non-canonical total amount for the line.

`subtotal_amount` is the canonical amount for a line. The invoice `total_amount` is derived from the sum of the line `subtotal_amount`s and discounts or taxes applied thereafter. Therefore, due to rounding or precision errors, the sum of line `total_amount`s may not equal the invoice `total_amount`. | | `TieredUnitPrice` | `bool?` | Optional | When `true`, indicates that the actual pricing scheme for the line was tiered, so the `unit_price` shown is the blended average for all units. | -| `PeriodRangeStart` | `DateTime?` | Optional | Start date for the period covered by this line. The format is `"YYYY-MM-DD"`.

* For periodic charges paid in advance, this date will match the billing date, and the end date will be in the future.
* For periodic charges paid in arrears (e.g. metered charges), this date will be the date of the previous billing, and the end date will be the current billing date.
* For non-periodic charges, this date and the end date will match. | -| `PeriodRangeEnd` | `DateTime?` | Optional | End date for the period covered by this line. The format is `"YYYY-MM-DD"`.

* For periodic charges paid in advance, this date will match the next (future) billing date.
* For periodic charges paid in arrears (e.g. metered charges), this date will be the date of the current billing date.
* For non-periodic charges, this date and the start date will match. | +| `PeriodRangeStart` | `DateTime?` | Optional | Start date for the period covered by this line. The format is `"YYYY-MM-DD"`.

* For periodic charges paid in advance, this date will match the billing date, and the end date will be in the future.
* For periodic charges paid in arrears (e.g., metered charges), this date will be the date of the previous billing, and the end date will be the current billing date.
* For non-periodic charges, this date and the end date will match. | +| `PeriodRangeEnd` | `DateTime?` | Optional | End date for the period covered by this line. The format is `"YYYY-MM-DD"`.

* For periodic charges paid in advance, this date will match the next (future) billing date.
* For periodic charges paid in arrears (e.g., metered charges), this date will be the date of the current billing date.
* For non-periodic charges, this date and the start date will match. | | `TransactionId` | `int?` | Optional | - | | `ProductId` | `int?` | Optional | The ID of the product subscribed when the charge was made.

This may be set even for component charges, so true product-only (non-component) charges will also have a nil `component_id`. | | `ProductVersion` | `int?` | Optional | The version of the product subscribed when the charge was made. | @@ -35,15 +35,18 @@ | `Kind` | `string` | Optional | - | | `PrepaidAllocationExpiresAt` | `DateTime?` | Optional | The date a prepaid allocation is set to expire. Only present on line items representing prepaid component allocations. The format is `"YYYY-MM-DD"`. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +InvoiceLineItem invoiceLineItem = new InvoiceLineItem { - "uid": "uid4", - "title": "title0", - "description": "description4", - "quantity": "quantity0", - "unit_price": "unit_price2" -} + Uid = "uid6", + Title = "title2", + Description = "description6", + Quantity = "quantity2", + UnitPrice = "unit_price4", +}; ``` diff --git a/doc/models/invoice-payer-change.md b/doc/models/invoice-payer-change.md index bc828591..d0a4cffa 100644 --- a/doc/models/invoice-payer-change.md +++ b/doc/models/invoice-payer-change.md @@ -14,14 +14,17 @@ | `Organization` | `string` | Optional | - | | `Email` | `string` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +InvoicePayerChange invoicePayerChange = new InvoicePayerChange { - "first_name": "first_name2", - "last_name": "last_name0", - "organization": "organization4", - "email": "email4" -} + FirstName = "first_name4", + LastName = "last_name2", + Organization = "organization2", + Email = "email2", +}; ``` diff --git a/doc/models/invoice-payer.md b/doc/models/invoice-payer.md index ebc46bfb..82ab3357 100644 --- a/doc/models/invoice-payer.md +++ b/doc/models/invoice-payer.md @@ -16,15 +16,18 @@ | `Email` | `string` | Optional | - | | `VatNumber` | `string` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +InvoicePayer invoicePayer = new InvoicePayer { - "chargify_id": 46, - "first_name": "first_name4", - "last_name": "last_name2", - "organization": "organization8", - "email": "email2" -} + ChargifyId = 198, + FirstName = "first_name2", + LastName = "last_name0", + Organization = "organization4", + Email = "email4", +}; ``` diff --git a/doc/models/invoice-payment-application.md b/doc/models/invoice-payment-application.md index 6ba0eb7e..fac6adab 100644 --- a/doc/models/invoice-payment-application.md +++ b/doc/models/invoice-payment-application.md @@ -13,13 +13,16 @@ | `ApplicationUid` | `string` | Optional | Unique identifier for the payment. It has the prefix "pmt_" followed by alphanumeric characters. | | `AppliedAmount` | `string` | Optional | Dollar amount of the paid invoice. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +InvoicePaymentApplication invoicePaymentApplication = new InvoicePaymentApplication { - "invoice_uid": "invoice_uid2", - "application_uid": "application_uid4", - "applied_amount": "applied_amount6" -} + InvoiceUid = "invoice_uid8", + ApplicationUid = "application_uid8", + AppliedAmount = "applied_amount0", +}; ``` diff --git a/doc/models/invoice-payment-method-type.md b/doc/models/invoice-payment-method-type.md index 5b3c3461..5f61faf5 100644 --- a/doc/models/invoice-payment-method-type.md +++ b/doc/models/invoice-payment-method-type.md @@ -18,3 +18,11 @@ The type of payment method used. Defaults to other. | `Ach` | | `Other` | +## Example + +```csharp +using AdvancedBilling.Standard.Models; + +InvoicePaymentMethodType invoicePaymentMethodType = InvoicePaymentMethodType.Cash; +``` + diff --git a/doc/models/invoice-payment-method.md b/doc/models/invoice-payment-method.md index 8469b596..7d676e4b 100644 --- a/doc/models/invoice-payment-method.md +++ b/doc/models/invoice-payment-method.md @@ -18,15 +18,18 @@ | `LastFour` | `string` | Optional | - | | `MaskedCardNumber` | `string` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +InvoicePaymentMethod invoicePaymentMethod = new InvoicePaymentMethod { - "details": "details8", - "kind": "kind6", - "memo": "memo2", - "type": "type8", - "card_brand": "card_brand8" -} + Details = "details2", + Kind = "kind0", + Memo = "memo6", + Type = "type8", + CardBrand = "card_brand4", +}; ``` diff --git a/doc/models/invoice-payment-type.md b/doc/models/invoice-payment-type.md index 1547e4f9..1bba0f38 100644 --- a/doc/models/invoice-payment-type.md +++ b/doc/models/invoice-payment-type.md @@ -16,3 +16,11 @@ The type of payment to be applied to an Invoice. Defaults to external. | `ServiceCredit` | | `Payment` | +## Example + +```csharp +using AdvancedBilling.Standard.Models; + +InvoicePaymentType invoicePaymentType = InvoicePaymentType.External; +``` + diff --git a/doc/models/invoice-payment.md b/doc/models/invoice-payment.md index c9192a47..2738f410 100644 --- a/doc/models/invoice-payment.md +++ b/doc/models/invoice-payment.md @@ -22,21 +22,28 @@ | `ReceivedOn` | `DateTime?` | Optional | Date reflecting when the payment was received from a customer. Must be in the past. Applicable only to
`external` payments. | | `Uid` | `string` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Globalization; + +InvoicePayment invoicePayment = new InvoicePayment { - "transaction_time": "2016-03-13T12:52:32.123Z", - "memo": "memo6", - "original_amount": "original_amount6", - "applied_amount": "applied_amount6", - "payment_method": { - "details": "details0", - "kind": "kind8", - "memo": "memo4", - "type": "type0", - "card_brand": "card_brand6" - } -} + TransactionTime = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + Memo = "memo6", + OriginalAmount = "original_amount6", + AppliedAmount = "applied_amount6", + PaymentMethod = new InvoicePaymentMethod + { + Details = "details0", + Kind = "kind8", + Memo = "memo4", + Type = "type0", + CardBrand = "card_brand6", + }, +}; ``` diff --git a/doc/models/invoice-pre-payment.md b/doc/models/invoice-pre-payment.md index 604b0052..c65b2ad3 100644 --- a/doc/models/invoice-pre-payment.md +++ b/doc/models/invoice-pre-payment.md @@ -13,13 +13,16 @@ | `AmountInCents` | `long?` | Optional | The amount in cents of the prepayment that was created as a result of this payment. | | `EndingBalanceInCents` | `long?` | Optional | The total balance of the prepayment account for this subscription including any prior prepayments | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +InvoicePrePayment invoicePrePayment = new InvoicePrePayment { - "subscription_id": 180, - "amount_in_cents": 100, - "ending_balance_in_cents": 60 -} + SubscriptionId = 252, + AmountInCents = 28L, + EndingBalanceInCents = 244L, +}; ``` diff --git a/doc/models/invoice-previous-balance.md b/doc/models/invoice-previous-balance.md index f901c751..f303b9a2 100644 --- a/doc/models/invoice-previous-balance.md +++ b/doc/models/invoice-previous-balance.md @@ -12,18 +12,39 @@ | `CapturedAt` | `DateTimeOffset?` | Optional | - | | `Invoices` | [`List`](../../doc/models/invoice-balance-item.md) | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Collections.Generic; +using System.Globalization; + +InvoicePreviousBalance invoicePreviousBalance = new InvoicePreviousBalance { - "captured_at": "2016-03-13T12:52:32.123Z", - "invoices": [ + CapturedAt = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + Invoices = new List { - "uid": "uid6", - "number": "number6", - "outstanding_amount": "outstanding_amount8" - } - ] -} + new InvoiceBalanceItem + { + Uid = "uid6", + Number = "number6", + OutstandingAmount = "outstanding_amount8", + }, + new InvoiceBalanceItem + { + Uid = "uid6", + Number = "number6", + OutstandingAmount = "outstanding_amount8", + }, + new InvoiceBalanceItem + { + Uid = "uid6", + Number = "number6", + OutstandingAmount = "outstanding_amount8", + }, + }, +}; ``` diff --git a/doc/models/invoice-refund.md b/doc/models/invoice-refund.md index a218eee8..332a14fd 100644 --- a/doc/models/invoice-refund.md +++ b/doc/models/invoice-refund.md @@ -19,15 +19,18 @@ | `GatewayHandle` | `string` | Optional | - | | `AchLateReject` | `bool?` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +InvoiceRefund invoiceRefund = new InvoiceRefund { - "transaction_id": 172, - "payment_id": 42, - "memo": "memo6", - "original_amount": "original_amount6", - "applied_amount": "applied_amount6" -} + TransactionId = 166, + PaymentId = 36, + Memo = "memo6", + OriginalAmount = "original_amount6", + AppliedAmount = "applied_amount6", +}; ``` diff --git a/doc/models/invoice-response.md b/doc/models/invoice-response.md index cfac4665..7a9e4311 100644 --- a/doc/models/invoice-response.md +++ b/doc/models/invoice-response.md @@ -11,21 +11,25 @@ | --- | --- | --- | --- | | `Invoice` | [`Invoice`](../../doc/models/invoice.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +InvoiceResponse invoiceResponse = new InvoiceResponse { - "invoice": { - "issue_date": "2024-01-01", - "due_date": "2024-01-01", - "paid_date": "2024-01-01", - "public_url_expires_on": "2024-01-21", - "id": 166, - "uid": "uid6", - "site_id": 92, - "customer_id": 204, - "subscription_id": 20 - } -} + Invoice = new Invoice + { + Id = 166L, + Uid = "uid6", + SiteId = 92, + CustomerId = 204, + SubscriptionId = 20, + IssueDate = DateTime.Parse("2024-01-01"), + DueDate = DateTime.Parse("2024-01-01"), + PaidDate = DateTime.Parse("2024-01-01"), + PublicUrlExpiresOn = DateTime.Parse("2024-01-21"), + }, +}; ``` diff --git a/doc/models/invoice-role.md b/doc/models/invoice-role.md index 0fb77224..ff96516f 100644 --- a/doc/models/invoice-role.md +++ b/doc/models/invoice-role.md @@ -20,3 +20,11 @@ | `Backport` | | `Backportbalancereconciliation` | +## Example + +```csharp +using AdvancedBilling.Standard.Models; + +InvoiceRole invoiceRole = InvoiceRole.Renewal; +``` + diff --git a/doc/models/invoice-seller.md b/doc/models/invoice-seller.md index d58131e5..baa27992 100644 --- a/doc/models/invoice-seller.md +++ b/doc/models/invoice-seller.md @@ -16,20 +16,24 @@ Information about the seller (merchant) listed on the masthead of the invoice. | `Phone` | `string` | Optional | - | | `LogoUrl` | `string` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +InvoiceSeller invoiceSeller = new InvoiceSeller { - "name": "name0", - "address": { - "street": "street6", - "line2": "line20", - "city": "city6", - "state": "state2", - "zip": "zip0" - }, - "phone": "phone0", - "logo_url": "logo_url0" -} + Name = "name4", + Address = new InvoiceAddress + { + Street = "street6", + Line2 = "line20", + City = "city6", + State = "state2", + Zip = "zip0", + }, + Phone = "phone6", + LogoUrl = "logo_url6", +}; ``` diff --git a/doc/models/invoice-sort-field.md b/doc/models/invoice-sort-field.md index 030ebb64..e76fd871 100644 --- a/doc/models/invoice-sort-field.md +++ b/doc/models/invoice-sort-field.md @@ -20,7 +20,9 @@ ## Example -``` -total_amount +```csharp +using AdvancedBilling.Standard.Models; + +InvoiceSortField invoiceSortField = InvoiceSortField.UpdatedAt; ``` diff --git a/doc/models/invoice-status.md b/doc/models/invoice-status.md index 43da5bc4..65ea30ec 100644 --- a/doc/models/invoice-status.md +++ b/doc/models/invoice-status.md @@ -19,3 +19,11 @@ The current status of the invoice. See [Invoice Statuses](https://maxio.zendesk. | `Canceled` | | `Processing` | +## Example + +```csharp +using AdvancedBilling.Standard.Models; + +InvoiceStatus invoiceStatus = InvoiceStatus.Paid; +``` + diff --git a/doc/models/invoice-tax-breakout.md b/doc/models/invoice-tax-breakout.md index cb4729d1..3c187a5f 100644 --- a/doc/models/invoice-tax-breakout.md +++ b/doc/models/invoice-tax-breakout.md @@ -14,14 +14,17 @@ | `TaxAmount` | `string` | Optional | - | | `TaxExemptAmount` | `string` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +InvoiceTaxBreakout invoiceTaxBreakout = new InvoiceTaxBreakout { - "uid": "uid2", - "taxable_amount": "taxable_amount6", - "tax_amount": "tax_amount6", - "tax_exempt_amount": "tax_exempt_amount2" -} + Uid = "uid4", + TaxableAmount = "taxable_amount8", + TaxAmount = "tax_amount2", + TaxExemptAmount = "tax_exempt_amount4", +}; ``` diff --git a/doc/models/invoice-tax-component-breakout.md b/doc/models/invoice-tax-component-breakout.md index d2dd9c86..b904b8e7 100644 --- a/doc/models/invoice-tax-component-breakout.md +++ b/doc/models/invoice-tax-component-breakout.md @@ -24,15 +24,18 @@ | `StateAssignedNo` | `string` | Optional | - | | `TaxSubType` | `string` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +InvoiceTaxComponentBreakout invoiceTaxComponentBreakout = new InvoiceTaxComponentBreakout { - "tax_rule_id": 226, - "percentage": "percentage0", - "country_code": "country_code8", - "subdivision_code": "subdivision_code6", - "tax_amount": "tax_amount4" -} + TaxRuleId = 66, + Percentage = "percentage0", + CountryCode = "country_code2", + SubdivisionCode = "subdivision_code6", + TaxAmount = "tax_amount4", +}; ``` diff --git a/doc/models/invoice-tax.md b/doc/models/invoice-tax.md index bbcf3ebd..41047a99 100644 --- a/doc/models/invoice-tax.md +++ b/doc/models/invoice-tax.md @@ -24,15 +24,18 @@ | `Type` | `string` | Optional | - | | `TaxExemptAmount` | `string` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +InvoiceTax invoiceTax = new InvoiceTax { - "uid": "uid8", - "title": "title6", - "description": "description2", - "source_type": "Tax", - "source_id": 164 -} + Uid = "uid2", + Title = "title8", + Description = "description2", + SourceType = ProformaInvoiceTaxSourceType.Tax, + SourceId = 86, +}; ``` diff --git a/doc/models/invoice.md b/doc/models/invoice.md index de082d12..e0ef30b6 100644 --- a/doc/models/invoice.md +++ b/doc/models/invoice.md @@ -15,11 +15,11 @@ | `CustomerId` | `int?` | Optional | ID of the customer to which the invoice belongs. | | `SubscriptionId` | `int?` | Optional | ID of the subscription that generated the invoice. | | `Number` | `string` | Optional | A unique, identifying string that appears on the invoice and in places the invoice is referenced.

While the UID is long and not appropriate to show to customers, the number is usually shorter and consumable by the customer and the merchant alike. | -| `SequenceNumber` | `int?` | Optional | A monotonically increasing number assigned to invoices as they are created. This number is unique within a site and can be used to sort and order invoices. | +| `SequenceNumber` | `int?` | Optional | A monotonically increasing number assigned to invoices as they are created. This number is unique within a site and can be used to sort and order invoices. | | `TransactionTime` | `DateTimeOffset?` | Optional | - | | `CreatedAt` | `DateTimeOffset?` | Optional | - | | `UpdatedAt` | `DateTimeOffset?` | Optional | - | -| `IssueDate` | `DateTime?` | Optional | Date the invoice was issued to the customer. This is the date that the invoice was made available for payment.

The format is `"YYYY-MM-DD"`. | +| `IssueDate` | `DateTime?` | Optional | Date the invoice was issued to the customer. This is the date that the invoice was made available for payment.

The format is `"YYYY-MM-DD"`. | | `DueDate` | `DateTime?` | Optional | Date the invoice is due.

The format is `"YYYY-MM-DD"`. | | `PaidDate` | `DateTime?` | Optional | Date the invoice became fully paid.

If partial payments are applied to the invoice, this date will not be present until payment has been made in full.

The format is `"YYYY-MM-DD"`. | | `Status` | [`InvoiceStatus?`](../../doc/models/invoice-status.md) | Optional | The current status of the invoice. See [Invoice Statuses](https://maxio.zendesk.com/hc/en-us/articles/24252287829645-Advanced-Billing-Invoices-Overview#invoice-statuses) for more. | @@ -28,7 +28,7 @@ | `CollectionMethod` | [`CollectionMethod?`](../../doc/models/collection-method.md) | Optional | The type of payment collection to be used in the subscription. For legacy Statements Architecture valid options are - `invoice`, `automatic`. For current Relationship Invoicing Architecture valid options are - `remittance`, `automatic`, `prepaid`. | | `PaymentInstructions` | `string` | Optional | A message that is printed on the invoice when it is marked for remittance collection. It is intended to describe to the customer how they may make payment, and is configured by the merchant. | | `Currency` | `string` | Optional | The ISO 4217 currency code (3 character string) representing the currency of invoice transaction. | -| `ConsolidationLevel` | [`InvoiceConsolidationLevel?`](../../doc/models/invoice-consolidation-level.md) | Optional | Consolidation level of the invoice, which is applicable to invoice consolidation. It will hold one of the following values:

* "none": A normal invoice with no consolidation.
* "child": An invoice segment which has been combined into a consolidated invoice.
* "parent": A consolidated invoice, whose contents are composed of invoice segments.

"Parent" invoices do not have lines of their own, but they have subtotals and totals which aggregate the member invoice segments.

See also the [invoice consolidation documentation](https://maxio.zendesk.com/hc/en-us/articles/24252269909389-Invoice-Consolidation). | +| `ConsolidationLevel` | [`InvoiceConsolidationLevel?`](../../doc/models/invoice-consolidation-level.md) | Optional | Consolidation level of the invoice, which is applicable to invoice consolidation. It will hold one of the following values:

* "none": A normal invoice with no consolidation.
* "child": An invoice segment which has been combined into a consolidated invoice.
* "parent": A consolidated invoice, whose contents are composed of invoice segments.

"Parent" invoices do not have lines of their own, but they have subtotals and totals which aggregate the member invoice segments.

See also the [invoice consolidation documentation](https://maxio.zendesk.com/hc/en-us/articles/24252269909389-Invoice-Consolidation). | | `ParentInvoiceUid` | `string` | Optional | For invoices with `consolidation_level` of `child`, this specifies the UID of the parent (consolidated) invoice. | | `SubscriptionGroupId` | `int?` | Optional | - | | `ParentInvoiceNumber` | `int?` | Optional | For invoices with `consolidation_level` of `child`, this specifies the number of the parent (consolidated) invoice. | @@ -36,17 +36,17 @@ | `ProductName` | `string` | Optional | The name of the product subscribed when the invoice was generated. | | `ProductFamilyName` | `string` | Optional | The name of the product family subscribed when the invoice was generated. | | `Seller` | [`InvoiceSeller`](../../doc/models/invoice-seller.md) | Optional | Information about the seller (merchant) listed on the masthead of the invoice. | -| `Customer` | [`InvoiceCustomer`](../../doc/models/invoice-customer.md) | Optional | Information about the customer who is owner or recipient the invoiced subscription. | +| `Customer` | [`InvoiceCustomer`](../../doc/models/invoice-customer.md) | Optional | Information about the customer who is owner or recipient of the invoiced subscription. | | `Payer` | [`InvoicePayer`](../../doc/models/invoice-payer.md) | Optional | - | | `RecipientEmails` | `List` | Optional | **Constraints**: *Maximum Items*: `5` | | `NetTerms` | `int?` | Optional | - | -| `Memo` | `string` | Optional | The memo printed on invoices of any collection type. This message is in control of the merchant. | +| `Memo` | `string` | Optional | The memo printed on invoices of any collection type. This message is in control of the merchant. | | `BillingAddress` | [`InvoiceAddress`](../../doc/models/invoice-address.md) | Optional | The invoice billing address. | | `ShippingAddress` | [`InvoiceAddress`](../../doc/models/invoice-address.md) | Optional | The invoice shipping address. | | `SubtotalAmount` | `string` | Optional | Subtotal of the invoice, which is the sum of all line items before discounts or taxes. | | `DiscountAmount` | `string` | Optional | Total discount applied to the invoice. | | `TaxAmount` | `string` | Optional | Total tax on the invoice. | -| `TotalAmount` | `string` | Optional | The invoice total, which is `subtotal_amount - discount_amount + tax_amount`.' | +| `TotalAmount` | `string` | Optional | The invoice total, which is `subtotal_amount - discount_amount + tax_amount`. | | `CreditAmount` | `string` | Optional | The amount of credit (from credit notes) applied to this invoice.

Credits offset the amount due from the customer. | | `DebitAmount` | `string` | Optional | - | | `RefundAmount` | `string` | Optional | - | @@ -65,20 +65,24 @@ | `PublicUrl` | `string` | Optional | The public URL of the invoice | | `PreviousBalanceData` | [`InvoicePreviousBalance`](../../doc/models/invoice-previous-balance.md) | Optional | - | | `PublicUrlExpiresOn` | `DateTime?` | Optional | The format is `"YYYY-MM-DD"`. | +| `BrandingThemeId` | `int?` | Optional | The ID of the Branding Theme associated with this invoice. This value represents the Branding Theme used for invoice theming, such as themed invoice rendering. Available only when Branding Themes are enabled for the site. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +Invoice invoice = new Invoice { - "issue_date": "2024-01-01", - "due_date": "2024-01-01", - "paid_date": "2024-01-01", - "public_url_expires_on": "2024-01-21", - "id": 252, - "uid": "uid0", - "site_id": 178, - "customer_id": 34, - "subscription_id": 106 -} + Id = 166L, + Uid = "uid6", + SiteId = 92, + CustomerId = 204, + SubscriptionId = 20, + IssueDate = DateTime.Parse("2024-01-01"), + DueDate = DateTime.Parse("2024-01-01"), + PaidDate = DateTime.Parse("2024-01-01"), + PublicUrlExpiresOn = DateTime.Parse("2024-01-21"), +}; ``` diff --git a/doc/models/issue-advance-invoice-request.md b/doc/models/issue-advance-invoice-request.md index 5fcff566..75aa03f8 100644 --- a/doc/models/issue-advance-invoice-request.md +++ b/doc/models/issue-advance-invoice-request.md @@ -11,11 +11,14 @@ | --- | --- | --- | --- | | `Force` | `bool?` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +IssueAdvanceInvoiceRequest issueAdvanceInvoiceRequest = new IssueAdvanceInvoiceRequest { - "force": false -} + Force = false, +}; ``` diff --git a/doc/models/issue-invoice-event-data.md b/doc/models/issue-invoice-event-data.md index fe4e9be2..150e04ab 100644 --- a/doc/models/issue-invoice-event-data.md +++ b/doc/models/issue-invoice-event-data.md @@ -11,21 +11,24 @@ Example schema for an `issue_invoice` event | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `ConsolidationLevel` | [`InvoiceConsolidationLevel`](../../doc/models/invoice-consolidation-level.md) | Required | Consolidation level of the invoice, which is applicable to invoice consolidation. It will hold one of the following values:

* "none": A normal invoice with no consolidation.
* "child": An invoice segment which has been combined into a consolidated invoice.
* "parent": A consolidated invoice, whose contents are composed of invoice segments.

"Parent" invoices do not have lines of their own, but they have subtotals and totals which aggregate the member invoice segments.

See also the [invoice consolidation documentation](https://maxio.zendesk.com/hc/en-us/articles/24252269909389-Invoice-Consolidation). | +| `ConsolidationLevel` | [`InvoiceConsolidationLevel`](../../doc/models/invoice-consolidation-level.md) | Required | Consolidation level of the invoice, which is applicable to invoice consolidation. It will hold one of the following values:

* "none": A normal invoice with no consolidation.
* "child": An invoice segment which has been combined into a consolidated invoice.
* "parent": A consolidated invoice, whose contents are composed of invoice segments.

"Parent" invoices do not have lines of their own, but they have subtotals and totals which aggregate the member invoice segments.

See also the [invoice consolidation documentation](https://maxio.zendesk.com/hc/en-us/articles/24252269909389-Invoice-Consolidation). | | `FromStatus` | [`InvoiceStatus`](../../doc/models/invoice-status.md) | Required | The status of the invoice before event occurrence. See [Invoice Statuses](https://maxio.zendesk.com/hc/en-us/articles/24252287829645-Advanced-Billing-Invoices-Overview#invoice-statuses) for more. | | `ToStatus` | [`InvoiceStatus`](../../doc/models/invoice-status.md) | Required | The status of the invoice after event occurrence. See [Invoice Statuses](https://maxio.zendesk.com/hc/en-us/articles/24252287829645-Advanced-Billing-Invoices-Overview#invoice-statuses) for more. | | `DueAmount` | `string` | Required | Amount due on the invoice, which is `total_amount - credit_amount - paid_amount`. | | `TotalAmount` | `string` | Required | The invoice total, which is `subtotal_amount - discount_amount + tax_amount`.' | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +IssueInvoiceEventData issueInvoiceEventData = new IssueInvoiceEventData { - "consolidation_level": "none", - "from_status": "voided", - "to_status": "draft", - "due_amount": "due_amount6", - "total_amount": "total_amount0" -} + ConsolidationLevel = InvoiceConsolidationLevel.Child, + FromStatus = InvoiceStatus.Draft, + ToStatus = InvoiceStatus.Voided, + DueAmount = "due_amount6", + TotalAmount = "total_amount0", +}; ``` diff --git a/doc/models/issue-invoice-event.md b/doc/models/issue-invoice-event.md index 7019ded7..b04a49c3 100644 --- a/doc/models/issue-invoice-event.md +++ b/doc/models/issue-invoice-event.md @@ -15,31 +15,39 @@ | `EventType` | [`InvoiceEventType`](../../doc/models/invoice-event-type.md) | Required | **Default**: `InvoiceEventType.issue_invoice` | | `EventData` | [`IssueInvoiceEventData`](../../doc/models/issue-invoice-event-data.md) | Required | Example schema for an `issue_invoice` event | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Globalization; + +IssueInvoiceEvent issueInvoiceEvent = new IssueInvoiceEvent { - "id": 130, - "timestamp": "2016-03-13T12:52:32.123Z", - "invoice": { - "issue_date": "2024-01-01", - "due_date": "2024-01-01", - "paid_date": "2024-01-01", - "public_url_expires_on": "2024-01-21", - "id": 166, - "uid": "uid6", - "site_id": 92, - "customer_id": 204, - "subscription_id": 20 - }, - "event_type": "issue_invoice", - "event_data": { - "consolidation_level": "child", - "from_status": "open", - "to_status": "pending", - "due_amount": "due_amount8", - "total_amount": "total_amount2" - } -} + Id = 144L, + Timestamp = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + Invoice = new Invoice + { + Id = 166L, + Uid = "uid6", + SiteId = 92, + CustomerId = 204, + SubscriptionId = 20, + IssueDate = DateTime.Parse("2024-01-01"), + DueDate = DateTime.Parse("2024-01-01"), + PaidDate = DateTime.Parse("2024-01-01"), + PublicUrlExpiresOn = DateTime.Parse("2024-01-21"), + }, + EventType = InvoiceEventType.IssueInvoice, + EventData = new IssueInvoiceEventData + { + ConsolidationLevel = InvoiceConsolidationLevel.Child, + FromStatus = InvoiceStatus.Open, + ToStatus = InvoiceStatus.Pending, + DueAmount = "due_amount8", + TotalAmount = "total_amount2", + }, +}; ``` diff --git a/doc/models/issue-invoice-request.md b/doc/models/issue-invoice-request.md index 4c929b1e..e880f730 100644 --- a/doc/models/issue-invoice-request.md +++ b/doc/models/issue-invoice-request.md @@ -9,13 +9,16 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `OnFailedPayment` | [`FailedPaymentAction?`](../../doc/models/failed-payment-action.md) | Optional | Action taken when payment for an invoice fails:

- `leave_open_invoice` - prepayments and credits applied to invoice; invoice status set to "open"; email sent to the customer for the issued invoice (if setting applies); payment failure recorded in the invoice history. This is the default option.
- `rollback_to_pending` - prepayments and credits not applied; invoice remains in "pending" status; no email sent to the customer; payment failure recorded in the invoice history.
- `initiate_dunning` - prepayments and credits applied to the invoice; invoice status set to "open"; email sent to the customer for the issued invoice (if setting applies); payment failure recorded in the invoice history; subscription will most likely go into "past_due" or "canceled" state (depending upon net terms and dunning settings).

**Default**: `FailedPaymentAction.leave_open_invoice` | +| `OnFailedPayment` | [`FailedPaymentAction?`](../../doc/models/failed-payment-action.md) | Optional | Action taken when payment for an invoice fails:

- `leave_open_invoice` - prepayments and credits applied to invoice; invoice status set to "open"; email sent to the customer for the issued invoice (if setting applies); payment failure recorded in the invoice history. This is the default option.
- `rollback_to_pending` - prepayments and credits not applied; invoice remains in "pending" status; no email sent to the customer; payment failure recorded in the invoice history.
- `initiate_dunning` - prepayments and credits applied to the invoice; invoice status set to "open"; email sent to the customer for the issued invoice (if setting applies); payment failure recorded in the invoice history; subscription will most likely go into "past_due" or "canceled" state (depending upon net terms and dunning settings).

**Default**: `FailedPaymentAction.leave_open_invoice` | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +IssueInvoiceRequest issueInvoiceRequest = new IssueInvoiceRequest { - "on_failed_payment": "leave_open_invoice" -} + OnFailedPayment = FailedPaymentAction.LeaveOpenInvoice, +}; ``` diff --git a/doc/models/issue-service-credit-request.md b/doc/models/issue-service-credit-request.md index a87bcd32..fbff1bda 100644 --- a/doc/models/issue-service-credit-request.md +++ b/doc/models/issue-service-credit-request.md @@ -11,14 +11,19 @@ | --- | --- | --- | --- | | `ServiceCredit` | [`IssueServiceCredit`](../../doc/models/issue-service-credit.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using AdvancedBilling.Standard.Models.Containers; + +IssueServiceCreditRequest issueServiceCreditRequest = new IssueServiceCreditRequest { - "service_credit": { - "amount": 31.42, - "memo": "memo0" - } -} + ServiceCredit = new IssueServiceCredit + { + Amount = IssueServiceCreditAmount.FromPrecision(31.42), + Memo = "memo0", + }, +}; ``` diff --git a/doc/models/issue-service-credit.md b/doc/models/issue-service-credit.md index 27b1bbc0..fd4d2dd1 100644 --- a/doc/models/issue-service-credit.md +++ b/doc/models/issue-service-credit.md @@ -12,12 +12,16 @@ | `Amount` | [`IssueServiceCreditAmount`](../../doc/models/containers/issue-service-credit-amount.md) | Required | This is a container for one-of cases. | | `Memo` | `string` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using AdvancedBilling.Standard.Models.Containers; + +IssueServiceCredit issueServiceCredit = new IssueServiceCredit { - "amount": 5.82, - "memo": "memo4" -} + Amount = IssueServiceCreditAmount.FromPrecision(44.88), + Memo = "memo6", +}; ``` diff --git a/doc/models/item-category.md b/doc/models/item-category.md index 3d882ad3..ca38e2d9 100644 --- a/doc/models/item-category.md +++ b/doc/models/item-category.md @@ -19,7 +19,9 @@ One of the following: Business Software, Consumer Software, Digital Services, Ph ## Example -``` -Business Software +```csharp +using AdvancedBilling.Standard.Models; + +ItemCategory itemCategory = ItemCategory.Other; ``` diff --git a/doc/models/item-price-point-changed.md b/doc/models/item-price-point-changed.md index 4ee55f0d..38262075 100644 --- a/doc/models/item-price-point-changed.md +++ b/doc/models/item-price-point-changed.md @@ -16,24 +16,29 @@ | `PreviousPricePoint` | [`ItemPricePointData`](../../doc/models/item-price-point-data.md) | Required | - | | `CurrentPricePoint` | [`ItemPricePointData`](../../doc/models/item-price-point-data.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +ItemPricePointChanged itemPricePointChanged = new ItemPricePointChanged { - "item_id": 66, - "item_type": "item_type6", - "item_handle": "item_handle4", - "item_name": "item_name8", - "previous_price_point": { - "id": 216, - "handle": "handle6", - "name": "name0" - }, - "current_price_point": { - "id": 218, - "handle": "handle6", - "name": "name0" - } -} + ItemId = 30, + ItemType = "item_type6", + ItemHandle = "item_handle4", + ItemName = "item_name8", + PreviousPricePoint = new ItemPricePointData + { + Id = 216, + Handle = "handle6", + Name = "name0", + }, + CurrentPricePoint = new ItemPricePointData + { + Id = 218, + Handle = "handle6", + Name = "name0", + }, +}; ``` diff --git a/doc/models/item-price-point-data.md b/doc/models/item-price-point-data.md index 30c0f733..91b239e4 100644 --- a/doc/models/item-price-point-data.md +++ b/doc/models/item-price-point-data.md @@ -13,13 +13,16 @@ | `Handle` | `string` | Optional | - | | `Name` | `string` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +ItemPricePointData itemPricePointData = new ItemPricePointData { - "id": 192, - "handle": "handle6", - "name": "name0" -} + Id = 80, + Handle = "handle8", + Name = "name2", +}; ``` diff --git a/doc/models/line-item-kind.md b/doc/models/line-item-kind.md index 3e5e5d1d..e9504e94 100644 --- a/doc/models/line-item-kind.md +++ b/doc/models/line-item-kind.md @@ -22,3 +22,11 @@ A handle for the line item kind | `Coupon` | | `Tax` | +## Example + +```csharp +using AdvancedBilling.Standard.Models; + +LineItemKind lineItemKind = LineItemKind.PrepaidUsageComponent; +``` + diff --git a/doc/models/line-item-transaction-type.md b/doc/models/line-item-transaction-type.md index 64e30b89..00c96f67 100644 --- a/doc/models/line-item-transaction-type.md +++ b/doc/models/line-item-transaction-type.md @@ -19,3 +19,11 @@ A handle for the line item transaction type | `InfoTransaction` | | `PaymentAuthorization` | +## Example + +```csharp +using AdvancedBilling.Standard.Models; + +LineItemTransactionType lineItemTransactionType = LineItemTransactionType.Payment; +``` + diff --git a/doc/models/list-all-component-price-points-input.md b/doc/models/list-all-component-price-points-input.md index cf18b2ce..b8c70c89 100644 --- a/doc/models/list-all-component-price-points-input.md +++ b/doc/models/list-all-component-price-points-input.md @@ -35,10 +35,10 @@ ListAllComponentPricePointsInput listAllComponentPricePointsInput = new ListAllC DateField = BasicDateField.UpdatedAt, StartDate = DateTime.Parse("2011-12-17"), EndDate = DateTime.Parse("2011-12-15"), - StartDatetime = DateTime.ParseExact("12/19/2011 09:15:30", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + StartDatetime = DateTime.ParseExact("2011-12-19T09:15:30+00:00", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", provider: CultureInfo.InvariantCulture, DateTimeStyles.RoundtripKind), - EndDatetime = DateTime.ParseExact("06/07/2019 17:20:06", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + EndDatetime = DateTime.ParseExact("2019-06-07T17:20:06Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", provider: CultureInfo.InvariantCulture, DateTimeStyles.RoundtripKind), Type = new List diff --git a/doc/models/list-all-product-price-points-input.md b/doc/models/list-all-product-price-points-input.md index bcef3404..375dfd63 100644 --- a/doc/models/list-all-product-price-points-input.md +++ b/doc/models/list-all-product-price-points-input.md @@ -32,10 +32,10 @@ ListAllProductPricePointsInput listAllProductPricePointsInput = new ListAllProdu DateField = BasicDateField.UpdatedAt, StartDate = DateTime.Parse("2011-12-17"), EndDate = DateTime.Parse("2011-12-15"), - StartDatetime = DateTime.ParseExact("12/19/2011 09:15:30", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + StartDatetime = DateTime.ParseExact("2011-12-19T09:15:30+00:00", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", provider: CultureInfo.InvariantCulture, DateTimeStyles.RoundtripKind), - EndDatetime = DateTime.ParseExact("06/07/2019 17:20:06", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + EndDatetime = DateTime.ParseExact("2019-06-07T17:20:06Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", provider: CultureInfo.InvariantCulture, DateTimeStyles.RoundtripKind), Type = new List diff --git a/doc/models/list-component-price-points-input.md b/doc/models/list-component-price-points-input.md index 3ccca078..9906d95b 100644 --- a/doc/models/list-component-price-points-input.md +++ b/doc/models/list-component-price-points-input.md @@ -12,7 +12,7 @@ Input structure for the method ListComponentPricePoints | Name | Type | Tags | Description | | --- | --- | --- | --- | | `ComponentId` | `int` | Required | The Advanced Billing id of the component | -| `CurrencyPrices` | `bool?` | Optional | Include an array of currency price data | +| `CurrencyPrices` | `bool?` | Optional | Include an array of currency price data. | | `Page` | `int?` | Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | | `PerPage` | `int?` | Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | | `FilterType` | [`List`](../../doc/models/price-point-type.md) | Optional | Use in query: `filter[type]=catalog,default`. | diff --git a/doc/models/list-components-filter.md b/doc/models/list-components-filter.md index 9b6eef08..d1bf950e 100644 --- a/doc/models/list-components-filter.md +++ b/doc/models/list-components-filter.md @@ -12,16 +12,21 @@ | `Ids` | `List` | Optional | Allows fetching components with matching id based on provided value. Use in query `filter[ids]=1,2,3`.

**Constraints**: *Minimum Items*: `1` | | `UseSiteExchangeRate` | `bool?` | Optional | Allows fetching components with matching use_site_exchange_rate based on provided value (refers to default price point). Use in query `filter[use_site_exchange_rate]=true`. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Collections.Generic; + +ListComponentsFilter listComponentsFilter = new ListComponentsFilter { - "ids": [ - 1, - 2, - 3 - ], - "use_site_exchange_rate": false -} + Ids = new List + { + 1, + 2, + 3, + }, + UseSiteExchangeRate = false, +}; ``` diff --git a/doc/models/list-components-for-product-family-input.md b/doc/models/list-components-for-product-family-input.md index ad8c70e6..467c0fa9 100644 --- a/doc/models/list-components-for-product-family-input.md +++ b/doc/models/list-components-for-product-family-input.md @@ -18,7 +18,7 @@ Input structure for the method ListComponentsForProductFamily | `Filter` | [`ListComponentsFilter`](../../doc/models/list-components-filter.md) | Optional | Filter to use for List Components operations | | `DateField` | [`BasicDateField?`](../../doc/models/basic-date-field.md) | Optional | The type of filter you would like to apply to your search. Use in query `date_field=created_at`. | | `EndDate` | `string` | Optional | The end date (format YYYY-MM-DD) with which to filter the date_field. Returns components with a timestamp up to and including 11:59:59PM in your site’s time zone on the date specified. | -| `EndDatetime` | `string` | Optional | The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns components with a timestamp at or before exact time provided in query. You can specify timezone in query - otherwise your site's time zone will be used. If provided, this parameter will be used instead of end_date. optional. | +| `EndDatetime` | `string` | Optional | The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns components with a timestamp at or before exact time provided in query. You can specify timezone in query - otherwise your site's time zone will be used. If provided, this parameter will be used instead of end_date. | | `StartDate` | `string` | Optional | The start date (format YYYY-MM-DD) with which to filter the date_field. Returns components with a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date specified. | | `StartDatetime` | `string` | Optional | The start date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns components with a timestamp at or after exact time provided in query. You can specify timezone in query - otherwise your site's time zone will be used. If provided, this parameter will be used instead of start_date. | diff --git a/doc/models/list-components-input.md b/doc/models/list-components-input.md index ca956c08..19e8b034 100644 --- a/doc/models/list-components-input.md +++ b/doc/models/list-components-input.md @@ -15,8 +15,8 @@ Input structure for the method ListComponents | `StartDate` | `string` | Optional | The start date (format YYYY-MM-DD) with which to filter the date_field. Returns components with a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date specified. | | `EndDate` | `string` | Optional | The end date (format YYYY-MM-DD) with which to filter the date_field. Returns components with a timestamp up to and including 11:59:59PM in your site’s time zone on the date specified. | | `StartDatetime` | `string` | Optional | The start date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns components with a timestamp at or after exact time provided in query. You can specify timezone in query - otherwise your site's time zone will be used. If provided, this parameter will be used instead of start_date. | -| `EndDatetime` | `string` | Optional | The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns components with a timestamp at or before exact time provided in query. You can specify timezone in query - otherwise your site's time zone will be used. If provided, this parameter will be used instead of end_date. optional | -| `IncludeArchived` | `bool?` | Optional | Include archived items | +| `EndDatetime` | `string` | Optional | The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns components with a timestamp at or before exact time provided in query. You can specify timezone in query - otherwise your site's time zone will be used. If provided, this parameter will be used instead of end_date. | +| `IncludeArchived` | `bool?` | Optional | Include archived items. | | `Page` | `int?` | Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | | `PerPage` | `int?` | Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | | `Filter` | [`ListComponentsFilter`](../../doc/models/list-components-filter.md) | Optional | Filter to use for List Components operations | diff --git a/doc/models/list-components-price-points-include.md b/doc/models/list-components-price-points-include.md index 78039a91..6e899046 100644 --- a/doc/models/list-components-price-points-include.md +++ b/doc/models/list-components-price-points-include.md @@ -13,7 +13,9 @@ ## Example -``` -currency_prices +```csharp +using AdvancedBilling.Standard.Models; + +ListComponentsPricePointsInclude listComponentsPricePointsInclude = ListComponentsPricePointsInclude.CurrencyPrices; ``` diff --git a/doc/models/list-components-price-points-response.md b/doc/models/list-components-price-points-response.md index bee00209..020a5f20 100644 --- a/doc/models/list-components-price-points-response.md +++ b/doc/models/list-components-price-points-response.md @@ -11,19 +11,25 @@ | --- | --- | --- | --- | | `PricePoints` | [`List`](../../doc/models/component-price-point.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Collections.Generic; + +ListComponentsPricePointsResponse listComponentsPricePointsResponse = new ListComponentsPricePointsResponse { - "price_points": [ + PricePoints = new List { - "id": 40, - "type": "default", - "default": false, - "name": "name2", - "pricing_scheme": "per_unit" - } - ] -} + new ComponentPricePoint + { + Id = 40, + Type = PricePointType.Default, + MDefault = false, + Name = "name2", + PricingScheme = PricingScheme.PerUnit, + }, + }, +}; ``` diff --git a/doc/models/list-coupons-filter.md b/doc/models/list-coupons-filter.md index fe6ba2ea..37f60a22 100644 --- a/doc/models/list-coupons-filter.md +++ b/doc/models/list-coupons-filter.md @@ -19,24 +19,35 @@ | `UseSiteExchangeRate` | `bool?` | Optional | If true, restricts the list to coupons whose pricing is recalculated from the site’s current exchange rates, so their currency_prices array contains on-the-fly conversions rather than stored price records. If false, restricts the list to coupons that have manually defined amounts for each currency, ensuring the response includes the saved currency_prices entries instead of exchange-rate-derived values. Use in query `filter[use_site_exchange_rate]=true`. | | `IncludeArchived` | `bool?` | Optional | Controls returning archived coupons. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Collections.Generic; +using System.Globalization; + +ListCouponsFilter listCouponsFilter = new ListCouponsFilter { - "start_date": "2011-12-17", - "end_date": "2011-12-15", - "start_datetime": "12/19/2011 09:15:30", - "end_datetime": "06/07/2019 17:20:06", - "ids": [ - 1, - 2, - 3 - ], - "codes": [ - "free", - "free_trial" - ], - "date_field": "updated_at" -} + DateField = BasicDateField.UpdatedAt, + StartDate = DateTime.Parse("2011-12-17"), + EndDate = DateTime.Parse("2011-12-15"), + StartDatetime = DateTime.ParseExact("2011-12-19T09:15:30+00:00", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + EndDatetime = DateTime.ParseExact("2019-06-07T17:20:06Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + Ids = new List + { + 1, + 2, + 3, + }, + Codes = new List + { + "free", + "free_trial", + }, +}; ``` diff --git a/doc/models/list-coupons-for-product-family-input.md b/doc/models/list-coupons-for-product-family-input.md index bef938bb..9fbdf78d 100644 --- a/doc/models/list-coupons-for-product-family-input.md +++ b/doc/models/list-coupons-for-product-family-input.md @@ -15,7 +15,7 @@ Input structure for the method ListCouponsForProductFamily | `Page` | `int?` | Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | | `PerPage` | `int?` | Optional | This parameter indicates how many records to fetch in each request. Default value is 30. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `30`

**Constraints**: `<= 200` | | `Filter` | [`ListCouponsFilter`](../../doc/models/list-coupons-filter.md) | Optional | Filter to use for List Coupons operations | -| `CurrencyPrices` | `bool?` | Optional | When fetching coupons, if you have defined multiple currencies at the site level, you can optionally pass the `?currency_prices=true` query param to include an array of currency price data in the response. Use in query `currency_prices=true`. | +| `CurrencyPrices` | `bool?` | Optional | (Optional) If you have defined multiple currencies at the site level, you can pass `?currency_prices=true` to include an array of currency price data in the response. Use in query `currency_prices=true`. | ## Example @@ -34,10 +34,10 @@ ListCouponsForProductFamilyInput listCouponsForProductFamilyInput = new ListCoup DateField = BasicDateField.UpdatedAt, StartDate = DateTime.Parse("2011-12-17"), EndDate = DateTime.Parse("2011-12-15"), - StartDatetime = DateTime.ParseExact("12/19/2011 09:15:30", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + StartDatetime = DateTime.ParseExact("2011-12-19T09:15:30+00:00", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", provider: CultureInfo.InvariantCulture, DateTimeStyles.RoundtripKind), - EndDatetime = DateTime.ParseExact("06/07/2019 17:20:06", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + EndDatetime = DateTime.ParseExact("2019-06-07T17:20:06Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", provider: CultureInfo.InvariantCulture, DateTimeStyles.RoundtripKind), Ids = new List diff --git a/doc/models/list-coupons-input.md b/doc/models/list-coupons-input.md index e63eab75..3cf0210a 100644 --- a/doc/models/list-coupons-input.md +++ b/doc/models/list-coupons-input.md @@ -14,7 +14,7 @@ Input structure for the method ListCoupons | `Page` | `int?` | Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | | `PerPage` | `int?` | Optional | This parameter indicates how many records to fetch in each request. Default value is 30. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `30`

**Constraints**: `<= 200` | | `Filter` | [`ListCouponsFilter`](../../doc/models/list-coupons-filter.md) | Optional | Filter to use for List Coupons operations | -| `CurrencyPrices` | `bool?` | Optional | When fetching coupons, if you have defined multiple currencies at the site level, you can optionally pass the `?currency_prices=true` query param to include an array of currency price data in the response. Use in query `currency_prices=true`. | +| `CurrencyPrices` | `bool?` | Optional | (Optional) If you have defined multiple currencies at the site level, you can pass `?currency_prices=true` to include an array of currency price data in the response. Use in query `currency_prices=true`. | ## Example @@ -32,10 +32,10 @@ ListCouponsInput listCouponsInput = new ListCouponsInput DateField = BasicDateField.UpdatedAt, StartDate = DateTime.Parse("2011-12-17"), EndDate = DateTime.Parse("2011-12-15"), - StartDatetime = DateTime.ParseExact("12/19/2011 09:15:30", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + StartDatetime = DateTime.ParseExact("2011-12-19T09:15:30+00:00", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", provider: CultureInfo.InvariantCulture, DateTimeStyles.RoundtripKind), - EndDatetime = DateTime.ParseExact("06/07/2019 17:20:06", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + EndDatetime = DateTime.ParseExact("2019-06-07T17:20:06Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", provider: CultureInfo.InvariantCulture, DateTimeStyles.RoundtripKind), Ids = new List diff --git a/doc/models/list-credit-notes-input.md b/doc/models/list-credit-notes-input.md index 332795c9..66a223f5 100644 --- a/doc/models/list-credit-notes-input.md +++ b/doc/models/list-credit-notes-input.md @@ -14,11 +14,11 @@ Input structure for the method ListCreditNotes | `SubscriptionId` | `int?` | Optional | The subscription's Advanced Billing id | | `Page` | `int?` | Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | | `PerPage` | `int?` | Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | -| `LineItems` | `bool?` | Optional | Include line items data

**Default**: `false` | -| `Discounts` | `bool?` | Optional | Include discounts data

**Default**: `false` | -| `Taxes` | `bool?` | Optional | Include taxes data

**Default**: `false` | -| `Refunds` | `bool?` | Optional | Include refunds data

**Default**: `false` | -| `Applications` | `bool?` | Optional | Include applications data

**Default**: `false` | +| `LineItems` | `bool?` | Optional | Include line items data.

**Default**: `false` | +| `Discounts` | `bool?` | Optional | Include discounts data.

**Default**: `false` | +| `Taxes` | `bool?` | Optional | Include taxes data.

**Default**: `false` | +| `Refunds` | `bool?` | Optional | Include refunds data.

**Default**: `false` | +| `Applications` | `bool?` | Optional | Include applications data.

**Default**: `false` | ## Example diff --git a/doc/models/list-credit-notes-response.md b/doc/models/list-credit-notes-response.md index 4201559a..29be6361 100644 --- a/doc/models/list-credit-notes-response.md +++ b/doc/models/list-credit-notes-response.md @@ -11,19 +11,25 @@ | --- | --- | --- | --- | | `CreditNotes` | [`List`](../../doc/models/credit-note.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Collections.Generic; + +ListCreditNotesResponse listCreditNotesResponse = new ListCreditNotesResponse { - "credit_notes": [ + CreditNotes = new List { - "uid": "uid2", - "site_id": 112, - "customer_id": 224, - "subscription_id": 40, - "number": "number0" - } - ] -} + new CreditNote + { + Uid = "uid2", + SiteId = 112, + CustomerId = 224, + SubscriptionId = 40, + Number = "number0", + }, + }, +}; ``` diff --git a/doc/models/list-events-date-field.md b/doc/models/list-events-date-field.md index d6364419..7689812b 100644 --- a/doc/models/list-events-date-field.md +++ b/doc/models/list-events-date-field.md @@ -13,7 +13,9 @@ ## Example -``` -created_at +```csharp +using AdvancedBilling.Standard.Models; + +ListEventsDateField listEventsDateField = ListEventsDateField.CreatedAt; ``` diff --git a/doc/models/list-events-input.md b/doc/models/list-events-input.md index ea6714a9..1ea13774 100644 --- a/doc/models/list-events-input.md +++ b/doc/models/list-events-input.md @@ -13,8 +13,8 @@ Input structure for the method ListEvents | --- | --- | --- | --- | | `Page` | `int?` | Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | | `PerPage` | `int?` | Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | -| `SinceId` | `long?` | Optional | Returns events with an id greater than or equal to the one specified | -| `MaxId` | `long?` | Optional | Returns events with an id less than or equal to the one specified | +| `SinceId` | `long?` | Optional | Returns events with an id greater than or equal to the one specified. | +| `MaxId` | `long?` | Optional | Returns events with an id less than or equal to the one specified. | | `Direction` | [`Direction?`](../../doc/models/direction.md) | Optional | The sort direction of the returned events.

**Default**: `Direction.desc` | | `Filter` | [`List`](../../doc/models/event-key.md) | Optional | You can pass multiple event keys after comma.
Use in query `filter=signup_success,payment_success`. | | `DateField` | [`ListEventsDateField?`](../../doc/models/list-events-date-field.md) | Optional | The type of filter you would like to apply to your search. | diff --git a/doc/models/list-invoice-events-response.md b/doc/models/list-invoice-events-response.md index d18809b7..c122f961 100644 --- a/doc/models/list-invoice-events-response.md +++ b/doc/models/list-invoice-events-response.md @@ -14,52 +14,172 @@ | `PerPage` | `int?` | Optional | - | | `TotalPages` | `int?` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using AdvancedBilling.Standard.Models.Containers; +using System.Collections.Generic; +using System.Globalization; + +ListInvoiceEventsResponse listInvoiceEventsResponse = new ListInvoiceEventsResponse { - "events": [ + Events = new List { - "event_type": "apply_credit_note", - "id": 214, - "timestamp": "2016-03-13T12:52:32.123Z", - "invoice": { - "id": 166, - "uid": "uid6", - "site_id": 92, - "customer_id": 204, - "subscription_id": 20 - }, - "event_data": { - "uid": "uid6", - "credit_note_number": "credit_note_number0", - "credit_note_uid": "credit_note_uid0", - "original_amount": "original_amount0", - "applied_amount": "applied_amount2", - "transaction_time": "2016-03-13T12:52:32.123Z", - "memo": "memo0", - "role": "role0", - "consolidated_invoice": false, - "applied_credit_notes": [ - { - "uid": "uid4", - "number": "number8" - }, - { - "uid": "uid4", - "number": "number8" - }, - { - "uid": "uid4", - "number": "number8" - } - ] - } - } - ], - "page": 184, - "per_page": 96, - "total_pages": 194 -} + InvoiceEvent.FromApplyCreditNoteEvent( + new ApplyCreditNoteEvent + { + Id = 214L, + Timestamp = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + Invoice = new Invoice + { + Id = 166L, + Uid = "uid6", + SiteId = 92, + CustomerId = 204, + SubscriptionId = 20, + }, + EventType = InvoiceEventType.ApplyCreditNote, + EventData = new ApplyCreditNoteEventData + { + Uid = "uid6", + CreditNoteNumber = "credit_note_number0", + CreditNoteUid = "credit_note_uid0", + OriginalAmount = "original_amount0", + AppliedAmount = "applied_amount2", + TransactionTime = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + Memo = "memo0", + Role = "role0", + ConsolidatedInvoice = false, + AppliedCreditNotes = new List + { + new AppliedCreditNoteData + { + Uid = "uid4", + Number = "number8", + }, + new AppliedCreditNoteData + { + Uid = "uid4", + Number = "number8", + }, + new AppliedCreditNoteData + { + Uid = "uid4", + Number = "number8", + }, + }, + }, + } + ), + InvoiceEvent.FromApplyCreditNoteEvent( + new ApplyCreditNoteEvent + { + Id = 214L, + Timestamp = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + Invoice = new Invoice + { + Id = 166L, + Uid = "uid6", + SiteId = 92, + CustomerId = 204, + SubscriptionId = 20, + }, + EventType = InvoiceEventType.ApplyCreditNote, + EventData = new ApplyCreditNoteEventData + { + Uid = "uid6", + CreditNoteNumber = "credit_note_number0", + CreditNoteUid = "credit_note_uid0", + OriginalAmount = "original_amount0", + AppliedAmount = "applied_amount2", + TransactionTime = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + Memo = "memo0", + Role = "role0", + ConsolidatedInvoice = false, + AppliedCreditNotes = new List + { + new AppliedCreditNoteData + { + Uid = "uid4", + Number = "number8", + }, + new AppliedCreditNoteData + { + Uid = "uid4", + Number = "number8", + }, + new AppliedCreditNoteData + { + Uid = "uid4", + Number = "number8", + }, + }, + }, + } + ), + InvoiceEvent.FromApplyCreditNoteEvent( + new ApplyCreditNoteEvent + { + Id = 214L, + Timestamp = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + Invoice = new Invoice + { + Id = 166L, + Uid = "uid6", + SiteId = 92, + CustomerId = 204, + SubscriptionId = 20, + }, + EventType = InvoiceEventType.ApplyCreditNote, + EventData = new ApplyCreditNoteEventData + { + Uid = "uid6", + CreditNoteNumber = "credit_note_number0", + CreditNoteUid = "credit_note_uid0", + OriginalAmount = "original_amount0", + AppliedAmount = "applied_amount2", + TransactionTime = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + Memo = "memo0", + Role = "role0", + ConsolidatedInvoice = false, + AppliedCreditNotes = new List + { + new AppliedCreditNoteData + { + Uid = "uid4", + Number = "number8", + }, + new AppliedCreditNoteData + { + Uid = "uid4", + Number = "number8", + }, + new AppliedCreditNoteData + { + Uid = "uid4", + Number = "number8", + }, + }, + }, + } + ), + }, + Page = 28, + PerPage = 196, + TotalPages = 94, +}; ``` diff --git a/doc/models/list-invoices-input.md b/doc/models/list-invoices-input.md index 30a8be57..63b1100c 100644 --- a/doc/models/list-invoices-input.md +++ b/doc/models/list-invoices-input.md @@ -20,13 +20,13 @@ Input structure for the method ListInvoices | `Page` | `int?` | Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | | `PerPage` | `int?` | Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | | `Direction` | [`Direction?`](../../doc/models/direction.md) | Optional | The sort direction of the returned invoices.

**Default**: `Direction.desc` | -| `LineItems` | `bool?` | Optional | Include line items data

**Default**: `false` | -| `Discounts` | `bool?` | Optional | Include discounts data

**Default**: `false` | -| `Taxes` | `bool?` | Optional | Include taxes data

**Default**: `false` | -| `Credits` | `bool?` | Optional | Include credits data

**Default**: `false` | -| `Payments` | `bool?` | Optional | Include payments data

**Default**: `false` | -| `CustomFields` | `bool?` | Optional | Include custom fields data

**Default**: `false` | -| `Refunds` | `bool?` | Optional | Include refunds data

**Default**: `false` | +| `LineItems` | `bool?` | Optional | Include line items data.

**Default**: `false` | +| `Discounts` | `bool?` | Optional | Include discounts data.

**Default**: `false` | +| `Taxes` | `bool?` | Optional | Include taxes data.

**Default**: `false` | +| `Credits` | `bool?` | Optional | Include credits data.

**Default**: `false` | +| `Payments` | `bool?` | Optional | Include payments data.

**Default**: `false` | +| `CustomFields` | `bool?` | Optional | Include custom fields data.

**Default**: `false` | +| `Refunds` | `bool?` | Optional | Include refunds data.

**Default**: `false` | | `DateField` | [`InvoiceDateField?`](../../doc/models/invoice-date-field.md) | Optional | The type of filter you would like to apply to your search. Use in query `date_field=issue_date`.

**Default**: `InvoiceDateField.due_date` | | `StartDatetime` | `string` | Optional | The start date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns invoices with a timestamp at or after exact time provided in query. You can specify timezone in query - otherwise your site's time zone will be used. If provided, this parameter will be used instead of start_date. Allowed to be used only along with date_field set to created_at or updated_at. | | `EndDatetime` | `string` | Optional | The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns invoices with a timestamp at or before exact time provided in query. You can specify timezone in query - otherwise your site's time zone will be used. If provided, this parameter will be used instead of end_date. Allowed to be used only along with date_field set to created_at or updated_at. | diff --git a/doc/models/list-invoices-response.md b/doc/models/list-invoices-response.md index 81d8b2c8..e4deb5f2 100644 --- a/doc/models/list-invoices-response.md +++ b/doc/models/list-invoices-response.md @@ -11,23 +11,29 @@ | --- | --- | --- | --- | | `Invoices` | [`List`](../../doc/models/invoice.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Collections.Generic; + +ListInvoicesResponse listInvoicesResponse = new ListInvoicesResponse { - "invoices": [ + Invoices = new List { - "issue_date": "2024-01-01", - "due_date": "2024-01-01", - "paid_date": "2024-01-01", - "public_url_expires_on": "2024-01-21", - "id": 196, - "uid": "uid6", - "site_id": 122, - "customer_id": 234, - "subscription_id": 50 - } - ] -} + new Invoice + { + Id = 196L, + Uid = "uid6", + SiteId = 122, + CustomerId = 234, + SubscriptionId = 50, + IssueDate = DateTime.Parse("2024-01-01"), + DueDate = DateTime.Parse("2024-01-01"), + PaidDate = DateTime.Parse("2024-01-01"), + PublicUrlExpiresOn = DateTime.Parse("2024-01-21"), + }, + }, +}; ``` diff --git a/doc/models/list-metafields-response.md b/doc/models/list-metafields-response.md index f78fcd3c..4f8c2ff8 100644 --- a/doc/models/list-metafields-response.md +++ b/doc/models/list-metafields-response.md @@ -15,29 +15,66 @@ | `PerPage` | `int?` | Optional | - | | `Metafields` | [`List`](../../doc/models/metafield.md) | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Collections.Generic; + +ListMetafieldsResponse listMetafieldsResponse = new ListMetafieldsResponse { - "total_count": 210, - "current_page": 186, - "total_pages": 198, - "per_page": 92, - "metafields": [ + TotalCount = 228, + CurrentPage = 204, + TotalPages = 216, + PerPage = 74, + Metafields = new List { - "id": 22, - "name": "name2", - "scope": { - "csv": "0", - "invoices": "0", - "statements": "0", - "portal": "0", - "public_show": "0" - }, - "data_count": 10, - "input_type": "balance_tracker" - } - ] -} + new Metafield + { + Id = 22, + Name = "name2", + Scope = new MetafieldScope + { + Csv = IncludeOption.Exclude, + Invoices = IncludeOption.Exclude, + Statements = IncludeOption.Exclude, + Portal = IncludeOption.Exclude, + PublicShow = IncludeOption.Exclude, + }, + DataCount = 10, + InputType = MetafieldInput.BalanceTracker, + }, + new Metafield + { + Id = 22, + Name = "name2", + Scope = new MetafieldScope + { + Csv = IncludeOption.Exclude, + Invoices = IncludeOption.Exclude, + Statements = IncludeOption.Exclude, + Portal = IncludeOption.Exclude, + PublicShow = IncludeOption.Exclude, + }, + DataCount = 10, + InputType = MetafieldInput.BalanceTracker, + }, + new Metafield + { + Id = 22, + Name = "name2", + Scope = new MetafieldScope + { + Csv = IncludeOption.Exclude, + Invoices = IncludeOption.Exclude, + Statements = IncludeOption.Exclude, + Portal = IncludeOption.Exclude, + PublicShow = IncludeOption.Exclude, + }, + DataCount = 10, + InputType = MetafieldInput.BalanceTracker, + }, + }, +}; ``` diff --git a/doc/models/list-mrr-filter.md b/doc/models/list-mrr-filter.md index 59b62a13..9c279140 100644 --- a/doc/models/list-mrr-filter.md +++ b/doc/models/list-mrr-filter.md @@ -11,15 +11,20 @@ | --- | --- | --- | --- | | `SubscriptionIds` | `List` | Optional | Submit ids in order to limit results. Use in query: `filter[subscription_ids]=1,2,3`.

**Constraints**: *Minimum Items*: `1` | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Collections.Generic; + +ListMrrFilter listMrrFilter = new ListMrrFilter { - "subscription_ids": [ - 1, - 2, - 3 - ] -} + SubscriptionIds = new List + { + 1, + 2, + 3, + }, +}; ``` diff --git a/doc/models/list-mrr-movements-input.md b/doc/models/list-mrr-movements-input.md index 07d3b984..a74c9295 100644 --- a/doc/models/list-mrr-movements-input.md +++ b/doc/models/list-mrr-movements-input.md @@ -11,7 +11,7 @@ Input structure for the method ListMrrMovements | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `SubscriptionId` | `int?` | Optional | optionally filter results by subscription | +| `SubscriptionId` | `int?` | Optional | (Optional) Filter results by subscription. | | `Page` | `int?` | Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | | `PerPage` | `int?` | Optional | This parameter indicates how many records to fetch in each request. Default value is 10. The maximum allowed values is 50; any per_page value over 50 will be changed to 50.
Use in query `per_page=20`.

**Default**: `10`

**Constraints**: `<= 50` | | `Direction` | [`SortingDirection?`](../../doc/models/sorting-direction.md) | Optional | Controls the order in which results are returned.
Use in query `direction=asc`. | diff --git a/doc/models/list-mrr-response-result.md b/doc/models/list-mrr-response-result.md index 19e68d78..bcf53141 100644 --- a/doc/models/list-mrr-response-result.md +++ b/doc/models/list-mrr-response-result.md @@ -17,15 +17,18 @@ | `CurrencySymbol` | `string` | Optional | - | | `Movements` | [`List`](../../doc/models/movement.md) | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +ListMRRResponseResult listMRRResponseResult = new ListMRRResponseResult { - "page": 150, - "per_page": 238, - "total_pages": 16, - "total_entries": 112, - "currency": "currency8" -} + Page = 40, + PerPage = 208, + TotalPages = 82, + TotalEntries = 78, + Currency = "currency6", +}; ``` diff --git a/doc/models/list-mrr-response.md b/doc/models/list-mrr-response.md index 76ea231d..08d8d512 100644 --- a/doc/models/list-mrr-response.md +++ b/doc/models/list-mrr-response.md @@ -11,17 +11,21 @@ | --- | --- | --- | --- | | `Mrr` | [`ListMRRResponseResult`](../../doc/models/list-mrr-response-result.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +ListMRRResponse listMRRResponse = new ListMRRResponse { - "mrr": { - "page": 30, - "per_page": 198, - "total_pages": 92, - "total_entries": 188, - "currency": "currency4" - } -} + Mrr = new ListMRRResponseResult + { + Page = 30, + PerPage = 198, + TotalPages = 92, + TotalEntries = 188, + Currency = "currency4", + }, +}; ``` diff --git a/doc/models/list-offers-response.md b/doc/models/list-offers-response.md index 6e9861a3..baf595f1 100644 --- a/doc/models/list-offers-response.md +++ b/doc/models/list-offers-response.md @@ -11,33 +11,25 @@ | --- | --- | --- | --- | | `Offers` | [`List`](../../doc/models/offer.md) | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Collections.Generic; + +ListOffersResponse listOffersResponse = new ListOffersResponse { - "offers": [ - { - "id": 12, - "site_id": 194, - "product_family_id": 16, - "product_id": 210, - "product_price_point_id": 134 - }, + Offers = new List { - "id": 12, - "site_id": 194, - "product_family_id": 16, - "product_id": 210, - "product_price_point_id": 134 + new Offer + { + Id = 12, + SiteId = 194, + ProductFamilyId = 16, + ProductId = 210, + ProductPricePointId = 134, + }, }, - { - "id": 12, - "site_id": 194, - "product_family_id": 16, - "product_id": 210, - "product_price_point_id": 134 - } - ] -} +}; ``` diff --git a/doc/models/list-prepayment-date-field.md b/doc/models/list-prepayment-date-field.md index a143aa4d..a81d3bca 100644 --- a/doc/models/list-prepayment-date-field.md +++ b/doc/models/list-prepayment-date-field.md @@ -14,7 +14,9 @@ ## Example -``` -created_at +```csharp +using AdvancedBilling.Standard.Models; + +ListPrepaymentDateField listPrepaymentDateField = ListPrepaymentDateField.CreatedAt; ``` diff --git a/doc/models/list-prepayments-filter.md b/doc/models/list-prepayments-filter.md index 9e73179b..19b1ee33 100644 --- a/doc/models/list-prepayments-filter.md +++ b/doc/models/list-prepayments-filter.md @@ -13,13 +13,16 @@ | `StartDate` | `DateTime?` | Optional | The start date (format YYYY-MM-DD) with which to filter the date_field. Returns prepayments with a timestamp at or after midnight (12:00:00 AM) in your site's time zone on the date specified. Use in query: `filter[start_date]=2011-12-15`. | | `EndDate` | `DateTime?` | Optional | The end date (format YYYY-MM-DD) with which to filter the date_field. Returns prepayments with a timestamp up to and including 11:59:59PM in your site's time zone on the date specified. Use in query: `filter[end_date]=2011-12-15`. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +ListPrepaymentsFilter listPrepaymentsFilter = new ListPrepaymentsFilter { - "date_field": "created_at", - "start_date": "2024-01-01", - "end_date": "2024-01-31" -} + DateField = ListPrepaymentDateField.CreatedAt, + StartDate = DateTime.Parse("2024-01-01"), + EndDate = DateTime.Parse("2024-01-31"), +}; ``` diff --git a/doc/models/list-price-points-filter.md b/doc/models/list-price-points-filter.md index f2623fa4..aa9d95e5 100644 --- a/doc/models/list-price-points-filter.md +++ b/doc/models/list-price-points-filter.md @@ -18,25 +18,36 @@ | `Ids` | `List` | Optional | Allows fetching price points with matching id based on provided values. Use in query: `filter[ids]=1,2,3`. | | `ArchivedAt` | [`IncludeNullOrNotNull?`](../../doc/models/include-null-or-not-null.md) | Optional | Allows fetching price points only if archived_at is present or not. Use in query: `filter[archived_at]=not_null`. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Collections.Generic; +using System.Globalization; + +ListPricePointsFilter listPricePointsFilter = new ListPricePointsFilter { - "start_date": "2011-12-17", - "end_date": "2011-12-15", - "start_datetime": "12/19/2011 09:15:30", - "end_datetime": "06/07/2019 17:20:06", - "type": [ - "catalog", - "default", - "custom" - ], - "ids": [ - 1, - 2, - 3 - ], - "date_field": "updated_at" -} + DateField = BasicDateField.UpdatedAt, + StartDate = DateTime.Parse("2011-12-17"), + EndDate = DateTime.Parse("2011-12-15"), + StartDatetime = DateTime.ParseExact("2011-12-19T09:15:30+00:00", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + EndDatetime = DateTime.ParseExact("2019-06-07T17:20:06Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + Type = new List + { + PricePointType.Catalog, + PricePointType.Default, + PricePointType.Custom, + }, + Ids = new List + { + 1, + 2, + 3, + }, +}; ``` diff --git a/doc/models/list-product-price-points-input.md b/doc/models/list-product-price-points-input.md index 1b18f8db..bd5004d5 100644 --- a/doc/models/list-product-price-points-input.md +++ b/doc/models/list-product-price-points-input.md @@ -14,7 +14,7 @@ Input structure for the method ListProductPricePoints | `ProductId` | [`ListProductPricePointsInputProductId`](../../doc/models/containers/list-product-price-points-input-product-id.md) | Required | This is a container for one-of cases. | | `Page` | `int?` | Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | | `PerPage` | `int?` | Optional | This parameter indicates how many records to fetch in each request. Default value is 10. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.

**Default**: `10`

**Constraints**: `<= 200` | -| `CurrencyPrices` | `bool?` | Optional | When fetching a product's price points, if you have defined multiple currencies at the site level, you can optionally pass the ?currency_prices=true query param to include an array of currency price data in the response. If the product price point 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. | +| `CurrencyPrices` | `bool?` | Optional | (Optional) If you have defined multiple currencies at the site level, you can pass ?currency_prices=true to include an array of currency price data in the response. If the product price point 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. | | `FilterType` | [`List`](../../doc/models/price-point-type.md) | Optional | Use in query: `filter[type]=catalog,default`. | | `Archived` | `bool?` | Optional | Set to include archived price points in the response. | diff --git a/doc/models/list-product-price-points-response.md b/doc/models/list-product-price-points-response.md index 39caa5f0..57206496 100644 --- a/doc/models/list-product-price-points-response.md +++ b/doc/models/list-product-price-points-response.md @@ -11,19 +11,25 @@ | --- | --- | --- | --- | | `PricePoints` | [`List`](../../doc/models/product-price-point.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Collections.Generic; + +ListProductPricePointsResponse listProductPricePointsResponse = new ListProductPricePointsResponse { - "price_points": [ + PricePoints = new List { - "id": 40, - "name": "name2", - "handle": "handle8", - "price_in_cents": 108, - "interval": 92 - } - ] -} + new ProductPricePoint + { + Id = 40, + Name = "name2", + Handle = "handle8", + PriceInCents = 108L, + Interval = 92, + }, + }, +}; ``` diff --git a/doc/models/list-products-filter.md b/doc/models/list-products-filter.md index d7b08b9d..d02718a6 100644 --- a/doc/models/list-products-filter.md +++ b/doc/models/list-products-filter.md @@ -13,19 +13,25 @@ | `PrepaidProductPricePoint` | [`PrepaidProductPricePointFilter`](../../doc/models/prepaid-product-price-point-filter.md) | Optional | Allows fetching products only if a prepaid product price point is present or not. To use this filter you also have to include the following param in the request `include=prepaid_product_price_point`. Use in query `filter[prepaid_product_price_point][product_price_point_id]=not_null`. | | `UseSiteExchangeRate` | `bool?` | Optional | Allows fetching products with matching use_site_exchange_rate based on provided value (refers to default price point). Use in query `filter[use_site_exchange_rate]=true`. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Collections.Generic; + +ListProductsFilter listProductsFilter = new ListProductsFilter { - "ids": [ - 1, - 2, - 3 - ], - "prepaid_product_price_point": { - "product_price_point_id": "product_price_point_id2" - }, - "use_site_exchange_rate": false -} + Ids = new List + { + 1, + 2, + 3, + }, + PrepaidProductPricePoint = new PrepaidProductPricePointFilter + { + ProductPricePointId = "product_price_point_id2", + }, + UseSiteExchangeRate = false, +}; ``` diff --git a/doc/models/list-products-for-product-family-input.md b/doc/models/list-products-for-product-family-input.md index 58682c0b..ac1171e3 100644 --- a/doc/models/list-products-for-product-family-input.md +++ b/doc/models/list-products-for-product-family-input.md @@ -20,7 +20,7 @@ Input structure for the method ListProductsForProductFamily | `EndDate` | `DateTime?` | Optional | The end date (format YYYY-MM-DD) with which to filter the date_field. Returns products with a timestamp up to and including 11:59:59PM in your site’s time zone on the date specified. | | `StartDatetime` | `DateTimeOffset?` | Optional | The start date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns products with a timestamp at or after exact time provided in query. You can specify timezone in query - otherwise your site's time zone will be used. If provided, this parameter will be used instead of start_date. | | `EndDatetime` | `DateTimeOffset?` | Optional | The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns products with a timestamp at or before exact time provided in query. You can specify timezone in query - otherwise your site's time zone will be used. If provided, this parameter will be used instead of end_date. | -| `IncludeArchived` | `bool?` | Optional | Include archived products | +| `IncludeArchived` | `bool?` | Optional | Include archived products. | | `Include` | [`ListProductsInclude?`](../../doc/models/list-products-include.md) | Optional | Allows including additional data in the response. Use in query `include=prepaid_product_price_point`. | ## Example diff --git a/doc/models/list-products-include.md b/doc/models/list-products-include.md index 9cfc57b4..6fe32fa5 100644 --- a/doc/models/list-products-include.md +++ b/doc/models/list-products-include.md @@ -13,7 +13,9 @@ ## Example -``` -prepaid_product_price_point +```csharp +using AdvancedBilling.Standard.Models; + +ListProductsInclude listProductsInclude = ListProductsInclude.PrepaidProductPricePoint; ``` diff --git a/doc/models/list-products-price-points-include.md b/doc/models/list-products-price-points-include.md index 45aaf37f..6c66374b 100644 --- a/doc/models/list-products-price-points-include.md +++ b/doc/models/list-products-price-points-include.md @@ -13,7 +13,9 @@ ## Example -``` -currency_prices +```csharp +using AdvancedBilling.Standard.Models; + +ListProductsPricePointsInclude listProductsPricePointsInclude = ListProductsPricePointsInclude.CurrencyPrices; ``` diff --git a/doc/models/list-proforma-invoices-input.md b/doc/models/list-proforma-invoices-input.md index 0126d18b..543520d0 100644 --- a/doc/models/list-proforma-invoices-input.md +++ b/doc/models/list-proforma-invoices-input.md @@ -18,12 +18,12 @@ Input structure for the method ListProformaInvoices | `Page` | `int?` | Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | | `PerPage` | `int?` | Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | | `Direction` | [`Direction?`](../../doc/models/direction.md) | Optional | The sort direction of the returned invoices.

**Default**: `Direction.desc` | -| `LineItems` | `bool?` | Optional | Include line items data

**Default**: `false` | -| `Discounts` | `bool?` | Optional | Include discounts data

**Default**: `false` | -| `Taxes` | `bool?` | Optional | Include taxes data

**Default**: `false` | -| `Credits` | `bool?` | Optional | Include credits data

**Default**: `false` | -| `Payments` | `bool?` | Optional | Include payments data

**Default**: `false` | -| `CustomFields` | `bool?` | Optional | Include custom fields data

**Default**: `false` | +| `LineItems` | `bool?` | Optional | Include line items data.

**Default**: `false` | +| `Discounts` | `bool?` | Optional | Include discounts data.

**Default**: `false` | +| `Taxes` | `bool?` | Optional | Include taxes data.

**Default**: `false` | +| `Credits` | `bool?` | Optional | Include credits data.

**Default**: `false` | +| `Payments` | `bool?` | Optional | Include payments data.

**Default**: `false` | +| `CustomFields` | `bool?` | Optional | Include custom fields data.

**Default**: `false` | ## Example diff --git a/doc/models/list-proforma-invoices-meta.md b/doc/models/list-proforma-invoices-meta.md index c7facff0..34713d87 100644 --- a/doc/models/list-proforma-invoices-meta.md +++ b/doc/models/list-proforma-invoices-meta.md @@ -14,14 +14,17 @@ | `TotalPages` | `int?` | Optional | - | | `StatusCode` | `int?` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +ListProformaInvoicesMeta listProformaInvoicesMeta = new ListProformaInvoicesMeta { - "total_count": 226, - "current_page": 202, - "total_pages": 214, - "status_code": 244 -} + TotalCount = 50, + CurrentPage = 26, + TotalPages = 38, + StatusCode = 68, +}; ``` diff --git a/doc/models/list-proforma-invoices-response.md b/doc/models/list-proforma-invoices-response.md index 967852ba..b20329df 100644 --- a/doc/models/list-proforma-invoices-response.md +++ b/doc/models/list-proforma-invoices-response.md @@ -12,39 +12,48 @@ | `ProformaInvoices` | [`List`](../../doc/models/proforma-invoice.md) | Optional | - | | `Meta` | [`ListProformaInvoicesMeta`](../../doc/models/list-proforma-invoices-meta.md) | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Collections.Generic; + +ListProformaInvoicesResponse listProformaInvoicesResponse = new ListProformaInvoicesResponse { - "proforma_invoices": [ + ProformaInvoices = new List { - "uid": "uid0", - "site_id": 140, - "customer_id": 252, - "subscription_id": 68, - "number": 56 + new ProformaInvoice + { + Uid = "uid0", + SiteId = 140, + CustomerId = 252, + SubscriptionId = 68, + Number = 56, + }, + new ProformaInvoice + { + Uid = "uid0", + SiteId = 140, + CustomerId = 252, + SubscriptionId = 68, + Number = 56, + }, + new ProformaInvoice + { + Uid = "uid0", + SiteId = 140, + CustomerId = 252, + SubscriptionId = 68, + Number = 56, + }, }, + Meta = new ListProformaInvoicesMeta { - "uid": "uid0", - "site_id": 140, - "customer_id": 252, - "subscription_id": 68, - "number": 56 + TotalCount = 150, + CurrentPage = 126, + TotalPages = 138, + StatusCode = 168, }, - { - "uid": "uid0", - "site_id": 140, - "customer_id": 252, - "subscription_id": 68, - "number": 56 - } - ], - "meta": { - "total_count": 150, - "current_page": 126, - "total_pages": 138, - "status_code": 168 - } -} +}; ``` diff --git a/doc/models/list-public-keys-meta.md b/doc/models/list-public-keys-meta.md index cf8467f9..2f90f19d 100644 --- a/doc/models/list-public-keys-meta.md +++ b/doc/models/list-public-keys-meta.md @@ -14,14 +14,17 @@ | `TotalPages` | `int?` | Optional | - | | `PerPage` | `int?` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +ListPublicKeysMeta listPublicKeysMeta = new ListPublicKeysMeta { - "total_count": 22, - "current_page": 254, - "total_pages": 10, - "per_page": 24 -} + TotalCount = 232, + CurrentPage = 208, + TotalPages = 220, + PerPage = 70, +}; ``` diff --git a/doc/models/list-public-keys-response.md b/doc/models/list-public-keys-response.md index d14208e7..27b7f1db 100644 --- a/doc/models/list-public-keys-response.md +++ b/doc/models/list-public-keys-response.md @@ -12,28 +12,33 @@ | `ChargifyJsKeys` | [`List`](../../doc/models/public-key.md) | Optional | - | | `Meta` | [`ListPublicKeysMeta`](../../doc/models/list-public-keys-meta.md) | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Collections.Generic; +using System.Globalization; + +ListPublicKeysResponse listPublicKeysResponse = new ListPublicKeysResponse { - "chargify_js_keys": [ + ChargifyJsKeys = new List { - "public_key": "public_key8", - "requires_security_token": false, - "created_at": "2016-03-13T12:52:32.123Z" + new PublicKey + { + PublicKeyProp = "public_key8", + RequiresSecurityToken = false, + CreatedAt = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + }, }, + Meta = new ListPublicKeysMeta { - "public_key": "public_key8", - "requires_security_token": false, - "created_at": "2016-03-13T12:52:32.123Z" - } - ], - "meta": { - "total_count": 150, - "current_page": 126, - "total_pages": 138, - "per_page": 152 - } -} + TotalCount = 150, + CurrentPage = 126, + TotalPages = 138, + PerPage = 152, + }, +}; ``` diff --git a/doc/models/list-sale-rep-item.md b/doc/models/list-sale-rep-item.md index 7e024bcc..1e76da5b 100644 --- a/doc/models/list-sale-rep-item.md +++ b/doc/models/list-sale-rep-item.md @@ -15,31 +15,39 @@ | `MrrData` | [`Dictionary`](../../doc/models/sale-rep-item-mrr.md) | Optional | - | | `TestMode` | `bool?` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Collections.Generic; + +ListSaleRepItem listSaleRepItem = new ListSaleRepItem { - "mrr_data": { - "november_2019": { - "mrr": "$0.00", - "usage": "$0.00", - "recurring": "$0.00" - }, - "december_2019": { - "mrr": "$0.00", - "usage": "$0.00", - "recurring": "$0.00" + Id = 54, + FullName = "full_name2", + SubscriptionsCount = 126, + MrrData = new Dictionary + { + ["november_2019"] = new SaleRepItemMrr + { + Mrr = "$0.00", + Usage = "$0.00", + Recurring = "$0.00", + }, + ["december_2019"] = new SaleRepItemMrr + { + Mrr = "$0.00", + Usage = "$0.00", + Recurring = "$0.00", + }, + ["january_2020"] = new SaleRepItemMrr + { + Mrr = "$400.00", + Usage = "$0.00", + Recurring = "$400.00", + }, }, - "january_2020": { - "mrr": "$400.00", - "usage": "$0.00", - "recurring": "$400.00" - } - }, - "id": 26, - "full_name": "full_name8", - "subscriptions_count": 154, - "test_mode": false -} + TestMode = false, +}; ``` diff --git a/doc/models/list-segments-filter.md b/doc/models/list-segments-filter.md index 26ec9e73..3cab3705 100644 --- a/doc/models/list-segments-filter.md +++ b/doc/models/list-segments-filter.md @@ -14,14 +14,17 @@ | `SegmentProperty3Value` | `string` | Optional | The value passed here would be used to filter segments. Pass a value related to `segment_property_3` on attached Metric. If empty string is passed, this filter would be rejected. | | `SegmentProperty4Value` | `string` | Optional | The value passed here would be used to filter segments. Pass a value related to `segment_property_4` on attached Metric. If empty string is passed, this filter would be rejected. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +ListSegmentsFilter listSegmentsFilter = new ListSegmentsFilter { - "segment_property_1_value": "EU", - "segment_property_2_value": "segment_property_2_value4", - "segment_property_3_value": "segment_property_3_value2", - "segment_property_4_value": "segment_property_4_value6" -} + SegmentProperty1Value = "EU", + SegmentProperty2Value = "segment_property_2_value6", + SegmentProperty3Value = "segment_property_3_value6", + SegmentProperty4Value = "segment_property_4_value8", +}; ``` diff --git a/doc/models/list-segments-response.md b/doc/models/list-segments-response.md index 639707c4..efb00375 100644 --- a/doc/models/list-segments-response.md +++ b/doc/models/list-segments-response.md @@ -11,19 +11,33 @@ | --- | --- | --- | --- | | `Segments` | [`List`](../../doc/models/segment.md) | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Collections.Generic; + +ListSegmentsResponse listSegmentsResponse = new ListSegmentsResponse { - "segments": [ + Segments = new List { - "id": 50, - "component_id": 160, - "price_point_id": 184, - "event_based_billing_metric_id": 244, - "pricing_scheme": "stairstep" - } - ] -} + new Segment + { + Id = 50, + ComponentId = 160, + PricePointId = 184, + EventBasedBillingMetricId = 244, + PricingScheme = PricingScheme.Stairstep, + }, + new Segment + { + Id = 50, + ComponentId = 160, + PricePointId = 184, + EventBasedBillingMetricId = 244, + PricingScheme = PricingScheme.Stairstep, + }, + }, +}; ``` diff --git a/doc/models/list-service-credits-response.md b/doc/models/list-service-credits-response.md index 9a827695..e5a25748 100644 --- a/doc/models/list-service-credits-response.md +++ b/doc/models/list-service-credits-response.md @@ -11,26 +11,41 @@ | --- | --- | --- | --- | | `ServiceCredits` | [`List`](../../doc/models/service-credit-1.md) | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Collections.Generic; + +ListServiceCreditsResponse listServiceCreditsResponse = new ListServiceCreditsResponse { - "service_credits": [ + ServiceCredits = new List { - "id": 224, - "amount_in_cents": 54, - "ending_balance_in_cents": 94, - "entry_type": "Credit", - "memo": "memo2" + new ServiceCredit1 + { + Id = 224, + AmountInCents = 54L, + EndingBalanceInCents = 94L, + EntryType = ServiceCreditType.Credit, + Memo = "memo2", + }, + new ServiceCredit1 + { + Id = 224, + AmountInCents = 54L, + EndingBalanceInCents = 94L, + EntryType = ServiceCreditType.Credit, + Memo = "memo2", + }, + new ServiceCredit1 + { + Id = 224, + AmountInCents = 54L, + EndingBalanceInCents = 94L, + EntryType = ServiceCreditType.Credit, + Memo = "memo2", + }, }, - { - "id": 224, - "amount_in_cents": 54, - "ending_balance_in_cents": 94, - "entry_type": "Credit", - "memo": "memo2" - } - ] -} +}; ``` diff --git a/doc/models/list-subscription-components-filter.md b/doc/models/list-subscription-components-filter.md index d686c049..d5c6aa7d 100644 --- a/doc/models/list-subscription-components-filter.md +++ b/doc/models/list-subscription-components-filter.md @@ -12,15 +12,20 @@ | `Currencies` | `List` | Optional | Allows fetching components allocation with matching currency based on provided values. Use in query `filter[currencies]=EUR,USD`.

**Constraints**: *Minimum Items*: `1` | | `UseSiteExchangeRate` | `bool?` | Optional | Allows fetching components allocation with matching use_site_exchange_rate based on provided value. Use in query `filter[use_site_exchange_rate]=true`. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Collections.Generic; + +ListSubscriptionComponentsFilter listSubscriptionComponentsFilter = new ListSubscriptionComponentsFilter { - "currencies": [ - "EUR", - "USD" - ], - "use_site_exchange_rate": false -} + Currencies = new List + { + "EUR", + "USD", + }, + UseSiteExchangeRate = false, +}; ``` diff --git a/doc/models/list-subscription-components-for-site-filter.md b/doc/models/list-subscription-components-for-site-filter.md index cd6d7d74..92374141 100644 --- a/doc/models/list-subscription-components-for-site-filter.md +++ b/doc/models/list-subscription-components-for-site-filter.md @@ -13,26 +13,36 @@ | `UseSiteExchangeRate` | `bool?` | Optional | Allows fetching components allocation with matching use_site_exchange_rate based on provided value. Use in query `filter[use_site_exchange_rate]=true`. | | `Subscription` | [`SubscriptionFilter`](../../doc/models/subscription-filter.md) | Optional | Nested filter used for List Subscription Components For Site Filter | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Collections.Generic; +using System.Globalization; + +ListSubscriptionComponentsForSiteFilter listSubscriptionComponentsForSiteFilter = new ListSubscriptionComponentsForSiteFilter { - "currencies": [ - "EUR", - "USD" - ], - "use_site_exchange_rate": false, - "subscription": { - "states": [ - "active", - "canceled", - "expired" - ], - "date_field": "updated_at", - "start_date": "2016-03-13", - "end_date": "2016-03-13", - "start_datetime": "2016-03-13T12:52:32.123Z" - } -} + Currencies = new List + { + "EUR", + "USD", + }, + UseSiteExchangeRate = false, + Subscription = new SubscriptionFilter + { + States = new List + { + SubscriptionStateFilter.Trialing, + SubscriptionStateFilter.Unpaid, + SubscriptionStateFilter.Active, + }, + DateField = SubscriptionListDateField.UpdatedAt, + StartDate = DateTime.Parse("2016-03-13"), + EndDate = DateTime.Parse("2016-03-13"), + StartDatetime = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + }, +}; ``` diff --git a/doc/models/list-subscription-components-for-site-input.md b/doc/models/list-subscription-components-for-site-input.md index 66336fde..c1a5cf26 100644 --- a/doc/models/list-subscription-components-for-site-input.md +++ b/doc/models/list-subscription-components-for-site-input.md @@ -51,9 +51,9 @@ ListSubscriptionComponentsForSiteInput listSubscriptionComponentsForSiteInput = { States = new List { + SubscriptionStateFilter.Trialing, + SubscriptionStateFilter.Unpaid, SubscriptionStateFilter.Active, - SubscriptionStateFilter.Canceled, - SubscriptionStateFilter.Expired, }, DateField = SubscriptionListDateField.UpdatedAt, StartDate = DateTime.Parse("2016-03-13"), diff --git a/doc/models/list-subscription-components-include.md b/doc/models/list-subscription-components-include.md index 2f68f49e..8a5ccf78 100644 --- a/doc/models/list-subscription-components-include.md +++ b/doc/models/list-subscription-components-include.md @@ -14,7 +14,9 @@ ## Example -``` -subscription +```csharp +using AdvancedBilling.Standard.Models; + +ListSubscriptionComponentsInclude listSubscriptionComponentsInclude = ListSubscriptionComponentsInclude.Subscription; ``` diff --git a/doc/models/list-subscription-components-response.md b/doc/models/list-subscription-components-response.md index 6b83b193..bb9ce8cb 100644 --- a/doc/models/list-subscription-components-response.md +++ b/doc/models/list-subscription-components-response.md @@ -11,19 +11,25 @@ | --- | --- | --- | --- | | `SubscriptionsComponents` | [`List`](../../doc/models/subscription-component.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Collections.Generic; + +ListSubscriptionComponentsResponse listSubscriptionComponentsResponse = new ListSubscriptionComponentsResponse { - "subscriptions_components": [ + SubscriptionsComponents = new List { - "id": 138, - "name": "name2", - "kind": "metered_component", - "unit_name": "unit_name4", - "enabled": false - } - ] -} + new SubscriptionComponent + { + Id = 138, + Name = "name2", + Kind = ComponentKind.MeteredComponent, + UnitName = "unit_name4", + Enabled = false, + }, + }, +}; ``` diff --git a/doc/models/list-subscription-components-sort.md b/doc/models/list-subscription-components-sort.md index d0d59aed..98d28cf5 100644 --- a/doc/models/list-subscription-components-sort.md +++ b/doc/models/list-subscription-components-sort.md @@ -14,7 +14,9 @@ ## Example -``` -updated_at +```csharp +using AdvancedBilling.Standard.Models; + +ListSubscriptionComponentsSort listSubscriptionComponentsSort = ListSubscriptionComponentsSort.Id; ``` diff --git a/doc/models/list-subscription-events-input.md b/doc/models/list-subscription-events-input.md index 563682a7..0d2250b8 100644 --- a/doc/models/list-subscription-events-input.md +++ b/doc/models/list-subscription-events-input.md @@ -14,8 +14,8 @@ Input structure for the method ListSubscriptionEvents | `SubscriptionId` | `int` | Required | The Chargify id of the subscription. | | `Page` | `int?` | Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | | `PerPage` | `int?` | Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | -| `SinceId` | `long?` | Optional | Returns events with an id greater than or equal to the one specified | -| `MaxId` | `long?` | Optional | Returns events with an id less than or equal to the one specified | +| `SinceId` | `long?` | Optional | Returns events with an id greater than or equal to the one specified. | +| `MaxId` | `long?` | Optional | Returns events with an id less than or equal to the one specified. | | `Direction` | [`Direction?`](../../doc/models/direction.md) | Optional | The sort direction of the returned events.

**Default**: `Direction.desc` | | `Filter` | [`List`](../../doc/models/event-key.md) | Optional | You can pass multiple event keys after comma.
Use in query `filter=signup_success,payment_success`. | diff --git a/doc/models/list-subcription-group-prepayment-item.md b/doc/models/list-subscription-group-prepayment-item.md similarity index 57% rename from doc/models/list-subcription-group-prepayment-item.md rename to doc/models/list-subscription-group-prepayment-item.md index 8769ca10..f2e7c3ba 100644 --- a/doc/models/list-subcription-group-prepayment-item.md +++ b/doc/models/list-subscription-group-prepayment-item.md @@ -1,9 +1,9 @@ -# List Subcription Group Prepayment Item +# List Subscription Group Prepayment Item ## Structure -`ListSubcriptionGroupPrepaymentItem` +`ListSubscriptionGroupPrepaymentItem` ## Fields @@ -19,15 +19,18 @@ | `PaymentType` | [`PrepaymentMethod?`](../../doc/models/prepayment-method.md) | Optional | - | | `CreatedAt` | `DateTimeOffset?` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +ListSubscriptionGroupPrepaymentItem listSubscriptionGroupPrepaymentItem = new ListSubscriptionGroupPrepaymentItem { - "id": 254, - "subscription_group_uid": "subscription_group_uid6", - "amount_in_cents": 172, - "remaining_amount_in_cents": 142, - "details": "details2" -} + Id = 72, + SubscriptionGroupUid = "subscription_group_uid6", + AmountInCents = 98L, + RemainingAmountInCents = 216L, + Details = "details2", +}; ``` diff --git a/doc/models/list-subscription-group-prepayment-response.md b/doc/models/list-subscription-group-prepayment-response.md index 42f19e05..3e7ee602 100644 --- a/doc/models/list-subscription-group-prepayment-response.md +++ b/doc/models/list-subscription-group-prepayment-response.md @@ -11,21 +11,28 @@ | --- | --- | --- | --- | | `Prepayments` | [`List`](../../doc/models/list-subscription-group-prepayment.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Collections.Generic; + +ListSubscriptionGroupPrepaymentResponse listSubscriptionGroupPrepaymentResponse = new ListSubscriptionGroupPrepaymentResponse { - "prepayments": [ + Prepayments = new List { - "prepayment": { - "id": 38, - "subscription_group_uid": "subscription_group_uid2", - "amount_in_cents": 124, - "remaining_amount_in_cents": 182, - "details": "details8" - } - } - ] -} + new ListSubscriptionGroupPrepayment + { + Prepayment = new ListSubscriptionGroupPrepaymentItem + { + Id = 38, + SubscriptionGroupUid = "subscription_group_uid2", + AmountInCents = 124L, + RemainingAmountInCents = 182L, + Details = "details8", + }, + }, + }, +}; ``` diff --git a/doc/models/list-subscription-group-prepayment.md b/doc/models/list-subscription-group-prepayment.md index a871e5df..20c7c01a 100644 --- a/doc/models/list-subscription-group-prepayment.md +++ b/doc/models/list-subscription-group-prepayment.md @@ -9,19 +9,23 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `Prepayment` | [`ListSubcriptionGroupPrepaymentItem`](../../doc/models/list-subcription-group-prepayment-item.md) | Required | - | +| `Prepayment` | [`ListSubscriptionGroupPrepaymentItem`](../../doc/models/list-subscription-group-prepayment-item.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +ListSubscriptionGroupPrepayment listSubscriptionGroupPrepayment = new ListSubscriptionGroupPrepayment { - "prepayment": { - "id": 38, - "subscription_group_uid": "subscription_group_uid2", - "amount_in_cents": 124, - "remaining_amount_in_cents": 182, - "details": "details8" - } -} + Prepayment = new ListSubscriptionGroupPrepaymentItem + { + Id = 38, + SubscriptionGroupUid = "subscription_group_uid2", + AmountInCents = 124L, + RemainingAmountInCents = 182L, + Details = "details8", + }, +}; ``` diff --git a/doc/models/list-subscription-group-proforma-invoices-input.md b/doc/models/list-subscription-group-proforma-invoices-input.md index 00f5ac5b..59643afb 100644 --- a/doc/models/list-subscription-group-proforma-invoices-input.md +++ b/doc/models/list-subscription-group-proforma-invoices-input.md @@ -12,12 +12,12 @@ Input structure for the method ListSubscriptionGroupProformaInvoices | Name | Type | Tags | Description | | --- | --- | --- | --- | | `Uid` | `string` | Required | The uid of the subscription group | -| `LineItems` | `bool?` | Optional | Include line items data

**Default**: `false` | -| `Discounts` | `bool?` | Optional | Include discounts data

**Default**: `false` | -| `Taxes` | `bool?` | Optional | Include taxes data

**Default**: `false` | -| `Credits` | `bool?` | Optional | Include credits data

**Default**: `false` | -| `Payments` | `bool?` | Optional | Include payments data

**Default**: `false` | -| `CustomFields` | `bool?` | Optional | Include custom fields data

**Default**: `false` | +| `LineItems` | `bool?` | Optional | Include line items data.

**Default**: `false` | +| `Discounts` | `bool?` | Optional | Include discounts data.

**Default**: `false` | +| `Taxes` | `bool?` | Optional | Include taxes data.

**Default**: `false` | +| `Credits` | `bool?` | Optional | Include credits data.

**Default**: `false` | +| `Payments` | `bool?` | Optional | Include payments data.

**Default**: `false` | +| `CustomFields` | `bool?` | Optional | Include custom fields data.

**Default**: `false` | ## Example diff --git a/doc/models/list-subscription-groups-item.md b/doc/models/list-subscription-groups-item.md index 878a845e..3238390f 100644 --- a/doc/models/list-subscription-groups-item.md +++ b/doc/models/list-subscription-groups-item.md @@ -21,17 +21,23 @@ | `AccountBalances` | [`SubscriptionGroupBalances`](../../doc/models/subscription-group-balances.md) | Optional | - | | `GroupType` | [`GroupType?`](../../doc/models/group-type.md) | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Collections.Generic; + +ListSubscriptionGroupsItem listSubscriptionGroupsItem = new ListSubscriptionGroupsItem { - "uid": "uid0", - "scheme": 124, - "customer_id": 144, - "payment_profile_id": 52, - "subscription_ids": [ - 254 - ] -} + Uid = "uid0", + Scheme = 228, + CustomerId = 248, + PaymentProfileId = 100, + SubscriptionIds = new List + { + 102, + 103, + }, +}; ``` diff --git a/doc/models/list-subscription-groups-meta.md b/doc/models/list-subscription-groups-meta.md index a6a5820d..88eae013 100644 --- a/doc/models/list-subscription-groups-meta.md +++ b/doc/models/list-subscription-groups-meta.md @@ -12,12 +12,15 @@ | `CurrentPage` | `int?` | Optional | - | | `TotalCount` | `int?` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +ListSubscriptionGroupsMeta listSubscriptionGroupsMeta = new ListSubscriptionGroupsMeta { - "current_page": 14, - "total_count": 38 -} + CurrentPage = 104, + TotalCount = 128, +}; ``` diff --git a/doc/models/list-subscription-groups-response.md b/doc/models/list-subscription-groups-response.md index 3b9099fe..06af082c 100644 --- a/doc/models/list-subscription-groups-response.md +++ b/doc/models/list-subscription-groups-response.md @@ -12,43 +12,33 @@ | `SubscriptionGroups` | [`List`](../../doc/models/list-subscription-groups-item.md) | Optional | - | | `Meta` | [`ListSubscriptionGroupsMeta`](../../doc/models/list-subscription-groups-meta.md) | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Collections.Generic; + +ListSubscriptionGroupsResponse listSubscriptionGroupsResponse = new ListSubscriptionGroupsResponse { - "subscription_groups": [ + SubscriptionGroups = new List { - "uid": "uid2", - "scheme": 166, - "customer_id": 186, - "payment_profile_id": 162, - "subscription_ids": [ - 40 - ] + new ListSubscriptionGroupsItem + { + Uid = "uid2", + Scheme = 166, + CustomerId = 186, + PaymentProfileId = 162, + SubscriptionIds = new List + { + 40, + }, + }, }, + Meta = new ListSubscriptionGroupsMeta { - "uid": "uid2", - "scheme": 166, - "customer_id": 186, - "payment_profile_id": 162, - "subscription_ids": [ - 40 - ] + CurrentPage = 126, + TotalCount = 150, }, - { - "uid": "uid2", - "scheme": 166, - "customer_id": 186, - "payment_profile_id": 162, - "subscription_ids": [ - 40 - ] - } - ], - "meta": { - "current_page": 126, - "total_count": 150 - } -} +}; ``` diff --git a/doc/models/list-subscriptions-input.md b/doc/models/list-subscriptions-input.md index 61188c04..1a86f2f3 100644 --- a/doc/models/list-subscriptions-input.md +++ b/doc/models/list-subscriptions-input.md @@ -13,25 +13,35 @@ Input structure for the method ListSubscriptions | --- | --- | --- | --- | | `Page` | `int?` | Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | | `PerPage` | `int?` | Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | +| `Sort` | [`SubscriptionSort?`](../../doc/models/subscription-sort.md) | Optional | The attribute by which to sort

**Default**: `SubscriptionSort.signup_date` | +| `Direction` | [`SortingDirection?`](../../doc/models/sorting-direction.md) | Optional | Controls the order in which results are returned.
Use in query `direction=asc`. | | `State` | [`SubscriptionStateFilter?`](../../doc/models/subscription-state-filter.md) | Optional | The current state of the subscription | -| `Product` | `int?` | Optional | The product id of the subscription. (Note that the product handle cannot be used.) | -| `ProductPricePointId` | `int?` | Optional | The ID of the product price point. If supplied, product is required | +| `Product` | [`ListSubscriptionsInputProduct`](../../doc/models/containers/list-subscriptions-input-product.md) | Optional | This is a container for one-of cases. | +| `Q` | `string` | Optional | Search string. | +| `QScope` | [`QScope?`](../../doc/models/q-scope.md) | Optional | Scope of fields used by the q search. | +| `CustomerId` | `int?` | Optional | The Advanced Billing id of the customer. | +| `ProductPricePointId` | `int?` | Optional | The ID of the product price point. If supplied, product is required. | | `Coupon` | `int?` | Optional | The numeric id of the coupon currently applied to the subscription. (This can be found in the URL when editing a coupon. Note that the coupon code cannot be used.) | | `CouponCode` | `string` | Optional | The coupon code currently applied to the subscription | +| `CollectionMethod` | [`CollectionMethod1?`](../../doc/models/collection-method-1.md) | Optional | The collection method for the subscription. | +| `BrandingThemeId` | `int?` | Optional | Filter subscriptions by the ID of an assigned Branding Theme. Branding Themes is a beta feature. See [Understand Branding Themes](https://docs.maxio.com/hc/en-us/articles/43796895662093-Understand-Branding-Themes#understand-branding-themes-0-0) for more information. | | `DateField` | [`SubscriptionDateField?`](../../doc/models/subscription-date-field.md) | Optional | The type of filter you'd like to apply to your search. Allowed Values: , current_period_ends_at, current_period_starts_at, created_at, activated_at, canceled_at, expires_at, trial_started_at, trial_ended_at, updated_at | | `StartDate` | `DateTime?` | Optional | The start date (format YYYY-MM-DD) with which to filter the date_field. Returns subscriptions with a timestamp at or after midnight (12:00:00 AM) in your site’s time zone on the date specified. Use in query `start_date=2022-07-01`. | | `EndDate` | `DateTime?` | Optional | The end date (format YYYY-MM-DD) with which to filter the date_field. Returns subscriptions with a timestamp up to and including 11:59:59PM in your site’s time zone on the date specified. Use in query `end_date=2022-08-01`. | | `StartDatetime` | `DateTimeOffset?` | Optional | The start date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns subscriptions with a timestamp at or after exact time provided in query. You can specify timezone in query - otherwise your site's time zone will be used. If provided, this parameter will be used instead of start_date. Use in query `start_datetime=2022-07-01 09:00:05`. | | `EndDatetime` | `DateTimeOffset?` | Optional | The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns subscriptions with a timestamp at or before exact time provided in query. You can specify timezone in query - otherwise your site's time zone will be used. If provided, this parameter will be used instead of end_date. Use in query `end_datetime=2022-08-01 10:00:05`. | | `Metadata` | `Dictionary` | Optional | The value of the metadata field specified in the parameter. Use in query `metadata[my-field]=value&metadata[other-field]=another_value`. | -| `Direction` | [`SortingDirection?`](../../doc/models/sorting-direction.md) | Optional | Controls the order in which results are returned.
Use in query `direction=asc`. | -| `Sort` | [`SubscriptionSort?`](../../doc/models/subscription-sort.md) | Optional | The attribute by which to sort

**Default**: `SubscriptionSort.signup_date` | +| `GroupStatus` | [`GroupStatus?`](../../doc/models/group-status.md) | Optional | Filter by whether a subscription is in a group. | +| `DunningExemption` | `bool?` | Optional | Filter by dunning exemption status. | +| `PaymentGateways` | `string` | Optional | Comma-separated payment gateway identifiers. | +| `Currencies` | `string` | Optional | Comma-separated currency codes. | | `Include` | [`List`](../../doc/models/subscription-list-include.md) | Optional | Allows including additional data in the response. Use in query: `include[]=self_service_page_token`. | ## Example ```csharp using AdvancedBilling.Standard.Models; +using AdvancedBilling.Standard.Models.Containers; using System.Collections.Generic; using System.Globalization; @@ -39,18 +49,25 @@ ListSubscriptionsInput listSubscriptionsInput = new ListSubscriptionsInput { Page = 1, PerPage = 50, - State = SubscriptionStateFilter.Suspended, - Product = 22, + Sort = SubscriptionSort.SignupDate, + Direction = SortingDirection.Asc, + State = SubscriptionStateFilter.PrepaidDunning, + Product = ListSubscriptionsInputProduct.FromNumber(200), + Q = "q0", + QScope = QScope.LastName, + CustomerId = 150, ProductPricePointId = 234, Coupon = 84, CouponCode = "coupon_code4", + CollectionMethod = CollectionMethod1.Automatic, + BrandingThemeId = 76, DateField = SubscriptionDateField.TrialStartedAt, - StartDate = DateTime.Parse("2022-07-01"), - EndDate = DateTime.Parse("2022-08-01"), - StartDatetime = DateTime.ParseExact("2022-07-01 09:00:05", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + StartDate = DateTime.Parse("2016-03-13"), + EndDate = DateTime.Parse("2016-03-13"), + StartDatetime = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", provider: CultureInfo.InvariantCulture, DateTimeStyles.RoundtripKind), - EndDatetime = DateTime.ParseExact("2022-08-01 10:00:05", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + EndDatetime = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", provider: CultureInfo.InvariantCulture, DateTimeStyles.RoundtripKind), Metadata = new Dictionary @@ -59,8 +76,10 @@ ListSubscriptionsInput listSubscriptionsInput = new ListSubscriptionsInput ["key1"] = "metadata4", ["key2"] = "metadata5", }, - Direction = SortingDirection.Asc, - Sort = SubscriptionSort.SignupDate, + GroupStatus = GroupStatus.Ungrouped, + DunningExemption = false, + PaymentGateways = "payment_gateways2", + Currencies = "currencies6", Include = new List { SubscriptionListInclude.SelfServicePageToken, diff --git a/doc/models/list-usages-input.md b/doc/models/list-usages-input.md index 2e0ededd..de5c30de 100644 --- a/doc/models/list-usages-input.md +++ b/doc/models/list-usages-input.md @@ -13,8 +13,8 @@ Input structure for the method ListUsages | --- | --- | --- | --- | | `SubscriptionIdOrReference` | [`ListUsagesInputSubscriptionIdOrReference`](../../doc/models/containers/list-usages-input-subscription-id-or-reference.md) | Required | This is a container for one-of cases. | | `ComponentId` | [`ListUsagesInputComponentId`](../../doc/models/containers/list-usages-input-component-id.md) | Required | This is a container for one-of cases. | -| `SinceId` | `long?` | Optional | Returns usages with an id greater than or equal to the one specified | -| `MaxId` | `long?` | Optional | Returns usages with an id less than or equal to the one specified | +| `SinceId` | `long?` | Optional | Returns usages with an id greater than or equal to the one specified. | +| `MaxId` | `long?` | Optional | Returns usages with an id less than or equal to the one specified. | | `SinceDate` | `DateTime?` | Optional | Returns usages with a created_at date greater than or equal to midnight (12:00 AM) on the date specified. | | `UntilDate` | `DateTime?` | Optional | Returns usages with a created_at date less than or equal to midnight (12:00 AM) on the date specified. | | `Page` | `int?` | Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | diff --git a/doc/models/metadata.md b/doc/models/metadata.md index c6432cb0..7037b6b4 100644 --- a/doc/models/metadata.md +++ b/doc/models/metadata.md @@ -16,15 +16,21 @@ | `DeletedAt` | `DateTimeOffset?` | Optional | - | | `MetafieldId` | `int?` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Globalization; + +Metadata metadata = new Metadata { - "id": 12, - "value": "value0", - "resource_id": 96, - "name": "name8", - "deleted_at": "2016-03-13T12:52:32.123Z" -} + Id = 50, + MValue = "value8", + ResourceId = 134, + Name = "name6", + DeletedAt = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), +}; ``` diff --git a/doc/models/metafield-input.md b/doc/models/metafield-input.md index 74bf0d5b..f752dd78 100644 --- a/doc/models/metafield-input.md +++ b/doc/models/metafield-input.md @@ -1,7 +1,7 @@ # Metafield Input -Indicates the type of metafield. A text metafield allows any string value. Dropdown and radio metafields have a set of values that can be selected. Defaults to 'text'. +Indicates the type of metafield. A text metafield allows any string value. Dropdown and radio metafields have a set of values that can be selected. Defaults to 'text'. ## Enumeration @@ -16,3 +16,11 @@ Indicates the type of metafield. A text metafield allows any string value. Dropd | `Radio` | | `Dropdown` | +## Example + +```csharp +using AdvancedBilling.Standard.Models; + +MetafieldInput metafieldInput = MetafieldInput.BalanceTracker; +``` + diff --git a/doc/models/metafield-scope.md b/doc/models/metafield-scope.md index 5b17e1f5..f39bfaef 100644 --- a/doc/models/metafield-scope.md +++ b/doc/models/metafield-scope.md @@ -19,15 +19,18 @@ Warning: When updating a metafield's scope attribute, all scope attributes must | `PublicEdit` | [`IncludeOption?`](../../doc/models/include-option.md) | Optional | Include (1) or exclude (0) metafields used in [Embeddable Components](page:development-tools/embeddable-components/overview) from being editable by your ecosystem. | | `Hosted` | `List` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +MetafieldScope metafieldScope = new MetafieldScope { - "csv": "0", - "invoices": "0", - "statements": "0", - "portal": "0", - "public_show": "0" -} + Csv = IncludeOption.Exclude, + Invoices = IncludeOption.Exclude, + Statements = IncludeOption.Exclude, + Portal = IncludeOption.Exclude, + PublicShow = IncludeOption.Exclude, +}; ``` diff --git a/doc/models/metafield.md b/doc/models/metafield.md index 1d786a51..a9c0b9fa 100644 --- a/doc/models/metafield.md +++ b/doc/models/metafield.md @@ -13,24 +13,28 @@ | `Name` | `string` | Optional | - | | `Scope` | [`MetafieldScope`](../../doc/models/metafield-scope.md) | Optional | Warning: When updating a metafield's scope attribute, all scope attributes must be passed. Partially complete scope attributes will override the existing settings. | | `DataCount` | `int?` | Optional | The amount of subscriptions this metafield has been applied to in Advanced Billing. | -| `InputType` | [`MetafieldInput?`](../../doc/models/metafield-input.md) | Optional | Indicates the type of metafield. A text metafield allows any string value. Dropdown and radio metafields have a set of values that can be selected. Defaults to 'text'. | +| `InputType` | [`MetafieldInput?`](../../doc/models/metafield-input.md) | Optional | Indicates the type of metafield. A text metafield allows any string value. Dropdown and radio metafields have a set of values that can be selected. Defaults to 'text'. | | `Enum` | [`MetafieldEnum`](../../doc/models/containers/metafield-enum.md) | Optional | This is a container for one-of cases. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +Metafield metafield = new Metafield { - "id": 52, - "name": "name8", - "scope": { - "csv": "0", - "invoices": "0", - "statements": "0", - "portal": "0", - "public_show": "0" - }, - "data_count": 216, - "input_type": "radio" -} + Id = 242, + Name = "name4", + Scope = new MetafieldScope + { + Csv = IncludeOption.Exclude, + Invoices = IncludeOption.Exclude, + Statements = IncludeOption.Exclude, + Portal = IncludeOption.Exclude, + PublicShow = IncludeOption.Exclude, + }, + DataCount = 26, + InputType = MetafieldInput.BalanceTracker, +}; ``` diff --git a/doc/models/metered-component.md b/doc/models/metered-component.md index e66a236d..9fd1cf3b 100644 --- a/doc/models/metered-component.md +++ b/doc/models/metered-component.md @@ -9,10 +9,10 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `Name` | `string` | Required | A name for this component that is suitable for showing customers and displaying on billing statements, ie. "Minutes". | -| `UnitName` | `string` | Required | The name of the unit of measurement for the component. It should be singular since it will be automatically pluralized when necessary. i.e. “message”, which may then be shown as “5 messages” on a subscription’s component line-item | +| `Name` | `string` | Required | A name for this component that is suitable for showing customers and displaying on billing statements, e.g., "Minutes". | +| `UnitName` | `string` | Required | The name of the unit of measurement for the component. It should be singular since it will be automatically pluralized when necessary. e.g., “message”, which may then be shown as “5 messages” on a subscription’s component line-item | | `Description` | `string` | Optional | A description for the component that will be displayed to the user on the hosted signup page. | -| `Handle` | `string` | Optional | A unique identifier for your use that can be used to retrieve this component is subsequent requests. Must start with a letter or number and may only contain lowercase letters, numbers, or the characters '.', ':', '-', or '_'.

**Constraints**: *Pattern*: `^[a-z0-9][a-z0-9\-_:.]*$` | +| `Handle` | `string` | Optional | A unique identifier for your use that can be used to retrieve this component in subsequent requests. Must start with a letter or number and may only contain lowercase letters, numbers, or the characters '.', ':', '-', or '_'.

**Constraints**: *Pattern*: `^[a-z0-9][a-z0-9\-_:.]*$` | | `Taxable` | `bool?` | Optional | Boolean flag describing whether a component is taxable or not. | | `PricingScheme` | [`PricingScheme`](../../doc/models/pricing-scheme.md) | Required | The identifier for the pricing scheme. See [Product Components](https://help.chargify.com/products/product-components.html) for an overview of pricing schemes. | | `Prices` | [`List`](../../doc/models/price.md) | Optional | (Not required for ‘per_unit’ pricing schemes) One or more price brackets. See [Price Bracket Rules](https://maxio.zendesk.com/hc/en-us/articles/24261149166733-Component-Pricing-Schemes#price-bracket-rules) for an overview of how price brackets work for different pricing schemes. | @@ -23,35 +23,65 @@ | `DisplayOnHostedPage` | `bool?` | Optional | - | | `AllowFractionalQuantities` | `bool?` | Optional | - | | `PublicSignupPageIds` | `List` | Optional | - | -| `Interval` | `int?` | Optional | The numerical interval. i.e. an interval of ‘30’ coupled with an interval_unit of day would mean this component's default price point would renew every 30 days. This property is only available for sites with Multifrequency enabled. | +| `Interval` | `int?` | Optional | The numerical interval. e.g., an interval of ‘30’ coupled with an interval_unit of day would mean this component's default price point would renew every 30 days. This property is only available for sites with Multifrequency enabled. | | `IntervalUnit` | [`IntervalUnit?`](../../doc/models/interval-unit.md) | Optional | A string representing the interval unit for this component's default price point, either month or day. This property is only available for sites with Multifrequency enabled. | +| `UnspscCode` | `string` | Optional | (Optional) Custom UNSPSC commodity code for Level 3/CEDP payment data. When set, this value is sent as the commodity code on invoice line items for this component instead of the default derived from item_category. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using AdvancedBilling.Standard.Models.Containers; +using System.Collections.Generic; + +MeteredComponent meteredComponent = new MeteredComponent { - "name": "name4", - "unit_name": "unit_name6", - "description": "description6", - "handle": "handle0", - "taxable": false, - "pricing_scheme": "stairstep", - "prices": [ + Name = "name6", + UnitName = "unit_name8", + PricingScheme = PricingScheme.Stairstep, + Description = "description4", + Handle = "handle2", + Taxable = false, + Prices = new List { - "starting_quantity": 242, - "ending_quantity": 40, - "unit_price": 23.26 - } - ], - "price_points": [ + new Price + { + StartingQuantity = PriceStartingQuantity.FromNumber(242), + UnitPrice = PriceUnitPrice.FromPrecision(23.26), + EndingQuantity = PriceEndingQuantity.FromNumber(40), + }, + new Price + { + StartingQuantity = PriceStartingQuantity.FromNumber(242), + UnitPrice = PriceUnitPrice.FromPrecision(23.26), + EndingQuantity = PriceEndingQuantity.FromNumber(40), + }, + new Price + { + StartingQuantity = PriceStartingQuantity.FromNumber(242), + UnitPrice = PriceUnitPrice.FromPrecision(23.26), + EndingQuantity = PriceEndingQuantity.FromNumber(40), + }, + }, + PricePoints = new List { - "name": "name2", - "handle": "handle8", - "pricing_scheme": "per_unit", - "interval": 92, - "interval_unit": "day" - } - ] -} + new ComponentPricePointItem + { + Name = "name2", + Handle = "handle8", + PricingScheme = PricingScheme.PerUnit, + Interval = 92, + IntervalUnit = IntervalUnit.Day, + }, + new ComponentPricePointItem + { + Name = "name2", + Handle = "handle8", + PricingScheme = PricingScheme.PerUnit, + Interval = 92, + IntervalUnit = IntervalUnit.Day, + }, + }, +}; ``` diff --git a/doc/models/metered-usage.md b/doc/models/metered-usage.md index 995a056f..49856f68 100644 --- a/doc/models/metered-usage.md +++ b/doc/models/metered-usage.md @@ -10,22 +10,26 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | | `PreviousUnitBalance` | `string` | Required | **Constraints**: *Minimum Length*: `1` | -| `NewUnitBalance` | `int` | Required | - | +| `NewUnitBalance` | [`MeteredUsageNewUnitBalance`](../../doc/models/containers/metered-usage-new-unit-balance.md) | Required | This is a container for one-of cases. | | `UsageQuantity` | `int` | Required | - | | `ComponentId` | `int` | Required | - | | `ComponentHandle` | `string` | Required | - | | `Memo` | `string` | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using AdvancedBilling.Standard.Models.Containers; + +MeteredUsage meteredUsage = new MeteredUsage { - "previous_unit_balance": "previous_unit_balance6", - "new_unit_balance": 80, - "usage_quantity": 42, - "component_id": 4, - "component_handle": "component_handle8", - "memo": "memo2" -} + PreviousUnitBalance = "previous_unit_balance6", + NewUnitBalance = MeteredUsageNewUnitBalance.FromNumber(66), + UsageQuantity = 106, + ComponentId = 68, + ComponentHandle = "component_handle0", + Memo = "memo4", +}; ``` diff --git a/doc/models/movement-line-item.md b/doc/models/movement-line-item.md index a7fc2ef0..8f8b922b 100644 --- a/doc/models/movement-line-item.md +++ b/doc/models/movement-line-item.md @@ -19,15 +19,18 @@ | `PrevQuantity` | `int?` | Optional | - | | `Recurring` | `bool?` | Optional | When `true`, the line item's MRR value will contribute to the `plan` breakout. When `false`, the line item contributes to the `usage` breakout. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +MovementLineItem movementLineItem = new MovementLineItem { - "product_id": 156, - "component_id": 68, - "price_point_id": 164, - "name": "name6", - "mrr": 154 -} + ProductId = 146, + ComponentId = 58, + PricePointId = 82, + Name = "name8", + Mrr = 92, +}; ``` diff --git a/doc/models/movement.md b/doc/models/movement.md index d0ccb846..06912996 100644 --- a/doc/models/movement.md +++ b/doc/models/movement.md @@ -19,15 +19,21 @@ | `SubscriptionId` | `int?` | Optional | - | | `SubscriberName` | `string` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Globalization; + +Movement movement = new Movement { - "timestamp": "2016-03-13T12:52:32.123Z", - "amount_in_cents": 174, - "amount_formatted": "amount_formatted4", - "description": "description2", - "category": "category0" -} + Timestamp = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + AmountInCents = 34L, + AmountFormatted = "amount_formatted6", + Description = "description4", + Category = "category2", +}; ``` diff --git a/doc/models/mrr-movement.md b/doc/models/mrr-movement.md index ca2e014c..d559039a 100644 --- a/doc/models/mrr-movement.md +++ b/doc/models/mrr-movement.md @@ -14,14 +14,17 @@ | `SubscriberDelta` | `int?` | Optional | - | | `LeadDelta` | `int?` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +MRRMovement mRRMovement = new MRRMovement { - "amount": 210, - "category": "category0", - "subscriber_delta": 170, - "lead_delta": 198 -} + Amount = 116, + Category = "category4", + SubscriberDelta = 100, + LeadDelta = 128, +}; ``` diff --git a/doc/models/mrr-response.md b/doc/models/mrr-response.md index 873f8191..57b67513 100644 --- a/doc/models/mrr-response.md +++ b/doc/models/mrr-response.md @@ -11,22 +11,27 @@ | --- | --- | --- | --- | | `Mrr` | [`MRR`](../../doc/models/mrr.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +MRRResponse mRRResponse = new MRRResponse { - "mrr": { - "amount_in_cents": 198, - "amount_formatted": "amount_formatted6", - "currency": "currency4", - "currency_symbol": "currency_symbol2", - "breakouts": { - "plan_amount_in_cents": 254, - "plan_amount_formatted": "plan_amount_formatted0", - "usage_amount_in_cents": 106, - "usage_amount_formatted": "usage_amount_formatted8" - } - } -} + Mrr = new MRR + { + AmountInCents = 198L, + AmountFormatted = "amount_formatted6", + Currency = "currency4", + CurrencySymbol = "currency_symbol2", + Breakouts = new Breakouts + { + PlanAmountInCents = 254L, + PlanAmountFormatted = "plan_amount_formatted0", + UsageAmountInCents = 106L, + UsageAmountFormatted = "usage_amount_formatted8", + }, + }, +}; ``` diff --git a/doc/models/mrr.md b/doc/models/mrr.md index a0a899ce..d84a58fc 100644 --- a/doc/models/mrr.md +++ b/doc/models/mrr.md @@ -16,20 +16,24 @@ | `Breakouts` | [`Breakouts`](../../doc/models/breakouts.md) | Optional | - | | `AtTime` | `DateTimeOffset?` | Optional | ISO8601 timestamp | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +MRR mRR = new MRR { - "amount_in_cents": 208, - "amount_formatted": "amount_formatted2", - "currency": "currency0", - "currency_symbol": "currency_symbol8", - "breakouts": { - "plan_amount_in_cents": 254, - "plan_amount_formatted": "plan_amount_formatted0", - "usage_amount_in_cents": 106, - "usage_amount_formatted": "usage_amount_formatted8" - } -} + AmountInCents = 122L, + AmountFormatted = "amount_formatted4", + Currency = "currency2", + CurrencySymbol = "currency_symbol0", + Breakouts = new Breakouts + { + PlanAmountInCents = 254L, + PlanAmountFormatted = "plan_amount_formatted0", + UsageAmountInCents = 106L, + UsageAmountFormatted = "usage_amount_formatted8", + }, +}; ``` diff --git a/doc/models/multi-invoice-payment-response.md b/doc/models/multi-invoice-payment-response.md index aebb3314..609e5ce8 100644 --- a/doc/models/multi-invoice-payment-response.md +++ b/doc/models/multi-invoice-payment-response.md @@ -11,32 +11,41 @@ | --- | --- | --- | --- | | `Payment` | [`MultiInvoicePayment`](../../doc/models/multi-invoice-payment.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Collections.Generic; + +MultiInvoicePaymentResponse multiInvoicePaymentResponse = new MultiInvoicePaymentResponse { - "payment": { - "transaction_id": 224, - "total_amount": "total_amount2", - "currency_code": "currency_code2", - "applications": [ - { - "invoice_uid": "invoice_uid8", - "application_uid": "application_uid8", - "applied_amount": "applied_amount0" - }, - { - "invoice_uid": "invoice_uid8", - "application_uid": "application_uid8", - "applied_amount": "applied_amount0" - }, - { - "invoice_uid": "invoice_uid8", - "application_uid": "application_uid8", - "applied_amount": "applied_amount0" - } - ] - } -} + Payment = new MultiInvoicePayment + { + TransactionId = 224, + TotalAmount = "total_amount2", + CurrencyCode = "currency_code2", + Applications = new List + { + new InvoicePaymentApplication + { + InvoiceUid = "invoice_uid8", + ApplicationUid = "application_uid8", + AppliedAmount = "applied_amount0", + }, + new InvoicePaymentApplication + { + InvoiceUid = "invoice_uid8", + ApplicationUid = "application_uid8", + AppliedAmount = "applied_amount0", + }, + new InvoicePaymentApplication + { + InvoiceUid = "invoice_uid8", + ApplicationUid = "application_uid8", + AppliedAmount = "applied_amount0", + }, + }, + }, +}; ``` diff --git a/doc/models/multi-invoice-payment.md b/doc/models/multi-invoice-payment.md index 7d00bd48..c2334e93 100644 --- a/doc/models/multi-invoice-payment.md +++ b/doc/models/multi-invoice-payment.md @@ -14,20 +14,32 @@ | `CurrencyCode` | `string` | Optional | The ISO 4217 currency code (3 character string) representing the currency of invoice transaction. | | `Applications` | [`List`](../../doc/models/invoice-payment-application.md) | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Collections.Generic; + +MultiInvoicePayment multiInvoicePayment = new MultiInvoicePayment { - "transaction_id": 144, - "total_amount": "total_amount2", - "currency_code": "currency_code2", - "applications": [ + TransactionId = 246, + TotalAmount = "total_amount0", + CurrencyCode = "currency_code0", + Applications = new List { - "invoice_uid": "invoice_uid8", - "application_uid": "application_uid8", - "applied_amount": "applied_amount0" - } - ] -} + new InvoicePaymentApplication + { + InvoiceUid = "invoice_uid8", + ApplicationUid = "application_uid8", + AppliedAmount = "applied_amount0", + }, + new InvoicePaymentApplication + { + InvoiceUid = "invoice_uid8", + ApplicationUid = "application_uid8", + AppliedAmount = "applied_amount0", + }, + }, +}; ``` diff --git a/doc/models/nested-subscription-group.md b/doc/models/nested-subscription-group.md index 0a5b71ea..86f3bbe3 100644 --- a/doc/models/nested-subscription-group.md +++ b/doc/models/nested-subscription-group.md @@ -14,14 +14,17 @@ | `PrimarySubscriptionId` | `int?` | Optional | The subscription ID of the primary within the group. Applicable to scheme 1. | | `Primary` | `bool?` | Optional | A boolean indicating whether the subscription is the primary in the group. Applicable to scheme 1. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +NestedSubscriptionGroup nestedSubscriptionGroup = new NestedSubscriptionGroup { - "uid": "uid2", - "scheme": 62, - "primary_subscription_id": 10, - "primary": false -} + Uid = "uid6", + Scheme = 106, + PrimarySubscriptionId = 54, + Primary = false, +}; ``` diff --git a/doc/models/net-terms.md b/doc/models/net-terms.md index 78f80c8e..171408a2 100644 --- a/doc/models/net-terms.md +++ b/doc/models/net-terms.md @@ -15,15 +15,18 @@ | `NetTermsOnRemittanceSignupsEnabled` | `bool?` | Optional | **Default**: `false` | | `CustomNetTermsEnabled` | `bool?` | Optional | **Default**: `false` | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +NetTerms netTerms = new NetTerms { - "default_net_terms": 0, - "automatic_net_terms": 0, - "remittance_net_terms": 0, - "net_terms_on_remittance_signups_enabled": false, - "custom_net_terms_enabled": false -} + DefaultNetTerms = 0, + AutomaticNetTerms = 0, + RemittanceNetTerms = 0, + NetTermsOnRemittanceSignupsEnabled = false, + CustomNetTermsEnabled = false, +}; ``` diff --git a/doc/models/offer-discount.md b/doc/models/offer-discount.md index 06ef6e26..5f3f8038 100644 --- a/doc/models/offer-discount.md +++ b/doc/models/offer-discount.md @@ -13,13 +13,16 @@ | `CouponId` | `int?` | Optional | - | | `CouponName` | `string` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +OfferDiscount offerDiscount = new OfferDiscount { - "coupon_code": "coupon_code8", - "coupon_id": 86, - "coupon_name": "coupon_name4" -} + CouponCode = "coupon_code6", + CouponId = 202, + CouponName = "coupon_name6", +}; ``` diff --git a/doc/models/offer-item.md b/doc/models/offer-item.md index ded99cd8..23a56878 100644 --- a/doc/models/offer-item.md +++ b/doc/models/offer-item.md @@ -17,18 +17,21 @@ | `ComponentName` | `string` | Optional | - | | `PricePointName` | `string` | Optional | - | | `CurrencyPrices` | [`List`](../../doc/models/currency-price.md) | Optional | - | -| `Interval` | `int?` | Optional | The numerical interval. i.e. an interval of '30' coupled with an interval_unit of day would mean this component price point would renew every 30 days. This property is only available for sites with Multifrequency enabled. | +| `Interval` | `int?` | Optional | The numerical interval. e.g., an interval of '30' coupled with an interval_unit of day would mean this component price point would renew every 30 days. This property is only available for sites with Multifrequency enabled. | | `IntervalUnit` | [`IntervalUnit?`](../../doc/models/interval-unit.md) | Optional | A string representing the interval unit for this component price point, either month or day. This property is only available for sites with Multifrequency enabled. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +OfferItem offerItem = new OfferItem { - "component_id": 216, - "price_point_id": 16, - "starting_quantity": "starting_quantity0", - "editable": false, - "component_unit_price": "component_unit_price8" -} + ComponentId = 234, + PricePointId = 254, + StartingQuantity = "starting_quantity6", + Editable = false, + ComponentUnitPrice = "component_unit_price2", +}; ``` diff --git a/doc/models/offer-response.md b/doc/models/offer-response.md index 19b6476f..0940d854 100644 --- a/doc/models/offer-response.md +++ b/doc/models/offer-response.md @@ -11,17 +11,21 @@ | --- | --- | --- | --- | | `Offer` | [`Offer`](../../doc/models/offer.md) | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +OfferResponse offerResponse = new OfferResponse { - "offer": { - "id": 28, - "site_id": 210, - "product_family_id": 224, - "product_id": 30, - "product_price_point_id": 150 - } -} + Offer = new Offer + { + Id = 28, + SiteId = 210, + ProductFamilyId = 224, + ProductId = 30, + ProductPricePointId = 150, + }, +}; ``` diff --git a/doc/models/offer-signup-page.md b/doc/models/offer-signup-page.md index 6b8149b9..5d659451 100644 --- a/doc/models/offer-signup-page.md +++ b/doc/models/offer-signup-page.md @@ -16,15 +16,18 @@ | `ReturnParams` | `string` | Optional | - | | `Url` | `string` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +OfferSignupPage offerSignupPage = new OfferSignupPage { - "id": 50, - "nickname": "nickname8", - "enabled": false, - "return_url": "return_url2", - "return_params": "return_params0" -} + Id = 102, + Nickname = "nickname6", + Enabled = false, + ReturnUrl = "return_url6", + ReturnParams = "return_params8", +}; ``` diff --git a/doc/models/offer.md b/doc/models/offer.md index 3e23a62a..b52926b1 100644 --- a/doc/models/offer.md +++ b/doc/models/offer.md @@ -29,15 +29,18 @@ | `ProductPriceInCents` | `long?` | Optional | - | | `OfferSignupPages` | [`List`](../../doc/models/offer-signup-page.md) | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +Offer offer = new Offer { - "id": 154, - "site_id": 80, - "product_family_id": 158, - "product_id": 96, - "product_price_point_id": 20 -} + Id = 28, + SiteId = 210, + ProductFamilyId = 224, + ProductId = 30, + ProductPricePointId = 150, +}; ``` diff --git a/doc/models/ok-response.md b/doc/models/ok-response.md index 03468221..fbca85b2 100644 --- a/doc/models/ok-response.md +++ b/doc/models/ok-response.md @@ -11,11 +11,14 @@ | --- | --- | --- | --- | | `Ok` | `string` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +OkResponse okResponse = new OkResponse { - "ok": "ok4" -} + Ok = "ok8", +}; ``` diff --git a/doc/models/on-off-component.md b/doc/models/on-off-component.md index c1a5f1a6..d5b69c47 100644 --- a/doc/models/on-off-component.md +++ b/doc/models/on-off-component.md @@ -9,9 +9,9 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `Name` | `string` | Required | A name for this component that is suitable for showing customers and displaying on billing statements, ie. "Minutes". | +| `Name` | `string` | Required | A name for this component that is suitable for showing customers and displaying on billing statements, e.g., "Minutes". | | `Description` | `string` | Optional | A description for the component that will be displayed to the user on the hosted signup page. | -| `Handle` | `string` | Optional | A unique identifier for your use that can be used to retrieve this component is subsequent requests. Must start with a letter or number and may only contain lowercase letters, numbers, or the characters '.', ':', '-', or '_'.

**Constraints**: *Pattern*: `^[a-z0-9][a-z0-9\-_:.]*$` | +| `Handle` | `string` | Optional | A unique identifier for your use that can be used to retrieve this component in subsequent requests. Must start with a letter or number and may only contain lowercase letters, numbers, or the characters '.', ':', '-', or '_'.

**Constraints**: *Pattern*: `^[a-z0-9][a-z0-9\-_:.]*$` | | `Taxable` | `bool?` | Optional | Boolean flag describing whether a component is taxable or not. | | `UpgradeCharge` | [`CreditType?`](../../doc/models/credit-type.md) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided. | | `DowngradeCredit` | [`CreditType?`](../../doc/models/credit-type.md) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided. | @@ -22,20 +22,25 @@ | `DisplayOnHostedPage` | `bool?` | Optional | - | | `AllowFractionalQuantities` | `bool?` | Optional | - | | `PublicSignupPageIds` | `List` | Optional | - | -| `Interval` | `int?` | Optional | The numerical interval. i.e. an interval of ‘30’ coupled with an interval_unit of day would mean this component's default price point would renew every 30 days. This property is only available for sites with Multifrequency enabled. | +| `Interval` | `int?` | Optional | The numerical interval. e.g., an interval of ‘30’ coupled with an interval_unit of day would mean this component's default price point would renew every 30 days. This property is only available for sites with Multifrequency enabled. | | `IntervalUnit` | [`IntervalUnit?`](../../doc/models/interval-unit.md) | Optional | A string representing the interval unit for this component's default price point, either month or day. This property is only available for sites with Multifrequency enabled. | +| `UnspscCode` | `string` | Optional | (Optional) Custom UNSPSC commodity code for Level 3/CEDP payment data. When set, this value is sent as the commodity code on invoice line items for this component instead of the default derived from item_category. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using AdvancedBilling.Standard.Models.Containers; + +OnOffComponent onOffComponent = new OnOffComponent { - "name": "name2", - "description": "description2", - "handle": "handle8", - "taxable": false, - "upgrade_charge": "prorated", - "downgrade_credit": "prorated", - "unit_price": "String1" -} + Name = "name0", + UnitPrice = OnOffComponentUnitPrice.FromString("String9"), + Description = "description0", + Handle = "handle6", + Taxable = false, + UpgradeCharge = CreditType.Full, + DowngradeCredit = CreditType.Full, +}; ``` diff --git a/doc/models/organization-address.md b/doc/models/organization-address.md index 8c70ac36..1740b4d2 100644 --- a/doc/models/organization-address.md +++ b/doc/models/organization-address.md @@ -18,15 +18,18 @@ | `Name` | `string` | Optional | - | | `Phone` | `string` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +OrganizationAddress organizationAddress = new OrganizationAddress { - "street": "street4", - "line2": "line28", - "city": "city4", - "state": "state0", - "zip": "zip2" -} + Street = "street2", + Line2 = "line26", + City = "city2", + State = "state8", + Zip = "zip6", +}; ``` diff --git a/doc/models/origin-invoice.md b/doc/models/origin-invoice.md index 68c0e5ec..30e539ef 100644 --- a/doc/models/origin-invoice.md +++ b/doc/models/origin-invoice.md @@ -12,12 +12,15 @@ | `Uid` | `string` | Optional | The UID of the invoice serving as an origin invoice. | | `Number` | `string` | Optional | The number of the invoice serving as an origin invoice. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +OriginInvoice originInvoice = new OriginInvoice { - "uid": "uid0", - "number": "number8" -} + Uid = "uid8", + Number = "number4", +}; ``` diff --git a/doc/models/overage-pricing.md b/doc/models/overage-pricing.md index e7cc1ad9..90d02fd6 100644 --- a/doc/models/overage-pricing.md +++ b/doc/models/overage-pricing.md @@ -12,28 +12,31 @@ | `PricingScheme` | [`PricingScheme`](../../doc/models/pricing-scheme.md) | Required | The identifier for the pricing scheme. See [Product Components](https://help.chargify.com/products/product-components.html) for an overview of pricing schemes. | | `Prices` | [`List`](../../doc/models/price.md) | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using AdvancedBilling.Standard.Models.Containers; +using System.Collections.Generic; + +OveragePricing overagePricing = new OveragePricing { - "pricing_scheme": "stairstep", - "prices": [ - { - "starting_quantity": 242, - "ending_quantity": 40, - "unit_price": 23.26 - }, + PricingScheme = PricingScheme.PerUnit, + Prices = new List { - "starting_quantity": 242, - "ending_quantity": 40, - "unit_price": 23.26 + new Price + { + StartingQuantity = PriceStartingQuantity.FromNumber(242), + UnitPrice = PriceUnitPrice.FromPrecision(23.26), + EndingQuantity = PriceEndingQuantity.FromNumber(40), + }, + new Price + { + StartingQuantity = PriceStartingQuantity.FromNumber(242), + UnitPrice = PriceUnitPrice.FromPrecision(23.26), + EndingQuantity = PriceEndingQuantity.FromNumber(40), + }, }, - { - "starting_quantity": 242, - "ending_quantity": 40, - "unit_price": 23.26 - } - ] -} +}; ``` diff --git a/doc/models/override-subscription-request.md b/doc/models/override-subscription-request.md index 65a5ce7b..3673ad48 100644 --- a/doc/models/override-subscription-request.md +++ b/doc/models/override-subscription-request.md @@ -11,17 +11,30 @@ | --- | --- | --- | --- | | `Subscription` | [`OverrideSubscription`](../../doc/models/override-subscription.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Globalization; + +OverrideSubscriptionRequest overrideSubscriptionRequest = new OverrideSubscriptionRequest { - "subscription": { - "activated_at": "2016-03-13T12:52:32.123Z", - "canceled_at": "2016-03-13T12:52:32.123Z", - "cancellation_message": "cancellation_message2", - "expires_at": "2016-03-13T12:52:32.123Z", - "current_period_starts_at": "2016-03-13T12:52:32.123Z" - } -} + Subscription = new OverrideSubscription + { + ActivatedAt = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + CanceledAt = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + CancellationMessage = "cancellation_message2", + ExpiresAt = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + CurrentPeriodStartsAt = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + }, +}; ``` diff --git a/doc/models/override-subscription.md b/doc/models/override-subscription.md index 113b0c29..6d93cad9 100644 --- a/doc/models/override-subscription.md +++ b/doc/models/override-subscription.md @@ -15,15 +15,27 @@ | `ExpiresAt` | `DateTimeOffset?` | Optional | Can be used to record an external expiration date. Chargify sets this field automatically when a subscription expires (ceases billing) after a prescribed amount of time. Only ISO8601 format is supported. This field is not supported when Multi-frequency is enabled for the Site. To change the Term End of a Subscription, use the Update Subscription endpoint. | | `CurrentPeriodStartsAt` | `DateTimeOffset?` | Optional | Can only be used when a subscription is unbilled, which happens when a future initial billing date is passed at subscription creation. The value passed must be before the current date and time. Allows you to set when the period started so mid period component allocations have the correct proration. Only ISO8601 format is supported. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Globalization; + +OverrideSubscription overrideSubscription = new OverrideSubscription { - "activated_at": "2016-03-13T12:52:32.123Z", - "canceled_at": "2016-03-13T12:52:32.123Z", - "cancellation_message": "cancellation_message4", - "expires_at": "2016-03-13T12:52:32.123Z", - "current_period_starts_at": "2016-03-13T12:52:32.123Z" -} + ActivatedAt = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + CanceledAt = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + CancellationMessage = "cancellation_message8", + ExpiresAt = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + CurrentPeriodStartsAt = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), +}; ``` diff --git a/doc/models/paginated-metadata.md b/doc/models/paginated-metadata.md index 01fdd7e0..70ce7c44 100644 --- a/doc/models/paginated-metadata.md +++ b/doc/models/paginated-metadata.md @@ -15,30 +15,32 @@ | `PerPage` | `int?` | Optional | - | | `Metadata` | [`List`](../../doc/models/metadata.md) | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Collections.Generic; +using System.Globalization; + +PaginatedMetadata paginatedMetadata = new PaginatedMetadata { - "total_count": 26, - "current_page": 2, - "total_pages": 14, - "per_page": 20, - "metadata": [ + TotalCount = 166, + CurrentPage = 142, + TotalPages = 154, + PerPage = 136, + Metadata = new List { - "id": 50, - "value": "value8", - "resource_id": 134, - "name": "name6", - "deleted_at": "2016-03-13T12:52:32.123Z" + new Metadata + { + Id = 50, + MValue = "value8", + ResourceId = 134, + Name = "name6", + DeletedAt = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + }, }, - { - "id": 50, - "value": "value8", - "resource_id": 134, - "name": "name6", - "deleted_at": "2016-03-13T12:52:32.123Z" - } - ] -} +}; ``` diff --git a/doc/models/paid-invoice.md b/doc/models/paid-invoice.md index a63fe4e5..f9cbfbed 100644 --- a/doc/models/paid-invoice.md +++ b/doc/models/paid-invoice.md @@ -14,14 +14,17 @@ | `DueAmount` | `string` | Optional | The remaining due amount on the invoice | | `PaidAmount` | `string` | Optional | The total amount paid on this invoice (including any prior payments) | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +PaidInvoice paidInvoice = new PaidInvoice { - "invoice_id": "invoice_id6", - "status": "open", - "due_amount": "due_amount8", - "paid_amount": "paid_amount8" -} + InvoiceId = "invoice_id2", + Status = InvoiceStatus.Canceled, + DueAmount = "due_amount4", + PaidAmount = "paid_amount6", +}; ``` diff --git a/doc/models/pause-request.md b/doc/models/pause-request.md index ff17025f..106b6a0e 100644 --- a/doc/models/pause-request.md +++ b/doc/models/pause-request.md @@ -1,7 +1,7 @@ # Pause Request -Allows to pause a Subscription +Allows you to pause a Subscription. ## Structure @@ -13,13 +13,20 @@ Allows to pause a Subscription | --- | --- | --- | --- | | `Hold` | [`AutoResume`](../../doc/models/auto-resume.md) | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Globalization; + +PauseRequest pauseRequest = new PauseRequest { - "hold": { - "automatically_resume_at": "2016-03-13T12:52:32.123Z" - } -} + Hold = new AutoResume + { + AutomaticallyResumeAt = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + }, +}; ``` diff --git a/doc/models/pay-pal-vault.md b/doc/models/pay-pal-vault.md index fc7462f6..b93eeb1e 100644 --- a/doc/models/pay-pal-vault.md +++ b/doc/models/pay-pal-vault.md @@ -16,3 +16,11 @@ The vault that stores the payment profile with the provided vault_token. | `Moduslink` | | `PaypalComplete` | +## Example + +```csharp +using AdvancedBilling.Standard.Models; + +PayPalVault payPalVault = PayPalVault.Moduslink; +``` + diff --git a/doc/models/payer-attributes.md b/doc/models/payer-attributes.md index 75b1fff2..5d891f64 100644 --- a/doc/models/payer-attributes.md +++ b/doc/models/payer-attributes.md @@ -28,19 +28,24 @@ | `TaxExemptReason` | `string` | Optional | - | | `Metafields` | `Dictionary` | Optional | (Optional) A set of key/value pairs representing custom fields and their values. Metafields will be created “on-the-fly” in your site for a given key, if they have not been created yet. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Collections.Generic; + +PayerAttributes payerAttributes = new PayerAttributes { - "metafields": { - "custom_field_name_1": "custom_field_value_1", - "custom_field_name_2": "custom_field_value_2" - }, - "first_name": "first_name4", - "last_name": "last_name2", - "email": "email2", - "cc_emails": "cc_emails4", - "organization": "organization8" -} + FirstName = "first_name2", + LastName = "last_name0", + Email = "email4", + CcEmails = "cc_emails8", + Organization = "organization4", + Metafields = new Dictionary + { + ["custom_field_name_1"] = "custom_field_value_1", + ["custom_field_name_2"] = "custom_field_value_2", + }, +}; ``` diff --git a/doc/models/payer-error.md b/doc/models/payer-error.md index b74b6366..fb44d631 100644 --- a/doc/models/payer-error.md +++ b/doc/models/payer-error.md @@ -13,22 +13,30 @@ | `FirstName` | `List` | Optional | - | | `Email` | `List` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Collections.Generic; + +PayerError payerError = new PayerError { - "last_name": [ - "last_name1", - "last_name2", - "last_name3" - ], - "first_name": [ - "first_name4", - "first_name5" - ], - "email": [ - "email4" - ] -} + LastName = new List + { + "last_name9", + }, + FirstName = new List + { + "first_name2", + "first_name3", + "first_name4", + }, + Email = new List + { + "email6", + "email7", + "email8", + }, +}; ``` diff --git a/doc/models/payment-collection-method-changed.md b/doc/models/payment-collection-method-changed.md index dacd8f21..33553752 100644 --- a/doc/models/payment-collection-method-changed.md +++ b/doc/models/payment-collection-method-changed.md @@ -12,12 +12,15 @@ | `PreviousValue` | `string` | Required | - | | `CurrentValue` | `string` | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +PaymentCollectionMethodChanged paymentCollectionMethodChanged = new PaymentCollectionMethodChanged { - "previous_value": "previous_value4", - "current_value": "current_value2" -} + PreviousValue = "previous_value4", + CurrentValue = "current_value2", +}; ``` diff --git a/doc/models/payment-for-allocation.md b/doc/models/payment-for-allocation.md index 8432bb06..b4c58e99 100644 --- a/doc/models/payment-for-allocation.md +++ b/doc/models/payment-for-allocation.md @@ -16,14 +16,17 @@ Information for captured payment, if applicable | `Success` | `bool?` | Optional | - | | `Memo` | `string` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +PaymentForAllocation paymentForAllocation = new PaymentForAllocation { - "id": 72, - "amount_in_cents": 158, - "success": false, - "memo": "memo6" -} + Id = 68, + AmountInCents = 102L, + Success = false, + Memo = "memo6", +}; ``` diff --git a/doc/models/payment-method-apple-pay.md b/doc/models/payment-method-apple-pay.md index 91c940a4..8228073a 100644 --- a/doc/models/payment-method-apple-pay.md +++ b/doc/models/payment-method-apple-pay.md @@ -11,11 +11,14 @@ | --- | --- | --- | --- | | `Type` | [`InvoiceEventPaymentMethod`](../../doc/models/invoice-event-payment-method.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +PaymentMethodApplePay paymentMethodApplePay = new PaymentMethodApplePay { - "type": "apple_pay" -} + Type = InvoiceEventPaymentMethod.ApplePay, +}; ``` diff --git a/doc/models/payment-method-bank-account.md b/doc/models/payment-method-bank-account.md index 72db9210..84403385 100644 --- a/doc/models/payment-method-bank-account.md +++ b/doc/models/payment-method-bank-account.md @@ -13,13 +13,16 @@ | `MaskedRoutingNumber` | `string` | Required | - | | `Type` | [`InvoiceEventPaymentMethod`](../../doc/models/invoice-event-payment-method.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +PaymentMethodBankAccount paymentMethodBankAccount = new PaymentMethodBankAccount { - "masked_account_number": "masked_account_number2", - "masked_routing_number": "masked_routing_number2", - "type": "bank_account" -} + MaskedAccountNumber = "masked_account_number4", + MaskedRoutingNumber = "masked_routing_number4", + Type = InvoiceEventPaymentMethod.BankAccount, +}; ``` diff --git a/doc/models/payment-method-credit-card.md b/doc/models/payment-method-credit-card.md index 34fcebc4..b94a6550 100644 --- a/doc/models/payment-method-credit-card.md +++ b/doc/models/payment-method-credit-card.md @@ -15,15 +15,18 @@ | `MaskedCardNumber` | `string` | Required | - | | `Type` | [`InvoiceEventPaymentMethod`](../../doc/models/invoice-event-payment-method.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +PaymentMethodCreditCard paymentMethodCreditCard = new PaymentMethodCreditCard { - "card_brand": "card_brand4", - "masked_card_number": "masked_card_number0", - "type": "credit_card", - "card_expiration": "card_expiration2", - "last_four": "last_four4" -} + CardBrand = "card_brand4", + MaskedCardNumber = "masked_card_number0", + Type = InvoiceEventPaymentMethod.CreditCard, + CardExpiration = "card_expiration2", + LastFour = "last_four6", +}; ``` diff --git a/doc/models/payment-method-external.md b/doc/models/payment-method-external.md index 0d07bd89..3c8b21fb 100644 --- a/doc/models/payment-method-external.md +++ b/doc/models/payment-method-external.md @@ -14,14 +14,17 @@ | `Memo` | `string` | Required | - | | `Type` | [`InvoiceEventPaymentMethod`](../../doc/models/invoice-event-payment-method.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +PaymentMethodExternal paymentMethodExternal = new PaymentMethodExternal { - "details": "details4", - "kind": "kind2", - "memo": "memo8", - "type": "external" -} + Details = "details0", + Kind = "kind8", + Memo = "memo4", + Type = InvoiceEventPaymentMethod.External, +}; ``` diff --git a/doc/models/payment-method-paypal.md b/doc/models/payment-method-paypal.md index 4305a828..54e9c894 100644 --- a/doc/models/payment-method-paypal.md +++ b/doc/models/payment-method-paypal.md @@ -12,12 +12,15 @@ | `Email` | `string` | Required | - | | `Type` | [`InvoiceEventPaymentMethod`](../../doc/models/invoice-event-payment-method.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +PaymentMethodPaypal paymentMethodPaypal = new PaymentMethodPaypal { - "email": "email2", - "type": "paypal_account" -} + Email = "email8", + Type = InvoiceEventPaymentMethod.PaypalAccount, +}; ``` diff --git a/doc/models/payment-profile-attributes.md b/doc/models/payment-profile-attributes.md index 8a228a50..6dbb86fd 100644 --- a/doc/models/payment-profile-attributes.md +++ b/doc/models/payment-profile-attributes.md @@ -11,22 +11,22 @@ alias to credit_card_attributes | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `ChargifyToken` | `string` | Optional | (Optional) Token received after sending billing information using Maxio.js (formerly Chargify.js). This token must be passed as a sole attribute of `payment_profile_attributes` (i.e. tok_9g6hw85pnpt6knmskpwp4ttt) | +| `ChargifyToken` | `string` | Optional | (Optional) Token received after sending billing information using Maxio.js (formerly Chargify.js). This token must be passed as a sole attribute of `payment_profile_attributes` (e.g., tok_9g6hw85pnpt6knmskpwp4ttt). | | `Id` | `int?` | Optional | - | | `PaymentType` | [`PaymentType?`](../../doc/models/payment-type.md) | Optional | - | | `FirstName` | `string` | Optional | (Optional) First name on card or bank account. If omitted, the first_name from customer attributes will be used. | | `LastName` | `string` | Optional | (Optional) Last name on card or bank account. If omitted, the last_name from customer attributes will be used. | | `MaskedCardNumber` | `string` | Optional | - | -| `FullNumber` | `string` | Optional | The full credit card number (string representation, i.e. 5424000000000015) | -| `CardType` | [`CardType?`](../../doc/models/card-type.md) | Optional | (Optional, used only for Subscription Import) If you know the card type (i.e. Visa, MC, etc) you may supply it here so that we may display the card type in the UI. | +| `FullNumber` | `string` | Optional | The full credit card number (string representation, e.g., 5424000000000015) | +| `CardType` | [`CardType?`](../../doc/models/card-type.md) | Optional | (Optional, used only for Subscription Import) If you know the card type (e.g., Visa, MC, etc.) you may supply it here so that we may display the card type in the UI. | | `ExpirationMonth` | [`PaymentProfileAttributesExpirationMonth`](../../doc/models/containers/payment-profile-attributes-expiration-month.md) | Optional | This is a container for one-of cases. | | `ExpirationYear` | [`PaymentProfileAttributesExpirationYear`](../../doc/models/containers/payment-profile-attributes-expiration-year.md) | Optional | This is a container for one-of cases. | -| `BillingAddress` | `string` | Optional | (Optional, may be required by your product configuration or gateway settings) The credit card or bank account billing street address (i.e. 123 Main St.). This value is merely passed through to the payment gateway. | -| `BillingAddress2` | `string` | Optional | (Optional) Second line of the customer’s billing address i.e. Apt. 100 | -| `BillingCity` | `string` | Optional | (Optional, may be required by your product configuration or gateway settings) The credit card or bank account billing address city (i.e. “Boston”). This value is merely passed through to the payment gateway. | -| `BillingState` | `string` | Optional | (Optional, may be required by your product configuration or gateway settings) The credit card or bank account billing address state (i.e. MA). This value is merely passed through to the payment gateway. This must conform to the [ISO_3166-1](https://en.wikipedia.org/wiki/ISO_3166-1#Current_codes) in order to be valid for tax locale purposes. | -| `BillingCountry` | `string` | Optional | (Optional, may be required by your product configuration or gateway settings) The credit card or bank account billing address country, required in [ISO_3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format (i.e. “US”). This value is merely passed through to the payment gateway. Some gateways require country codes in a specific format. Check your gateway’s documentation. If creating an ACH subscription, only US is supported at this time. | -| `BillingZip` | `string` | Optional | (Optional, may be required by your product configuration or gateway settings) The credit card or bank account billing address zip code (i.e. 12345). This value is merely passed through to the payment gateway. | +| `BillingAddress` | `string` | Optional | (Optional, may be required by your product configuration or gateway settings) The credit card or bank account billing street address (e.g., 123 Main St.). This value is merely passed through to the payment gateway. | +| `BillingAddress2` | `string` | Optional | (Optional) Second line of the customer’s billing address, e.g., Apt. 100 | +| `BillingCity` | `string` | Optional | (Optional, may be required by your product configuration or gateway settings) The credit card or bank account billing address city (e.g., “Boston”). This value is merely passed through to the payment gateway. | +| `BillingState` | `string` | Optional | (Optional, may be required by your product configuration or gateway settings) The credit card or bank account billing address state (e.g., MA). This value is merely passed through to the payment gateway. This must conform to the [ISO_3166-1](https://en.wikipedia.org/wiki/ISO_3166-1#Current_codes) in order to be valid for tax locale purposes. | +| `BillingCountry` | `string` | Optional | (Optional, may be required by your product configuration or gateway settings) The credit card or bank account billing address country, required in [ISO_3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format (e.g., “US”). This value is merely passed through to the payment gateway. Some gateways require country codes in a specific format. Check your gateway’s documentation. If creating an ACH subscription, only US is supported at this time. | +| `BillingZip` | `string` | Optional | (Optional, may be required by your product configuration or gateway settings) The credit card or bank account billing address zip code (e.g., 12345). This value is merely passed through to the payment gateway. | | `CurrentVault` | [`AllVaults?`](../../doc/models/all-vaults.md) | Optional | (Optional, used only for Subscription Import) The vault that stores the payment profile with the provided vault_token. | | `VaultToken` | `string` | Optional | (Optional, used only for Subscription Import) The “token” provided by your vault storage for an already stored payment profile | | `CustomerVaultToken` | `string` | Optional | (Optional, used only for Subscription Import) (only for Authorize.Net CIM storage or Square) The customerProfileId for the owner of the customerPaymentProfileId provided as the vault_token | @@ -35,17 +35,20 @@ alias to credit_card_attributes | `PaymentMethodNonce` | `string` | Optional | (Required for Square unless importing with vault_token and customer_vault_token) The nonce generated by the Square Javascript library (SqPaymentForm) | | `GatewayHandle` | `string` | Optional | (Optional) This attribute is only available if MultiGateway feature is enabled for your Site. This feature is in the Private Beta currently. gateway_handle is used to directly select a gateway where a payment profile will be stored in. Every connected gateway must have a unique gateway handle specified. Read [Multigateway description](https://chargify.zendesk.com/hc/en-us/articles/4407761759643#connecting-with-multiple-gateways) to learn more about new concepts that MultiGateway introduces and the default behavior when this attribute is not passed. | | `Cvv` | `string` | Optional | (Optional, may be required by your gateway settings) The 3- or 4-digit Card Verification Value. This value is merely passed through to the payment gateway. | -| `LastFour` | `string` | Optional | (Optional, used only for Subscription Import) If you have the last 4 digits of the credit card number, you may supply them here so that we may create a masked card number (i.e. XXXX-XXXX-XXXX-1234) for display in the UI. Last 4 digits are required for refunds in Auth.Net. | +| `LastFour` | `string` | Optional | (Optional, used only for Subscription Import) If you have the last 4 digits of the credit card number, you may supply them here so that we may create a masked card number (e.g., XXXX-XXXX-XXXX-1234) for display in the UI. Last 4 digits are required for refunds in Auth.Net. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +PaymentProfileAttributes paymentProfileAttributes = new PaymentProfileAttributes { - "chargify_token": "chargify_token8", - "id": 80, - "payment_type": "credit_card", - "first_name": "first_name0", - "last_name": "last_name8" -} + ChargifyToken = "chargify_token8", + Id = 14, + PaymentType = PaymentType.PaypalAccount, + FirstName = "first_name0", + LastName = "last_name8", +}; ``` diff --git a/doc/models/payment-profile-params.md b/doc/models/payment-profile-params.md index d7af6c32..39cbf9f5 100644 --- a/doc/models/payment-profile-params.md +++ b/doc/models/payment-profile-params.md @@ -15,13 +15,16 @@ PCI-safe cardholder fields only. Full card numbers, CVV, and billing address are | `LastName` | `string` | Optional | - | | `CardType` | `string` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +PaymentProfileParams paymentProfileParams = new PaymentProfileParams { - "first_name": "first_name2", - "last_name": "last_name0", - "card_type": "card_type8" -} + FirstName = "first_name2", + LastName = "last_name0", + CardType = "card_type2", +}; ``` diff --git a/doc/models/payment-profile-response.md b/doc/models/payment-profile-response.md index 4a888a75..6db9d60d 100644 --- a/doc/models/payment-profile-response.md +++ b/doc/models/payment-profile-response.md @@ -11,18 +11,25 @@ | --- | --- | --- | --- | | `PaymentProfile` | [`PaymentProfile`](../../doc/models/containers/payment-profile.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using AdvancedBilling.Standard.Models.Containers; + +PaymentProfileResponse paymentProfileResponse = new PaymentProfileResponse { - "payment_profile": { - "payment_type": "apple_pay", - "id": 60, - "first_name": "first_name2", - "last_name": "last_name0", - "customer_id": 98, - "current_vault": "braintree_blue" - } -} + PaymentProfile = PaymentProfile.FromApplePayPaymentProfile( + new ApplePayPaymentProfile + { + PaymentType = PaymentType.ApplePay, + Id = 60, + FirstName = "first_name2", + LastName = "last_name0", + CustomerId = 98, + CurrentVault = ApplePayVault.BraintreeBlue, + } + ), +}; ``` diff --git a/doc/models/payment-related-events.md b/doc/models/payment-related-events.md index 6cc2fbbf..e26e9cff 100644 --- a/doc/models/payment-related-events.md +++ b/doc/models/payment-related-events.md @@ -12,12 +12,15 @@ | `ProductId` | `int` | Required | - | | `AccountTransactionId` | `int` | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +PaymentRelatedEvents paymentRelatedEvents = new PaymentRelatedEvents { - "product_id": 42, - "account_transaction_id": 58 -} + ProductId = 186, + AccountTransactionId = 170, +}; ``` diff --git a/doc/models/payment-type.md b/doc/models/payment-type.md index 8b72290f..4ccfa442 100644 --- a/doc/models/payment-type.md +++ b/doc/models/payment-type.md @@ -14,3 +14,11 @@ | `PaypalAccount` | | `ApplePay` | +## Example + +```csharp +using AdvancedBilling.Standard.Models; + +PaymentType paymentType = PaymentType.CreditCard; +``` + diff --git a/doc/models/paypal-payment-profile.md b/doc/models/paypal-payment-profile.md index 0b605d42..44fff56e 100644 --- a/doc/models/paypal-payment-profile.md +++ b/doc/models/paypal-payment-profile.md @@ -29,16 +29,19 @@ | `CreatedAt` | `DateTimeOffset?` | Optional | A timestamp indicating when this payment profile was created | | `UpdatedAt` | `DateTimeOffset?` | Optional | A timestamp indicating when this payment profile was last updated | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +PaypalPaymentProfile paypalPaymentProfile = new PaypalPaymentProfile { - "payment_type": "paypal_account", - "id": 10, - "first_name": "first_name0", - "last_name": "last_name8", - "customer_id": 48, - "current_vault": "moduslink" -} + PaymentType = PaymentType.PaypalAccount, + Id = 214, + FirstName = "first_name0", + LastName = "last_name8", + CustomerId = 252, + CurrentVault = PayPalVault.Moduslink, +}; ``` diff --git a/doc/models/pending-cancellation-change.md b/doc/models/pending-cancellation-change.md index 77fe8964..94dc7406 100644 --- a/doc/models/pending-cancellation-change.md +++ b/doc/models/pending-cancellation-change.md @@ -12,12 +12,18 @@ | `CancellationState` | `string` | Required | - | | `CancelsAt` | `DateTimeOffset` | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Globalization; + +PendingCancellationChange pendingCancellationChange = new PendingCancellationChange { - "cancellation_state": "cancellation_state8", - "cancels_at": "2016-03-13T12:52:32.123Z" -} + CancellationState = "cancellation_state0", + CancelsAt = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), +}; ``` diff --git a/doc/models/portal-management-link.md b/doc/models/portal-management-link.md index cb0ba664..f846555e 100644 --- a/doc/models/portal-management-link.md +++ b/doc/models/portal-management-link.md @@ -16,15 +16,25 @@ | `ExpiresAt` | `DateTimeOffset?` | Optional | - | | `LastInviteSentAt` | `DateTimeOffset?` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Globalization; + +PortalManagementLink portalManagementLink = new PortalManagementLink { - "url": "url0", - "fetch_count": 222, - "created_at": "2016-03-13T12:52:32.123Z", - "new_link_available_at": "2016-03-13T12:52:32.123Z", - "expires_at": "2016-03-13T12:52:32.123Z" -} + Url = "url8", + FetchCount = 88, + CreatedAt = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + NewLinkAvailableAt = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + ExpiresAt = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), +}; ``` diff --git a/doc/models/prepaid-configuration-response.md b/doc/models/prepaid-configuration-response.md index 6ae63a8d..cd7ecee0 100644 --- a/doc/models/prepaid-configuration-response.md +++ b/doc/models/prepaid-configuration-response.md @@ -11,17 +11,21 @@ | --- | --- | --- | --- | | `PrepaidConfiguration` | [`PrepaidConfiguration`](../../doc/models/prepaid-configuration.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +PrepaidConfigurationResponse prepaidConfigurationResponse = new PrepaidConfigurationResponse { - "prepaid_configuration": { - "id": 142, - "initial_funding_amount_in_cents": 74, - "replenish_to_amount_in_cents": 76, - "auto_replenish": false, - "replenish_threshold_amount_in_cents": 20 - } -} + PrepaidConfiguration = new PrepaidConfiguration + { + Id = 142, + InitialFundingAmountInCents = 74L, + ReplenishToAmountInCents = 76L, + AutoReplenish = false, + ReplenishThresholdAmountInCents = 20L, + }, +}; ``` diff --git a/doc/models/prepaid-configuration.md b/doc/models/prepaid-configuration.md index 490fa9a7..d148a199 100644 --- a/doc/models/prepaid-configuration.md +++ b/doc/models/prepaid-configuration.md @@ -15,15 +15,18 @@ | `AutoReplenish` | `bool?` | Optional | - | | `ReplenishThresholdAmountInCents` | `long?` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +PrepaidConfiguration prepaidConfiguration = new PrepaidConfiguration { - "id": 156, - "initial_funding_amount_in_cents": 88, - "replenish_to_amount_in_cents": 166, - "auto_replenish": false, - "replenish_threshold_amount_in_cents": 222 -} + Id = 146, + InitialFundingAmountInCents = 78L, + ReplenishToAmountInCents = 80L, + AutoReplenish = false, + ReplenishThresholdAmountInCents = 232L, +}; ``` diff --git a/doc/models/prepaid-product-price-point-filter.md b/doc/models/prepaid-product-price-point-filter.md index 13bdba11..b0f34545 100644 --- a/doc/models/prepaid-product-price-point-filter.md +++ b/doc/models/prepaid-product-price-point-filter.md @@ -11,11 +11,14 @@ | --- | --- | --- | --- | | `ProductPricePointId` | `string` | Required, Constant | Passed as a parameter to list methods to return only non null values.

**Value**: `"not_null"` | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +PrepaidProductPricePointFilter prepaidProductPricePointFilter = new PrepaidProductPricePointFilter { - "product_price_point_id": "not_null" -} + ProductPricePointId = "not_null", +}; ``` diff --git a/doc/models/prepaid-subscription-balance-changed.md b/doc/models/prepaid-subscription-balance-changed.md index b675e9f8..26af9ebb 100644 --- a/doc/models/prepaid-subscription-balance-changed.md +++ b/doc/models/prepaid-subscription-balance-changed.md @@ -14,14 +14,17 @@ | `PrepaymentAccountBalanceInCents` | `long` | Required | - | | `CurrentUsageAmountInCents` | `long` | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +PrepaidSubscriptionBalanceChanged prepaidSubscriptionBalanceChanged = new PrepaidSubscriptionBalanceChanged { - "reason": "reason8", - "current_account_balance_in_cents": 250, - "prepayment_account_balance_in_cents": 44, - "current_usage_amount_in_cents": 242 -} + Reason = "reason6", + CurrentAccountBalanceInCents = 194L, + PrepaymentAccountBalanceInCents = 100L, + CurrentUsageAmountInCents = 186L, +}; ``` diff --git a/doc/models/prepaid-usage-allocation-detail.md b/doc/models/prepaid-usage-allocation-detail.md index 1b744c15..bef59a71 100644 --- a/doc/models/prepaid-usage-allocation-detail.md +++ b/doc/models/prepaid-usage-allocation-detail.md @@ -13,13 +13,16 @@ | `ChargeId` | `int?` | Optional | - | | `UsageQuantity` | `int?` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +PrepaidUsageAllocationDetail prepaidUsageAllocationDetail = new PrepaidUsageAllocationDetail { - "allocation_id": 72, - "charge_id": 30, - "usage_quantity": 212 -} + AllocationId = 144, + ChargeId = 214, + UsageQuantity = 140, +}; ``` diff --git a/doc/models/prepaid-usage-component.md b/doc/models/prepaid-usage-component.md index 8429142d..cadb1073 100644 --- a/doc/models/prepaid-usage-component.md +++ b/doc/models/prepaid-usage-component.md @@ -9,10 +9,10 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `Name` | `string` | Required | A name for this component that is suitable for showing customers and displaying on billing statements, ie. "Minutes". | -| `UnitName` | `string` | Required | The name of the unit of measurement for the component. It should be singular since it will be automatically pluralized when necessary. i.e. “message”, which may then be shown as “5 messages” on a subscription’s component line-item | +| `Name` | `string` | Required | A name for this component that is suitable for showing customers and displaying on billing statements, e.g., "Minutes". | +| `UnitName` | `string` | Required | The name of the unit of measurement for the component. It should be singular since it will be automatically pluralized when necessary. e.g., “message”, which may then be shown as “5 messages” on a subscription’s component line-item | | `Description` | `string` | Optional | A description for the component that will be displayed to the user on the hosted signup page. | -| `Handle` | `string` | Optional | A unique identifier for your use that can be used to retrieve this component is subsequent requests. Must start with a letter or number and may only contain lowercase letters, numbers, or the characters '.', ':', '-', or '_'.

**Constraints**: *Pattern*: `^[a-z0-9][a-z0-9\-_:.]*$` | +| `Handle` | `string` | Optional | A unique identifier for your use that can be used to retrieve this component in subsequent requests. Must start with a letter or number and may only contain lowercase letters, numbers, or the characters '.', ':', '-', or '_'.

**Constraints**: *Pattern*: `^[a-z0-9][a-z0-9\-_:.]*$` | | `Taxable` | `bool?` | Optional | Boolean flag describing whether a component is taxable or not. | | `PricingScheme` | [`PricingScheme`](../../doc/models/pricing-scheme.md) | Required | The identifier for the pricing scheme. See [Product Components](https://help.chargify.com/products/product-components.html) for an overview of pricing schemes. | | `Prices` | [`List`](../../doc/models/price.md) | Optional | (Not required for ‘per_unit’ pricing schemes) One or more price brackets. See [Price Bracket Rules](https://maxio.zendesk.com/hc/en-us/articles/24261149166733-Component-Pricing-Schemes#price-bracket-rules) for an overview of how price brackets work for different pricing schemes. | @@ -23,47 +23,65 @@ | `TaxCode` | `string` | Optional | 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. | | `HideDateRangeOnInvoice` | `bool?` | Optional | (Only available on Relationship Invoicing sites) Boolean flag describing if the service date range should show for the component on generated invoices. | | `OveragePricing` | [`OveragePricing`](../../doc/models/overage-pricing.md) | Required | - | -| `RolloverPrepaidRemainder` | `bool?` | Optional | Boolean which controls whether or not remaining units should be rolled over to the next period | -| `RenewPrepaidAllocation` | `bool?` | Optional | Boolean which controls whether or not the allocated quantity should be renewed at the beginning of each period | +| `RolloverPrepaidRemainder` | `bool?` | Optional | Boolean which controls whether or not remaining units should be rolled over to the next period. | +| `RenewPrepaidAllocation` | `bool?` | Optional | Boolean which controls whether or not the allocated quantity should be renewed at the beginning of each period. | | `ExpirationInterval` | `double?` | Optional | (only for prepaid usage components where rollover_prepaid_remainder is true) The number of `expiration_interval_unit`s after which rollover amounts should expire | | `ExpirationIntervalUnit` | [`ExpirationIntervalUnit?`](../../doc/models/expiration-interval-unit.md) | Optional | - | | `DisplayOnHostedPage` | `bool?` | Optional | - | | `AllowFractionalQuantities` | `bool?` | Optional | - | | `PublicSignupPageIds` | `List` | Optional | - | +| `UnspscCode` | `string` | Optional | (Optional) Custom UNSPSC commodity code for Level 3/CEDP payment data. When set, this value is sent as the commodity code on invoice line items for this component instead of the default derived from item_category. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using AdvancedBilling.Standard.Models.Containers; +using System.Collections.Generic; + +PrepaidUsageComponent prepaidUsageComponent = new PrepaidUsageComponent { - "name": "name2", - "unit_name": "unit_name4", - "description": "description8", - "handle": "handle8", - "taxable": false, - "pricing_scheme": "stairstep", - "prices": [ + Name = "name2", + UnitName = "unit_name4", + PricingScheme = PricingScheme.PerUnit, + OveragePricing = new OveragePricing { - "starting_quantity": 242, - "ending_quantity": 40, - "unit_price": 23.26 + PricingScheme = PricingScheme.Stairstep, + Prices = new List + { + new Price + { + StartingQuantity = PriceStartingQuantity.FromNumber(242), + UnitPrice = PriceUnitPrice.FromPrecision(23.26), + EndingQuantity = PriceEndingQuantity.FromNumber(40), + }, + }, }, + Description = "description8", + Handle = "handle8", + Taxable = false, + Prices = new List { - "starting_quantity": 242, - "ending_quantity": 40, - "unit_price": 23.26 - } - ], - "upgrade_charge": "prorated", - "overage_pricing": { - "pricing_scheme": "stairstep", - "prices": [ - { - "starting_quantity": 242, - "ending_quantity": 40, - "unit_price": 23.26 - } - ] - } -} + new Price + { + StartingQuantity = PriceStartingQuantity.FromNumber(242), + UnitPrice = PriceUnitPrice.FromPrecision(23.26), + EndingQuantity = PriceEndingQuantity.FromNumber(40), + }, + new Price + { + StartingQuantity = PriceStartingQuantity.FromNumber(242), + UnitPrice = PriceUnitPrice.FromPrecision(23.26), + EndingQuantity = PriceEndingQuantity.FromNumber(40), + }, + new Price + { + StartingQuantity = PriceStartingQuantity.FromNumber(242), + UnitPrice = PriceUnitPrice.FromPrecision(23.26), + EndingQuantity = PriceEndingQuantity.FromNumber(40), + }, + }, + UpgradeCharge = CreditType.None, +}; ``` diff --git a/doc/models/prepaid-usage.md b/doc/models/prepaid-usage.md index 009caf47..e5227208 100644 --- a/doc/models/prepaid-usage.md +++ b/doc/models/prepaid-usage.md @@ -11,8 +11,8 @@ | --- | --- | --- | --- | | `PreviousUnitBalance` | `string` | Required | **Constraints**: *Minimum Length*: `1` | | `PreviousOverageUnitBalance` | `string` | Required | **Constraints**: *Minimum Length*: `1` | -| `NewUnitBalance` | `int` | Required | - | -| `NewOverageUnitBalance` | `int` | Required | - | +| `NewUnitBalance` | [`PrepaidUsageNewUnitBalance`](../../doc/models/containers/prepaid-usage-new-unit-balance.md) | Required | This is a container for one-of cases. | +| `NewOverageUnitBalance` | [`PrepaidUsageNewOverageUnitBalance`](../../doc/models/containers/prepaid-usage-new-overage-unit-balance.md) | Required | This is a container for one-of cases. | | `UsageQuantity` | `int` | Required | - | | `OverageUsageQuantity` | `int` | Required | - | | `ComponentId` | `int` | Required | - | @@ -20,26 +20,33 @@ | `Memo` | `string` | Required | - | | `AllocationDetails` | [`List`](../../doc/models/prepaid-usage-allocation-detail.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using AdvancedBilling.Standard.Models.Containers; +using System.Collections.Generic; + +PrepaidUsage prepaidUsage = new PrepaidUsage { - "previous_unit_balance": "previous_unit_balance0", - "previous_overage_unit_balance": "previous_overage_unit_balance4", - "new_unit_balance": 252, - "new_overage_unit_balance": 224, - "usage_quantity": 214, - "overage_usage_quantity": 106, - "component_id": 176, - "component_handle": "component_handle4", - "memo": "memo8", - "allocation_details": [ + PreviousUnitBalance = "previous_unit_balance4", + PreviousOverageUnitBalance = "previous_overage_unit_balance0", + NewUnitBalance = PrepaidUsageNewUnitBalance.FromNumber(206), + NewOverageUnitBalance = PrepaidUsageNewOverageUnitBalance.FromNumber(78), + UsageQuantity = 246, + OverageUsageQuantity = 138, + ComponentId = 208, + ComponentHandle = "component_handle0", + Memo = "memo4", + AllocationDetails = new List { - "allocation_id": 18, - "charge_id": 84, - "usage_quantity": 10 - } - ] -} + new PrepaidUsageAllocationDetail + { + AllocationId = 18, + ChargeId = 84, + UsageQuantity = 10, + }, + }, +}; ``` diff --git a/doc/models/prepayment-account-balance-changed.md b/doc/models/prepayment-account-balance-changed.md index 2a981d73..076a5fd0 100644 --- a/doc/models/prepayment-account-balance-changed.md +++ b/doc/models/prepayment-account-balance-changed.md @@ -14,14 +14,17 @@ | `PrepaymentBalanceChangeInCents` | `long` | Required | - | | `CurrencyCode` | `string` | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +PrepaymentAccountBalanceChanged prepaymentAccountBalanceChanged = new PrepaymentAccountBalanceChanged { - "reason": "reason4", - "prepayment_account_balance_in_cents": 182, - "prepayment_balance_change_in_cents": 206, - "currency_code": "currency_code4" -} + Reason = "reason8", + PrepaymentAccountBalanceInCents = 134L, + PrepaymentBalanceChangeInCents = 158L, + CurrencyCode = "currency_code8", +}; ``` diff --git a/doc/models/prepayment-method.md b/doc/models/prepayment-method.md index 10b58a6e..a451930e 100644 --- a/doc/models/prepayment-method.md +++ b/doc/models/prepayment-method.md @@ -17,3 +17,11 @@ | `CreditCard` | | `Other` | +## Example + +```csharp +using AdvancedBilling.Standard.Models; + +PrepaymentMethod prepaymentMethod = PrepaymentMethod.Other; +``` + diff --git a/doc/models/prepayment-response.md b/doc/models/prepayment-response.md index b254f826..d53b9a22 100644 --- a/doc/models/prepayment-response.md +++ b/doc/models/prepayment-response.md @@ -11,22 +11,29 @@ | --- | --- | --- | --- | | `Prepayment` | [`Prepayment`](../../doc/models/prepayment.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Globalization; + +PrepaymentResponse prepaymentResponse = new PrepaymentResponse { - "prepayment": { - "id": 38, - "subscription_id": 148, - "amount_in_cents": 124, - "remaining_amount_in_cents": 182, - "refunded_amount_in_cents": 132, - "details": "details8", - "external": false, - "memo": "memo2", - "payment_type": "credit_card", - "created_at": "2016-03-13T12:52:32.123Z" - } -} + Prepayment = new Prepayment + { + Id = 38, + SubscriptionId = 148, + AmountInCents = 124L, + RemainingAmountInCents = 182L, + External = false, + Memo = "memo2", + CreatedAt = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + RefundedAmountInCents = 132L, + Details = "details8", + PaymentType = PrepaymentMethod.CreditCard, + }, +}; ``` diff --git a/doc/models/prepayment.md b/doc/models/prepayment.md index b7592bfa..de2bdd49 100644 --- a/doc/models/prepayment.md +++ b/doc/models/prepayment.md @@ -20,20 +20,26 @@ | `PaymentType` | [`PrepaymentMethod?`](../../doc/models/prepayment-method.md) | Optional | The payment type of the prepayment. | | `CreatedAt` | `DateTimeOffset` | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Globalization; + +Prepayment prepayment = new Prepayment { - "id": 50, - "subscription_id": 160, - "amount_in_cents": 120, - "remaining_amount_in_cents": 194, - "refunded_amount_in_cents": 144, - "details": "details4", - "external": false, - "memo": "memo8", - "payment_type": "cash", - "created_at": "2016-03-13T12:52:32.123Z" -} + Id = 38, + SubscriptionId = 148, + AmountInCents = 124L, + RemainingAmountInCents = 182L, + External = false, + Memo = "memo2", + CreatedAt = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + RefundedAmountInCents = 132L, + Details = "details8", + PaymentType = PrepaymentMethod.CreditCard, +}; ``` diff --git a/doc/models/prepayments-response.md b/doc/models/prepayments-response.md index e1ced148..4728d881 100644 --- a/doc/models/prepayments-response.md +++ b/doc/models/prepayments-response.md @@ -11,36 +11,33 @@ | --- | --- | --- | --- | | `Prepayments` | [`List`](../../doc/models/prepayment.md) | Optional | **Constraints**: *Unique Items Required* | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Collections.Generic; +using System.Globalization; + +PrepaymentsResponse prepaymentsResponse = new PrepaymentsResponse { - "prepayments": [ + Prepayments = new List { - "id": 76, - "subscription_id": 186, - "amount_in_cents": 94, - "remaining_amount_in_cents": 220, - "refunded_amount_in_cents": 170, - "details": "details6", - "external": false, - "memo": "memo0", - "payment_type": "cash", - "created_at": "2016-03-13T12:52:32.123Z" + new Prepayment + { + Id = 76, + SubscriptionId = 186, + AmountInCents = 94L, + RemainingAmountInCents = 220L, + External = false, + Memo = "memo0", + CreatedAt = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + RefundedAmountInCents = 170L, + Details = "details6", + PaymentType = PrepaymentMethod.Cash, + }, }, - { - "id": 76, - "subscription_id": 186, - "amount_in_cents": 94, - "remaining_amount_in_cents": 220, - "refunded_amount_in_cents": 170, - "details": "details6", - "external": false, - "memo": "memo0", - "payment_type": "cash", - "created_at": "2016-03-13T12:52:32.123Z" - } - ] -} +}; ``` diff --git a/doc/models/preview-allocations-request.md b/doc/models/preview-allocations-request.md index b377a330..f25ca1af 100644 --- a/doc/models/preview-allocations-request.md +++ b/doc/models/preview-allocations-request.md @@ -14,23 +14,29 @@ | `UpgradeCharge` | [`CreditType?`](../../doc/models/credit-type.md) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided. | | `DowngradeCredit` | [`CreditType?`](../../doc/models/credit-type.md) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Collections.Generic; + +PreviewAllocationsRequest previewAllocationsRequest = new PreviewAllocationsRequest { - "allocations": [ + Allocations = new List { - "quantity": 26.48, - "decimal_quantity": "decimal_quantity8", - "previous_quantity": 55.5, - "decimal_previous_quantity": "decimal_previous_quantity2", - "component_id": 242, - "memo": "memo6" - } - ], - "effective_proration_date": "2023-12-01", - "upgrade_charge": "none", - "downgrade_credit": "prorated" -} + new CreateAllocation + { + Quantity = 26.48, + DecimalQuantity = "decimal_quantity8", + PreviousQuantity = 55.5, + DecimalPreviousQuantity = "decimal_previous_quantity2", + ComponentId = 242, + Memo = "memo6", + }, + }, + EffectiveProrationDate = DateTime.Parse("2023-12-01"), + UpgradeCharge = CreditType.None, + DowngradeCredit = CreditType.None, +}; ``` diff --git a/doc/models/price-point-type.md b/doc/models/price-point-type.md index aa976681..d091420f 100644 --- a/doc/models/price-point-type.md +++ b/doc/models/price-point-type.md @@ -19,3 +19,11 @@ Price point type. We expose the following types: | `Default` | | `Custom` | +## Example + +```csharp +using AdvancedBilling.Standard.Models; + +PricePointType pricePointType = PricePointType.Default; +``` + diff --git a/doc/models/price.md b/doc/models/price.md index fbaefc0b..7987354e 100644 --- a/doc/models/price.md +++ b/doc/models/price.md @@ -13,13 +13,17 @@ | `EndingQuantity` | [`PriceEndingQuantity`](../../doc/models/containers/price-ending-quantity.md) | Optional | This is a container for one-of cases. | | `UnitPrice` | [`PriceUnitPrice`](../../doc/models/containers/price-unit-price.md) | Required | This is a container for one-of cases. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using AdvancedBilling.Standard.Models.Containers; + +Price price = new Price { - "starting_quantity": 40, - "ending_quantity": 14, - "unit_price": 125.12 -} + StartingQuantity = PriceStartingQuantity.FromNumber(132), + UnitPrice = PriceUnitPrice.FromPrecision(70.44), + EndingQuantity = PriceEndingQuantity.FromNumber(6), +}; ``` diff --git a/doc/models/pricing-scheme.md b/doc/models/pricing-scheme.md index 2d4daff3..005d9018 100644 --- a/doc/models/pricing-scheme.md +++ b/doc/models/pricing-scheme.md @@ -16,3 +16,11 @@ The identifier for the pricing scheme. See [Product Components](https://help.cha | `PerUnit` | | `Tiered` | +## Example + +```csharp +using AdvancedBilling.Standard.Models; + +PricingScheme pricingScheme = PricingScheme.Stairstep; +``` + diff --git a/doc/models/product-family-response.md b/doc/models/product-family-response.md index eb121639..2858cc31 100644 --- a/doc/models/product-family-response.md +++ b/doc/models/product-family-response.md @@ -11,17 +11,21 @@ | --- | --- | --- | --- | | `ProductFamily` | [`ProductFamily`](../../doc/models/product-family.md) | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +ProductFamilyResponse productFamilyResponse = new ProductFamilyResponse { - "product_family": { - "id": 14, - "name": "name0", - "handle": "handle6", - "accounting_code": "accounting_code6", - "description": "description0" - } -} + ProductFamily = new ProductFamily + { + Id = 14, + Name = "name0", + Handle = "handle6", + AccountingCode = "accounting_code6", + Description = "description0", + }, +}; ``` diff --git a/doc/models/product-family.md b/doc/models/product-family.md index 6b379b0a..96b651ce 100644 --- a/doc/models/product-family.md +++ b/doc/models/product-family.md @@ -14,19 +14,23 @@ | `Handle` | `string` | Optional | - | | `AccountingCode` | `string` | Optional | - | | `Description` | `string` | Optional | - | +| `Surcharging` | `bool?` | Optional | Whether surcharging applies to this product family. Only included on sites where surcharging is enabled. | | `CreatedAt` | `DateTimeOffset?` | Optional | - | | `UpdatedAt` | `DateTimeOffset?` | Optional | - | | `ArchivedAt` | `DateTimeOffset?` | Optional | Timestamp indicating when this product family was archived. `null` if the product family is not archived. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +ProductFamily productFamily = new ProductFamily { - "id": 194, - "name": "name2", - "handle": "handle8", - "accounting_code": "accounting_code8", - "description": "description8" -} + Id = 134, + Name = "name4", + Handle = "handle0", + AccountingCode = "accounting_code0", + Description = "description4", +}; ``` diff --git a/doc/models/product-price-point-error-response-exception.md b/doc/models/product-price-point-error-response-exception.md index 67b9e7c1..b179e4b9 100644 --- a/doc/models/product-price-point-error-response-exception.md +++ b/doc/models/product-price-point-error-response-exception.md @@ -11,31 +11,20 @@ | --- | --- | --- | --- | | `Errors` | [`ProductPricePointErrors`](../../doc/models/product-price-point-errors.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +try { - "errors": { - "price_point": "can't be blank", - "interval": [ - "Recurring Interval: cannot be blank.", - "Recurring Interval: must be greater than or equal to 1." - ], - "interval_unit": [ - "Interval unit: cannot be blank.", - "Interval unit: must be 'month' or 'day'." - ], - "name": [ - "Name: cannot be blank." - ], - "price": [ - "Price: is not a number.", - "Price: must be greater than or equal to 0." - ], - "price_in_cents": [ - "Price in cents: cannot be blank." - ] - } + // make the API call +} +catch (ApiException e) +{ + if (e is ProductPricePointErrorResponseException) + { + // TODO: Handle ProductPricePointErrorResponseException + Console.WriteLine(e.Message); + } } ``` diff --git a/doc/models/product-price-point-errors.md b/doc/models/product-price-point-errors.md index de18feb3..7ebc6152 100644 --- a/doc/models/product-price-point-errors.md +++ b/doc/models/product-price-point-errors.md @@ -16,29 +16,38 @@ | `Price` | `List` | Optional | - | | `PriceInCents` | `List` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Collections.Generic; + +ProductPricePointErrors productPricePointErrors = new ProductPricePointErrors { - "price_point": "can't be blank", - "interval": [ - "Recurring Interval: cannot be blank.", - "Recurring Interval: must be greater than or equal to 1." - ], - "interval_unit": [ - "Interval unit: cannot be blank.", - "Interval unit: must be 'month' or 'day'." - ], - "name": [ - "Name: cannot be blank." - ], - "price": [ - "Price: is not a number.", - "Price: must be greater than or equal to 0." - ], - "price_in_cents": [ - "Price in cents: cannot be blank." - ] -} + PricePoint = "can't be blank", + Interval = new List + { + "Recurring Interval: cannot be blank.", + "Recurring Interval: must be greater than or equal to 1.", + }, + IntervalUnit = new List + { + "Interval unit: cannot be blank.", + "Interval unit: must be 'month' or 'day'.", + }, + Name = new List + { + "Name: cannot be blank.", + }, + Price = new List + { + "Price: is not a number.", + "Price: must be greater than or equal to 0.", + }, + PriceInCents = new List + { + "Price in cents: cannot be blank.", + }, +}; ``` diff --git a/doc/models/product-price-point-response.md b/doc/models/product-price-point-response.md index 4459abc7..6b9a47c3 100644 --- a/doc/models/product-price-point-response.md +++ b/doc/models/product-price-point-response.md @@ -11,17 +11,21 @@ | --- | --- | --- | --- | | `PricePoint` | [`ProductPricePoint`](../../doc/models/product-price-point.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +ProductPricePointResponse productPricePointResponse = new ProductPricePointResponse { - "price_point": { - "id": 248, - "name": "name0", - "handle": "handle6", - "price_in_cents": 196, - "interval": 44 - } -} + PricePoint = new ProductPricePoint + { + Id = 248, + Name = "name0", + Handle = "handle6", + PriceInCents = 196L, + Interval = 44, + }, +}; ``` diff --git a/doc/models/product-price-point.md b/doc/models/product-price-point.md index db67d747..b5c8cb5d 100644 --- a/doc/models/product-price-point.md +++ b/doc/models/product-price-point.md @@ -13,16 +13,16 @@ | `Name` | `string` | Optional | The product price point name | | `Handle` | `string` | Optional | The product price point API handle | | `PriceInCents` | `long?` | Optional | The product price point price, in integer cents | -| `Interval` | `int?` | Optional | The numerical interval. i.e. an interval of ‘30’ coupled with an interval_unit of day would mean this product price point would renew every 30 days | +| `Interval` | `int?` | Optional | The numerical interval. e.g., an interval of ‘30’ coupled with an interval_unit of day would mean this product price point would renew every 30 days. | | `IntervalUnit` | [`IntervalUnit?`](../../doc/models/interval-unit.md) | Optional | A string representing the interval unit for this product price point, either month or day | | `TrialPriceInCents` | `long?` | Optional | The product price point trial price, in integer cents | -| `TrialInterval` | `int?` | Optional | The numerical trial interval. i.e. an interval of ‘30’ coupled with a trial_interval_unit of day would mean this product price point trial would last 30 days | +| `TrialInterval` | `int?` | Optional | The numerical trial interval. e.g., an interval of ‘30’ coupled with a trial_interval_unit of day would mean this product price point trial would last 30 days. | | `TrialIntervalUnit` | [`IntervalUnit?`](../../doc/models/interval-unit.md) | Optional | A string representing the trial interval unit for this product price point, either month or day | -| `TrialType` | [`TrialType?`](../../doc/models/trial-type.md) | Optional | Indicates how a trial is handled when the trail period ends and there is no credit card on file. For `no_obligation`, the subscription transitions to a Trial Ended state. Maxio will not send any emails or statements. For `payment_expected`, the subscription transitions to a Past Due state. Maxio will send normal dunning emails and statements according to your other settings. | +| `TrialType` | [`TrialType?`](../../doc/models/trial-type.md) | Optional | Indicates how a trial is handled when the trial period ends and there is no credit card on file. For `no_obligation`, the subscription transitions to a Trial Ended state. Maxio will not send any emails or statements. For `payment_expected`, the subscription transitions to a Past Due state. Maxio will send normal dunning emails and statements according to your other settings. | | `IntroductoryOffer` | `bool?` | Optional | reserved for future use | | `InitialChargeInCents` | `long?` | Optional | The product price point initial charge, in integer cents | | `InitialChargeAfterTrial` | `bool?` | Optional | - | -| `ExpirationInterval` | `int?` | Optional | The numerical expiration interval. i.e. an expiration_interval of ‘30’ coupled with an expiration_interval_unit of day would mean this product price point would expire after 30 days | +| `ExpirationInterval` | `int?` | Optional | The numerical expiration interval. e.g., an expiration_interval of ‘30’ coupled with an expiration_interval_unit of day would mean this product price point would expire after 30 days. | | `ExpirationIntervalUnit` | [`ExpirationIntervalUnit?`](../../doc/models/expiration-interval-unit.md) | Optional | A string representing the expiration interval unit for this product price point, either month, day or never | | `ProductId` | `int?` | Optional | The product id this price point belongs to | | `ArchivedAt` | `DateTimeOffset?` | Optional | Timestamp indicating when this price point was archived | @@ -34,15 +34,18 @@ | `SubscriptionId` | `int?` | Optional | The subscription id this price point belongs to | | `CurrencyPrices` | [`List`](../../doc/models/currency-price.md) | Optional | An array of currency pricing data is available when multiple currencies are defined for the site. It varies based on the use_site_exchange_rate setting for the price point. This parameter is present only in the response of read endpoints, after including the appropriate query parameter. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +ProductPricePoint productPricePoint = new ProductPricePoint { - "id": 196, - "name": "name6", - "handle": "handle2", - "price_in_cents": 248, - "interval": 8 -} + Id = 10, + Name = "name0", + Handle = "handle6", + PriceInCents = 178L, + Interval = 194, +}; ``` diff --git a/doc/models/product-response.md b/doc/models/product-response.md index 588ebf0d..33f38c82 100644 --- a/doc/models/product-response.md +++ b/doc/models/product-response.md @@ -11,17 +11,21 @@ | --- | --- | --- | --- | | `Product` | [`Product`](../../doc/models/product.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +ProductResponse productResponse = new ProductResponse { - "product": { - "id": 134, - "name": "name0", - "handle": "handle6", - "description": "description0", - "accounting_code": "accounting_code6" - } -} + Product = new Product + { + Id = 134, + Name = "name0", + Handle = "handle6", + Description = "description0", + AccountingCode = "accounting_code6", + }, +}; ``` diff --git a/doc/models/product.md b/doc/models/product.md index 66dbe1bd..7ff54e79 100644 --- a/doc/models/product.md +++ b/doc/models/product.md @@ -13,18 +13,18 @@ | `Name` | `string` | Optional | The product name | | `Handle` | `string` | Optional | The product API handle | | `Description` | `string` | Optional | The product description | -| `AccountingCode` | `string` | Optional | E.g. Internal ID or SKU Number | +| `AccountingCode` | `string` | Optional | E.g., Internal ID or SKU Number | | `RequestCreditCard` | `bool?` | Optional | Deprecated value that can be ignored unless you have legacy hosted pages. For Public Signup Page users, read this attribute from under the signup page. | -| `ExpirationInterval` | `int?` | Optional | A numerical interval for the length a subscription to this product will run before it expires. See the description of interval for a description of how this value is coupled with an interval unit to calculate the full interval | +| `ExpirationInterval` | `int?` | Optional | A numerical interval for the length a subscription to this product will run before it expires. See the description of interval for a description of how this value is coupled with an interval unit to calculate the full interval. | | `ExpirationIntervalUnit` | [`ExpirationIntervalUnit?`](../../doc/models/expiration-interval-unit.md) | Optional | A string representing the expiration interval unit for this product, either month, day or never | | `CreatedAt` | `DateTimeOffset?` | Optional | Timestamp indicating when this product was created | | `UpdatedAt` | `DateTimeOffset?` | Optional | Timestamp indicating when this product was last updated | | `PriceInCents` | `long?` | Optional | The product price, in integer cents | -| `Interval` | `int?` | Optional | The numerical interval. i.e. an interval of ‘30’ coupled with an interval_unit of day would mean this product would renew every 30 days | +| `Interval` | `int?` | Optional | The numerical interval. e.g., an interval of ‘30’ coupled with an interval_unit of day would mean this product would renew every 30 days. | | `IntervalUnit` | [`IntervalUnit?`](../../doc/models/interval-unit.md) | Optional | A string representing the interval unit for this product, either month or day | | `InitialChargeInCents` | `long?` | Optional | The up front charge you have specified. | | `TrialPriceInCents` | `long?` | Optional | The price of the trial period for a subscription to this product, in integer cents. | -| `TrialInterval` | `int?` | Optional | A numerical interval for the length of the trial period of a subscription to this product. See the description of interval for a description of how this value is coupled with an interval unit to calculate the full interval | +| `TrialInterval` | `int?` | Optional | A numerical interval for the length of the trial period of a subscription to this product. See the description of interval for a description of how this value is coupled with an interval unit to calculate the full interval. | | `TrialIntervalUnit` | [`IntervalUnit?`](../../doc/models/interval-unit.md) | Optional | A string representing the trial interval unit for this product, either month or day | | `ArchivedAt` | `DateTimeOffset?` | Optional | Timestamp indicating when this product was archived | | `RequireCreditCard` | `bool?` | Optional | Boolean that controls whether a payment profile is required to be entered for customers wishing to sign up on this product. | @@ -33,7 +33,7 @@ | `UpdateReturnUrl` | `string` | Optional | The url to which a customer will be returned after a successful account update | | `InitialChargeAfterTrial` | `bool?` | Optional | - | | `VersionNumber` | `int?` | Optional | The version of the product | -| `UpdateReturnParams` | `string` | Optional | The parameters will append to the url after a successful account update. See [help documentation](https://help.chargify.com/products/product-editing.html#return-parameters-after-account-update) | +| `UpdateReturnParams` | `string` | Optional | The parameters will append to the url after a successful account update. See [help documentation](https://help.chargify.com/products/product-editing.html#return-parameters-after-account-update). | | `ProductFamily` | [`ProductFamily`](../../doc/models/product-family.md) | Optional | - | | `PublicSignupPages` | [`List`](../../doc/models/public-signup-page.md) | Optional | - | | `ProductPricePointName` | `string` | Optional | - | @@ -46,16 +46,20 @@ | `ItemCategory` | `string` | Optional | One of the following: Business Software, Consumer Software, Digital Services, Physical Goods, Other | | `ProductPricePointId` | `int?` | Optional | - | | `ProductPricePointHandle` | `string` | Optional | - | +| `UnspscCode` | `string` | Optional | (Optional) Custom UNSPSC commodity code for Level 3/CEDP payment data. When set, this value is sent as the commodity code on invoice line items for this product instead of the default derived from item_category. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +Product product = new Product { - "id": 180, - "name": "name4", - "handle": "handle0", - "description": "description4", - "accounting_code": "accounting_code0" -} + Id = 134, + Name = "name0", + Handle = "handle6", + Description = "description0", + AccountingCode = "accounting_code6", +}; ``` diff --git a/doc/models/proforma-bad-request-error-response-exception.md b/doc/models/proforma-bad-request-error-response-exception.md index 247f8d4d..cf432524 100644 --- a/doc/models/proforma-bad-request-error-response-exception.md +++ b/doc/models/proforma-bad-request-error-response-exception.md @@ -11,18 +11,20 @@ | --- | --- | --- | --- | | `Errors` | [`ProformaError`](../../doc/models/proforma-error.md) | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +try { - "errors": { - "subscription": { - "base": [ - "base3", - "base4" - ] + // make the API call +} +catch (ApiException e) +{ + if (e is ProformaBadRequestErrorResponseException) + { + // TODO: Handle ProformaBadRequestErrorResponseException + Console.WriteLine(e.Message); } - } } ``` diff --git a/doc/models/proforma-error.md b/doc/models/proforma-error.md index 9926c09c..303a9bd9 100644 --- a/doc/models/proforma-error.md +++ b/doc/models/proforma-error.md @@ -11,16 +11,22 @@ | --- | --- | --- | --- | | `Subscription` | [`BaseStringError`](../../doc/models/base-string-error.md) | Optional | The error is base if it is not directly associated with a single attribute. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Collections.Generic; + +ProformaError proformaError = new ProformaError { - "subscription": { - "base": [ - "base3", - "base4" - ] - } -} + Subscription = new BaseStringError + { + MBase = new List + { + "base3", + "base4", + }, + }, +}; ``` diff --git a/doc/models/proforma-invoice-credit.md b/doc/models/proforma-invoice-credit.md index e8d25e15..1aa08ee1 100644 --- a/doc/models/proforma-invoice-credit.md +++ b/doc/models/proforma-invoice-credit.md @@ -14,14 +14,17 @@ | `OriginalAmount` | `string` | Optional | **Constraints**: *Minimum Length*: `1` | | `AppliedAmount` | `string` | Optional | **Constraints**: *Minimum Length*: `1` | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +ProformaInvoiceCredit proformaInvoiceCredit = new ProformaInvoiceCredit { - "uid": "uid8", - "memo": "memo2", - "original_amount": "original_amount2", - "applied_amount": "applied_amount0" -} + Uid = "uid4", + Memo = "memo8", + OriginalAmount = "original_amount8", + AppliedAmount = "applied_amount4", +}; ``` diff --git a/doc/models/proforma-invoice-discount-source-type.md b/doc/models/proforma-invoice-discount-source-type.md index 4618f4f7..bacc2c7a 100644 --- a/doc/models/proforma-invoice-discount-source-type.md +++ b/doc/models/proforma-invoice-discount-source-type.md @@ -12,3 +12,11 @@ | `Coupon` | | `Referral` | +## Example + +```csharp +using AdvancedBilling.Standard.Models; + +ProformaInvoiceDiscountSourceType proformaInvoiceDiscountSourceType = ProformaInvoiceDiscountSourceType.Coupon; +``` + diff --git a/doc/models/proforma-invoice-discount.md b/doc/models/proforma-invoice-discount.md index 77e89860..f2769642 100644 --- a/doc/models/proforma-invoice-discount.md +++ b/doc/models/proforma-invoice-discount.md @@ -18,15 +18,18 @@ | `DiscountAmount` | `string` | Optional | **Constraints**: *Minimum Length*: `1` | | `LineItemBreakouts` | [`List`](../../doc/models/invoice-discount-breakout.md) | Optional | **Constraints**: *Minimum Items*: `1`, *Unique Items Required* | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +ProformaInvoiceDiscount proformaInvoiceDiscount = new ProformaInvoiceDiscount { - "uid": "uid2", - "title": "title8", - "code": "code0", - "source_type": "Coupon", - "discount_type": "percentage" -} + Uid = "uid2", + Title = "title8", + Code = "code0", + SourceType = ProformaInvoiceDiscountSourceType.Coupon, + DiscountType = InvoiceDiscountType.Percentage, +}; ``` diff --git a/doc/models/proforma-invoice-issued.md b/doc/models/proforma-invoice-issued.md index 151b73db..9fdd2aea 100644 --- a/doc/models/proforma-invoice-issued.md +++ b/doc/models/proforma-invoice-issued.md @@ -21,29 +21,38 @@ | `ProductName` | `string` | Required | - | | `LineItems` | [`List`](../../doc/models/invoice-line-item-event-data.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Collections.Generic; +using System.Globalization; + +ProformaInvoiceIssued proformaInvoiceIssued = new ProformaInvoiceIssued { - "uid": "uid0", - "number": "number2", - "role": "role6", - "delivery_date": "2016-03-13", - "created_at": "2016-03-13T12:52:32.123Z", - "due_amount": "due_amount2", - "paid_amount": "paid_amount8", - "tax_amount": "tax_amount6", - "total_amount": "total_amount6", - "product_name": "product_name6", - "line_items": [ + Uid = "uid6", + Number = "number4", + Role = "role0", + DeliveryDate = DateTime.Parse("2016-03-13"), + CreatedAt = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + DueAmount = "due_amount8", + PaidAmount = "paid_amount8", + TaxAmount = "tax_amount0", + TotalAmount = "total_amount2", + ProductName = "product_name2", + LineItems = new List { - "uid": "uid8", - "title": "title4", - "description": "description8", - "quantity": 102, - "quantity_delta": 204 - } - ] -} + new InvoiceLineItemEventData + { + Uid = "uid8", + Title = "title4", + Description = "description8", + Quantity = 102, + QuantityDelta = 204, + }, + }, +}; ``` diff --git a/doc/models/proforma-invoice-payment.md b/doc/models/proforma-invoice-payment.md index a7168af2..c83ab433 100644 --- a/doc/models/proforma-invoice-payment.md +++ b/doc/models/proforma-invoice-payment.md @@ -14,14 +14,17 @@ | `AppliedAmount` | `string` | Optional | **Constraints**: *Minimum Length*: `1` | | `Prepayment` | `bool?` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +ProformaInvoicePayment proformaInvoicePayment = new ProformaInvoicePayment { - "memo": "memo4", - "original_amount": "original_amount4", - "applied_amount": "applied_amount8", - "prepayment": false -} + Memo = "memo2", + OriginalAmount = "original_amount2", + AppliedAmount = "applied_amount0", + Prepayment = false, +}; ``` diff --git a/doc/models/proforma-invoice-role.md b/doc/models/proforma-invoice-role.md index 21f1d26b..4c6e9aeb 100644 --- a/doc/models/proforma-invoice-role.md +++ b/doc/models/proforma-invoice-role.md @@ -1,7 +1,7 @@ # Proforma Invoice Role -'proforma' value is deprecated in favor of proforma_adhoc and proforma_automatic +'proforma' value is deprecated in favor of proforma_adhoc and proforma_automatic. ## Enumeration @@ -16,3 +16,11 @@ | `ProformaAdhoc` | | `ProformaAutomatic` | +## Example + +```csharp +using AdvancedBilling.Standard.Models; + +ProformaInvoiceRole proformaInvoiceRole = ProformaInvoiceRole.Unset; +``` + diff --git a/doc/models/proforma-invoice-status.md b/doc/models/proforma-invoice-status.md index 95854de9..396f08ec 100644 --- a/doc/models/proforma-invoice-status.md +++ b/doc/models/proforma-invoice-status.md @@ -13,3 +13,11 @@ | `Voided` | | `Archived` | +## Example + +```csharp +using AdvancedBilling.Standard.Models; + +ProformaInvoiceStatus proformaInvoiceStatus = ProformaInvoiceStatus.Draft; +``` + diff --git a/doc/models/proforma-invoice-tax-source-type.md b/doc/models/proforma-invoice-tax-source-type.md index 4bd4e3ee..f10d4573 100644 --- a/doc/models/proforma-invoice-tax-source-type.md +++ b/doc/models/proforma-invoice-tax-source-type.md @@ -12,3 +12,11 @@ | `Tax` | | `Avalara` | +## Example + +```csharp +using AdvancedBilling.Standard.Models; + +ProformaInvoiceTaxSourceType proformaInvoiceTaxSourceType = ProformaInvoiceTaxSourceType.Tax; +``` + diff --git a/doc/models/proforma-invoice-tax.md b/doc/models/proforma-invoice-tax.md index e4753632..7725cbd8 100644 --- a/doc/models/proforma-invoice-tax.md +++ b/doc/models/proforma-invoice-tax.md @@ -17,15 +17,18 @@ | `TaxAmount` | `string` | Optional | **Constraints**: *Minimum Length*: `1` | | `LineItemBreakouts` | [`List`](../../doc/models/invoice-tax-breakout.md) | Optional | **Constraints**: *Minimum Items*: `1`, *Unique Items Required* | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +ProformaInvoiceTax proformaInvoiceTax = new ProformaInvoiceTax { - "uid": "uid8", - "title": "title4", - "source_type": "Tax", - "percentage": "percentage6", - "taxable_amount": "taxable_amount2" -} + Uid = "uid4", + Title = "title0", + SourceType = ProformaInvoiceTaxSourceType.Tax, + Percentage = "percentage2", + TaxableAmount = "taxable_amount8", +}; ``` diff --git a/doc/models/proforma-invoice.md b/doc/models/proforma-invoice.md index 31b4bb97..2c1f2344 100644 --- a/doc/models/proforma-invoice.md +++ b/doc/models/proforma-invoice.md @@ -21,12 +21,12 @@ | `CollectionMethod` | [`CollectionMethod?`](../../doc/models/collection-method.md) | Optional | The type of payment collection to be used in the subscription. For legacy Statements Architecture valid options are - `invoice`, `automatic`. For current Relationship Invoicing Architecture valid options are - `remittance`, `automatic`, `prepaid`. | | `PaymentInstructions` | `string` | Optional | - | | `Currency` | `string` | Optional | - | -| `ConsolidationLevel` | [`InvoiceConsolidationLevel?`](../../doc/models/invoice-consolidation-level.md) | Optional | Consolidation level of the invoice, which is applicable to invoice consolidation. It will hold one of the following values:

* "none": A normal invoice with no consolidation.
* "child": An invoice segment which has been combined into a consolidated invoice.
* "parent": A consolidated invoice, whose contents are composed of invoice segments.

"Parent" invoices do not have lines of their own, but they have subtotals and totals which aggregate the member invoice segments.

See also the [invoice consolidation documentation](https://maxio.zendesk.com/hc/en-us/articles/24252269909389-Invoice-Consolidation). | +| `ConsolidationLevel` | [`InvoiceConsolidationLevel?`](../../doc/models/invoice-consolidation-level.md) | Optional | Consolidation level of the invoice, which is applicable to invoice consolidation. It will hold one of the following values:

* "none": A normal invoice with no consolidation.
* "child": An invoice segment which has been combined into a consolidated invoice.
* "parent": A consolidated invoice, whose contents are composed of invoice segments.

"Parent" invoices do not have lines of their own, but they have subtotals and totals which aggregate the member invoice segments.

See also the [invoice consolidation documentation](https://maxio.zendesk.com/hc/en-us/articles/24252269909389-Invoice-Consolidation). | | `ProductName` | `string` | Optional | - | | `ProductFamilyName` | `string` | Optional | - | -| `Role` | [`ProformaInvoiceRole?`](../../doc/models/proforma-invoice-role.md) | Optional | 'proforma' value is deprecated in favor of proforma_adhoc and proforma_automatic | +| `Role` | [`ProformaInvoiceRole?`](../../doc/models/proforma-invoice-role.md) | Optional | 'proforma' value is deprecated in favor of proforma_adhoc and proforma_automatic. | | `Seller` | [`InvoiceSeller`](../../doc/models/invoice-seller.md) | Optional | Information about the seller (merchant) listed on the masthead of the invoice. | -| `Customer` | [`InvoiceCustomer`](../../doc/models/invoice-customer.md) | Optional | Information about the customer who is owner or recipient the invoiced subscription. | +| `Customer` | [`InvoiceCustomer`](../../doc/models/invoice-customer.md) | Optional | Information about the customer who is owner or recipient of the invoiced subscription. | | `Memo` | `string` | Optional | - | | `BillingAddress` | [`InvoiceAddress`](../../doc/models/invoice-address.md) | Optional | - | | `ShippingAddress` | [`InvoiceAddress`](../../doc/models/invoice-address.md) | Optional | - | @@ -47,15 +47,18 @@ | `PublicUrl` | `string` | Optional | - | | `AvailableActions` | [`AvailableActions`](../../doc/models/available-actions.md) | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +ProformaInvoice proformaInvoice = new ProformaInvoice { - "uid": "uid6", - "site_id": 196, - "customer_id": 52, - "subscription_id": 124, - "number": 0 -} + Uid = "uid8", + SiteId = 94, + CustomerId = 206, + SubscriptionId = 22, + Number = 102, +}; ``` diff --git a/doc/models/proration.md b/doc/models/proration.md index 664637e4..36ad027b 100644 --- a/doc/models/proration.md +++ b/doc/models/proration.md @@ -11,11 +11,14 @@ | --- | --- | --- | --- | | `PreservePeriod` | `bool?` | Optional | The alternative to sending preserve_period as a direct attribute to migration | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +Proration proration = new Proration { - "preserve_period": false -} + PreservePeriod = false, +}; ``` diff --git a/doc/models/public-key.md b/doc/models/public-key.md index c88b1bfb..c78c5173 100644 --- a/doc/models/public-key.md +++ b/doc/models/public-key.md @@ -13,13 +13,19 @@ | `RequiresSecurityToken` | `bool?` | Optional | - | | `CreatedAt` | `DateTimeOffset?` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Globalization; + +PublicKey publicKey = new PublicKey { - "public_key": "public_key8", - "requires_security_token": false, - "created_at": "2016-03-13T12:52:32.123Z" -} + PublicKeyProp = "public_key2", + RequiresSecurityToken = false, + CreatedAt = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), +}; ``` diff --git a/doc/models/public-signup-page.md b/doc/models/public-signup-page.md index e55fa6f8..fff44004 100644 --- a/doc/models/public-signup-page.md +++ b/doc/models/public-signup-page.md @@ -10,18 +10,21 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | | `Id` | `int?` | Optional | The id of the signup page (public_signup_pages only) | -| `ReturnUrl` | `string` | Optional | The url to which a customer will be returned after a successful signup (public_signup_pages only) | +| `ReturnUrl` | `string` | Optional | The url to which a customer will be returned after a successful signup (public_signup_pages only). | | `ReturnParams` | `string` | Optional | The params to be appended to the return_url (public_signup_pages only) | -| `Url` | `string` | Optional | The url where the signup page can be viewed (public_signup_pages only) | +| `Url` | `string` | Optional | The url where the signup page can be viewed (public_signup_pages only). | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +PublicSignupPage publicSignupPage = new PublicSignupPage { - "id": 6, - "return_url": "return_url0", - "return_params": "return_params2", - "url": "url8" -} + Id = 20, + ReturnUrl = "return_url0", + ReturnParams = "return_params2", + Url = "url8", +}; ``` diff --git a/doc/models/q-scope.md b/doc/models/q-scope.md new file mode 100644 index 00000000..bf5308ea --- /dev/null +++ b/doc/models/q-scope.md @@ -0,0 +1,26 @@ + +# Q Scope + +## Enumeration + +`QScope` + +## Fields + +| Name | +| --- | +| `FullName` | +| `FirstName` | +| `LastName` | +| `Organization` | +| `CustomerReference` | +| `SubscriptionReference` | + +## Example + +```csharp +using AdvancedBilling.Standard.Models; + +QScope qScope = QScope.LastName; +``` + diff --git a/doc/models/quantity-based-component.md b/doc/models/quantity-based-component.md index 76567f32..72825119 100644 --- a/doc/models/quantity-based-component.md +++ b/doc/models/quantity-based-component.md @@ -9,10 +9,10 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `Name` | `string` | Required | A name for this component that is suitable for showing customers and displaying on billing statements, ie. "Minutes". | -| `UnitName` | `string` | Required | The name of the unit of measurement for the component. It should be singular since it will be automatically pluralized when necessary. i.e. “message”, which may then be shown as “5 messages” on a subscription’s component line-item | +| `Name` | `string` | Required | A name for this component that is suitable for showing customers and displaying on billing statements, e.g., "Minutes". | +| `UnitName` | `string` | Required | “The name of the unit of measurement for the component. It should be singular since it will be automatically pluralized when necessary. e.g., “message”, which may then be shown as “5 messages” on a subscription’s component line-item.” | | `Description` | `string` | Optional | A description for the component that will be displayed to the user on the hosted signup page. | -| `Handle` | `string` | Optional | A unique identifier for your use that can be used to retrieve this component is subsequent requests. Must start with a letter or number and may only contain lowercase letters, numbers, or the characters '.', ':', '-', or '_'.

**Constraints**: *Pattern*: `^[a-z0-9][a-z0-9\-_:.]*$` | +| `Handle` | `string` | Optional | A unique identifier for your use that can be used to retrieve this component in subsequent requests. Must start with a letter or number and may only contain lowercase letters, numbers, or the characters '.', ':', '-', or '_'.

**Constraints**: *Pattern*: `^[a-z0-9][a-z0-9\-_:.]*$` | | `Taxable` | `bool?` | Optional | Boolean flag describing whether a component is taxable or not. | | `PricingScheme` | [`PricingScheme`](../../doc/models/pricing-scheme.md) | Required | The identifier for the pricing scheme. See [Product Components](https://help.chargify.com/products/product-components.html) for an overview of pricing schemes. | | `Prices` | [`List`](../../doc/models/price.md) | Optional | (Not required for ‘per_unit’ pricing schemes) One or more price brackets. See [Price Bracket Rules](https://maxio.zendesk.com/hc/en-us/articles/24261149166733-Component-Pricing-Schemes#price-bracket-rules) for an overview of how price brackets work for different pricing schemes. | @@ -26,27 +26,35 @@ | `DisplayOnHostedPage` | `bool?` | Optional | - | | `AllowFractionalQuantities` | `bool?` | Optional | - | | `PublicSignupPageIds` | `List` | Optional | - | -| `Interval` | `int?` | Optional | The numerical interval. i.e. an interval of ‘30’ coupled with an interval_unit of day would mean this component's default price point would renew every 30 days. This property is only available for sites with Multifrequency enabled. | +| `Interval` | `int?` | Optional | The numerical interval. e.g., an interval of ‘30’ coupled with an interval_unit of day would mean this component’s default price point would renew every 30 days. This property is only available for sites with Multifrequency enabled. | | `IntervalUnit` | [`IntervalUnit?`](../../doc/models/interval-unit.md) | Optional | A string representing the interval unit for this component's default price point, either month or day. This property is only available for sites with Multifrequency enabled. | +| `UnspscCode` | `string` | Optional | (Optional) Custom UNSPSC commodity code for Level 3/CEDP payment data. When set, this value is sent as the commodity code on invoice line items for this component instead of the default derived from item_category. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using AdvancedBilling.Standard.Models.Containers; +using System.Collections.Generic; + +QuantityBasedComponent quantityBasedComponent = new QuantityBasedComponent { - "name": "name8", - "unit_name": "unit_name0", - "description": "description8", - "handle": "handle4", - "taxable": false, - "pricing_scheme": "per_unit", - "prices": [ + Name = "name0", + UnitName = "unit_name2", + PricingScheme = PricingScheme.PerUnit, + Description = "description0", + Handle = "handle6", + Taxable = false, + Prices = new List { - "starting_quantity": 242, - "ending_quantity": 40, - "unit_price": 23.26 - } - ], - "upgrade_charge": "full" -} + new Price + { + StartingQuantity = PriceStartingQuantity.FromNumber(242), + UnitPrice = PriceUnitPrice.FromPrecision(23.26), + EndingQuantity = PriceEndingQuantity.FromNumber(40), + }, + }, + UpgradeCharge = CreditType.Full, +}; ``` diff --git a/doc/models/reactivate-subscription-group-request.md b/doc/models/reactivate-subscription-group-request.md index 0cb75150..45937a81 100644 --- a/doc/models/reactivate-subscription-group-request.md +++ b/doc/models/reactivate-subscription-group-request.md @@ -12,12 +12,15 @@ | `Resume` | `bool?` | Optional | - | | `ResumeMembers` | `bool?` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +ReactivateSubscriptionGroupRequest reactivateSubscriptionGroupRequest = new ReactivateSubscriptionGroupRequest { - "resume": false, - "resume_members": false -} + Resume = false, + ResumeMembers = false, +}; ``` diff --git a/doc/models/reactivate-subscription-group-response.md b/doc/models/reactivate-subscription-group-response.md index 5219868d..04625802 100644 --- a/doc/models/reactivate-subscription-group-response.md +++ b/doc/models/reactivate-subscription-group-response.md @@ -19,18 +19,24 @@ | `State` | `string` | Optional | - | | `CancelAtEndOfPeriod` | `bool?` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Collections.Generic; + +ReactivateSubscriptionGroupResponse reactivateSubscriptionGroupResponse = new ReactivateSubscriptionGroupResponse { - "uid": "uid4", - "scheme": 66, - "customer_id": 86, - "payment_profile_id": 250, - "subscription_ids": [ - 196, - 197 - ] -} + Uid = "uid0", + Scheme = 10, + CustomerId = 30, + PaymentProfileId = 62, + SubscriptionIds = new List + { + 140, + 141, + 142, + }, +}; ``` diff --git a/doc/models/reactivate-subscription-request.md b/doc/models/reactivate-subscription-request.md index db7fae5f..e0d0e518 100644 --- a/doc/models/reactivate-subscription-request.md +++ b/doc/models/reactivate-subscription-request.md @@ -9,24 +9,28 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `CalendarBilling` | [`ReactivationBilling`](../../doc/models/reactivation-billing.md) | Optional | These values are only applicable to subscriptions using calendar billing | +| `CalendarBilling` | [`ReactivationBilling`](../../doc/models/reactivation-billing.md) | Optional | These values are only applicable to subscriptions using calendar billing. | | `IncludeTrial` | `bool?` | Optional | If `true` is sent, the reactivated Subscription will include a trial if one is available. If `false` is sent, the trial period will be ignored. | | `PreserveBalance` | `bool?` | Optional | If `true` is passed, the existing subscription balance will NOT be cleared/reset before adding the additional reactivation charges. | | `CouponCode` | `string` | Optional | The coupon code to be applied during reactivation. | | `UseCreditsAndPrepayments` | `bool?` | Optional | If true is sent, Advanced Billing will use service credits and prepayments upon reactivation. If false is sent, the service credits and prepayments will be ignored. | | `Resume` | [`ReactivateSubscriptionRequestResume`](../../doc/models/containers/reactivate-subscription-request-resume.md) | Optional | This is a container for one-of cases. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +ReactivateSubscriptionRequest reactivateSubscriptionRequest = new ReactivateSubscriptionRequest { - "calendar_billing": { - "reactivation_charge": "prorated" - }, - "include_trial": false, - "preserve_balance": false, - "coupon_code": "coupon_code6", - "use_credits_and_prepayments": false -} + CalendarBilling = new ReactivationBilling + { + ReactivationCharge = ReactivationCharge.Prorated, + }, + IncludeTrial = false, + PreserveBalance = false, + CouponCode = "coupon_code2", + UseCreditsAndPrepayments = false, +}; ``` diff --git a/doc/models/reactivation-billing.md b/doc/models/reactivation-billing.md index 74a42a50..2b25f9e5 100644 --- a/doc/models/reactivation-billing.md +++ b/doc/models/reactivation-billing.md @@ -1,7 +1,7 @@ # Reactivation Billing -These values are only applicable to subscriptions using calendar billing +These values are only applicable to subscriptions using calendar billing. ## Structure @@ -11,13 +11,16 @@ These values are only applicable to subscriptions using calendar billing | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `ReactivationCharge` | [`ReactivationCharge?`](../../doc/models/reactivation-charge.md) | Optional | You may choose how to handle the reactivation charge for that subscription: 1) `prorated` A prorated charge for the product price will be attempted for to complete the period 2) `immediate` A full-price charge for the product price will be attempted immediately 3) `delayed` A full-price charge for the product price will be attempted at the next renewal

**Default**: `ReactivationCharge.prorated` | +| `ReactivationCharge` | [`ReactivationCharge?`](../../doc/models/reactivation-charge.md) | Optional | You may choose how to handle the reactivation charge for that subscription: 1) `prorated` A prorated charge for the product price will be attempted to complete the period 2) `immediate` A full-price charge for the product price will be attempted immediately 3) `delayed` A full-price charge for the product price will be attempted at the next renewal.

**Default**: `ReactivationCharge.prorated` | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +ReactivationBilling reactivationBilling = new ReactivationBilling { - "reactivation_charge": "prorated" -} + ReactivationCharge = ReactivationCharge.Prorated, +}; ``` diff --git a/doc/models/reactivation-charge.md b/doc/models/reactivation-charge.md index a661edd3..24f8cb09 100644 --- a/doc/models/reactivation-charge.md +++ b/doc/models/reactivation-charge.md @@ -1,7 +1,7 @@ # Reactivation Charge -You may choose how to handle the reactivation charge for that subscription: 1) `prorated` A prorated charge for the product price will be attempted for to complete the period 2) `immediate` A full-price charge for the product price will be attempted immediately 3) `delayed` A full-price charge for the product price will be attempted at the next renewal +You may choose how to handle the reactivation charge for that subscription: 1) `prorated` A prorated charge for the product price will be attempted to complete the period 2) `immediate` A full-price charge for the product price will be attempted immediately 3) `delayed` A full-price charge for the product price will be attempted at the next renewal. ## Enumeration @@ -15,3 +15,11 @@ You may choose how to handle the reactivation charge for that subscription: 1) ` | `Immediate` | | `Delayed` | +## Example + +```csharp +using AdvancedBilling.Standard.Models; + +ReactivationCharge reactivationCharge = ReactivationCharge.Immediate; +``` + diff --git a/doc/models/read-events-count-input.md b/doc/models/read-events-count-input.md index 36dc136c..a6dd1605 100644 --- a/doc/models/read-events-count-input.md +++ b/doc/models/read-events-count-input.md @@ -13,8 +13,8 @@ Input structure for the method ReadEventsCount | --- | --- | --- | --- | | `Page` | `int?` | Optional | Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.
Use in query `page=1`.

**Default**: `1`

**Constraints**: `>= 1` | | `PerPage` | `int?` | Optional | This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.
Use in query `per_page=200`.

**Default**: `20`

**Constraints**: `<= 200` | -| `SinceId` | `long?` | Optional | Returns events with an id greater than or equal to the one specified | -| `MaxId` | `long?` | Optional | Returns events with an id less than or equal to the one specified | +| `SinceId` | `long?` | Optional | Returns events with an id greater than or equal to the one specified. | +| `MaxId` | `long?` | Optional | Returns events with an id less than or equal to the one specified. | | `Direction` | [`Direction?`](../../doc/models/direction.md) | Optional | The sort direction of the returned events.

**Default**: `Direction.desc` | | `Filter` | [`List`](../../doc/models/event-key.md) | Optional | You can pass multiple event keys after comma.
Use in query `filter=signup_success,payment_success`. | diff --git a/doc/models/reason-code-response.md b/doc/models/reason-code-response.md index a4e376db..8cb895c3 100644 --- a/doc/models/reason-code-response.md +++ b/doc/models/reason-code-response.md @@ -11,17 +11,21 @@ | --- | --- | --- | --- | | `ReasonCode` | [`ReasonCode`](../../doc/models/reason-code.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +ReasonCodeResponse reasonCodeResponse = new ReasonCodeResponse { - "reason_code": { - "id": 240, - "site_id": 166, - "code": "code4", - "description": "description6", - "position": 14 - } -} + ReasonCode = new ReasonCode + { + Id = 240, + SiteId = 166, + Code = "code4", + Description = "description6", + Position = 14, + }, +}; ``` diff --git a/doc/models/reason-code.md b/doc/models/reason-code.md index 5775387f..458229c1 100644 --- a/doc/models/reason-code.md +++ b/doc/models/reason-code.md @@ -17,15 +17,18 @@ | `CreatedAt` | `DateTimeOffset?` | Optional | - | | `UpdatedAt` | `DateTimeOffset?` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +ReasonCode reasonCode = new ReasonCode { - "id": 164, - "site_id": 90, - "code": "code0", - "description": "description2", - "position": 194 -} + Id = 174, + SiteId = 100, + Code = "code4", + Description = "description6", + Position = 204, +}; ``` diff --git a/doc/models/record-payment-request.md b/doc/models/record-payment-request.md index b812f58b..1ccab433 100644 --- a/doc/models/record-payment-request.md +++ b/doc/models/record-payment-request.md @@ -11,16 +11,20 @@ | --- | --- | --- | --- | | `Payment` | [`CreatePayment`](../../doc/models/create-payment.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +RecordPaymentRequest recordPaymentRequest = new RecordPaymentRequest { - "payment": { - "amount": "amount8", - "memo": "memo0", - "payment_details": "payment_details6", - "payment_method": "cash" - } -} + Payment = new CreatePayment + { + Amount = "amount8", + Memo = "memo0", + PaymentDetails = "payment_details6", + PaymentMethod = InvoicePaymentMethodType.Cash, + }, +}; ``` diff --git a/doc/models/record-payment-response.md b/doc/models/record-payment-response.md index eff73257..01378ee3 100644 --- a/doc/models/record-payment-response.md +++ b/doc/models/record-payment-response.md @@ -12,35 +12,30 @@ | `PaidInvoices` | [`List`](../../doc/models/paid-invoice.md) | Optional | - | | `Prepayment` | [`InvoicePrePayment`](../../doc/models/invoice-pre-payment.md) | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Collections.Generic; + +RecordPaymentResponse recordPaymentResponse = new RecordPaymentResponse { - "paid_invoices": [ + PaidInvoices = new List { - "invoice_id": "invoice_id8", - "status": "draft", - "due_amount": "due_amount0", - "paid_amount": "paid_amount0" + new PaidInvoice + { + InvoiceId = "invoice_id8", + Status = InvoiceStatus.Draft, + DueAmount = "due_amount0", + PaidAmount = "paid_amount0", + }, }, + Prepayment = new InvoicePrePayment { - "invoice_id": "invoice_id8", - "status": "draft", - "due_amount": "due_amount0", - "paid_amount": "paid_amount0" + SubscriptionId = 148, + AmountInCents = 124L, + EndingBalanceInCents = 164L, }, - { - "invoice_id": "invoice_id8", - "status": "draft", - "due_amount": "due_amount0", - "paid_amount": "paid_amount0" - } - ], - "prepayment": { - "subscription_id": 148, - "amount_in_cents": 124, - "ending_balance_in_cents": 164 - } -} +}; ``` diff --git a/doc/models/recurring-scheme.md b/doc/models/recurring-scheme.md index 547307c3..dbbfa92a 100644 --- a/doc/models/recurring-scheme.md +++ b/doc/models/recurring-scheme.md @@ -13,3 +13,11 @@ | `RecurIndefinitely` | | `RecurWithDuration` | +## Example + +```csharp +using AdvancedBilling.Standard.Models; + +RecurringScheme recurringScheme = RecurringScheme.RecurIndefinitely; +``` + diff --git a/doc/models/referral-code.md b/doc/models/referral-code.md index c02c97cd..562aebb2 100644 --- a/doc/models/referral-code.md +++ b/doc/models/referral-code.md @@ -14,14 +14,17 @@ | `SubscriptionId` | `int?` | Optional | - | | `Code` | `string` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +ReferralCode referralCode = new ReferralCode { - "id": 42, - "site_id": 224, - "subscription_id": 152, - "code": "code6" -} + Id = 186, + SiteId = 112, + SubscriptionId = 40, + Code = "code6", +}; ``` diff --git a/doc/models/referral-validation-response.md b/doc/models/referral-validation-response.md index b5c7fa93..42b5f9c8 100644 --- a/doc/models/referral-validation-response.md +++ b/doc/models/referral-validation-response.md @@ -11,16 +11,20 @@ | --- | --- | --- | --- | | `ReferralCode` | [`ReferralCode`](../../doc/models/referral-code.md) | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +ReferralValidationResponse referralValidationResponse = new ReferralValidationResponse { - "referral_code": { - "id": 46, - "site_id": 228, - "subscription_id": 156, - "code": "code0" - } -} + ReferralCode = new ReferralCode + { + Id = 46, + SiteId = 228, + SubscriptionId = 156, + Code = "code0", + }, +}; ``` diff --git a/doc/models/refund-consolidated-invoice.md b/doc/models/refund-consolidated-invoice.md index 37ccf7a6..b5069509 100644 --- a/doc/models/refund-consolidated-invoice.md +++ b/doc/models/refund-consolidated-invoice.md @@ -1,7 +1,7 @@ # Refund Consolidated Invoice -Refund consolidated invoice +Refund consolidated invoice. ## Structure @@ -18,19 +18,27 @@ Refund consolidated invoice | `ApplyCredit` | `bool?` | Optional | If set to true, creates credit and applies it to an invoice. Defaults to `false`. | | `Amount` | `string` | Optional | The amount of payment to be refunded in decimal format. Example: "10.50". This will default to the full amount of the payment if not provided. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using AdvancedBilling.Standard.Models.Containers; +using System.Collections.Generic; + +RefundConsolidatedInvoice refundConsolidatedInvoice = new RefundConsolidatedInvoice { - "memo": "memo0", - "payment_id": 46, - "segment_uids": [ - "String0", - "String1" - ], - "external": false, - "apply_credit": false, - "amount": "amount8" -} + Memo = "memo0", + PaymentId = 138, + SegmentUids = RefundConsolidatedInvoiceSegmentUids.FromListOfString( + new List + { + "String0", + "String1", + } + ), + External = false, + ApplyCredit = false, + Amount = "amount8", +}; ``` diff --git a/doc/models/refund-invoice-event-data.md b/doc/models/refund-invoice-event-data.md index 7ccee4c6..cb88c7f8 100644 --- a/doc/models/refund-invoice-event-data.md +++ b/doc/models/refund-invoice-event-data.md @@ -12,7 +12,7 @@ Example schema for an `refund_invoice` event | Name | Type | Tags | Description | | --- | --- | --- | --- | | `ApplyCredit` | `bool` | Required | If true, credit was created and applied it to the invoice. | -| `ConsolidationLevel` | [`InvoiceConsolidationLevel?`](../../doc/models/invoice-consolidation-level.md) | Optional | Consolidation level of the invoice, which is applicable to invoice consolidation. It will hold one of the following values:

* "none": A normal invoice with no consolidation.
* "child": An invoice segment which has been combined into a consolidated invoice.
* "parent": A consolidated invoice, whose contents are composed of invoice segments.

"Parent" invoices do not have lines of their own, but they have subtotals and totals which aggregate the member invoice segments.

See also the [invoice consolidation documentation](https://maxio.zendesk.com/hc/en-us/articles/24252269909389-Invoice-Consolidation). | +| `ConsolidationLevel` | [`InvoiceConsolidationLevel?`](../../doc/models/invoice-consolidation-level.md) | Optional | Consolidation level of the invoice, which is applicable to invoice consolidation. It will hold one of the following values:

* "none": A normal invoice with no consolidation.
* "child": An invoice segment which has been combined into a consolidated invoice.
* "parent": A consolidated invoice, whose contents are composed of invoice segments.

"Parent" invoices do not have lines of their own, but they have subtotals and totals which aggregate the member invoice segments.

See also the [invoice consolidation documentation](https://maxio.zendesk.com/hc/en-us/articles/24252269909389-Invoice-Consolidation). | | `CreditNoteAttributes` | [`CreditNote`](../../doc/models/credit-note.md) | Required | - | | `Memo` | `string` | Optional | The refund memo. | | `OriginalAmount` | `string` | Optional | The full, original amount of the refund. | @@ -21,25 +21,32 @@ Example schema for an `refund_invoice` event | `RefundId` | `int` | Required | The ID of the refund transaction. | | `TransactionTime` | `DateTimeOffset` | Required | The time the refund was applied, in ISO 8601 format, i.e. "2019-06-07T17:20:06Z" | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Globalization; + +RefundInvoiceEventData refundInvoiceEventData = new RefundInvoiceEventData { - "apply_credit": false, - "consolidation_level": "parent", - "credit_note_attributes": { - "uid": "uid2", - "site_id": 72, - "customer_id": 184, - "subscription_id": 0, - "number": "number0" - }, - "memo": "memo0", - "original_amount": "original_amount0", - "payment_id": 114, - "refund_amount": "refund_amount8", - "refund_id": 158, - "transaction_time": "2016-03-13T12:52:32.123Z" -} + ApplyCredit = false, + CreditNoteAttributes = new CreditNote + { + Uid = "uid2", + SiteId = 72, + CustomerId = 184, + SubscriptionId = 0, + Number = "number0", + }, + PaymentId = 140, + RefundAmount = "refund_amount8", + RefundId = 184, + TransactionTime = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + ConsolidationLevel = InvoiceConsolidationLevel.Parent, + Memo = "memo0", + OriginalAmount = "original_amount0", +}; ``` diff --git a/doc/models/refund-invoice-event.md b/doc/models/refund-invoice-event.md index e54a3206..61f07c39 100644 --- a/doc/models/refund-invoice-event.md +++ b/doc/models/refund-invoice-event.md @@ -15,41 +15,52 @@ | `EventType` | [`InvoiceEventType`](../../doc/models/invoice-event-type.md) | Required | **Default**: `InvoiceEventType.refund_invoice` | | `EventData` | [`RefundInvoiceEventData`](../../doc/models/refund-invoice-event-data.md) | Required | Example schema for an `refund_invoice` event | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Globalization; + +RefundInvoiceEvent refundInvoiceEvent = new RefundInvoiceEvent { - "id": 54, - "timestamp": "2016-03-13T12:52:32.123Z", - "invoice": { - "issue_date": "2024-01-01", - "due_date": "2024-01-01", - "paid_date": "2024-01-01", - "public_url_expires_on": "2024-01-21", - "id": 166, - "uid": "uid6", - "site_id": 92, - "customer_id": 204, - "subscription_id": 20 - }, - "event_type": "refund_invoice", - "event_data": { - "apply_credit": false, - "consolidation_level": "child", - "credit_note_attributes": { - "uid": "uid2", - "site_id": 72, - "customer_id": 184, - "subscription_id": 0, - "number": "number0" + Id = 132L, + Timestamp = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + Invoice = new Invoice + { + Id = 166L, + Uid = "uid6", + SiteId = 92, + CustomerId = 204, + SubscriptionId = 20, + IssueDate = DateTime.Parse("2024-01-01"), + DueDate = DateTime.Parse("2024-01-01"), + PaidDate = DateTime.Parse("2024-01-01"), + PublicUrlExpiresOn = DateTime.Parse("2024-01-21"), + }, + EventType = InvoiceEventType.RefundInvoice, + EventData = new RefundInvoiceEventData + { + ApplyCredit = false, + CreditNoteAttributes = new CreditNote + { + Uid = "uid2", + SiteId = 72, + CustomerId = 184, + SubscriptionId = 0, + Number = "number0", + }, + PaymentId = 204, + RefundAmount = "refund_amount8", + RefundId = 248, + TransactionTime = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + ConsolidationLevel = InvoiceConsolidationLevel.Child, + Memo = "memo0", + OriginalAmount = "original_amount0", }, - "memo": "memo0", - "original_amount": "original_amount0", - "payment_id": 204, - "refund_amount": "refund_amount8", - "refund_id": 248, - "transaction_time": "2016-03-13T12:52:32.123Z" - } -} +}; ``` diff --git a/doc/models/refund-invoice-request.md b/doc/models/refund-invoice-request.md index a5203a08..273397b0 100644 --- a/doc/models/refund-invoice-request.md +++ b/doc/models/refund-invoice-request.md @@ -11,18 +11,25 @@ | --- | --- | --- | --- | | `Refund` | [`RefundInvoiceRequestRefund`](../../doc/models/containers/refund-invoice-request-refund.md) | Required | This is a container for any-of cases. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using AdvancedBilling.Standard.Models.Containers; + +RefundInvoiceRequest refundInvoiceRequest = new RefundInvoiceRequest { - "refund": { - "amount": "amount8", - "memo": "memo0", - "payment_id": 0, - "external": false, - "apply_credit": false, - "void_invoice": false - } -} + Refund = RefundInvoiceRequestRefund.FromRefundInvoice( + new RefundInvoice + { + Amount = "amount8", + Memo = "memo0", + PaymentId = 0, + External = false, + ApplyCredit = false, + VoidInvoice = false, + } + ), +}; ``` diff --git a/doc/models/refund-invoice.md b/doc/models/refund-invoice.md index 0d7af38b..7a49f69d 100644 --- a/doc/models/refund-invoice.md +++ b/doc/models/refund-invoice.md @@ -16,18 +16,21 @@ Refund an invoice or a segment of a consolidated invoice. | `PaymentId` | `int` | Required | The ID of the payment to be refunded | | `External` | `bool?` | Optional | Flag that marks refund as external (no money is returned to the customer). Defaults to `false`. | | `ApplyCredit` | `bool?` | Optional | If set to true, creates credit and applies it to an invoice. Defaults to `false`. | -| `VoidInvoice` | `bool?` | Optional | If `apply_credit` set to false and refunding full amount, if `void_invoice` set to true, invoice will be voided after refund. Defaults to `false`. | +| `VoidInvoice` | `bool?` | Optional | If `apply_credit` is set to false and refunding full amount, if `void_invoice` is set to true, invoice will be voided after refund. Defaults to `false`. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +RefundInvoice refundInvoice = new RefundInvoice { - "amount": "amount8", - "memo": "memo0", - "payment_id": 0, - "external": false, - "apply_credit": false, - "void_invoice": false -} + Amount = "amount2", + Memo = "memo4", + PaymentId = 36, + External = false, + ApplyCredit = false, + VoidInvoice = false, +}; ``` diff --git a/doc/models/refund-prepayment-base-errors-response-exception.md b/doc/models/refund-prepayment-base-errors-response-exception.md index 142e3825..8786f7e7 100644 --- a/doc/models/refund-prepayment-base-errors-response-exception.md +++ b/doc/models/refund-prepayment-base-errors-response-exception.md @@ -13,20 +13,20 @@ Errors returned on creating a refund prepayment when bad request | --- | --- | --- | --- | | `Errors` | [`RefundPrepaymentBaseRefundError`](../../doc/models/refund-prepayment-base-refund-error.md) | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +try { - "errors": { - "refund": { - "base": [ - { - "key1": "val1", - "key2": "val2" - } - ] + // make the API call +} +catch (ApiException e) +{ + if (e is RefundPrepaymentBaseErrorsResponseException) + { + // TODO: Handle RefundPrepaymentBaseErrorsResponseException + Console.WriteLine(e.Message); } - } } ``` diff --git a/doc/models/refund-prepayment-base-refund-error.md b/doc/models/refund-prepayment-base-refund-error.md index 7a2244f5..1780199c 100644 --- a/doc/models/refund-prepayment-base-refund-error.md +++ b/doc/models/refund-prepayment-base-refund-error.md @@ -11,18 +11,22 @@ | --- | --- | --- | --- | | `Refund` | [`BaseRefundError`](../../doc/models/base-refund-error.md) | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using AdvancedBilling.Standard.Utilities; +using System.Collections.Generic; + +RefundPrepaymentBaseRefundError refundPrepaymentBaseRefundError = new RefundPrepaymentBaseRefundError { - "refund": { - "base": [ - { - "key1": "val1", - "key2": "val2" - } - ] - } -} + Refund = new BaseRefundError + { + MBase = new List + { + ApiHelper.JsonDeserialize("{\"key1\":\"val1\",\"key2\":\"val2\"}"), + }, + }, +}; ``` diff --git a/doc/models/refund-prepayment-request.md b/doc/models/refund-prepayment-request.md index 78932497..a3b5992f 100644 --- a/doc/models/refund-prepayment-request.md +++ b/doc/models/refund-prepayment-request.md @@ -11,16 +11,21 @@ | --- | --- | --- | --- | | `Refund` | [`RefundPrepayment`](../../doc/models/refund-prepayment.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using AdvancedBilling.Standard.Models.Containers; + +RefundPrepaymentRequest refundPrepaymentRequest = new RefundPrepaymentRequest { - "refund": { - "amount_in_cents": 132, - "amount": "String1", - "memo": "memo2", - "external": false - } -} + Refund = new RefundPrepayment + { + AmountInCents = 132L, + Amount = RefundPrepaymentAmount.FromString("String1"), + Memo = "memo2", + External = false, + }, +}; ``` diff --git a/doc/models/refund-prepayment.md b/doc/models/refund-prepayment.md index 5fcefae7..260aea00 100644 --- a/doc/models/refund-prepayment.md +++ b/doc/models/refund-prepayment.md @@ -14,14 +14,18 @@ | `Memo` | `string` | Required | **Constraints**: *Minimum Length*: `1` | | `External` | `bool?` | Optional | Specify the type of refund you wish to initiate. When the prepayment is external, the `external` flag is optional. But if the prepayment was made through a payment profile, the `external` flag is required. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using AdvancedBilling.Standard.Models.Containers; + +RefundPrepayment refundPrepayment = new RefundPrepayment { - "amount_in_cents": 110, - "amount": "String3", - "memo": "memo4", - "external": false -} + AmountInCents = 22L, + Amount = RefundPrepaymentAmount.FromString("String1"), + Memo = "memo2", + External = false, +}; ``` diff --git a/doc/models/refund-success.md b/doc/models/refund-success.md index 8703318b..f11b01a3 100644 --- a/doc/models/refund-success.md +++ b/doc/models/refund-success.md @@ -13,13 +13,16 @@ | `GatewayTransactionId` | `int` | Required | - | | `ProductId` | `int` | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +RefundSuccess refundSuccess = new RefundSuccess { - "refund_id": 12, - "gateway_transaction_id": 182, - "product_id": 168 -} + RefundId = 34, + GatewayTransactionId = 160, + ProductId = 190, +}; ``` diff --git a/doc/models/register.md b/doc/models/register.md index f13c00f9..aee7cf91 100644 --- a/doc/models/register.md +++ b/doc/models/register.md @@ -12,16 +12,19 @@ | `Id` | `int?` | Optional | - | | `MaxioId` | `string` | Optional | - | | `Name` | `string` | Optional | - | -| `CurrencyCode` | `string` | Optional | The ISO 4217 currency code (3 character string) representing the currency of invoice transaction. | +| `CurrencyCode` | `string` | Optional | The ISO 4217 currency code (3 character string) representing the currency of an invoice transaction. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +Register register = new Register { - "id": 90, - "maxio_id": "maxio_id0", - "name": "name6", - "currency_code": "currency_code2" -} + Id = 54, + MaxioId = "maxio_id4", + Name = "name2", + CurrencyCode = "currency_code2", +}; ``` diff --git a/doc/models/remove-payment-event-data.md b/doc/models/remove-payment-event-data.md index 31f02e7d..a95d4dcc 100644 --- a/doc/models/remove-payment-event-data.md +++ b/doc/models/remove-payment-event-data.md @@ -19,19 +19,29 @@ Example schema for an `remove_payment` event | `PaymentMethod` | [`InvoiceEventPayment`](../../doc/models/containers/invoice-event-payment.md) | Required | A nested data structure detailing the method of payment | | `Prepayment` | `bool` | Required | The flag that shows whether the original payment was a prepayment or not | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using AdvancedBilling.Standard.Models.Containers; +using System.Globalization; + +RemovePaymentEventData removePaymentEventData = new RemovePaymentEventData { - "transaction_id": 180, - "memo": "memo0", - "applied_amount": "applied_amount2", - "transaction_time": "2016-03-13T12:52:32.123Z", - "payment_method": { - "type": "apple_pay" - }, - "prepayment": false, - "original_amount": "original_amount0" -} + TransactionId = 20, + Memo = "memo4", + AppliedAmount = "applied_amount8", + TransactionTime = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + PaymentMethod = InvoiceEventPayment.FromPaymentMethodApplePay( + new PaymentMethodApplePay + { + Type = InvoiceEventPaymentMethod.ApplePay, + } + ), + Prepayment = false, + OriginalAmount = "original_amount4", +}; ``` diff --git a/doc/models/remove-payment-event.md b/doc/models/remove-payment-event.md index 2423b57d..b7313c16 100644 --- a/doc/models/remove-payment-event.md +++ b/doc/models/remove-payment-event.md @@ -15,35 +15,49 @@ | `EventType` | [`InvoiceEventType`](../../doc/models/invoice-event-type.md) | Required | **Default**: `InvoiceEventType.remove_payment` | | `EventData` | [`RemovePaymentEventData`](../../doc/models/remove-payment-event-data.md) | Required | Example schema for an `remove_payment` event | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using AdvancedBilling.Standard.Models.Containers; +using System.Globalization; + +RemovePaymentEvent removePaymentEvent = new RemovePaymentEvent { - "id": 236, - "timestamp": "2016-03-13T12:52:32.123Z", - "invoice": { - "issue_date": "2024-01-01", - "due_date": "2024-01-01", - "paid_date": "2024-01-01", - "public_url_expires_on": "2024-01-21", - "id": 166, - "uid": "uid6", - "site_id": 92, - "customer_id": 204, - "subscription_id": 20 - }, - "event_type": "remove_payment", - "event_data": { - "transaction_id": 78, - "memo": "memo0", - "applied_amount": "applied_amount2", - "transaction_time": "2016-03-13T12:52:32.123Z", - "payment_method": { - "type": "apple_pay" + Id = 132L, + Timestamp = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + Invoice = new Invoice + { + Id = 166L, + Uid = "uid6", + SiteId = 92, + CustomerId = 204, + SubscriptionId = 20, + IssueDate = DateTime.Parse("2024-01-01"), + DueDate = DateTime.Parse("2024-01-01"), + PaidDate = DateTime.Parse("2024-01-01"), + PublicUrlExpiresOn = DateTime.Parse("2024-01-21"), + }, + EventType = InvoiceEventType.RemovePayment, + EventData = new RemovePaymentEventData + { + TransactionId = 78, + Memo = "memo0", + AppliedAmount = "applied_amount2", + TransactionTime = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + PaymentMethod = InvoiceEventPayment.FromPaymentMethodApplePay( + new PaymentMethodApplePay + { + Type = InvoiceEventPaymentMethod.ApplePay, + } + ), + Prepayment = false, + OriginalAmount = "original_amount0", }, - "prepayment": false, - "original_amount": "original_amount0" - } -} +}; ``` diff --git a/doc/models/renewal-preview-component.md b/doc/models/renewal-preview-component.md index 483b8739..99df03e9 100644 --- a/doc/models/renewal-preview-component.md +++ b/doc/models/renewal-preview-component.md @@ -13,13 +13,17 @@ | `Quantity` | `int?` | Optional | The quantity for which you wish to preview billing. This is useful if you want to preview a predicted, higher usage value than is currently present on the subscription.

This quantity represents:

- Whether or not an on/off component is enabled - use 0 for disabled or 1 for enabled
- The desired allocated_quantity for a quantity-based component
- The desired unit_balance for a metered component
- The desired metric quantity for an events-based component | | `PricePointId` | [`RenewalPreviewComponentPricePointId`](../../doc/models/containers/renewal-preview-component-price-point-id.md) | Optional | This is a container for one-of cases. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using AdvancedBilling.Standard.Models.Containers; + +RenewalPreviewComponent renewalPreviewComponent = new RenewalPreviewComponent { - "component_id": "String7", - "quantity": 174, - "price_point_id": "String1" -} + ComponentId = RenewalPreviewComponentComponentId.FromString("String1"), + Quantity = 254, + PricePointId = RenewalPreviewComponentPricePointId.FromString("String7"), +}; ``` diff --git a/doc/models/renewal-preview-line-item.md b/doc/models/renewal-preview-line-item.md index 6c12dff4..0b073837 100644 --- a/doc/models/renewal-preview-line-item.md +++ b/doc/models/renewal-preview-line-item.md @@ -24,15 +24,18 @@ | `PeriodRangeStart` | `string` | Optional | - | | `PeriodRangeEnd` | `string` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +RenewalPreviewLineItem renewalPreviewLineItem = new RenewalPreviewLineItem { - "transaction_type": "charge", - "kind": "prepaid_usage_component", - "amount_in_cents": 154, - "memo": "memo0", - "discount_amount_in_cents": 214 -} + TransactionType = LineItemTransactionType.Adjustment, + Kind = LineItemKind.PrepaidUsageComponent, + AmountInCents = 32L, + Memo = "memo0", + DiscountAmountInCents = 228L, +}; ``` diff --git a/doc/models/renewal-preview-request.md b/doc/models/renewal-preview-request.md index 033a1bf0..c0cb61e9 100644 --- a/doc/models/renewal-preview-request.md +++ b/doc/models/renewal-preview-request.md @@ -9,29 +9,26 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | -| `Components` | [`List`](../../doc/models/renewal-preview-component.md) | Optional | An optional array of component definitions to preview. Providing any component definitions here will override the actual components on the subscription (and their quantities), and the billing preview will contain only these components (in addition to any product base fees). | +| `Components` | [`List`](../../doc/models/renewal-preview-component.md) | Optional | (Optional) Array of component definitions to preview. Providing any component definitions here will override the actual components on the subscription (and their quantities), and the billing preview will contain only these components (in addition to any product base fees). | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using AdvancedBilling.Standard.Models.Containers; +using System.Collections.Generic; + +RenewalPreviewRequest renewalPreviewRequest = new RenewalPreviewRequest { - "components": [ - { - "component_id": "String5", - "quantity": 210, - "price_point_id": "String3" - }, + Components = new List { - "component_id": "String5", - "quantity": 210, - "price_point_id": "String3" + new RenewalPreviewComponent + { + ComponentId = RenewalPreviewComponentComponentId.FromString("String5"), + Quantity = 210, + PricePointId = RenewalPreviewComponentPricePointId.FromString("String3"), + }, }, - { - "component_id": "String5", - "quantity": 210, - "price_point_id": "String3" - } - ] -} +}; ``` diff --git a/doc/models/renewal-preview-response.md b/doc/models/renewal-preview-response.md index 28278352..6054aa7d 100644 --- a/doc/models/renewal-preview-response.md +++ b/doc/models/renewal-preview-response.md @@ -11,17 +11,24 @@ | --- | --- | --- | --- | | `RenewalPreview` | [`RenewalPreview`](../../doc/models/renewal-preview.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Globalization; + +RenewalPreviewResponse renewalPreviewResponse = new RenewalPreviewResponse { - "renewal_preview": { - "next_assessment_at": "2016-03-13T12:52:32.123Z", - "subtotal_in_cents": 132, - "total_tax_in_cents": 0, - "total_discount_in_cents": 250, - "total_in_cents": 20 - } -} + RenewalPreview = new RenewalPreview + { + NextAssessmentAt = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + SubtotalInCents = 132L, + TotalTaxInCents = 0L, + TotalDiscountInCents = 250L, + TotalInCents = 20L, + }, +}; ``` diff --git a/doc/models/renewal-preview.md b/doc/models/renewal-preview.md index b3dc5bdd..4a046d79 100644 --- a/doc/models/renewal-preview.md +++ b/doc/models/renewal-preview.md @@ -19,15 +19,21 @@ | `UncalculatedTaxes` | `bool?` | Optional | A boolean indicating whether or not additional taxes will be calculated at the time of renewal. This will be true if you are using Avalara and the address of the subscription is in one of your defined taxable regions. | | `LineItems` | [`List`](../../doc/models/renewal-preview-line-item.md) | Optional | An array of objects representing the individual transactions that will be created at the next renewal | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Globalization; + +RenewalPreview renewalPreview = new RenewalPreview { - "next_assessment_at": "2016-03-13T12:52:32.123Z", - "subtotal_in_cents": 160, - "total_tax_in_cents": 28, - "total_discount_in_cents": 34, - "total_in_cents": 48 -} + NextAssessmentAt = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + SubtotalInCents = 102L, + TotalTaxInCents = 226L, + TotalDiscountInCents = 232L, + TotalInCents = 246L, +}; ``` diff --git a/doc/models/replay-webhooks-request.md b/doc/models/replay-webhooks-request.md index af0e5226..4a826c03 100644 --- a/doc/models/replay-webhooks-request.md +++ b/doc/models/replay-webhooks-request.md @@ -11,13 +11,20 @@ | --- | --- | --- | --- | | `Ids` | `List` | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Collections.Generic; + +ReplayWebhooksRequest replayWebhooksRequest = new ReplayWebhooksRequest { - "ids": [ - 15 - ] -} + Ids = new List + { + 209L, + 210L, + 211L, + }, +}; ``` diff --git a/doc/models/replay-webhooks-response.md b/doc/models/replay-webhooks-response.md index 8228b20f..edadc1cf 100644 --- a/doc/models/replay-webhooks-response.md +++ b/doc/models/replay-webhooks-response.md @@ -11,11 +11,14 @@ | --- | --- | --- | --- | | `Status` | `string` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +ReplayWebhooksResponse replayWebhooksResponse = new ReplayWebhooksResponse { - "status": "status4" -} + Status = "status6", +}; ``` diff --git a/doc/models/resent-invitation.md b/doc/models/resent-invitation.md index 9773b526..65755f69 100644 --- a/doc/models/resent-invitation.md +++ b/doc/models/resent-invitation.md @@ -16,16 +16,24 @@ | `LastInviteSentAt` | `DateTimeOffset?` | Optional | - | | `LastInviteAcceptedAt` | `DateTimeOffset?` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Globalization; + +ResentInvitation resentInvitation = new ResentInvitation { - "last_invite_sent_at": "01/01/2024 04:30:00", - "last_invite_accepted_at": "01/01/2024 04:35:00", - "last_sent_at": "last_sent_at8", - "last_accepted_at": "last_accepted_at8", - "send_invite_link_text": "send_invite_link_text6", - "uninvited_count": 6 -} + LastSentAt = "last_sent_at0", + LastAcceptedAt = "last_accepted_at0", + SendInviteLinkText = "send_invite_link_text8", + UninvitedCount = 178, + LastInviteSentAt = DateTime.ParseExact("2024-01-01T04:30:00+00:00", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + LastInviteAcceptedAt = DateTime.ParseExact("2024-01-01T04:35:00+00:00", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), +}; ``` diff --git a/doc/models/resource-type.md b/doc/models/resource-type.md index c72afba5..5cadf014 100644 --- a/doc/models/resource-type.md +++ b/doc/models/resource-type.md @@ -12,3 +12,11 @@ | `Subscriptions` | | `Customers` | +## Example + +```csharp +using AdvancedBilling.Standard.Models; + +ResourceType resourceType = ResourceType.Subscriptions; +``` + diff --git a/doc/models/restriction-type.md b/doc/models/restriction-type.md index c69ef31a..b9800b9a 100644 --- a/doc/models/restriction-type.md +++ b/doc/models/restriction-type.md @@ -12,3 +12,11 @@ | `Component` | | `Product` | +## Example + +```csharp +using AdvancedBilling.Standard.Models; + +RestrictionType restrictionType = RestrictionType.Component; +``` + diff --git a/doc/models/resume-options.md b/doc/models/resume-options.md index 5ccc3c79..8ca8af6a 100644 --- a/doc/models/resume-options.md +++ b/doc/models/resume-options.md @@ -12,12 +12,15 @@ | `RequireResume` | `bool?` | Optional | Chargify will only attempt to resume the subscription's billing period. If not resumable, the subscription will be left in its current state. | | `ForgiveBalance` | `bool?` | Optional | Indicates whether or not Chargify should clear the subscription's existing balance before attempting to resume the subscription. If subscription cannot be resumed, the balance will remain as it was before the attempt to resume was made. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +ResumeOptions resumeOptions = new ResumeOptions { - "require_resume": false, - "forgive_balance": false -} + RequireResume = false, + ForgiveBalance = false, +}; ``` diff --git a/doc/models/resumption-charge.md b/doc/models/resumption-charge.md index f3a3fd80..f17a5e26 100644 --- a/doc/models/resumption-charge.md +++ b/doc/models/resumption-charge.md @@ -15,3 +15,11 @@ | `Immediate` | | `Delayed` | +## Example + +```csharp +using AdvancedBilling.Standard.Models; + +ResumptionCharge resumptionCharge = ResumptionCharge.Immediate; +``` + diff --git a/doc/models/revoked-invitation.md b/doc/models/revoked-invitation.md index 492c2caf..5fc6430c 100644 --- a/doc/models/revoked-invitation.md +++ b/doc/models/revoked-invitation.md @@ -13,13 +13,16 @@ | `LastAcceptedAt` | `string` | Optional | - | | `UninvitedCount` | `int?` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +RevokedInvitation revokedInvitation = new RevokedInvitation { - "last_sent_at": "last_sent_at2", - "last_accepted_at": "last_accepted_at2", - "uninvited_count": 226 -} + LastSentAt = "last_sent_at8", + LastAcceptedAt = "last_accepted_at8", + UninvitedCount = 130, +}; ``` diff --git a/doc/models/sale-rep-item-mrr.md b/doc/models/sale-rep-item-mrr.md index 74dae968..6cbca80b 100644 --- a/doc/models/sale-rep-item-mrr.md +++ b/doc/models/sale-rep-item-mrr.md @@ -13,13 +13,16 @@ | `Usage` | `string` | Optional | - | | `Recurring` | `string` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +SaleRepItemMrr saleRepItemMrr = new SaleRepItemMrr { - "mrr": "mrr2", - "usage": "usage0", - "recurring": "recurring4" -} + Mrr = "mrr8", + Usage = "usage0", + Recurring = "recurring6", +}; ``` diff --git a/doc/models/sale-rep-settings.md b/doc/models/sale-rep-settings.md index 2e657016..3400b7e6 100644 --- a/doc/models/sale-rep-settings.md +++ b/doc/models/sale-rep-settings.md @@ -17,15 +17,18 @@ | `SalesRepId` | `int?` | Optional | - | | `SalesRepName` | `string` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +SaleRepSettings saleRepSettings = new SaleRepSettings { - "customer_name": "customer_name8", - "subscription_id": 200, - "site_link": "site_link4", - "site_name": "site_name8", - "subscription_mrr": "subscription_mrr6" -} + CustomerName = "customer_name6", + SubscriptionId = 202, + SiteLink = "site_link2", + SiteName = "site_name6", + SubscriptionMrr = "subscription_mrr4", +}; ``` diff --git a/doc/models/sale-rep-subscription.md b/doc/models/sale-rep-subscription.md index 71f6d256..6b0edaa2 100644 --- a/doc/models/sale-rep-subscription.md +++ b/doc/models/sale-rep-subscription.md @@ -20,15 +20,18 @@ | `LastPayment` | `string` | Optional | - | | `ChurnDate` | `string` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +SaleRepSubscription saleRepSubscription = new SaleRepSubscription { - "id": 18, - "site_name": "site_name2", - "subscription_url": "subscription_url6", - "customer_name": "customer_name2", - "created_at": "created_at8" -} + Id = 68, + SiteName = "site_name8", + SubscriptionUrl = "subscription_url2", + CustomerName = "customer_name8", + CreatedAt = "created_at4", +}; ``` diff --git a/doc/models/sale-rep.md b/doc/models/sale-rep.md index 5b4c0261..06b62328 100644 --- a/doc/models/sale-rep.md +++ b/doc/models/sale-rep.md @@ -15,30 +15,45 @@ | `TestMode` | `bool?` | Optional | - | | `Subscriptions` | [`List`](../../doc/models/sale-rep-subscription.md) | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Collections.Generic; + +SaleRep saleRep = new SaleRep { - "id": 18, - "full_name": "full_name0", - "subscriptions_count": 162, - "test_mode": false, - "subscriptions": [ + Id = 78, + FullName = "full_name0", + SubscriptionsCount = 102, + TestMode = false, + Subscriptions = new List { - "id": 202, - "site_name": "site_name8", - "subscription_url": "subscription_url2", - "customer_name": "customer_name8", - "created_at": "created_at4" + new SaleRepSubscription + { + Id = 202, + SiteName = "site_name8", + SubscriptionUrl = "subscription_url2", + CustomerName = "customer_name8", + CreatedAt = "created_at4", + }, + new SaleRepSubscription + { + Id = 202, + SiteName = "site_name8", + SubscriptionUrl = "subscription_url2", + CustomerName = "customer_name8", + CreatedAt = "created_at4", + }, + new SaleRepSubscription + { + Id = 202, + SiteName = "site_name8", + SubscriptionUrl = "subscription_url2", + CustomerName = "customer_name8", + CreatedAt = "created_at4", + }, }, - { - "id": 202, - "site_name": "site_name8", - "subscription_url": "subscription_url2", - "customer_name": "customer_name8", - "created_at": "created_at4" - } - ] -} +}; ``` diff --git a/doc/models/scheduled-renewal-component-custom-price.md b/doc/models/scheduled-renewal-component-custom-price.md index f55007b1..772f0807 100644 --- a/doc/models/scheduled-renewal-component-custom-price.md +++ b/doc/models/scheduled-renewal-component-custom-price.md @@ -12,22 +12,29 @@ Custom pricing for a component within a scheduled renewal. | Name | Type | Tags | Description | | --- | --- | --- | --- | | `TaxIncluded` | `bool?` | Optional | Whether or not the price point includes tax | -| `PricingScheme` | [`PricingScheme`](../../doc/models/pricing-scheme.md) | Required | Omit for On/Off components | +| `PricingScheme` | [`PricingScheme`](../../doc/models/pricing-scheme.md) | Required | Omit for On/Off components. | | `Prices` | [`List`](../../doc/models/price.md) | Required | On/off components only need one price bracket starting at 1. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using AdvancedBilling.Standard.Models.Containers; +using System.Collections.Generic; + +ScheduledRenewalComponentCustomPrice scheduledRenewalComponentCustomPrice = new ScheduledRenewalComponentCustomPrice { - "pricing_scheme": "stairstep", - "prices": [ + PricingScheme = PricingScheme.PerUnit, + Prices = new List { - "starting_quantity": 242, - "ending_quantity": 40, - "unit_price": 23.26 - } - ], - "tax_included": false -} + new Price + { + StartingQuantity = PriceStartingQuantity.FromNumber(242), + UnitPrice = PriceUnitPrice.FromPrecision(23.26), + EndingQuantity = PriceEndingQuantity.FromNumber(40), + }, + }, + TaxIncluded = false, +}; ``` diff --git a/doc/models/scheduled-renewal-configuration-item-request.md b/doc/models/scheduled-renewal-configuration-item-request.md index 6791c748..d31c42be 100644 --- a/doc/models/scheduled-renewal-configuration-item-request.md +++ b/doc/models/scheduled-renewal-configuration-item-request.md @@ -11,32 +11,44 @@ | --- | --- | --- | --- | | `RenewalConfigurationItem` | [`ScheduledRenewalConfigurationItemRequestRenewalConfigurationItem`](../../doc/models/containers/scheduled-renewal-configuration-item-request-renewal-configuration-item.md) | Required | This is a container for one-of cases. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using AdvancedBilling.Standard.Models.Containers; +using System.Collections.Generic; + +ScheduledRenewalConfigurationItemRequest scheduledRenewalConfigurationItemRequest = new ScheduledRenewalConfigurationItemRequest { - "renewal_configuration_item": { - "item_type": "Component", - "item_id": 108, - "price_point_id": 122, - "quantity": 212, - "custom_price": { - "tax_included": false, - "pricing_scheme": "stairstep", - "prices": [ - { - "starting_quantity": 242, - "ending_quantity": 40, - "unit_price": 23.26 - }, + RenewalConfigurationItem = ScheduledRenewalConfigurationItemRequestRenewalConfigurationItem.FromScheduledRenewalItemRequestBodyComponent( + new ScheduledRenewalItemRequestBodyComponent { - "starting_quantity": 242, - "ending_quantity": 40, - "unit_price": 23.26 + ItemType = "Component", + ItemId = 108, + PricePointId = 122, + Quantity = 212, + CustomPrice = new ScheduledRenewalComponentCustomPrice + { + PricingScheme = PricingScheme.Stairstep, + Prices = new List + { + new Price + { + StartingQuantity = PriceStartingQuantity.FromNumber(242), + UnitPrice = PriceUnitPrice.FromPrecision(23.26), + EndingQuantity = PriceEndingQuantity.FromNumber(40), + }, + new Price + { + StartingQuantity = PriceStartingQuantity.FromNumber(242), + UnitPrice = PriceUnitPrice.FromPrecision(23.26), + EndingQuantity = PriceEndingQuantity.FromNumber(40), + }, + }, + TaxIncluded = false, + }, } - ] - } - } -} + ), +}; ``` diff --git a/doc/models/scheduled-renewal-configuration-item-response.md b/doc/models/scheduled-renewal-configuration-item-response.md index 19053a50..070ae9e1 100644 --- a/doc/models/scheduled-renewal-configuration-item-response.md +++ b/doc/models/scheduled-renewal-configuration-item-response.md @@ -11,17 +11,21 @@ | --- | --- | --- | --- | | `ScheduledRenewalConfigurationItem` | [`ScheduledRenewalConfigurationItem`](../../doc/models/scheduled-renewal-configuration-item.md) | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +ScheduledRenewalConfigurationItemResponse scheduledRenewalConfigurationItemResponse = new ScheduledRenewalConfigurationItemResponse { - "scheduled_renewal_configuration_item": { - "id": 98, - "subscription_id": 208, - "subscription_renewal_configuration_id": 108, - "item_id": 246, - "item_type": "item_type2" - } -} + ScheduledRenewalConfigurationItem = new ScheduledRenewalConfigurationItem + { + Id = 98, + SubscriptionId = 208, + SubscriptionRenewalConfigurationId = 108, + ItemId = 246, + ItemType = "item_type2", + }, +}; ``` diff --git a/doc/models/scheduled-renewal-configuration-item.md b/doc/models/scheduled-renewal-configuration-item.md index 54bf656e..54fd3f8f 100644 --- a/doc/models/scheduled-renewal-configuration-item.md +++ b/doc/models/scheduled-renewal-configuration-item.md @@ -21,15 +21,18 @@ | `DecimalQuantity` | `string` | Optional | - | | `CreatedAt` | `DateTimeOffset?` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +ScheduledRenewalConfigurationItem scheduledRenewalConfigurationItem = new ScheduledRenewalConfigurationItem { - "id": 146, - "subscription_id": 0, - "subscription_renewal_configuration_id": 156, - "item_id": 38, - "item_type": "item_type4" -} + Id = 54, + SubscriptionId = 164, + SubscriptionRenewalConfigurationId = 64, + ItemId = 202, + ItemType = "item_type0", +}; ``` diff --git a/doc/models/scheduled-renewal-configuration-request-body.md b/doc/models/scheduled-renewal-configuration-request-body.md index fae6df32..f95cab2b 100644 --- a/doc/models/scheduled-renewal-configuration-request-body.md +++ b/doc/models/scheduled-renewal-configuration-request-body.md @@ -15,15 +15,25 @@ | `ContractId` | `int?` | Optional | (Optional) Existing contract to associate with the scheduled renewal. Contracts must be enabled for your site. | | `CreateNewContract` | `bool?` | Optional | (Optional) Set to true to create a new contract when contracts are enabled. Contracts must be enabled for your site. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Globalization; + +ScheduledRenewalConfigurationRequestBody scheduledRenewalConfigurationRequestBody = new ScheduledRenewalConfigurationRequestBody { - "starts_at": "2016-03-13T12:52:32.123Z", - "ends_at": "2016-03-13T12:52:32.123Z", - "lock_in_at": "2016-03-13T12:52:32.123Z", - "contract_id": 110, - "create_new_contract": false -} + StartsAt = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + EndsAt = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + LockInAt = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + ContractId = 162, + CreateNewContract = false, +}; ``` diff --git a/doc/models/scheduled-renewal-configuration-request.md b/doc/models/scheduled-renewal-configuration-request.md index 36376341..408b73c0 100644 --- a/doc/models/scheduled-renewal-configuration-request.md +++ b/doc/models/scheduled-renewal-configuration-request.md @@ -11,17 +11,28 @@ | --- | --- | --- | --- | | `RenewalConfiguration` | [`ScheduledRenewalConfigurationRequestBody`](../../doc/models/scheduled-renewal-configuration-request-body.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Globalization; + +ScheduledRenewalConfigurationRequest scheduledRenewalConfigurationRequest = new ScheduledRenewalConfigurationRequest { - "renewal_configuration": { - "starts_at": "2016-03-13T12:52:32.123Z", - "ends_at": "2016-03-13T12:52:32.123Z", - "lock_in_at": "2016-03-13T12:52:32.123Z", - "contract_id": 244, - "create_new_contract": false - } -} + RenewalConfiguration = new ScheduledRenewalConfigurationRequestBody + { + StartsAt = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + EndsAt = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + LockInAt = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + ContractId = 244, + CreateNewContract = false, + }, +}; ``` diff --git a/doc/models/scheduled-renewal-configuration-response.md b/doc/models/scheduled-renewal-configuration-response.md index b3636909..e66383f3 100644 --- a/doc/models/scheduled-renewal-configuration-response.md +++ b/doc/models/scheduled-renewal-configuration-response.md @@ -11,17 +11,26 @@ | --- | --- | --- | --- | | `ScheduledRenewalConfiguration` | [`ScheduledRenewalConfiguration`](../../doc/models/scheduled-renewal-configuration.md) | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Globalization; + +ScheduledRenewalConfigurationResponse scheduledRenewalConfigurationResponse = new ScheduledRenewalConfigurationResponse { - "scheduled_renewal_configuration": { - "id": 134, - "site_id": 60, - "subscription_id": 244, - "starts_at": "2016-03-13T12:52:32.123Z", - "ends_at": "2016-03-13T12:52:32.123Z" - } -} + ScheduledRenewalConfiguration = new ScheduledRenewalConfiguration + { + Id = 134, + SiteId = 60, + SubscriptionId = 244, + StartsAt = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + EndsAt = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + }, +}; ``` diff --git a/doc/models/scheduled-renewal-configuration.md b/doc/models/scheduled-renewal-configuration.md index 2c8389ff..58522580 100644 --- a/doc/models/scheduled-renewal-configuration.md +++ b/doc/models/scheduled-renewal-configuration.md @@ -20,15 +20,23 @@ | `ScheduledRenewalConfigurationItems` | [`List`](../../doc/models/scheduled-renewal-configuration-item.md) | Optional | - | | `Contract` | [`Contract`](../../doc/models/contract.md) | Optional | Contract linked to the scheduled renewal configuration. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Globalization; + +ScheduledRenewalConfiguration scheduledRenewalConfiguration = new ScheduledRenewalConfiguration { - "id": 152, - "site_id": 78, - "subscription_id": 6, - "starts_at": "2016-03-13T12:52:32.123Z", - "ends_at": "2016-03-13T12:52:32.123Z" -} + Id = 8, + SiteId = 190, + SubscriptionId = 118, + StartsAt = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + EndsAt = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), +}; ``` diff --git a/doc/models/scheduled-renewal-configurations-response.md b/doc/models/scheduled-renewal-configurations-response.md index 9336f8d2..bb7bf878 100644 --- a/doc/models/scheduled-renewal-configurations-response.md +++ b/doc/models/scheduled-renewal-configurations-response.md @@ -11,33 +11,30 @@ | --- | --- | --- | --- | | `ScheduledRenewalConfigurations` | [`List`](../../doc/models/scheduled-renewal-configuration.md) | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Collections.Generic; +using System.Globalization; + +ScheduledRenewalConfigurationsResponse scheduledRenewalConfigurationsResponse = new ScheduledRenewalConfigurationsResponse { - "scheduled_renewal_configurations": [ - { - "id": 122, - "site_id": 48, - "subscription_id": 232, - "starts_at": "2016-03-13T12:52:32.123Z", - "ends_at": "2016-03-13T12:52:32.123Z" - }, + ScheduledRenewalConfigurations = new List { - "id": 122, - "site_id": 48, - "subscription_id": 232, - "starts_at": "2016-03-13T12:52:32.123Z", - "ends_at": "2016-03-13T12:52:32.123Z" + new ScheduledRenewalConfiguration + { + Id = 122, + SiteId = 48, + SubscriptionId = 232, + StartsAt = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + EndsAt = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + }, }, - { - "id": 122, - "site_id": 48, - "subscription_id": 232, - "starts_at": "2016-03-13T12:52:32.123Z", - "ends_at": "2016-03-13T12:52:32.123Z" - } - ] -} +}; ``` diff --git a/doc/models/scheduled-renewal-item-request-body-component.md b/doc/models/scheduled-renewal-item-request-body-component.md index d35a0b0d..d0100c91 100644 --- a/doc/models/scheduled-renewal-item-request-body-component.md +++ b/doc/models/scheduled-renewal-item-request-body-component.md @@ -12,33 +12,42 @@ | `ItemType` | `string` | Required, Constant | Item type to add. Either Product or Component.

**Value**: `"Component"` | | `ItemId` | `int` | Required | Product or component identifier. | | `PricePointId` | `int?` | Optional | Price point identifier. | -| `Quantity` | `int?` | Optional | Optional quantity for the item. | +| `Quantity` | `int?` | Optional | (Optional) Quantity for the item. | | `CustomPrice` | [`ScheduledRenewalComponentCustomPrice`](../../doc/models/scheduled-renewal-component-custom-price.md) | Optional | Custom pricing for a component within a scheduled renewal. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using AdvancedBilling.Standard.Models.Containers; +using System.Collections.Generic; + +ScheduledRenewalItemRequestBodyComponent scheduledRenewalItemRequestBodyComponent = new ScheduledRenewalItemRequestBodyComponent { - "item_type": "Component", - "item_id": 108, - "price_point_id": 122, - "quantity": 212, - "custom_price": { - "tax_included": false, - "pricing_scheme": "stairstep", - "prices": [ - { - "starting_quantity": 242, - "ending_quantity": 40, - "unit_price": 23.26 - }, - { - "starting_quantity": 242, - "ending_quantity": 40, - "unit_price": 23.26 - } - ] - } -} + ItemType = "Component", + ItemId = 20, + PricePointId = 6, + Quantity = 84, + CustomPrice = new ScheduledRenewalComponentCustomPrice + { + PricingScheme = PricingScheme.Stairstep, + Prices = new List + { + new Price + { + StartingQuantity = PriceStartingQuantity.FromNumber(242), + UnitPrice = PriceUnitPrice.FromPrecision(23.26), + EndingQuantity = PriceEndingQuantity.FromNumber(40), + }, + new Price + { + StartingQuantity = PriceStartingQuantity.FromNumber(242), + UnitPrice = PriceUnitPrice.FromPrecision(23.26), + EndingQuantity = PriceEndingQuantity.FromNumber(40), + }, + }, + TaxIncluded = false, + }, +}; ``` diff --git a/doc/models/scheduled-renewal-item-request-body-product.md b/doc/models/scheduled-renewal-item-request-body-product.md index e4089444..c3db6e5a 100644 --- a/doc/models/scheduled-renewal-item-request-body-product.md +++ b/doc/models/scheduled-renewal-item-request-body-product.md @@ -12,27 +12,32 @@ | `ItemType` | `string` | Required, Constant | Item type to add. Either Product or Component.

**Value**: `"Product"` | | `ItemId` | `int` | Required | Product or component identifier. | | `PricePointId` | `int?` | Optional | Price point identifier. | -| `Quantity` | `int?` | Optional | Optional quantity for the item. | +| `Quantity` | `int?` | Optional | (Optional) Quantity for the item. | | `CustomPrice` | [`ScheduledRenewalProductPricePoint`](../../doc/models/scheduled-renewal-product-price-point.md) | Optional | Custom pricing for a product within a scheduled renewal. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using AdvancedBilling.Standard.Models.Containers; + +ScheduledRenewalItemRequestBodyProduct scheduledRenewalItemRequestBodyProduct = new ScheduledRenewalItemRequestBodyProduct { - "item_type": "Product", - "item_id": 32, - "price_point_id": 18, - "quantity": 96, - "custom_price": { - "name": "name4", - "handle": "handle0", - "price_in_cents": "String3", - "interval": "String3", - "interval_unit": "day", - "tax_included": false, - "initial_charge_in_cents": 30, - "expiration_interval": 52 - } -} + ItemType = "Product", + ItemId = 154, + PricePointId = 168, + Quantity = 166, + CustomPrice = new ScheduledRenewalProductPricePoint + { + PriceInCents = ScheduledRenewalProductPricePointPriceInCents.FromString("String3"), + Interval = ScheduledRenewalProductPricePointInterval.FromString("String3"), + IntervalUnit = IntervalUnit.Day, + Name = "name4", + Handle = "handle0", + TaxIncluded = false, + InitialChargeInCents = 30L, + ExpirationInterval = 52, + }, +}; ``` diff --git a/doc/models/scheduled-renewal-lock-in-request.md b/doc/models/scheduled-renewal-lock-in-request.md index 1de2fce5..a40b7240 100644 --- a/doc/models/scheduled-renewal-lock-in-request.md +++ b/doc/models/scheduled-renewal-lock-in-request.md @@ -11,11 +11,14 @@ | --- | --- | --- | --- | | `LockInAt` | `DateTime` | Required | Date to lock in the renewal. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +ScheduledRenewalLockInRequest scheduledRenewalLockInRequest = new ScheduledRenewalLockInRequest { - "lock_in_at": "2016-03-13" -} + LockInAt = DateTime.Parse("2016-03-13"), +}; ``` diff --git a/doc/models/scheduled-renewal-product-price-point.md b/doc/models/scheduled-renewal-product-price-point.md index 443d8ea8..789d4f7a 100644 --- a/doc/models/scheduled-renewal-product-price-point.md +++ b/doc/models/scheduled-renewal-product-price-point.md @@ -18,21 +18,25 @@ Custom pricing for a product within a scheduled renewal. | `IntervalUnit` | [`IntervalUnit?`](../../doc/models/interval-unit.md) | Required | Required if using `custom_price` attribute. | | `TaxIncluded` | `bool?` | Optional | (Optional) | | `InitialChargeInCents` | `long?` | Optional | The product price point initial charge, in integer cents. | -| `ExpirationInterval` | `int?` | Optional | The numerical expiration interval. i.e. an expiration_interval of ‘30’ coupled with an expiration_interval_unit of day would mean this product price point would expire after 30 days. | +| `ExpirationInterval` | `int?` | Optional | The numerical expiration interval. e.g., an expiration_interval of ‘30’ coupled with an expiration_interval_unit of day would mean this product price point would expire after 30 days. | | `ExpirationIntervalUnit` | [`ExpirationIntervalUnit?`](../../doc/models/expiration-interval-unit.md) | Optional | A string representing the expiration interval unit for this product price point, either month, day or never | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using AdvancedBilling.Standard.Models.Containers; + +ScheduledRenewalProductPricePoint scheduledRenewalProductPricePoint = new ScheduledRenewalProductPricePoint { - "name": "name4", - "handle": "handle0", - "price_in_cents": "String3", - "interval": "String9", - "interval_unit": "day", - "tax_included": false, - "initial_charge_in_cents": 86, - "expiration_interval": 108 -} + PriceInCents = ScheduledRenewalProductPricePointPriceInCents.FromString("String1"), + Interval = ScheduledRenewalProductPricePointInterval.FromString("String7"), + IntervalUnit = IntervalUnit.Day, + Name = "name6", + Handle = "handle2", + TaxIncluded = false, + InitialChargeInCents = 218L, + ExpirationInterval = 240, +}; ``` diff --git a/doc/models/scheduled-renewal-update-request.md b/doc/models/scheduled-renewal-update-request.md index 7d2834f1..e43df08a 100644 --- a/doc/models/scheduled-renewal-update-request.md +++ b/doc/models/scheduled-renewal-update-request.md @@ -11,32 +11,44 @@ | --- | --- | --- | --- | | `RenewalConfigurationItem` | [`ScheduledRenewalUpdateRequestRenewalConfigurationItem`](../../doc/models/containers/scheduled-renewal-update-request-renewal-configuration-item.md) | Required | This is a container for one-of cases. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using AdvancedBilling.Standard.Models.Containers; +using System.Collections.Generic; + +ScheduledRenewalUpdateRequest scheduledRenewalUpdateRequest = new ScheduledRenewalUpdateRequest { - "renewal_configuration_item": { - "item_type": "Component", - "item_id": 108, - "price_point_id": 122, - "quantity": 212, - "custom_price": { - "tax_included": false, - "pricing_scheme": "stairstep", - "prices": [ - { - "starting_quantity": 242, - "ending_quantity": 40, - "unit_price": 23.26 - }, + RenewalConfigurationItem = ScheduledRenewalUpdateRequestRenewalConfigurationItem.FromScheduledRenewalItemRequestBodyComponent( + new ScheduledRenewalItemRequestBodyComponent { - "starting_quantity": 242, - "ending_quantity": 40, - "unit_price": 23.26 + ItemType = "Component", + ItemId = 108, + PricePointId = 122, + Quantity = 212, + CustomPrice = new ScheduledRenewalComponentCustomPrice + { + PricingScheme = PricingScheme.Stairstep, + Prices = new List + { + new Price + { + StartingQuantity = PriceStartingQuantity.FromNumber(242), + UnitPrice = PriceUnitPrice.FromPrecision(23.26), + EndingQuantity = PriceEndingQuantity.FromNumber(40), + }, + new Price + { + StartingQuantity = PriceStartingQuantity.FromNumber(242), + UnitPrice = PriceUnitPrice.FromPrecision(23.26), + EndingQuantity = PriceEndingQuantity.FromNumber(40), + }, + }, + TaxIncluded = false, + }, } - ] - } - } -} + ), +}; ``` diff --git a/doc/models/segment-price.md b/doc/models/segment-price.md index 72f7eb70..f557427b 100644 --- a/doc/models/segment-price.md +++ b/doc/models/segment-price.md @@ -18,15 +18,18 @@ | `FormattedUnitPrice` | `string` | Optional | - | | `SegmentId` | `int?` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +SegmentPrice segmentPrice = new SegmentPrice { - "id": 220, - "component_id": 74, - "starting_quantity": 118, - "ending_quantity": 92, - "unit_price": "unit_price0" -} + Id = 194, + ComponentId = 48, + StartingQuantity = 144, + EndingQuantity = 118, + UnitPrice = "unit_price0", +}; ``` diff --git a/doc/models/segment-response.md b/doc/models/segment-response.md index f2d93e0b..0a587b84 100644 --- a/doc/models/segment-response.md +++ b/doc/models/segment-response.md @@ -11,17 +11,21 @@ | --- | --- | --- | --- | | `Segment` | [`Segment`](../../doc/models/segment.md) | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +SegmentResponse segmentResponse = new SegmentResponse { - "segment": { - "id": 118, - "component_id": 228, - "price_point_id": 4, - "event_based_billing_metric_id": 56, - "pricing_scheme": "stairstep" - } -} + Segment = new Segment + { + Id = 118, + ComponentId = 228, + PricePointId = 4, + EventBasedBillingMetricId = 56, + PricingScheme = PricingScheme.Stairstep, + }, +}; ``` diff --git a/doc/models/segment.md b/doc/models/segment.md index e1c87eb2..e975c2aa 100644 --- a/doc/models/segment.md +++ b/doc/models/segment.md @@ -22,15 +22,18 @@ | `UpdatedAt` | `DateTimeOffset?` | Optional | - | | `Prices` | [`List`](../../doc/models/segment-price.md) | Optional | **Constraints**: *Minimum Items*: `1` | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +Segment segment = new Segment { - "id": 6, - "component_id": 116, - "price_point_id": 140, - "event_based_billing_metric_id": 200, - "pricing_scheme": "stairstep" -} + Id = 118, + ComponentId = 228, + PricePointId = 4, + EventBasedBillingMetricId = 56, + PricingScheme = PricingScheme.Stairstep, +}; ``` diff --git a/doc/models/send-email.md b/doc/models/send-email.md index 3271daed..edc0eeb8 100644 --- a/doc/models/send-email.md +++ b/doc/models/send-email.md @@ -12,12 +12,15 @@ | `CanExecute` | `bool` | Required | - | | `Url` | `string` | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +SendEmail sendEmail = new SendEmail { - "can_execute": false, - "url": "url2" -} + CanExecute = false, + Url = "url2", +}; ``` diff --git a/doc/models/send-invoice-request.md b/doc/models/send-invoice-request.md index 1c5d263f..8c859251 100644 --- a/doc/models/send-invoice-request.md +++ b/doc/models/send-invoice-request.md @@ -14,25 +14,32 @@ | `BccRecipientEmails` | `List` | Optional | **Constraints**: *Maximum Items*: `5` | | `AttachmentUrls` | `List` | Optional | Array of URLs to files to attach to the invoice email. Max 10 files, 10MB each.

**Constraints**: *Maximum Items*: `10` | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Collections.Generic; + +SendInvoiceRequest sendInvoiceRequest = new SendInvoiceRequest { - "recipient_emails": [ - "recipient_emails3", - "recipient_emails4" - ], - "cc_recipient_emails": [ - "cc_recipient_emails6", - "cc_recipient_emails5" - ], - "bcc_recipient_emails": [ - "bcc_recipient_emails6" - ], - "attachment_urls": [ - "attachment_urls0", - "attachment_urls1" - ] -} + RecipientEmails = new List + { + "recipient_emails7", + }, + CcRecipientEmails = new List + { + "cc_recipient_emails2", + }, + BccRecipientEmails = new List + { + "bcc_recipient_emails0", + "bcc_recipient_emails1", + "bcc_recipient_emails2", + }, + AttachmentUrls = new List + { + "attachment_urls4", + }, +}; ``` diff --git a/doc/models/service-credit-1.md b/doc/models/service-credit-1.md index d0612052..ff8684a0 100644 --- a/doc/models/service-credit-1.md +++ b/doc/models/service-credit-1.md @@ -14,19 +14,22 @@ | `EndingBalanceInCents` | `long?` | Optional | The new balance for the credit account | | `EntryType` | [`ServiceCreditType?`](../../doc/models/service-credit-type.md) | Optional | The type of entry | | `Memo` | `string` | Optional | The memo attached to the entry | -| `InvoiceUid` | `string` | Optional | The invoice uid associated with the entry. Only present for debit entries | +| `InvoiceUid` | `string` | Optional | The invoice uid associated with the entry. Only present for debit entries. | | `RemainingBalanceInCents` | `long?` | Optional | The remaining balance for the entry | | `CreatedAt` | `DateTimeOffset?` | Optional | The date and time the entry was created | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +ServiceCredit1 serviceCredit1 = new ServiceCredit1 { - "id": 174, - "amount_in_cents": 4, - "ending_balance_in_cents": 44, - "entry_type": "Credit", - "memo": "memo8" -} + Id = 12, + AmountInCents = 158L, + EndingBalanceInCents = 138L, + EntryType = ServiceCreditType.Credit, + Memo = "memo4", +}; ``` diff --git a/doc/models/service-credit-response.md b/doc/models/service-credit-response.md index 890084a6..3bb6226f 100644 --- a/doc/models/service-credit-response.md +++ b/doc/models/service-credit-response.md @@ -11,17 +11,21 @@ | --- | --- | --- | --- | | `ServiceCredit` | [`ServiceCredit`](../../doc/models/service-credit.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +ServiceCreditResponse serviceCreditResponse = new ServiceCreditResponse { - "service_credit": { - "id": 38, - "amount_in_cents": 124, - "ending_balance_in_cents": 164, - "entry_type": "Credit", - "memo": "memo0" - } -} + ServiceCredit = new ServiceCredit + { + Id = 38, + AmountInCents = 124L, + EndingBalanceInCents = 164L, + EntryType = ServiceCreditType.Credit, + Memo = "memo0", + }, +}; ``` diff --git a/doc/models/service-credit-type.md b/doc/models/service-credit-type.md index 6d70a37f..6005d778 100644 --- a/doc/models/service-credit-type.md +++ b/doc/models/service-credit-type.md @@ -14,3 +14,11 @@ The type of entry | `Credit` | | `Debit` | +## Example + +```csharp +using AdvancedBilling.Standard.Models; + +ServiceCreditType serviceCreditType = ServiceCreditType.Credit; +``` + diff --git a/doc/models/service-credit.md b/doc/models/service-credit.md index 162ac120..4e05e9e4 100644 --- a/doc/models/service-credit.md +++ b/doc/models/service-credit.md @@ -15,15 +15,18 @@ | `EntryType` | [`ServiceCreditType?`](../../doc/models/service-credit-type.md) | Optional | The type of entry | | `Memo` | `string` | Optional | The memo attached to the entry | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +ServiceCredit serviceCredit = new ServiceCredit { - "id": 216, - "amount_in_cents": 210, - "ending_balance_in_cents": 86, - "entry_type": "Credit", - "memo": "memo2" -} + Id = 132, + AmountInCents = 218L, + EndingBalanceInCents = 2L, + EntryType = ServiceCreditType.Credit, + Memo = "memo8", +}; ``` diff --git a/doc/models/signup-proforma-preview-response.md b/doc/models/signup-proforma-preview-response.md index e82ee7fa..37335a97 100644 --- a/doc/models/signup-proforma-preview-response.md +++ b/doc/models/signup-proforma-preview-response.md @@ -11,26 +11,32 @@ | --- | --- | --- | --- | | `ProformaInvoicePreview` | [`SignupProformaPreview`](../../doc/models/signup-proforma-preview.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +SignupProformaPreviewResponse signupProformaPreviewResponse = new SignupProformaPreviewResponse { - "proforma_invoice_preview": { - "current_proforma_invoice": { - "uid": "uid6", - "site_id": 72, - "customer_id": 184, - "subscription_id": 0, - "number": 132 + ProformaInvoicePreview = new SignupProformaPreview + { + CurrentProformaInvoice = new ProformaInvoice + { + Uid = "uid6", + SiteId = 72, + CustomerId = 184, + SubscriptionId = 0, + Number = 132, + }, + NextProformaInvoice = new ProformaInvoice + { + Uid = "uid8", + SiteId = 212, + CustomerId = 68, + SubscriptionId = 140, + Number = 16, + }, }, - "next_proforma_invoice": { - "uid": "uid8", - "site_id": 212, - "customer_id": 68, - "subscription_id": 140, - "number": 16 - } - } -} +}; ``` diff --git a/doc/models/signup-proforma-preview.md b/doc/models/signup-proforma-preview.md index 1e2ae14a..4ec3ec64 100644 --- a/doc/models/signup-proforma-preview.md +++ b/doc/models/signup-proforma-preview.md @@ -12,24 +12,29 @@ | `CurrentProformaInvoice` | [`ProformaInvoice`](../../doc/models/proforma-invoice.md) | Optional | - | | `NextProformaInvoice` | [`ProformaInvoice`](../../doc/models/proforma-invoice.md) | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +SignupProformaPreview signupProformaPreview = new SignupProformaPreview { - "current_proforma_invoice": { - "uid": "uid6", - "site_id": 72, - "customer_id": 184, - "subscription_id": 0, - "number": 132 - }, - "next_proforma_invoice": { - "uid": "uid8", - "site_id": 212, - "customer_id": 68, - "subscription_id": 140, - "number": 16 - } -} + CurrentProformaInvoice = new ProformaInvoice + { + Uid = "uid6", + SiteId = 72, + CustomerId = 184, + SubscriptionId = 0, + Number = 132, + }, + NextProformaInvoice = new ProformaInvoice + { + Uid = "uid8", + SiteId = 212, + CustomerId = 68, + SubscriptionId = 140, + Number = 16, + }, +}; ``` diff --git a/doc/models/single-error-response-exception.md b/doc/models/single-error-response-exception.md index ce5e9aa6..bbe60862 100644 --- a/doc/models/single-error-response-exception.md +++ b/doc/models/single-error-response-exception.md @@ -11,11 +11,20 @@ | --- | --- | --- | --- | | `Error` | `string` | Required | - | -## Example (as JSON) +## Example -```json +```csharp +try { - "error": "error2" + // make the API call +} +catch (ApiException e) +{ + if (e is SingleErrorResponseException) + { + // TODO: Handle SingleErrorResponseException + Console.WriteLine(e.Message); + } } ``` diff --git a/doc/models/single-string-error-response-exception.md b/doc/models/single-string-error-response-exception.md index 5db75d5b..a418a17e 100644 --- a/doc/models/single-string-error-response-exception.md +++ b/doc/models/single-string-error-response-exception.md @@ -11,11 +11,20 @@ | --- | --- | --- | --- | | `Errors` | `string` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +try { - "errors": "errors4" + // make the API call +} +catch (ApiException e) +{ + if (e is SingleStringErrorResponseException) + { + // TODO: Handle SingleStringErrorResponseException + Console.WriteLine(e.Message); + } } ``` diff --git a/doc/models/site-response.md b/doc/models/site-response.md index cb074019..8f505796 100644 --- a/doc/models/site-response.md +++ b/doc/models/site-response.md @@ -11,17 +11,21 @@ | --- | --- | --- | --- | | `Site` | [`Site`](../../doc/models/site.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +SiteResponse siteResponse = new SiteResponse { - "site": { - "id": 64, - "name": "name4", - "subdomain": "subdomain0", - "currency": "currency4", - "seller_id": 228 - } -} + Site = new Site + { + Id = 64, + Name = "name4", + Subdomain = "subdomain0", + Currency = "currency4", + SellerId = 228, + }, +}; ``` diff --git a/doc/models/site-statistics.md b/doc/models/site-statistics.md index 58c40260..38a2b41a 100644 --- a/doc/models/site-statistics.md +++ b/doc/models/site-statistics.md @@ -21,15 +21,18 @@ | `TotalUnpaidSubscriptions` | `int?` | Optional | - | | `TotalDunningSubscriptions` | `int?` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +SiteStatistics siteStatistics = new SiteStatistics { - "total_subscriptions": 204, - "subscriptions_today": 134, - "total_revenue": "total_revenue6", - "revenue_today": "revenue_today4", - "revenue_this_month": "revenue_this_month4" -} + TotalSubscriptions = 168, + SubscriptionsToday = 170, + TotalRevenue = "total_revenue2", + RevenueToday = "revenue_today0", + RevenueThisMonth = "revenue_this_month0", +}; ``` diff --git a/doc/models/site-summary.md b/doc/models/site-summary.md index 874b6d02..a1828526 100644 --- a/doc/models/site-summary.md +++ b/doc/models/site-summary.md @@ -15,21 +15,25 @@ | `SiteCurrency` | `string` | Optional | - | | `Stats` | [`SiteStatistics`](../../doc/models/site-statistics.md) | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +SiteSummary siteSummary = new SiteSummary { - "seller_name": "seller_name0", - "site_name": "site_name4", - "site_id": 218, - "site_currency": "site_currency6", - "stats": { - "total_subscriptions": 110, - "subscriptions_today": 228, - "total_revenue": "total_revenue6", - "revenue_today": "revenue_today4", - "revenue_this_month": "revenue_this_month4" - } -} + SellerName = "seller_name4", + SiteName = "site_name8", + SiteId = 252, + SiteCurrency = "site_currency0", + Stats = new SiteStatistics + { + TotalSubscriptions = 110, + SubscriptionsToday = 228, + TotalRevenue = "total_revenue6", + RevenueToday = "revenue_today4", + RevenueThisMonth = "revenue_this_month4", + }, +}; ``` diff --git a/doc/models/site.md b/doc/models/site.md index 3a3f5c63..65b4bd01 100644 --- a/doc/models/site.md +++ b/doc/models/site.md @@ -30,15 +30,18 @@ | `PortalEnabled` | `bool?` | Optional | Whether the Billing Portal is enabled for this site. | | `Test` | `bool?` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +Site site = new Site { - "id": 34, - "name": "name0", - "subdomain": "subdomain4", - "currency": "currency0", - "seller_id": 198 -} + Id = 64, + Name = "name4", + Subdomain = "subdomain0", + Currency = "currency4", + SellerId = 228, +}; ``` diff --git a/doc/models/sorting-direction.md b/doc/models/sorting-direction.md index 047e9eda..a9b8f82c 100644 --- a/doc/models/sorting-direction.md +++ b/doc/models/sorting-direction.md @@ -14,3 +14,11 @@ Used for sorting results. | `Asc` | | `Desc` | +## Example + +```csharp +using AdvancedBilling.Standard.Models; + +SortingDirection sortingDirection = SortingDirection.Asc; +``` + diff --git a/doc/models/status.md b/doc/models/status.md index a7a8dca1..bec3e8dc 100644 --- a/doc/models/status.md +++ b/doc/models/status.md @@ -16,3 +16,11 @@ | `Active` | | `Fulfilled` | +## Example + +```csharp +using AdvancedBilling.Standard.Models; + +Status status = Status.Pending; +``` + diff --git a/doc/models/subscription-add-coupon-error-exception.md b/doc/models/subscription-add-coupon-error-exception.md index 30623183..02f4b791 100644 --- a/doc/models/subscription-add-coupon-error-exception.md +++ b/doc/models/subscription-add-coupon-error-exception.md @@ -14,25 +14,20 @@ | `CouponCodes` | `List` | Optional | - | | `Subscription` | `List` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +try { - "codes": [ - "codes6", - "codes7", - "codes8" - ], - "coupon_code": [ - "coupon_code8", - "coupon_code7" - ], - "coupon_codes": [ - "coupon_codes2" - ], - "subscription": [ - "subscription8" - ] + // make the API call +} +catch (ApiException e) +{ + if (e is SubscriptionAddCouponErrorException) + { + // TODO: Handle SubscriptionAddCouponErrorException + Console.WriteLine(e.Message); + } } ``` diff --git a/doc/models/subscription-component-allocation-error-exception.md b/doc/models/subscription-component-allocation-error-exception.md index 53cd4760..fca866fb 100644 --- a/doc/models/subscription-component-allocation-error-exception.md +++ b/doc/models/subscription-component-allocation-error-exception.md @@ -11,16 +11,20 @@ | --- | --- | --- | --- | | `Errors` | [`List`](../../doc/models/subscription-component-allocation-error-item.md) | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +try { - "errors": [ + // make the API call +} +catch (ApiException e) +{ + if (e is SubscriptionComponentAllocationErrorException) { - "kind": "kind8", - "message": "message0" + // TODO: Handle SubscriptionComponentAllocationErrorException + Console.WriteLine(e.Message); } - ] } ``` diff --git a/doc/models/subscription-component-allocation-error-item.md b/doc/models/subscription-component-allocation-error-item.md index 27310eec..2b7acc97 100644 --- a/doc/models/subscription-component-allocation-error-item.md +++ b/doc/models/subscription-component-allocation-error-item.md @@ -12,12 +12,15 @@ | `Kind` | `string` | Optional | - | | `Message` | `string` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +SubscriptionComponentAllocationErrorItem subscriptionComponentAllocationErrorItem = new SubscriptionComponentAllocationErrorItem { - "kind": "kind0", - "message": "message8" -} + Kind = "kind6", + Message = "message8", +}; ``` diff --git a/doc/models/subscription-component-response.md b/doc/models/subscription-component-response.md index a0f6ebf2..9d62179f 100644 --- a/doc/models/subscription-component-response.md +++ b/doc/models/subscription-component-response.md @@ -11,17 +11,21 @@ | --- | --- | --- | --- | | `Component` | [`SubscriptionComponent`](../../doc/models/subscription-component.md) | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +SubscriptionComponentResponse subscriptionComponentResponse = new SubscriptionComponentResponse { - "component": { - "id": 80, - "name": "name8", - "kind": "quantity_based_component", - "unit_name": "unit_name0", - "enabled": false - } -} + Component = new SubscriptionComponent + { + Id = 80, + Name = "name8", + Kind = ComponentKind.QuantityBasedComponent, + UnitName = "unit_name0", + Enabled = false, + }, +}; ``` diff --git a/doc/models/subscription-component-subscription.md b/doc/models/subscription-component-subscription.md index 48ddca93..35ebb203 100644 --- a/doc/models/subscription-component-subscription.md +++ b/doc/models/subscription-component-subscription.md @@ -1,7 +1,7 @@ # Subscription Component Subscription -An optional object, will be returned if provided `include=subscription` query param. +(Optional) Object that will be returned if the `include=subscription` query param is provided. ## Structure @@ -14,12 +14,18 @@ An optional object, will be returned if provided `include=subscription` query pa | `State` | [`SubscriptionState?`](../../doc/models/subscription-state.md) | Optional | The state of a subscription.

* **Live States**
* `active` - A normal, active subscription. It is not in a trial and is paid and up to date.
* `assessing` - An internal (transient) state that indicates a subscription is in the middle of periodic assessment. Do not base any access decisions in your app on this state, as it may not always be exposed.
* `pending` - An internal (transient) state that indicates a subscription is in the creation process. Do not base any access decisions in your app on this state, as it may not always be exposed.
* `trialing` - A subscription in trialing state has a valid trial subscription. This type of subscription may transition to active once payment is received when the trial has ended. Otherwise, it may go to a Problem or End of Life state.
* `paused` - An internal state that indicates that your account with Advanced Billing is in arrears.
* **Problem States**
* `past_due` - Indicates that the most recent payment has failed, and payment is past due for this subscription. If you have enabled our automated dunning, this subscription will be in the dunning process (additional status and callbacks from the dunning process will be available in the future). If you are handling dunning and payment updates yourself, you will want to use this state to initiate a payment update from your customers.
* `soft_failure` - Indicates that normal assessment/processing of the subscription has failed for a reason that cannot be fixed by the Customer. For example, a Soft Fail may result from a timeout at the gateway or incorrect credentials on your part. The subscriptions should be retried automatically. An interface is being built for you to review problems resulting from these events to take manual action when needed.
* `unpaid` - Indicates an unpaid subscription. A subscription is marked unpaid if the retry period expires and you have configured your [Dunning](https://maxio.zendesk.com/hc/en-us/articles/24287076583565-Dunning-Overview) settings to have a Final Action of `mark the subscription unpaid`.
* **End of Life States**
* `canceled` - Indicates a canceled subscription. This may happen at your request (via the API or the web interface) or due to the expiration of the [Dunning](https://maxio.zendesk.com/hc/en-us/articles/24287076583565-Dunning-Overview) process without payment. See the [Reactivation](https://maxio.zendesk.com/hc/en-us/articles/24252109503629-Reactivating-and-Resuming) documentation for info on how to restart a canceled subscription.
While a subscription is canceled, its period will not advance, it will not accrue any new charges, and Advanced Billing will not attempt to collect the overdue balance.
* `expired` - Indicates a subscription that has expired due to running its normal life cycle. Some products may be configured to have an expiration period. An expired subscription then is one that stayed active until it fulfilled its full period.
* `failed_to_create` - Indicates that signup has failed. (You may see this state in a signup_failure webhook.)
* `on_hold` - Indicates that a subscription’s billing has been temporarily stopped. While it is expected that the subscription will resume and return to active status, this is still treated as an “End of Life” state because the customer is not paying for services during this time.
* `suspended` - Indicates that a prepaid subscription has used up all their prepayment balance. If a prepayment is applied, it will return to an active state.
* `trial_ended` - A subscription in a trial_ended state is a subscription that completed a no-obligation trial and did not have a card on file at the expiration of the trial period. See [Product Pricing – No Obligation Trials](https://maxio.zendesk.com/hc/en-us/articles/24261076617869-Product-Editing) for more details.

See [Subscription States](https://maxio.zendesk.com/hc/en-us/articles/24252119027853-Subscription-States) for more info about subscription states and state transitions. | | `UpdatedAt` | `DateTimeOffset?` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Globalization; + +SubscriptionComponentSubscription subscriptionComponentSubscription = new SubscriptionComponentSubscription { - "state": "paused", - "updated_at": "2016-03-13T12:52:32.123Z" -} + State = SubscriptionState.Assessing, + UpdatedAt = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), +}; ``` diff --git a/doc/models/subscription-component.md b/doc/models/subscription-component.md index 4feeb4f1..1098bb93 100644 --- a/doc/models/subscription-component.md +++ b/doc/models/subscription-component.md @@ -13,8 +13,8 @@ | `Name` | `string` | Optional | - | | `Kind` | [`ComponentKind?`](../../doc/models/component-kind.md) | Optional | A handle for the component type | | `UnitName` | `string` | Optional | - | -| `Enabled` | `bool?` | Optional | (for on/off components) indicates if the component is enabled for the subscription | -| `UnitBalance` | `int?` | Optional | - | +| `Enabled` | `bool?` | Optional | (for on/off components) indicates if the component is enabled for the subscription. | +| `UnitBalance` | [`SubscriptionComponentUnitBalance`](../../doc/models/containers/subscription-component-unit-balance.md) | Optional | This is a container for one-of cases. | | `Currency` | `string` | Optional | - | | `AllocatedQuantity` | [`SubscriptionComponentAllocatedQuantity`](../../doc/models/containers/subscription-component-allocated-quantity.md) | Optional | This is a container for one-of cases. | | `PricingScheme` | [`PricingScheme?`](../../doc/models/pricing-scheme.md) | Optional | - | @@ -36,21 +36,24 @@ | `UseSiteExchangeRate` | `bool?` | Optional | - | | `Description` | `string` | Optional | - | | `AllowFractionalQuantities` | `bool?` | Optional | - | -| `Subscription` | [`SubscriptionComponentSubscription`](../../doc/models/subscription-component-subscription.md) | Optional | An optional object, will be returned if provided `include=subscription` query param. | +| `Subscription` | [`SubscriptionComponentSubscription`](../../doc/models/subscription-component-subscription.md) | Optional | (Optional) Object that will be returned if the `include=subscription` query param is provided. | | `HistoricUsages` | [`List`](../../doc/models/historic-usage.md) | Optional | - | | `DisplayOnHostedPage` | `bool?` | Optional | - | -| `Interval` | `int?` | Optional | The numerical interval. i.e. an interval of '30' coupled with an interval_unit of day would mean this component price point would renew every 30 days. This property is only available for sites with Multifrequency enabled. | +| `Interval` | `int?` | Optional | The numerical interval. e.g., an interval of '30' coupled with an interval_unit of day would mean this component price point would renew every 30 days. This property is only available for sites with Multifrequency enabled. | | `IntervalUnit` | [`IntervalUnit?`](../../doc/models/interval-unit.md) | Optional | A string representing the interval unit for this component price point, either month or day. This property is only available for sites with Multifrequency enabled. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +SubscriptionComponent subscriptionComponent = new SubscriptionComponent { - "id": 20, - "name": "name8", - "kind": "quantity_based_component", - "unit_name": "unit_name0", - "enabled": false -} + Id = 254, + Name = "name8", + Kind = ComponentKind.QuantityBasedComponent, + UnitName = "unit_name0", + Enabled = false, +}; ``` diff --git a/doc/models/subscription-custom-price.md b/doc/models/subscription-custom-price.md index 3e231a40..e2312033 100644 --- a/doc/models/subscription-custom-price.md +++ b/doc/models/subscription-custom-price.md @@ -19,25 +19,29 @@ | `TrialPriceInCents` | [`SubscriptionCustomPriceTrialPriceInCents`](../../doc/models/containers/subscription-custom-price-trial-price-in-cents.md) | Optional | This is a container for one-of cases. | | `TrialInterval` | [`SubscriptionCustomPriceTrialInterval`](../../doc/models/containers/subscription-custom-price-trial-interval.md) | Optional | This is a container for one-of cases. | | `TrialIntervalUnit` | [`IntervalUnit?`](../../doc/models/interval-unit.md) | Optional | (Optional) | -| `TrialType` | [`TrialType?`](../../doc/models/trial-type.md) | Optional | Indicates how a trial is handled when the trail period ends and there is no credit card on file. For `no_obligation`, the subscription transitions to a Trial Ended state. Maxio will not send any emails or statements. For `payment_expected`, the subscription transitions to a Past Due state. Maxio will send normal dunning emails and statements according to your other settings. | +| `TrialType` | [`TrialType?`](../../doc/models/trial-type.md) | Optional | Indicates how a trial is handled when the trial period ends and there is no credit card on file. For `no_obligation`, the subscription transitions to a Trial Ended state. Maxio will not send any emails or statements. For `payment_expected`, the subscription transitions to a Past Due state. Maxio will send normal dunning emails and statements according to your other settings. | | `InitialChargeInCents` | [`SubscriptionCustomPriceInitialChargeInCents`](../../doc/models/containers/subscription-custom-price-initial-charge-in-cents.md) | Optional | This is a container for one-of cases. | | `InitialChargeAfterTrial` | `bool?` | Optional | (Optional) | | `ExpirationInterval` | [`SubscriptionCustomPriceExpirationInterval`](../../doc/models/containers/subscription-custom-price-expiration-interval.md) | Optional | This is a container for one-of cases. | | `ExpirationIntervalUnit` | [`ExpirationIntervalUnit?`](../../doc/models/expiration-interval-unit.md) | Optional | (Optional) | | `TaxIncluded` | `bool?` | Optional | (Optional) | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using AdvancedBilling.Standard.Models.Containers; + +SubscriptionCustomPrice subscriptionCustomPrice = new SubscriptionCustomPrice { - "name": "name4", - "handle": "handle0", - "price_in_cents": "String3", - "interval": "String3", - "interval_unit": "day", - "trial_price_in_cents": "String3", - "trial_interval": "String5", - "trial_interval_unit": "day" -} + PriceInCents = SubscriptionCustomPricePriceInCents.FromString("String5"), + Interval = SubscriptionCustomPriceInterval.FromString("String1"), + IntervalUnit = IntervalUnit.Day, + Name = "name2", + Handle = "handle8", + TrialPriceInCents = SubscriptionCustomPriceTrialPriceInCents.FromString("String5"), + TrialInterval = SubscriptionCustomPriceTrialInterval.FromString("String9"), + TrialIntervalUnit = IntervalUnit.Day, +}; ``` diff --git a/doc/models/subscription-date-field.md b/doc/models/subscription-date-field.md index 96ed6f37..24f05738 100644 --- a/doc/models/subscription-date-field.md +++ b/doc/models/subscription-date-field.md @@ -19,3 +19,11 @@ | `TrialEndedAt` | | `UpdatedAt` | +## Example + +```csharp +using AdvancedBilling.Standard.Models; + +SubscriptionDateField subscriptionDateField = SubscriptionDateField.UpdatedAt; +``` + diff --git a/doc/models/subscription-filter.md b/doc/models/subscription-filter.md index 339a88d2..740751fc 100644 --- a/doc/models/subscription-filter.md +++ b/doc/models/subscription-filter.md @@ -18,19 +18,29 @@ Nested filter used for List Subscription Components For Site Filter | `StartDatetime` | `DateTimeOffset?` | Optional | The start date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns components that belong to the subscription with a timestamp at or after exact time provided in query. You can specify timezone in query - otherwise your site''s time zone will be used. If provided, this parameter will be used instead of start_date. To use this filter you also have to include the following param in the request `include=subscription`. | | `EndDatetime` | `DateTimeOffset?` | Optional | The end date and time (format YYYY-MM-DD HH:MM:SS) with which to filter the date_field. Returns components that belong to the subscription with a timestamp at or before exact time provided in query. You can specify timezone in query - otherwise your site''s time zone will be used. If provided, this parameter will be used instead of end_date. To use this filter you also have to include the following param in the request `include=subscription`. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Collections.Generic; +using System.Globalization; + +SubscriptionFilter subscriptionFilter = new SubscriptionFilter { - "states": [ - "active", - "canceled" - ], - "start_date": "2024-01-17", - "end_date": "2024-01-31", - "start_datetime": "01/17/2024 09:15:30", - "end_datetime": "01/17/2024 17:20:06", - "date_field": "updated_at" -} + States = new List + { + SubscriptionStateFilter.Active, + SubscriptionStateFilter.Canceled, + }, + DateField = SubscriptionListDateField.UpdatedAt, + StartDate = DateTime.Parse("2024-01-17"), + EndDate = DateTime.Parse("2024-01-31"), + StartDatetime = DateTime.ParseExact("2024-01-17T09:15:30+00:00", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + EndDatetime = DateTime.ParseExact("2024-01-17T17:20:06Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), +}; ``` diff --git a/doc/models/subscription-group-balances.md b/doc/models/subscription-group-balances.md index 71bfa040..e49eaeb0 100644 --- a/doc/models/subscription-group-balances.md +++ b/doc/models/subscription-group-balances.md @@ -14,30 +14,37 @@ | `OpenInvoices` | [`AccountBalance`](../../doc/models/account-balance.md) | Optional | - | | `PendingDiscounts` | [`AccountBalance`](../../doc/models/account-balance.md) | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +SubscriptionGroupBalances subscriptionGroupBalances = new SubscriptionGroupBalances { - "prepayments": { - "balance_in_cents": 192, - "automatic_balance_in_cents": 178, - "remittance_balance_in_cents": 146 - }, - "service_credits": { - "balance_in_cents": 84, - "automatic_balance_in_cents": 70, - "remittance_balance_in_cents": 38 - }, - "open_invoices": { - "balance_in_cents": 40, - "automatic_balance_in_cents": 202, - "remittance_balance_in_cents": 170 - }, - "pending_discounts": { - "balance_in_cents": 88, - "automatic_balance_in_cents": 154, - "remittance_balance_in_cents": 134 - } -} + Prepayments = new AccountBalance + { + BalanceInCents = 192L, + AutomaticBalanceInCents = 178L, + RemittanceBalanceInCents = 146L, + }, + ServiceCredits = new AccountBalance + { + BalanceInCents = 84L, + AutomaticBalanceInCents = 70L, + RemittanceBalanceInCents = 38L, + }, + OpenInvoices = new AccountBalance + { + BalanceInCents = 40L, + AutomaticBalanceInCents = 202L, + RemittanceBalanceInCents = 170L, + }, + PendingDiscounts = new AccountBalance + { + BalanceInCents = 88L, + AutomaticBalanceInCents = 154L, + RemittanceBalanceInCents = 134L, + }, +}; ``` diff --git a/doc/models/subscription-group-bank-account.md b/doc/models/subscription-group-bank-account.md index c7bccb4a..71082d71 100644 --- a/doc/models/subscription-group-bank-account.md +++ b/doc/models/subscription-group-bank-account.md @@ -11,9 +11,9 @@ | --- | --- | --- | --- | | `BankName` | `string` | Optional | (Required when creating a subscription with ACH or GoCardless) The name of the bank where the customer’s account resides | | `BankAccountNumber` | `string` | Optional | (Required when creating a subscription with ACH. Required when creating a subscription with GoCardless and bank_iban is blank) The customerʼs bank account number | -| `BankRoutingNumber` | `string` | Optional | (Required when creating a subscription with ACH. Optional when creating a subscription with GoCardless). The routing number of the bank. It becomes bank_code while passing via GoCardless API | -| `BankIban` | `string` | Optional | (Optional when creating a subscription with GoCardless). International Bank Account Number. Alternatively, local bank details can be provided | -| `BankBranchCode` | `string` | Optional | (Optional when creating a subscription with GoCardless) Branch code. Alternatively, an IBAN can be provided | +| `BankRoutingNumber` | `string` | Optional | (Required when creating a subscription with ACH. Optional when creating a subscription with GoCardless.) The routing number of the bank. It becomes bank_code while passing via GoCardless API. | +| `BankIban` | `string` | Optional | (Optional when creating a subscription with GoCardless). International Bank Account Number. Alternatively, local bank details can be provided. | +| `BankBranchCode` | `string` | Optional | (Optional when creating a subscription with GoCardless) Branch code. Alternatively, an IBAN can be provided. | | `BankAccountType` | [`BankAccountType?`](../../doc/models/bank-account-type.md) | Optional | Defaults to checking | | `BankAccountHolderType` | [`BankAccountHolderType?`](../../doc/models/bank-account-holder-type.md) | Optional | Defaults to personal | | `PaymentType` | [`PaymentType?`](../../doc/models/payment-type.md) | Optional | - | @@ -26,15 +26,18 @@ | `CurrentVault` | [`BankAccountVault?`](../../doc/models/bank-account-vault.md) | Optional | The vault that stores the payment profile with the provided vault_token. Use `bogus` for testing. | | `GatewayHandle` | `string` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +SubscriptionGroupBankAccount subscriptionGroupBankAccount = new SubscriptionGroupBankAccount { - "bank_name": "bank_name2", - "bank_account_number": "bank_account_number4", - "bank_routing_number": "bank_routing_number8", - "bank_iban": "bank_iban6", - "bank_branch_code": "bank_branch_code6" -} + BankName = "bank_name2", + BankAccountNumber = "bank_account_number4", + BankRoutingNumber = "bank_routing_number8", + BankIban = "bank_iban6", + BankBranchCode = "bank_branch_code6", +}; ``` diff --git a/doc/models/subscription-group-component-custom-price.md b/doc/models/subscription-group-component-custom-price.md index 07203173..6d849ef6 100644 --- a/doc/models/subscription-group-component-custom-price.md +++ b/doc/models/subscription-group-component-custom-price.md @@ -15,34 +15,85 @@ Used in place of `price_point_id` to define a custom price point unique to the s | `Prices` | [`List`](../../doc/models/price.md) | Optional | - | | `OveragePricing` | [`List`](../../doc/models/component-custom-price.md) | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using AdvancedBilling.Standard.Models.Containers; +using System.Collections.Generic; + +SubscriptionGroupComponentCustomPrice subscriptionGroupComponentCustomPrice = new SubscriptionGroupComponentCustomPrice { - "pricing_scheme": "per_unit", - "prices": [ + PricingScheme = PricingScheme.Stairstep, + Prices = new List { - "starting_quantity": 242, - "ending_quantity": 40, - "unit_price": 23.26 - } - ], - "overage_pricing": [ + new Price + { + StartingQuantity = PriceStartingQuantity.FromNumber(242), + UnitPrice = PriceUnitPrice.FromPrecision(23.26), + EndingQuantity = PriceEndingQuantity.FromNumber(40), + }, + new Price + { + StartingQuantity = PriceStartingQuantity.FromNumber(242), + UnitPrice = PriceUnitPrice.FromPrecision(23.26), + EndingQuantity = PriceEndingQuantity.FromNumber(40), + }, + }, + OveragePricing = new List { - "tax_included": false, - "pricing_scheme": "stairstep", - "interval": 230, - "interval_unit": "day", - "list_price_point_id": 10, - "prices": [ + new ComponentCustomPrice + { + Prices = new List + { + new Price + { + StartingQuantity = PriceStartingQuantity.FromNumber(242), + UnitPrice = PriceUnitPrice.FromPrecision(23.26), + EndingQuantity = PriceEndingQuantity.FromNumber(40), + }, + }, + TaxIncluded = false, + PricingScheme = PricingScheme.Stairstep, + Interval = 230, + IntervalUnit = IntervalUnit.Day, + ListPricePointId = 10, + }, + new ComponentCustomPrice + { + Prices = new List + { + new Price + { + StartingQuantity = PriceStartingQuantity.FromNumber(242), + UnitPrice = PriceUnitPrice.FromPrecision(23.26), + EndingQuantity = PriceEndingQuantity.FromNumber(40), + }, + }, + TaxIncluded = false, + PricingScheme = PricingScheme.Stairstep, + Interval = 230, + IntervalUnit = IntervalUnit.Day, + ListPricePointId = 10, + }, + new ComponentCustomPrice { - "starting_quantity": 242, - "ending_quantity": 40, - "unit_price": 23.26 - } - ] - } - ] -} + Prices = new List + { + new Price + { + StartingQuantity = PriceStartingQuantity.FromNumber(242), + UnitPrice = PriceUnitPrice.FromPrecision(23.26), + EndingQuantity = PriceEndingQuantity.FromNumber(40), + }, + }, + TaxIncluded = false, + PricingScheme = PricingScheme.Stairstep, + Interval = 230, + IntervalUnit = IntervalUnit.Day, + ListPricePointId = 10, + }, + }, +}; ``` diff --git a/doc/models/subscription-group-create-error-response-exception.md b/doc/models/subscription-group-create-error-response-exception.md index ca0fad4a..f7743e6b 100644 --- a/doc/models/subscription-group-create-error-response-exception.md +++ b/doc/models/subscription-group-create-error-response-exception.md @@ -11,15 +11,20 @@ | --- | --- | --- | --- | | `Errors` | [`SubscriptionGroupCreateErrorResponseErrors`](../../doc/models/containers/subscription-group-create-error-response-errors.md) | Required | This is a container for one-of cases. | -## Example (as JSON) +## Example -```json +```csharp +try { - "errors": { - "members": [ - "members6" - ] - } + // make the API call +} +catch (ApiException e) +{ + if (e is SubscriptionGroupCreateErrorResponseException) + { + // TODO: Handle SubscriptionGroupCreateErrorResponseException + Console.WriteLine(e.Message); + } } ``` diff --git a/doc/models/subscription-group-credit-card.md b/doc/models/subscription-group-credit-card.md index be864b07..bae1c587 100644 --- a/doc/models/subscription-group-credit-card.md +++ b/doc/models/subscription-group-credit-card.md @@ -30,16 +30,20 @@ | `Cvv` | `string` | Optional | - | | `PaymentType` | `string` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using AdvancedBilling.Standard.Models.Containers; + +SubscriptionGroupCreditCard subscriptionGroupCreditCard = new SubscriptionGroupCreditCard { - "chargify_token": "tok_592nf92ng0sjd4300p", - "full_number": 4111111111111111, - "vault_token": "vault_token6", - "current_vault": "braintree_blue", - "gateway_handle": "gateway_handle6", - "first_name": "first_name4" -} + ChargifyToken = "tok_592nf92ng0sjd4300p", + VaultToken = "vault_token0", + CurrentVault = CreditCardVault.BlueSnap, + GatewayHandle = "gateway_handle0", + FirstName = "first_name8", + FullNumber = SubscriptionGroupCreditCardFullNumber.FromNumber(4111111111111111), +}; ``` diff --git a/doc/models/subscription-group-customer.md b/doc/models/subscription-group-customer.md index 053d8840..554d430e 100644 --- a/doc/models/subscription-group-customer.md +++ b/doc/models/subscription-group-customer.md @@ -15,15 +15,18 @@ | `Email` | `string` | Optional | - | | `Reference` | `string` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +SubscriptionGroupCustomer subscriptionGroupCustomer = new SubscriptionGroupCustomer { - "first_name": "first_name4", - "last_name": "last_name2", - "organization": "organization2", - "email": "email2", - "reference": "reference0" -} + FirstName = "first_name6", + LastName = "last_name4", + Organization = "organization0", + Email = "email0", + Reference = "reference8", +}; ``` diff --git a/doc/models/subscription-group-include.md b/doc/models/subscription-group-include.md index a9b79d1a..63ea7706 100644 --- a/doc/models/subscription-group-include.md +++ b/doc/models/subscription-group-include.md @@ -11,3 +11,11 @@ | --- | | `CurrentBillingAmountInCents` | +## Example + +```csharp +using AdvancedBilling.Standard.Models; + +SubscriptionGroupInclude subscriptionGroupInclude = SubscriptionGroupInclude.CurrentBillingAmountInCents; +``` + diff --git a/doc/models/subscription-group-item.md b/doc/models/subscription-group-item.md index 9ac4a6f3..36851a4b 100644 --- a/doc/models/subscription-group-item.md +++ b/doc/models/subscription-group-item.md @@ -20,15 +20,18 @@ | `TotalRevenueInCents` | `long?` | Optional | - | | `BalanceInCents` | `long?` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +SubscriptionGroupItem subscriptionGroupItem = new SubscriptionGroupItem { - "id": 16, - "reference": "reference8", - "product_id": 214, - "product_handle": "product_handle4", - "product_price_point_id": 138 -} + Id = 26, + Reference = "reference4", + ProductId = 32, + ProductHandle = "product_handle8", + ProductPricePointId = 148, +}; ``` diff --git a/doc/models/subscription-group-members-array-error.md b/doc/models/subscription-group-members-array-error.md index 923d16cf..ea9ef01c 100644 --- a/doc/models/subscription-group-members-array-error.md +++ b/doc/models/subscription-group-members-array-error.md @@ -11,13 +11,18 @@ | --- | --- | --- | --- | | `Members` | `List` | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Collections.Generic; + +SubscriptionGroupMembersArrayError subscriptionGroupMembersArrayError = new SubscriptionGroupMembersArrayError { - "members": [ - "members6" - ] -} + Members = new List + { + "members6", + }, +}; ``` diff --git a/doc/models/subscription-group-payment-profile.md b/doc/models/subscription-group-payment-profile.md index bfb9a08b..d8bfdef9 100644 --- a/doc/models/subscription-group-payment-profile.md +++ b/doc/models/subscription-group-payment-profile.md @@ -14,14 +14,17 @@ | `LastName` | `string` | Optional | - | | `MaskedCardNumber` | `string` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +SubscriptionGroupPaymentProfile subscriptionGroupPaymentProfile = new SubscriptionGroupPaymentProfile { - "id": 22, - "first_name": "first_name4", - "last_name": "last_name2", - "masked_card_number": "masked_card_number2" -} + Id = 246, + FirstName = "first_name6", + LastName = "last_name4", + MaskedCardNumber = "masked_card_number4", +}; ``` diff --git a/doc/models/subscription-group-prepayment-method.md b/doc/models/subscription-group-prepayment-method.md index fb11c3df..e9302932 100644 --- a/doc/models/subscription-group-prepayment-method.md +++ b/doc/models/subscription-group-prepayment-method.md @@ -16,3 +16,11 @@ | `PaypalAccount` | | `Other` | +## Example + +```csharp +using AdvancedBilling.Standard.Models; + +SubscriptionGroupPrepaymentMethod subscriptionGroupPrepaymentMethod = SubscriptionGroupPrepaymentMethod.Check; +``` + diff --git a/doc/models/subscription-group-prepayment-request.md b/doc/models/subscription-group-prepayment-request.md index 1b26d756..4f7e0683 100644 --- a/doc/models/subscription-group-prepayment-request.md +++ b/doc/models/subscription-group-prepayment-request.md @@ -11,16 +11,20 @@ | --- | --- | --- | --- | | `Prepayment` | [`SubscriptionGroupPrepayment`](../../doc/models/subscription-group-prepayment.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +SubscriptionGroupPrepaymentRequest subscriptionGroupPrepaymentRequest = new SubscriptionGroupPrepaymentRequest { - "prepayment": { - "amount": 136, - "details": "details8", - "memo": "memo2", - "method": "paypal_account" - } -} + Prepayment = new SubscriptionGroupPrepayment + { + Amount = 136, + Details = "details8", + Memo = "memo2", + Method = SubscriptionGroupPrepaymentMethod.PaypalAccount, + }, +}; ``` diff --git a/doc/models/subscription-group-prepayment-response.md b/doc/models/subscription-group-prepayment-response.md index 8a61bb91..2f67f536 100644 --- a/doc/models/subscription-group-prepayment-response.md +++ b/doc/models/subscription-group-prepayment-response.md @@ -15,15 +15,18 @@ | `EntryType` | [`ServiceCreditType?`](../../doc/models/service-credit-type.md) | Optional | The type of entry | | `Memo` | `string` | Optional | A memo attached to the entry. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +SubscriptionGroupPrepaymentResponse subscriptionGroupPrepaymentResponse = new SubscriptionGroupPrepaymentResponse { - "id": 110, - "amount_in_cents": 196, - "ending_balance_in_cents": 236, - "entry_type": "Credit", - "memo": "memo2" -} + Id = 32, + AmountInCents = 138L, + EndingBalanceInCents = 158L, + EntryType = ServiceCreditType.Credit, + Memo = "memo2", +}; ``` diff --git a/doc/models/subscription-group-prepayment.md b/doc/models/subscription-group-prepayment.md index f15fe16a..00ea8966 100644 --- a/doc/models/subscription-group-prepayment.md +++ b/doc/models/subscription-group-prepayment.md @@ -14,14 +14,17 @@ | `Memo` | `string` | Required | - | | `Method` | [`SubscriptionGroupPrepaymentMethod`](../../doc/models/subscription-group-prepayment-method.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +SubscriptionGroupPrepayment subscriptionGroupPrepayment = new SubscriptionGroupPrepayment { - "amount": 96, - "details": "details2", - "memo": "memo6", - "method": "money_order" -} + Amount = 12, + Details = "details4", + Memo = "memo8", + Method = SubscriptionGroupPrepaymentMethod.MoneyOrder, +}; ``` diff --git a/doc/models/subscription-group-response.md b/doc/models/subscription-group-response.md index 3eb25366..41ab5fbf 100644 --- a/doc/models/subscription-group-response.md +++ b/doc/models/subscription-group-response.md @@ -11,25 +11,32 @@ | --- | --- | --- | --- | | `SubscriptionGroup` | [`SubscriptionGroup`](../../doc/models/subscription-group.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Collections.Generic; + +SubscriptionGroupResponse subscriptionGroupResponse = new SubscriptionGroupResponse { - "subscription_group": { - "uid": "uid8", - "customer_id": 220, - "payment_profile": { - "id": 44, - "first_name": "first_name4", - "last_name": "last_name2", - "masked_card_number": "masked_card_number2" + SubscriptionGroup = new SubscriptionGroup + { + Uid = "uid8", + CustomerId = 220, + PaymentProfile = new SubscriptionGroupPaymentProfile + { + Id = 44, + FirstName = "first_name4", + LastName = "last_name2", + MaskedCardNumber = "masked_card_number2", + }, + PaymentCollectionMethod = CollectionMethod.Prepaid, + SubscriptionIds = new List + { + 74, + 75, + }, }, - "payment_collection_method": "prepaid", - "subscription_ids": [ - 74, - 75 - ] - } -} +}; ``` diff --git a/doc/models/subscription-group-signup-component.md b/doc/models/subscription-group-signup-component.md index 87efca50..b91aa66d 100644 --- a/doc/models/subscription-group-signup-component.md +++ b/doc/models/subscription-group-signup-component.md @@ -15,73 +15,92 @@ | `PricePointId` | [`SubscriptionGroupSignupComponentPricePointId`](../../doc/models/containers/subscription-group-signup-component-price-point-id.md) | Optional | This is a container for one-of cases. | | `CustomPrice` | [`SubscriptionGroupComponentCustomPrice`](../../doc/models/subscription-group-component-custom-price.md) | Optional | Used in place of `price_point_id` to define a custom price point unique to the subscription. You still need to provide `component_id`. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using AdvancedBilling.Standard.Models.Containers; +using System.Collections.Generic; + +SubscriptionGroupSignupComponent subscriptionGroupSignupComponent = new SubscriptionGroupSignupComponent { - "component_id": "String1", - "allocated_quantity": "String5", - "unit_balance": "String9", - "price_point_id": "String5", - "custom_price": { - "pricing_scheme": "stairstep", - "prices": [ - { - "starting_quantity": 242, - "ending_quantity": 40, - "unit_price": 23.26 - }, - { - "starting_quantity": 242, - "ending_quantity": 40, - "unit_price": 23.26 - } - ], - "overage_pricing": [ - { - "tax_included": false, - "pricing_scheme": "stairstep", - "interval": 230, - "interval_unit": "day", - "list_price_point_id": 10, - "prices": [ - { - "starting_quantity": 242, - "ending_quantity": 40, - "unit_price": 23.26 - } - ] - }, - { - "tax_included": false, - "pricing_scheme": "stairstep", - "interval": 230, - "interval_unit": "day", - "list_price_point_id": 10, - "prices": [ - { - "starting_quantity": 242, - "ending_quantity": 40, - "unit_price": 23.26 - } - ] - }, - { - "tax_included": false, - "pricing_scheme": "stairstep", - "interval": 230, - "interval_unit": "day", - "list_price_point_id": 10, - "prices": [ - { - "starting_quantity": 242, - "ending_quantity": 40, - "unit_price": 23.26 - } - ] - } - ] - } -} + ComponentId = SubscriptionGroupSignupComponentComponentId.FromString("String7"), + AllocatedQuantity = SubscriptionGroupSignupComponentAllocatedQuantity.FromString("String1"), + UnitBalance = SubscriptionGroupSignupComponentUnitBalance.FromString("String5"), + PricePointId = SubscriptionGroupSignupComponentPricePointId.FromString("String1"), + CustomPrice = new SubscriptionGroupComponentCustomPrice + { + PricingScheme = PricingScheme.Stairstep, + Prices = new List + { + new Price + { + StartingQuantity = PriceStartingQuantity.FromNumber(242), + UnitPrice = PriceUnitPrice.FromPrecision(23.26), + EndingQuantity = PriceEndingQuantity.FromNumber(40), + }, + new Price + { + StartingQuantity = PriceStartingQuantity.FromNumber(242), + UnitPrice = PriceUnitPrice.FromPrecision(23.26), + EndingQuantity = PriceEndingQuantity.FromNumber(40), + }, + }, + OveragePricing = new List + { + new ComponentCustomPrice + { + Prices = new List + { + new Price + { + StartingQuantity = PriceStartingQuantity.FromNumber(242), + UnitPrice = PriceUnitPrice.FromPrecision(23.26), + EndingQuantity = PriceEndingQuantity.FromNumber(40), + }, + }, + TaxIncluded = false, + PricingScheme = PricingScheme.Stairstep, + Interval = 230, + IntervalUnit = IntervalUnit.Day, + ListPricePointId = 10, + }, + new ComponentCustomPrice + { + Prices = new List + { + new Price + { + StartingQuantity = PriceStartingQuantity.FromNumber(242), + UnitPrice = PriceUnitPrice.FromPrecision(23.26), + EndingQuantity = PriceEndingQuantity.FromNumber(40), + }, + }, + TaxIncluded = false, + PricingScheme = PricingScheme.Stairstep, + Interval = 230, + IntervalUnit = IntervalUnit.Day, + ListPricePointId = 10, + }, + new ComponentCustomPrice + { + Prices = new List + { + new Price + { + StartingQuantity = PriceStartingQuantity.FromNumber(242), + UnitPrice = PriceUnitPrice.FromPrecision(23.26), + EndingQuantity = PriceEndingQuantity.FromNumber(40), + }, + }, + TaxIncluded = false, + PricingScheme = PricingScheme.Stairstep, + Interval = 230, + IntervalUnit = IntervalUnit.Day, + ListPricePointId = 10, + }, + }, + }, +}; ``` diff --git a/doc/models/subscription-group-signup-error-response-exception.md b/doc/models/subscription-group-signup-error-response-exception.md index 9796da9e..9323a440 100644 --- a/doc/models/subscription-group-signup-error-response-exception.md +++ b/doc/models/subscription-group-signup-error-response-exception.md @@ -11,60 +11,20 @@ | --- | --- | --- | --- | | `Errors` | [`SubscriptionGroupSignupError`](../../doc/models/subscription-group-signup-error.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +try { - "errors": { - "subscriptions": { - "0": { - "payment_profile.chargify_token": [ - "Chargify token not found" - ], - "product": [ - "Product must be among the Products for this Site" - ], - "product_price_point_id": [ - "Product price point must belong to product." - ], - "base": [ - "No payment method was on file for the $30.00 balance'" - ], - "payment_profile.expiration_month": [ - "Credit card expiration month: cannot be blank." - ], - "payment_profile.expiration_year": [ - "Credit card expiration year: cannot be blank." - ], - "payment_profile.full_number": [ - "Credit card number: cannot be blank." - ], - "payment_profile": [ - "payment_profile2" - ] - } - }, - "payer_reference": "payer_reference4", - "payer": { - "last_name": [ - "last_name5", - "last_name6" - ], - "first_name": [ - "first_name8" - ], - "email": [ - "email0", - "email9" - ] - }, - "subscription_group": [ - "subscription_group7", - "subscription_group8", - "subscription_group9" - ], - "payment_profile_id": "payment_profile_id8" - } + // make the API call +} +catch (ApiException e) +{ + if (e is SubscriptionGroupSignupErrorResponseException) + { + // TODO: Handle SubscriptionGroupSignupErrorResponseException + Console.WriteLine(e.Message); + } } ``` diff --git a/doc/models/subscription-group-signup-error.md b/doc/models/subscription-group-signup-error.md index 00b7711b..3e406bd8 100644 --- a/doc/models/subscription-group-signup-error.md +++ b/doc/models/subscription-group-signup-error.md @@ -16,67 +16,114 @@ | `PaymentProfileId` | `string` | Optional | - | | `PayerId` | `string` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Collections.Generic; + +SubscriptionGroupSignupError subscriptionGroupSignupError = new SubscriptionGroupSignupError { - "subscriptions": { - "key0": { - "product": [ - "product9" - ], - "product_price_point_id": [ - "product_price_point_id7" - ], - "payment_profile": [ - "payment_profile2" - ], - "payment_profile.chargify_token": [ - "payment_profile.chargify_token6" - ], - "base": [ - "base5", - "base6" - ] + Subscriptions = new Dictionary + { + ["key0"] = new SubscriptionGroupSubscriptionError + { + Product = new List + { + "product9", + }, + ProductPricePointId = new List + { + "product_price_point_id7", + }, + PaymentProfile = new List + { + "payment_profile2", + }, + PaymentProfileChargifyToken = new List + { + "payment_profile.chargify_token6", + }, + MBase = new List + { + "base5", + "base6", + }, + }, + ["key1"] = new SubscriptionGroupSubscriptionError + { + Product = new List + { + "product9", + }, + ProductPricePointId = new List + { + "product_price_point_id7", + }, + PaymentProfile = new List + { + "payment_profile2", + }, + PaymentProfileChargifyToken = new List + { + "payment_profile.chargify_token6", + }, + MBase = new List + { + "base5", + "base6", + }, + }, + ["key2"] = new SubscriptionGroupSubscriptionError + { + Product = new List + { + "product9", + }, + ProductPricePointId = new List + { + "product_price_point_id7", + }, + PaymentProfile = new List + { + "payment_profile2", + }, + PaymentProfileChargifyToken = new List + { + "payment_profile.chargify_token6", + }, + MBase = new List + { + "base5", + "base6", + }, + }, + }, + PayerReference = "payer_reference8", + Payer = new PayerError + { + LastName = new List + { + "last_name5", + "last_name6", + }, + FirstName = new List + { + "first_name8", + }, + Email = new List + { + "email0", + "email9", + }, + }, + SubscriptionGroup = new List + { + "subscription_group3", + "subscription_group4", + "subscription_group5", }, - "key1": { - "product": [ - "product9" - ], - "product_price_point_id": [ - "product_price_point_id7" - ], - "payment_profile": [ - "payment_profile2" - ], - "payment_profile.chargify_token": [ - "payment_profile.chargify_token6" - ], - "base": [ - "base5", - "base6" - ] - } - }, - "payer_reference": "payer_reference0", - "payer": { - "last_name": [ - "last_name5", - "last_name6" - ], - "first_name": [ - "first_name8" - ], - "email": [ - "email0", - "email9" - ] - }, - "subscription_group": [ - "subscription_group1", - "subscription_group2" - ], - "payment_profile_id": "payment_profile_id2" -} + PaymentProfileId = "payment_profile_id4", +}; ``` diff --git a/doc/models/subscription-group-signup-event-data.md b/doc/models/subscription-group-signup-event-data.md index 0cb21a47..3f9af101 100644 --- a/doc/models/subscription-group-signup-event-data.md +++ b/doc/models/subscription-group-signup-event-data.md @@ -12,30 +12,36 @@ | `SubscriptionGroup` | [`SubscriptionGroupSignupFailureData`](../../doc/models/subscription-group-signup-failure-data.md) | Required | - | | `Customer` | [`Customer`](../../doc/models/customer.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +SubscriptionGroupSignupEventData subscriptionGroupSignupEventData = new SubscriptionGroupSignupEventData { - "subscription_group": { - "payer_id": 150, - "payer_reference": "payer_reference6", - "payment_profile_id": 128, - "payment_collection_method": "payment_collection_method8", - "payer_attributes": { - "first_name": "first_name2", - "last_name": "last_name0", - "email": "email4", - "cc_emails": "cc_emails2", - "organization": "organization6" - } - }, - "customer": { - "first_name": "first_name0", - "last_name": "last_name8", - "email": "email6", - "cc_emails": "cc_emails0", - "organization": "organization6" - } -} + SubscriptionGroup = new SubscriptionGroupSignupFailureData + { + PayerId = 150, + PayerReference = "payer_reference6", + PaymentProfileId = 128, + PaymentCollectionMethod = "payment_collection_method8", + PayerAttributes = new PayerAttributes + { + FirstName = "first_name2", + LastName = "last_name0", + Email = "email4", + CcEmails = "cc_emails2", + Organization = "organization6", + }, + }, + Customer = new Customer + { + FirstName = "first_name0", + LastName = "last_name8", + Email = "email6", + CcEmails = "cc_emails0", + Organization = "organization6", + }, +}; ``` diff --git a/doc/models/subscription-group-signup-failure-data.md b/doc/models/subscription-group-signup-failure-data.md index c9982063..3c959567 100644 --- a/doc/models/subscription-group-signup-failure-data.md +++ b/doc/models/subscription-group-signup-failure-data.md @@ -18,21 +18,25 @@ | `BankAccountAttributes` | [`SubscriptionGroupBankAccount`](../../doc/models/subscription-group-bank-account.md) | Optional | - | | `Subscriptions` | [`List`](../../doc/models/subscription-group-signup-item.md) | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +SubscriptionGroupSignupFailureData subscriptionGroupSignupFailureData = new SubscriptionGroupSignupFailureData { - "payer_id": 16, - "payer_reference": "payer_reference8", - "payment_profile_id": 6, - "payment_collection_method": "payment_collection_method0", - "payer_attributes": { - "first_name": "first_name2", - "last_name": "last_name0", - "email": "email4", - "cc_emails": "cc_emails2", - "organization": "organization6" - } -} + PayerId = 236, + PayerReference = "payer_reference2", + PaymentProfileId = 42, + PaymentCollectionMethod = "payment_collection_method4", + PayerAttributes = new PayerAttributes + { + FirstName = "first_name2", + LastName = "last_name0", + Email = "email4", + CcEmails = "cc_emails2", + Organization = "organization6", + }, +}; ``` diff --git a/doc/models/subscription-group-signup-item.md b/doc/models/subscription-group-signup-item.md index 369e1854..5df5c2fe 100644 --- a/doc/models/subscription-group-signup-item.md +++ b/doc/models/subscription-group-signup-item.md @@ -13,29 +13,34 @@ | `ProductId` | `int?` | Optional | The Product ID of the product for which you are creating a subscription. You can pass either `product_id` or `product_handle`. | | `ProductPricePointId` | `int?` | Optional | The ID of the particular price point on the product. | | `ProductPricePointHandle` | `string` | Optional | The user-friendly API handle of a product's particular price point. | -| `OfferId` | `int?` | Optional | Use in place of passing product and component information to set up the subscription with an existing offer. May be either the Chargify ID of the offer or its handle prefixed with `handle:` | -| `Reference` | `string` | Optional | The reference value (provided by your app) for the subscription itelf. | +| `OfferId` | `int?` | Optional | Use in place of passing product and component information to set up the subscription with an existing offer. May be either the Chargify ID of the offer or its handle prefixed with `handle:`. | +| `Reference` | `string` | Optional | The reference value (provided by your app) for the subscription itself. | | `Primary` | `bool?` | Optional | One of the subscriptions must be marked as primary in the group. | | `Currency` | `string` | Optional | (Optional) If Multi-Currency is enabled and the currency is configured in Chargify, pass it at signup to create a subscription on a non-default currency. Note that you cannot update the currency of an existing subscription. | | `CouponCodes` | `List` | Optional | An array for all the coupons attached to the subscription. | | `Components` | [`List`](../../doc/models/subscription-group-signup-component.md) | Optional | - | | `CustomPrice` | [`SubscriptionCustomPrice`](../../doc/models/subscription-custom-price.md) | Optional | (Optional) Used in place of `product_price_point_id` to define a custom price point unique to the subscription. A subscription can have up to 30 custom price points. Exceeding this limit will result in an API error. | -| `CalendarBilling` | [`CalendarBilling`](../../doc/models/calendar-billing.md) | Optional | (Optional). Cannot be used when also specifying next_billing_at | +| `CalendarBilling` | [`CalendarBilling`](../../doc/models/calendar-billing.md) | Optional | (Optional). Cannot be used when also specifying next_billing_at. | | `Metafields` | `Dictionary` | Optional | (Optional) A set of key/value pairs representing custom fields and their values. Metafields will be created “on-the-fly” in your site for a given key, if they have not been created yet. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Collections.Generic; + +SubscriptionGroupSignupItem subscriptionGroupSignupItem = new SubscriptionGroupSignupItem { - "metafields": { - "custom_field_name_1": "custom_field_value_1", - "custom_field_name_2": "custom_field_value_2" - }, - "product_handle": "product_handle2", - "product_id": 34, - "product_price_point_id": 214, - "product_price_point_handle": "product_price_point_handle4", - "offer_id": 150 -} + ProductHandle = "product_handle8", + ProductId = 12, + ProductPricePointId = 192, + ProductPricePointHandle = "product_price_point_handle8", + OfferId = 172, + Metafields = new Dictionary + { + ["custom_field_name_1"] = "custom_field_value_1", + ["custom_field_name_2"] = "custom_field_value_2", + }, +}; ``` diff --git a/doc/models/subscription-group-signup-request.md b/doc/models/subscription-group-signup-request.md index ab287a59..5e163561 100644 --- a/doc/models/subscription-group-signup-request.md +++ b/doc/models/subscription-group-signup-request.md @@ -11,36 +11,45 @@ | --- | --- | --- | --- | | `SubscriptionGroup` | [`SubscriptionGroupSignup`](../../doc/models/subscription-group-signup.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Collections.Generic; + +SubscriptionGroupSignupRequest subscriptionGroupSignupRequest = new SubscriptionGroupSignupRequest { - "subscription_group": { - "subscriptions": [ - { - "metafields": { - "custom_field_name_1": "custom_field_value_1", - "custom_field_name_2": "custom_field_value_2" + SubscriptionGroup = new SubscriptionGroupSignup + { + Subscriptions = new List + { + new SubscriptionGroupSignupItem + { + ProductHandle = "product_handle8", + ProductId = 144, + ProductPricePointId = 68, + ProductPricePointHandle = "product_price_point_handle4", + OfferId = 40, + Metafields = new Dictionary + { + ["custom_field_name_1"] = "custom_field_value_1", + ["custom_field_name_2"] = "custom_field_value_2", + }, + }, + }, + PaymentProfileId = 128, + PayerId = 150, + PayerReference = "payer_reference6", + PaymentCollectionMethod = CollectionMethod.Prepaid, + PayerAttributes = new PayerAttributes + { + FirstName = "first_name2", + LastName = "last_name0", + Email = "email4", + CcEmails = "cc_emails2", + Organization = "organization6", }, - "product_handle": "product_handle8", - "product_id": 144, - "product_price_point_id": 68, - "product_price_point_handle": "product_price_point_handle4", - "offer_id": 40 - } - ], - "payment_profile_id": 128, - "payer_id": 150, - "payer_reference": "payer_reference6", - "payment_collection_method": "prepaid", - "payer_attributes": { - "first_name": "first_name2", - "last_name": "last_name0", - "email": "email4", - "cc_emails": "cc_emails2", - "organization": "organization6" - } - } -} + }, +}; ``` diff --git a/doc/models/subscription-group-signup-response.md b/doc/models/subscription-group-signup-response.md index d38599ea..a3dcd0f6 100644 --- a/doc/models/subscription-group-signup-response.md +++ b/doc/models/subscription-group-signup-response.md @@ -21,19 +21,22 @@ | `Subscriptions` | [`List`](../../doc/models/subscription-group-item.md) | Optional | - | | `PaymentCollectionMethod` | [`CollectionMethod?`](../../doc/models/collection-method.md) | Optional | The type of payment collection to be used in the subscription. For legacy Statements Architecture valid options are - `invoice`, `automatic`. For current Relationship Invoicing Architecture valid options are - `remittance`, `automatic`, `prepaid`. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Collections.Generic; + +SubscriptionGroupSignupResponse subscriptionGroupSignupResponse = new SubscriptionGroupSignupResponse { - "uid": "uid8", - "scheme": 28, - "customer_id": 48, - "payment_profile_id": 44, - "subscription_ids": [ - 158, - 159, - 160 - ] -} + Uid = "uid4", + Scheme = 60, + CustomerId = 80, + PaymentProfileId = 244, + SubscriptionIds = new List + { + 190, + }, +}; ``` diff --git a/doc/models/subscription-group-signup.md b/doc/models/subscription-group-signup.md index 5ca032c2..c0e8a49a 100644 --- a/doc/models/subscription-group-signup.md +++ b/doc/models/subscription-group-signup.md @@ -18,34 +18,42 @@ | `BankAccountAttributes` | [`SubscriptionGroupBankAccount`](../../doc/models/subscription-group-bank-account.md) | Optional | - | | `Subscriptions` | [`List`](../../doc/models/subscription-group-signup-item.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Collections.Generic; + +SubscriptionGroupSignup subscriptionGroupSignup = new SubscriptionGroupSignup { - "subscriptions": [ + Subscriptions = new List + { + new SubscriptionGroupSignupItem + { + ProductHandle = "product_handle8", + ProductId = 144, + ProductPricePointId = 68, + ProductPricePointHandle = "product_price_point_handle4", + OfferId = 40, + Metafields = new Dictionary + { + ["custom_field_name_1"] = "custom_field_value_1", + ["custom_field_name_2"] = "custom_field_value_2", + }, + }, + }, + PaymentProfileId = 124, + PayerId = 146, + PayerReference = "payer_reference0", + PaymentCollectionMethod = CollectionMethod.Prepaid, + PayerAttributes = new PayerAttributes { - "metafields": { - "custom_field_name_1": "custom_field_value_1", - "custom_field_name_2": "custom_field_value_2" - }, - "product_handle": "product_handle8", - "product_id": 144, - "product_price_point_id": 68, - "product_price_point_handle": "product_price_point_handle4", - "offer_id": 40 - } - ], - "payment_profile_id": 42, - "payer_id": 64, - "payer_reference": "payer_reference8", - "payment_collection_method": "automatic", - "payer_attributes": { - "first_name": "first_name2", - "last_name": "last_name0", - "email": "email4", - "cc_emails": "cc_emails2", - "organization": "organization6" - } -} + FirstName = "first_name2", + LastName = "last_name0", + Email = "email4", + CcEmails = "cc_emails2", + Organization = "organization6", + }, +}; ``` diff --git a/doc/models/subscription-group-single-error.md b/doc/models/subscription-group-single-error.md index 5fe8eb05..ed5b2fe4 100644 --- a/doc/models/subscription-group-single-error.md +++ b/doc/models/subscription-group-single-error.md @@ -11,11 +11,14 @@ | --- | --- | --- | --- | | `SubscriptionGroup` | `string` | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +SubscriptionGroupSingleError subscriptionGroupSingleError = new SubscriptionGroupSingleError { - "subscription_group": "subscription_group2" -} + SubscriptionGroup = "subscription_group0", +}; ``` diff --git a/doc/models/subscription-group-subscription-error.md b/doc/models/subscription-group-subscription-error.md index 757e5e5e..db68489e 100644 --- a/doc/models/subscription-group-subscription-error.md +++ b/doc/models/subscription-group-subscription-error.md @@ -20,31 +20,40 @@ Object which contains subscription errors. | `PaymentProfileExpirationYear` | `List` | Optional | - | | `PaymentProfileFullNumber` | `List` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Collections.Generic; + +SubscriptionGroupSubscriptionError subscriptionGroupSubscriptionError = new SubscriptionGroupSubscriptionError { - "product": [ - "product7", - "product6" - ], - "product_price_point_id": [ - "product_price_point_id9", - "product_price_point_id0" - ], - "payment_profile": [ - "payment_profile4", - "payment_profile5" - ], - "payment_profile.chargify_token": [ - "payment_profile.chargify_token8", - "payment_profile.chargify_token9" - ], - "base": [ - "base7", - "base8", - "base9" - ] -} + Product = new List + { + "product7", + "product8", + }, + ProductPricePointId = new List + { + "product_price_point_id3", + "product_price_point_id4", + }, + PaymentProfile = new List + { + "payment_profile8", + "payment_profile9", + }, + PaymentProfileChargifyToken = new List + { + "payment_profile.chargify_token2", + "payment_profile.chargify_token3", + }, + MBase = new List + { + "base1", + "base2", + "base3", + }, +}; ``` diff --git a/doc/models/subscription-group-update-error-response-exception.md b/doc/models/subscription-group-update-error-response-exception.md index e4f7724a..f2abf3ee 100644 --- a/doc/models/subscription-group-update-error-response-exception.md +++ b/doc/models/subscription-group-update-error-response-exception.md @@ -11,16 +11,20 @@ | --- | --- | --- | --- | | `Errors` | [`SubscriptionGroupUpdateError`](../../doc/models/subscription-group-update-error.md) | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +try { - "errors": { - "members": [ - "members2", - "members1" - ] - } + // make the API call +} +catch (ApiException e) +{ + if (e is SubscriptionGroupUpdateErrorResponseException) + { + // TODO: Handle SubscriptionGroupUpdateErrorResponseException + Console.WriteLine(e.Message); + } } ``` diff --git a/doc/models/subscription-group-update-error.md b/doc/models/subscription-group-update-error.md index 204795cd..ef77ab02 100644 --- a/doc/models/subscription-group-update-error.md +++ b/doc/models/subscription-group-update-error.md @@ -11,15 +11,19 @@ | --- | --- | --- | --- | | `Members` | `List` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Collections.Generic; + +SubscriptionGroupUpdateError subscriptionGroupUpdateError = new SubscriptionGroupUpdateError { - "members": [ - "members4", - "members5", - "members6" - ] -} + Members = new List + { + "members6", + "members7", + }, +}; ``` diff --git a/doc/models/subscription-group.md b/doc/models/subscription-group.md index a10f2552..5a5ed2f8 100644 --- a/doc/models/subscription-group.md +++ b/doc/models/subscription-group.md @@ -16,24 +16,30 @@ | `SubscriptionIds` | `List` | Optional | - | | `CreatedAt` | `DateTimeOffset?` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Collections.Generic; + +SubscriptionGroup subscriptionGroup = new SubscriptionGroup { - "uid": "uid4", - "customer_id": 36, - "payment_profile": { - "id": 44, - "first_name": "first_name4", - "last_name": "last_name2", - "masked_card_number": "masked_card_number2" - }, - "payment_collection_method": "prepaid", - "subscription_ids": [ - 146, - 147, - 148 - ] -} + Uid = "uid8", + CustomerId = 78, + PaymentProfile = new SubscriptionGroupPaymentProfile + { + Id = 44, + FirstName = "first_name4", + LastName = "last_name2", + MaskedCardNumber = "masked_card_number2", + }, + PaymentCollectionMethod = CollectionMethod.Automatic, + SubscriptionIds = new List + { + 188, + 189, + 190, + }, +}; ``` diff --git a/doc/models/subscription-groups-list-include.md b/doc/models/subscription-groups-list-include.md index fc6245e9..2600bcd2 100644 --- a/doc/models/subscription-groups-list-include.md +++ b/doc/models/subscription-groups-list-include.md @@ -11,3 +11,11 @@ | --- | | `AccountBalances` | +## Example + +```csharp +using AdvancedBilling.Standard.Models; + +SubscriptionGroupsListInclude subscriptionGroupsListInclude = SubscriptionGroupsListInclude.AccountBalances; +``` + diff --git a/doc/models/subscription-include.md b/doc/models/subscription-include.md index a5f953d1..9cbc6ae1 100644 --- a/doc/models/subscription-include.md +++ b/doc/models/subscription-include.md @@ -12,3 +12,11 @@ | `Coupons` | | `SelfServicePageToken` | +## Example + +```csharp +using AdvancedBilling.Standard.Models; + +SubscriptionInclude subscriptionInclude = SubscriptionInclude.Coupons; +``` + diff --git a/doc/models/subscription-included-coupon.md b/doc/models/subscription-included-coupon.md index 20c8a143..415cfbc8 100644 --- a/doc/models/subscription-included-coupon.md +++ b/doc/models/subscription-included-coupon.md @@ -17,17 +17,20 @@ | `AmountInCents` | `long?` | Optional | **Constraints**: `>= 0` | | `Percentage` | `string` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +SubscriptionIncludedCoupon subscriptionIncludedCoupon = new SubscriptionIncludedCoupon { - "code": "\"ABCD_10\"", - "use_count": 2, - "uses_allowed": 10, - "expires_at": "\"2023-07-13T05:18:58-04:00\"", - "amount_in_cents": 1000, - "percentage": "\"15.0\"", - "recurring": false -} + Code = "\"ABCD_10\"", + UseCount = 2, + UsesAllowed = 10, + ExpiresAt = "\"2023-07-13T05:18:58-04:00\"", + Recurring = false, + AmountInCents = 1000L, + Percentage = "\"15.0\"", +}; ``` diff --git a/doc/models/subscription-list-date-field.md b/doc/models/subscription-list-date-field.md index da66051e..65e849ec 100644 --- a/doc/models/subscription-list-date-field.md +++ b/doc/models/subscription-list-date-field.md @@ -13,7 +13,9 @@ ## Example -``` -updated_at +```csharp +using AdvancedBilling.Standard.Models; + +SubscriptionListDateField subscriptionListDateField = SubscriptionListDateField.UpdatedAt; ``` diff --git a/doc/models/subscription-list-include.md b/doc/models/subscription-list-include.md index 27359075..19f2b0e7 100644 --- a/doc/models/subscription-list-include.md +++ b/doc/models/subscription-list-include.md @@ -10,4 +10,15 @@ | Name | | --- | | `SelfServicePageToken` | +| `CurrentAccountBalanceInCents` | +| `CurrentBillingAmount` | +| `Coupons` | + +## Example + +```csharp +using AdvancedBilling.Standard.Models; + +SubscriptionListInclude subscriptionListInclude = SubscriptionListInclude.SelfServicePageToken; +``` diff --git a/doc/models/subscription-migration-preview-options.md b/doc/models/subscription-migration-preview-options.md index ec99f0be..3e26d0c7 100644 --- a/doc/models/subscription-migration-preview-options.md +++ b/doc/models/subscription-migration-preview-options.md @@ -20,16 +20,19 @@ | `Proration` | [`Proration`](../../doc/models/proration.md) | Optional | - | | `ProrationDate` | `DateTimeOffset?` | Optional | The date that the proration is calculated from for the preview | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +SubscriptionMigrationPreviewOptions subscriptionMigrationPreviewOptions = new SubscriptionMigrationPreviewOptions { - "include_trial": false, - "include_initial_charge": false, - "include_coupons": true, - "preserve_period": false, - "product_id": 242, - "product_price_point_id": 166 -} + ProductId = 70, + ProductPricePointId = 250, + IncludeTrial = false, + IncludeInitialCharge = false, + IncludeCoupons = true, + PreservePeriod = false, +}; ``` diff --git a/doc/models/subscription-migration-preview-request.md b/doc/models/subscription-migration-preview-request.md index 64f6e58d..576cb0ef 100644 --- a/doc/models/subscription-migration-preview-request.md +++ b/doc/models/subscription-migration-preview-request.md @@ -11,18 +11,22 @@ | --- | --- | --- | --- | | `Migration` | [`SubscriptionMigrationPreviewOptions`](../../doc/models/subscription-migration-preview-options.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +SubscriptionMigrationPreviewRequest subscriptionMigrationPreviewRequest = new SubscriptionMigrationPreviewRequest { - "migration": { - "include_trial": false, - "include_initial_charge": false, - "include_coupons": true, - "preserve_period": false, - "product_id": 158, - "product_price_point_id": 82 - } -} + Migration = new SubscriptionMigrationPreviewOptions + { + ProductId = 158, + ProductPricePointId = 82, + IncludeTrial = false, + IncludeInitialCharge = false, + IncludeCoupons = true, + PreservePeriod = false, + }, +}; ``` diff --git a/doc/models/subscription-migration-preview-response.md b/doc/models/subscription-migration-preview-response.md index 6f85d579..bc70253b 100644 --- a/doc/models/subscription-migration-preview-response.md +++ b/doc/models/subscription-migration-preview-response.md @@ -11,16 +11,20 @@ | --- | --- | --- | --- | | `Migration` | [`SubscriptionMigrationPreview`](../../doc/models/subscription-migration-preview.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +SubscriptionMigrationPreviewResponse subscriptionMigrationPreviewResponse = new SubscriptionMigrationPreviewResponse { - "migration": { - "prorated_adjustment_in_cents": 196, - "charge_in_cents": 78, - "payment_due_in_cents": 250, - "credit_applied_in_cents": 210 - } -} + Migration = new SubscriptionMigrationPreview + { + ProratedAdjustmentInCents = 196L, + ChargeInCents = 78L, + PaymentDueInCents = 250L, + CreditAppliedInCents = 210L, + }, +}; ``` diff --git a/doc/models/subscription-migration-preview.md b/doc/models/subscription-migration-preview.md index c68fea55..ba3bce16 100644 --- a/doc/models/subscription-migration-preview.md +++ b/doc/models/subscription-migration-preview.md @@ -14,14 +14,17 @@ | `PaymentDueInCents` | `long?` | Optional | The amount of the payment due in the case of an upgrade. | | `CreditAppliedInCents` | `long?` | Optional | Represents a credit in cents that is applied to your subscription as part of a migration process for a specific product, which reduces the amount owed for the subscription. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +SubscriptionMigrationPreview subscriptionMigrationPreview = new SubscriptionMigrationPreview { - "prorated_adjustment_in_cents": 134, - "charge_in_cents": 16, - "payment_due_in_cents": 188, - "credit_applied_in_cents": 148 -} + ProratedAdjustmentInCents = 6L, + ChargeInCents = 144L, + PaymentDueInCents = 60L, + CreditAppliedInCents = 20L, +}; ``` diff --git a/doc/models/subscription-mrr-breakout.md b/doc/models/subscription-mrr-breakout.md index 269357a6..d4389bd6 100644 --- a/doc/models/subscription-mrr-breakout.md +++ b/doc/models/subscription-mrr-breakout.md @@ -12,12 +12,15 @@ | `PlanAmountInCents` | `long` | Required | - | | `UsageAmountInCents` | `long` | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +SubscriptionMRRBreakout subscriptionMRRBreakout = new SubscriptionMRRBreakout { - "plan_amount_in_cents": 208, - "usage_amount_in_cents": 60 -} + PlanAmountInCents = 248L, + UsageAmountInCents = 100L, +}; ``` diff --git a/doc/models/subscription-mrr-response.md b/doc/models/subscription-mrr-response.md index c0d5ed15..216c9339 100644 --- a/doc/models/subscription-mrr-response.md +++ b/doc/models/subscription-mrr-response.md @@ -11,20 +11,27 @@ | --- | --- | --- | --- | | `SubscriptionsMrr` | [`List`](../../doc/models/subscription-mrr.md) | Required | **Constraints**: *Minimum Items*: `1`, *Unique Items Required* | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Collections.Generic; + +SubscriptionMRRResponse subscriptionMRRResponse = new SubscriptionMRRResponse { - "subscriptions_mrr": [ + SubscriptionsMrr = new List { - "subscription_id": 0, - "mrr_amount_in_cents": 0, - "breakouts": { - "plan_amount_in_cents": 0, - "usage_amount_in_cents": 0 - } - } - ] -} + new SubscriptionMRR + { + SubscriptionId = 0, + MrrAmountInCents = 0L, + Breakouts = new SubscriptionMRRBreakout + { + PlanAmountInCents = 0L, + UsageAmountInCents = 0L, + }, + }, + }, +}; ``` diff --git a/doc/models/subscription-mrr.md b/doc/models/subscription-mrr.md index c344722d..034a0c56 100644 --- a/doc/models/subscription-mrr.md +++ b/doc/models/subscription-mrr.md @@ -13,16 +13,20 @@ | `MrrAmountInCents` | `long` | Required | - | | `Breakouts` | [`SubscriptionMRRBreakout`](../../doc/models/subscription-mrr-breakout.md) | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +SubscriptionMRR subscriptionMRR = new SubscriptionMRR { - "subscription_id": 4, - "mrr_amount_in_cents": 22, - "breakouts": { - "plan_amount_in_cents": 254, - "usage_amount_in_cents": 106 - } -} + SubscriptionId = 192, + MrrAmountInCents = 210L, + Breakouts = new SubscriptionMRRBreakout + { + PlanAmountInCents = 254L, + UsageAmountInCents = 106L, + }, +}; ``` diff --git a/doc/models/subscription-note-response.md b/doc/models/subscription-note-response.md index a9bb681b..52174a24 100644 --- a/doc/models/subscription-note-response.md +++ b/doc/models/subscription-note-response.md @@ -11,17 +11,26 @@ | --- | --- | --- | --- | | `Note` | [`SubscriptionNote`](../../doc/models/subscription-note.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Globalization; + +SubscriptionNoteResponse subscriptionNoteResponse = new SubscriptionNoteResponse { - "note": { - "id": 28, - "body": "body0", - "subscription_id": 138, - "created_at": "2016-03-13T12:52:32.123Z", - "updated_at": "2016-03-13T12:52:32.123Z" - } -} + Note = new SubscriptionNote + { + Id = 28, + Body = "body0", + SubscriptionId = 138, + CreatedAt = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + UpdatedAt = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + }, +}; ``` diff --git a/doc/models/subscription-note.md b/doc/models/subscription-note.md index fa0c6046..57d45991 100644 --- a/doc/models/subscription-note.md +++ b/doc/models/subscription-note.md @@ -16,15 +16,23 @@ | `UpdatedAt` | `DateTimeOffset?` | Optional | - | | `Sticky` | `bool?` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Globalization; + +SubscriptionNote subscriptionNote = new SubscriptionNote { - "id": 36, - "body": "body4", - "subscription_id": 146, - "created_at": "2016-03-13T12:52:32.123Z", - "updated_at": "2016-03-13T12:52:32.123Z" -} + Id = 18, + Body = "body6", + SubscriptionId = 128, + CreatedAt = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + UpdatedAt = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), +}; ``` diff --git a/doc/models/subscription-preview-response.md b/doc/models/subscription-preview-response.md index 4f431011..fb34227c 100644 --- a/doc/models/subscription-preview-response.md +++ b/doc/models/subscription-preview-response.md @@ -11,56 +11,69 @@ | --- | --- | --- | --- | | `SubscriptionPreview` | [`SubscriptionPreview`](../../doc/models/subscription-preview.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Collections.Generic; + +SubscriptionPreviewResponse subscriptionPreviewResponse = new SubscriptionPreviewResponse { - "subscription_preview": { - "current_billing_manifest": { - "line_items": [ - { - "transaction_type": "credit", - "kind": "component", - "amount_in_cents": 24, - "memo": "memo2", - "discount_amount_in_cents": 172 - } - ], - "total_in_cents": 38, - "total_discount_in_cents": 24, - "total_tax_in_cents": 18, - "subtotal_in_cents": 150 - }, - "next_billing_manifest": { - "line_items": [ + SubscriptionPreview = new SubscriptionPreview + { + CurrentBillingManifest = new BillingManifest { - "transaction_type": "credit", - "kind": "component", - "amount_in_cents": 24, - "memo": "memo2", - "discount_amount_in_cents": 172 + LineItems = new List + { + new BillingManifestItem + { + TransactionType = LineItemTransactionType.Credit, + Kind = BillingManifestLineItemKind.Component, + AmountInCents = 24L, + Memo = "memo2", + DiscountAmountInCents = 172L, + }, + }, + TotalInCents = 38L, + TotalDiscountInCents = 24L, + TotalTaxInCents = 18L, + SubtotalInCents = 150L, }, + NextBillingManifest = new BillingManifest { - "transaction_type": "credit", - "kind": "component", - "amount_in_cents": 24, - "memo": "memo2", - "discount_amount_in_cents": 172 + LineItems = new List + { + new BillingManifestItem + { + TransactionType = LineItemTransactionType.Credit, + Kind = BillingManifestLineItemKind.Component, + AmountInCents = 24L, + Memo = "memo2", + DiscountAmountInCents = 172L, + }, + new BillingManifestItem + { + TransactionType = LineItemTransactionType.Credit, + Kind = BillingManifestLineItemKind.Component, + AmountInCents = 24L, + Memo = "memo2", + DiscountAmountInCents = 172L, + }, + new BillingManifestItem + { + TransactionType = LineItemTransactionType.Credit, + Kind = BillingManifestLineItemKind.Component, + AmountInCents = 24L, + Memo = "memo2", + DiscountAmountInCents = 172L, + }, + }, + TotalInCents = 62L, + TotalDiscountInCents = 208L, + TotalTaxInCents = 42L, + SubtotalInCents = 174L, }, - { - "transaction_type": "credit", - "kind": "component", - "amount_in_cents": 24, - "memo": "memo2", - "discount_amount_in_cents": 172 - } - ], - "total_in_cents": 62, - "total_discount_in_cents": 208, - "total_tax_in_cents": 42, - "subtotal_in_cents": 174 - } - } -} + }, +}; ``` diff --git a/doc/models/subscription-preview.md b/doc/models/subscription-preview.md index c3a1d1d6..34bca105 100644 --- a/doc/models/subscription-preview.md +++ b/doc/models/subscription-preview.md @@ -12,54 +12,66 @@ | `CurrentBillingManifest` | [`BillingManifest`](../../doc/models/billing-manifest.md) | Optional | - | | `NextBillingManifest` | [`BillingManifest`](../../doc/models/billing-manifest.md) | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Collections.Generic; + +SubscriptionPreview subscriptionPreview = new SubscriptionPreview { - "current_billing_manifest": { - "line_items": [ - { - "transaction_type": "credit", - "kind": "component", - "amount_in_cents": 24, - "memo": "memo2", - "discount_amount_in_cents": 172 - } - ], - "total_in_cents": 38, - "total_discount_in_cents": 24, - "total_tax_in_cents": 18, - "subtotal_in_cents": 150 - }, - "next_billing_manifest": { - "line_items": [ - { - "transaction_type": "credit", - "kind": "component", - "amount_in_cents": 24, - "memo": "memo2", - "discount_amount_in_cents": 172 - }, - { - "transaction_type": "credit", - "kind": "component", - "amount_in_cents": 24, - "memo": "memo2", - "discount_amount_in_cents": 172 - }, - { - "transaction_type": "credit", - "kind": "component", - "amount_in_cents": 24, - "memo": "memo2", - "discount_amount_in_cents": 172 - } - ], - "total_in_cents": 62, - "total_discount_in_cents": 208, - "total_tax_in_cents": 42, - "subtotal_in_cents": 174 - } -} + CurrentBillingManifest = new BillingManifest + { + LineItems = new List + { + new BillingManifestItem + { + TransactionType = LineItemTransactionType.Credit, + Kind = BillingManifestLineItemKind.Component, + AmountInCents = 24L, + Memo = "memo2", + DiscountAmountInCents = 172L, + }, + }, + TotalInCents = 38L, + TotalDiscountInCents = 24L, + TotalTaxInCents = 18L, + SubtotalInCents = 150L, + }, + NextBillingManifest = new BillingManifest + { + LineItems = new List + { + new BillingManifestItem + { + TransactionType = LineItemTransactionType.Credit, + Kind = BillingManifestLineItemKind.Component, + AmountInCents = 24L, + Memo = "memo2", + DiscountAmountInCents = 172L, + }, + new BillingManifestItem + { + TransactionType = LineItemTransactionType.Credit, + Kind = BillingManifestLineItemKind.Component, + AmountInCents = 24L, + Memo = "memo2", + DiscountAmountInCents = 172L, + }, + new BillingManifestItem + { + TransactionType = LineItemTransactionType.Credit, + Kind = BillingManifestLineItemKind.Component, + AmountInCents = 24L, + Memo = "memo2", + DiscountAmountInCents = 172L, + }, + }, + TotalInCents = 62L, + TotalDiscountInCents = 208L, + TotalTaxInCents = 42L, + SubtotalInCents = 174L, + }, +}; ``` diff --git a/doc/models/subscription-product-change.md b/doc/models/subscription-product-change.md index fdf5431a..e1664638 100644 --- a/doc/models/subscription-product-change.md +++ b/doc/models/subscription-product-change.md @@ -1,6 +1,8 @@ # Subscription Product Change +Event data for both `subscription_product_change` and `subscription_product_change_scheduled`. The price point and `effective_at` fields are only populated for scheduled changes. + ## Structure `SubscriptionProductChange` @@ -11,13 +13,25 @@ | --- | --- | --- | --- | | `PreviousProductId` | `int` | Required | - | | `NewProductId` | `int` | Required | - | +| `PreviousProductPricePointId` | `int?` | Optional | - | +| `NewProductPricePointId` | `int?` | Optional | - | +| `EffectiveAt` | `DateTimeOffset?` | Optional | When the scheduled product change takes effect (the subscription's next renewal). Only sent for `subscription_product_change_scheduled`. | + +## Example -## Example (as JSON) +```csharp +using AdvancedBilling.Standard.Models; +using System.Globalization; -```json +SubscriptionProductChange subscriptionProductChange = new SubscriptionProductChange { - "previous_product_id": 126, - "new_product_id": 12 -} + PreviousProductId = 104, + NewProductId = 10, + PreviousProductPricePointId = 228, + NewProductPricePointId = 222, + EffectiveAt = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), +}; ``` diff --git a/doc/models/subscription-product-migration-request.md b/doc/models/subscription-product-migration-request.md index 16fbc10d..e10ecab0 100644 --- a/doc/models/subscription-product-migration-request.md +++ b/doc/models/subscription-product-migration-request.md @@ -11,18 +11,22 @@ | --- | --- | --- | --- | | `Migration` | [`SubscriptionProductMigration`](../../doc/models/subscription-product-migration.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +SubscriptionProductMigrationRequest subscriptionProductMigrationRequest = new SubscriptionProductMigrationRequest { - "migration": { - "include_trial": false, - "include_initial_charge": false, - "include_coupons": true, - "preserve_period": false, - "product_id": 158, - "product_price_point_id": 82 - } -} + Migration = new SubscriptionProductMigration + { + ProductId = 158, + ProductPricePointId = 82, + IncludeTrial = false, + IncludeInitialCharge = false, + IncludeCoupons = true, + PreservePeriod = false, + }, +}; ``` diff --git a/doc/models/subscription-product-migration.md b/doc/models/subscription-product-migration.md index b0fe744d..16f4d0ae 100644 --- a/doc/models/subscription-product-migration.md +++ b/doc/models/subscription-product-migration.md @@ -19,16 +19,19 @@ | `ProductPricePointHandle` | `string` | Optional | The ID or handle of the specified product's price point. This can be passed to migrate to a non-default price point. | | `Proration` | [`Proration`](../../doc/models/proration.md) | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +SubscriptionProductMigration subscriptionProductMigration = new SubscriptionProductMigration { - "include_trial": false, - "include_initial_charge": false, - "include_coupons": true, - "preserve_period": false, - "product_id": 8, - "product_price_point_id": 172 -} + ProductId = 44, + ProductPricePointId = 224, + IncludeTrial = false, + IncludeInitialCharge = false, + IncludeCoupons = true, + PreservePeriod = false, +}; ``` diff --git a/doc/models/subscription-purge-type.md b/doc/models/subscription-purge-type.md index e8d5857e..a0e308f4 100644 --- a/doc/models/subscription-purge-type.md +++ b/doc/models/subscription-purge-type.md @@ -12,3 +12,11 @@ | `Customer` | | `PaymentProfile` | +## Example + +```csharp +using AdvancedBilling.Standard.Models; + +SubscriptionPurgeType subscriptionPurgeType = SubscriptionPurgeType.Customer; +``` + diff --git a/doc/models/subscription-remove-coupon-errors-exception.md b/doc/models/subscription-remove-coupon-errors-exception.md index 7ff24658..c96b1c11 100644 --- a/doc/models/subscription-remove-coupon-errors-exception.md +++ b/doc/models/subscription-remove-coupon-errors-exception.md @@ -11,13 +11,20 @@ | --- | --- | --- | --- | | `Subscription` | `List` | Required | - | -## Example (as JSON) +## Example -```json +```csharp +try { - "subscription": [ - "subscription0" - ] + // make the API call +} +catch (ApiException e) +{ + if (e is SubscriptionRemoveCouponErrorsException) + { + // TODO: Handle SubscriptionRemoveCouponErrorsException + Console.WriteLine(e.Message); + } } ``` diff --git a/doc/models/subscription-response-error-exception.md b/doc/models/subscription-response-error-exception.md index 1fea24d8..77bc5ef9 100644 --- a/doc/models/subscription-response-error-exception.md +++ b/doc/models/subscription-response-error-exception.md @@ -11,17 +11,20 @@ | --- | --- | --- | --- | | `Subscription` | [`Subscription`](../../doc/models/subscription.md) | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +try { - "subscription": { - "id": 8, - "state": "paused", - "balance_in_cents": 124, - "total_revenue_in_cents": 48, - "product_price_in_cents": 238 - } + // make the API call +} +catch (ApiException e) +{ + if (e is SubscriptionResponseErrorException) + { + // TODO: Handle SubscriptionResponseErrorException + Console.WriteLine(e.Message); + } } ``` diff --git a/doc/models/subscription-response.md b/doc/models/subscription-response.md index 3ed0e02e..37a6ad9f 100644 --- a/doc/models/subscription-response.md +++ b/doc/models/subscription-response.md @@ -11,17 +11,21 @@ | --- | --- | --- | --- | | `Subscription` | [`Subscription`](../../doc/models/subscription.md) | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +SubscriptionResponse subscriptionResponse = new SubscriptionResponse { - "subscription": { - "id": 8, - "state": "paused", - "balance_in_cents": 124, - "total_revenue_in_cents": 48, - "product_price_in_cents": 238 - } -} + Subscription = new Subscription + { + Id = 8, + State = SubscriptionState.Paused, + BalanceInCents = 124L, + TotalRevenueInCents = 48L, + ProductPriceInCents = 238L, + }, +}; ``` diff --git a/doc/models/subscription-sort.md b/doc/models/subscription-sort.md index 7ee76b10..babe940f 100644 --- a/doc/models/subscription-sort.md +++ b/doc/models/subscription-sort.md @@ -20,3 +20,11 @@ | `OpenBalance` | | `ExpiresAt` | +## Example + +```csharp +using AdvancedBilling.Standard.Models; + +SubscriptionSort subscriptionSort = SubscriptionSort.TotalPayments; +``` + diff --git a/doc/models/subscription-state-change.md b/doc/models/subscription-state-change.md index 7b190a12..88ad4b28 100644 --- a/doc/models/subscription-state-change.md +++ b/doc/models/subscription-state-change.md @@ -12,12 +12,15 @@ | `PreviousSubscriptionState` | `string` | Required | **Constraints**: *Minimum Length*: `1` | | `NewSubscriptionState` | `string` | Required | **Constraints**: *Minimum Length*: `1` | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +SubscriptionStateChange subscriptionStateChange = new SubscriptionStateChange { - "previous_subscription_state": "previous_subscription_state2", - "new_subscription_state": "new_subscription_state6" -} + PreviousSubscriptionState = "previous_subscription_state8", + NewSubscriptionState = "new_subscription_state2", +}; ``` diff --git a/doc/models/subscription-state-filter.md b/doc/models/subscription-state-filter.md index aaf21877..43d4e565 100644 --- a/doc/models/subscription-state-filter.md +++ b/doc/models/subscription-state-filter.md @@ -15,12 +15,25 @@ Allowed values for filtering by the current state of the subscription. | `Canceled` | | `Expired` | | `ExpiredCards` | +| `EnumExpiredCardsLiveSubscriptions` | +| `EnumExpiredCardsAllSubscriptions` | | `OnHold` | +| `AwaitingSignup` | +| `AwaitingSignupDate` | | `PastDue` | | `PendingCancellation` | | `PendingRenewal` | +| `PrepaidDunning` | | `Suspended` | | `TrialEnded` | | `Trialing` | | `Unpaid` | +## Example + +```csharp +using AdvancedBilling.Standard.Models; + +SubscriptionStateFilter subscriptionStateFilter = SubscriptionStateFilter.AwaitingSignup; +``` + diff --git a/doc/models/subscription-state.md b/doc/models/subscription-state.md index 3b99ac5e..77f5843d 100644 --- a/doc/models/subscription-state.md +++ b/doc/models/subscription-state.md @@ -48,3 +48,11 @@ See [Subscription States](https://maxio.zendesk.com/hc/en-us/articles/2425211902 | `OnHold` | | `AwaitingSignup` | +## Example + +```csharp +using AdvancedBilling.Standard.Models; + +SubscriptionState subscriptionState = SubscriptionState.AwaitingSignup; +``` + diff --git a/doc/models/subscription.md b/doc/models/subscription.md index bfe2433c..471ddd44 100644 --- a/doc/models/subscription.md +++ b/doc/models/subscription.md @@ -13,13 +13,13 @@ | `State` | [`SubscriptionState?`](../../doc/models/subscription-state.md) | Optional | The state of a subscription.

* **Live States**
* `active` - A normal, active subscription. It is not in a trial and is paid and up to date.
* `assessing` - An internal (transient) state that indicates a subscription is in the middle of periodic assessment. Do not base any access decisions in your app on this state, as it may not always be exposed.
* `pending` - An internal (transient) state that indicates a subscription is in the creation process. Do not base any access decisions in your app on this state, as it may not always be exposed.
* `trialing` - A subscription in trialing state has a valid trial subscription. This type of subscription may transition to active once payment is received when the trial has ended. Otherwise, it may go to a Problem or End of Life state.
* `paused` - An internal state that indicates that your account with Advanced Billing is in arrears.
* **Problem States**
* `past_due` - Indicates that the most recent payment has failed, and payment is past due for this subscription. If you have enabled our automated dunning, this subscription will be in the dunning process (additional status and callbacks from the dunning process will be available in the future). If you are handling dunning and payment updates yourself, you will want to use this state to initiate a payment update from your customers.
* `soft_failure` - Indicates that normal assessment/processing of the subscription has failed for a reason that cannot be fixed by the Customer. For example, a Soft Fail may result from a timeout at the gateway or incorrect credentials on your part. The subscriptions should be retried automatically. An interface is being built for you to review problems resulting from these events to take manual action when needed.
* `unpaid` - Indicates an unpaid subscription. A subscription is marked unpaid if the retry period expires and you have configured your [Dunning](https://maxio.zendesk.com/hc/en-us/articles/24287076583565-Dunning-Overview) settings to have a Final Action of `mark the subscription unpaid`.
* **End of Life States**
* `canceled` - Indicates a canceled subscription. This may happen at your request (via the API or the web interface) or due to the expiration of the [Dunning](https://maxio.zendesk.com/hc/en-us/articles/24287076583565-Dunning-Overview) process without payment. See the [Reactivation](https://maxio.zendesk.com/hc/en-us/articles/24252109503629-Reactivating-and-Resuming) documentation for info on how to restart a canceled subscription.
While a subscription is canceled, its period will not advance, it will not accrue any new charges, and Advanced Billing will not attempt to collect the overdue balance.
* `expired` - Indicates a subscription that has expired due to running its normal life cycle. Some products may be configured to have an expiration period. An expired subscription then is one that stayed active until it fulfilled its full period.
* `failed_to_create` - Indicates that signup has failed. (You may see this state in a signup_failure webhook.)
* `on_hold` - Indicates that a subscription’s billing has been temporarily stopped. While it is expected that the subscription will resume and return to active status, this is still treated as an “End of Life” state because the customer is not paying for services during this time.
* `suspended` - Indicates that a prepaid subscription has used up all their prepayment balance. If a prepayment is applied, it will return to an active state.
* `trial_ended` - A subscription in a trial_ended state is a subscription that completed a no-obligation trial and did not have a card on file at the expiration of the trial period. See [Product Pricing – No Obligation Trials](https://maxio.zendesk.com/hc/en-us/articles/24261076617869-Product-Editing) for more details.

See [Subscription States](https://maxio.zendesk.com/hc/en-us/articles/24252119027853-Subscription-States) for more info about subscription states and state transitions. | | `BalanceInCents` | `long?` | Optional | Gives the current outstanding subscription balance in the number of cents. | | `TotalRevenueInCents` | `long?` | Optional | Gives the total revenue from the subscription in the number of cents. | -| `ProductPriceInCents` | `long?` | Optional | (Added Nov 5 2013) The recurring amount of the product (and version),currently subscribed. NOTE: this may differ from the current price of,the product, if you’ve changed the price of the product but haven’t,moved this subscription to a newer version. | +| `ProductPriceInCents` | `long?` | Optional | (Added Nov 5 2013) The recurring amount of the product (and version), currently subscribed. NOTE: this may differ from the current price of the product, if you’ve changed the price of the product but haven’t moved this subscription to a newer version. | | `ProductVersionNumber` | `int?` | Optional | The version of the product for the subscription. Note that this is a deprecated field kept for backwards-compatibility. | -| `CurrentPeriodEndsAt` | `DateTimeOffset?` | Optional | Timestamp relating to the end of the current (recurring) period (i.e.,when the next regularly scheduled attempted charge will occur) | -| `NextAssessmentAt` | `DateTimeOffset?` | Optional | Timestamp that indicates when capture of payment will be tried or,retried. This value will usually track the current_period_ends_at, but,will diverge if a renewal payment fails and must be retried. In that,case, the current_period_ends_at will advance to the end of the next,period (time doesn’t stop because a payment was missed) but the,next_assessment_at will be scheduled for the auto-retry time (i.e. 24,hours in the future, in some cases) | +| `CurrentPeriodEndsAt` | `DateTimeOffset?` | Optional | Timestamp relating to the end of the current (recurring) period (i.e., when the next regularly scheduled attempted charge will occur) | +| `NextAssessmentAt` | `DateTimeOffset?` | Optional | Timestamp that indicates when capture of payment will be tried or retried. This value will usually track the current_period_ends_at, but will diverge if a renewal payment fails and must be retried. In that case, the current_period_ends_at will advance to the end of the next period (time doesn’t stop because a payment was missed) but the next_assessment_at will be scheduled for the auto-retry time (e.g., 24 hours in the future, in some cases). | | `TrialStartedAt` | `DateTimeOffset?` | Optional | Timestamp for when the trial period (if any) began | | `TrialEndedAt` | `DateTimeOffset?` | Optional | Timestamp for when the trial period (if any) ended | -| `ActivatedAt` | `DateTimeOffset?` | Optional | Timestamp for when the subscription began (i.e. when it came out of trial, or when it began in the case of no trial) | +| `ActivatedAt` | `DateTimeOffset?` | Optional | Timestamp for when the subscription began (i.e., when it came out of trial, or when it began in the case of no trial) | | `ExpiresAt` | `DateTimeOffset?` | Optional | Timestamp giving the expiration date of this subscription (if any) | | `CreatedAt` | `DateTimeOffset?` | Optional | The creation date for this subscription | | `UpdatedAt` | `DateTimeOffset?` | Optional | The date of last update for this subscription | @@ -28,9 +28,9 @@ | `CancelAtEndOfPeriod` | `bool?` | Optional | Whether or not the subscription will (or has) canceled at the end of the period. | | `CanceledAt` | `DateTimeOffset?` | Optional | The timestamp of the most recent cancellation | | `CurrentPeriodStartedAt` | `DateTimeOffset?` | Optional | Timestamp relating to the start of the current (recurring) period | -| `PreviousState` | [`SubscriptionState?`](../../doc/models/subscription-state.md) | Optional | Only valid for webhook payloads The previous state for webhooks that have indicated a change in state. For normal API calls, this will always be the same as the state (current state) | +| `PreviousState` | [`SubscriptionState?`](../../doc/models/subscription-state.md) | Optional | Only valid for webhook payloads The previous state for webhooks that have indicated a change in state. For normal API calls, this will always be the same as the state (current state). | | `SignupPaymentId` | `int?` | Optional | The ID of the transaction that generated the revenue | -| `SignupRevenue` | `string` | Optional | The revenue, formatted as a string of decimal separated dollars and,cents, from the subscription signup ($50.00 would be formatted as,50.00) | +| `SignupRevenue` | `string` | Optional | The revenue, formatted as a string of decimal separated dollars and cents, from the subscription signup ($50.00 would be formatted as 50.00) | | `DelayedCancelAt` | `DateTimeOffset?` | Optional | Timestamp for when the subscription is currently set to cancel. | | `CouponCode` | `string` | Optional | (deprecated) The coupon code of the single coupon currently applied to the subscription. See coupon_codes instead as subscriptions can now have more than one coupon. | | `SnapDay` | `string` | Optional | A day of month that subscription will be processed on. Can be 1 up to 28 or 'end'. | @@ -46,7 +46,7 @@ | `NextProductHandle` | `string` | Optional | If a delayed product change is scheduled, the handle of the product that the subscription will be changed to at the next renewal. | | `CouponUseCount` | `int?` | Optional | (deprecated) How many times the subscription's single coupon has been used. This field has no replacement for multiple coupons. | | `CouponUsesAllowed` | `int?` | Optional | (deprecated) How many times the subscription's single coupon may be used. This field has no replacement for multiple coupons. | -| `ReasonCode` | `string` | Optional | The churn reason code associated to a cancelled subscription. | +| `ReasonCode` | `string` | Optional | The churn reason code associated to a canceled subscription. | | `AutomaticallyResumeAt` | `DateTimeOffset?` | Optional | The date the subscription is scheduled to automatically resume from the on_hold state. | | `CouponCodes` | `List` | Optional | An array for all the coupons attached to the subscription. | | `OfferId` | `int?` | Optional | The ID of the offer associated with the subscription. | @@ -57,10 +57,10 @@ | `NextProductPricePointId` | `int?` | Optional | If a delayed product change is scheduled, the ID of the product price point that the subscription will be changed to at the next renewal. | | `NetTerms` | `int?` | Optional | On Relationship Invoicing, the number of days before a renewal invoice is due. | | `StoredCredentialTransactionId` | `int?` | Optional | For European sites subject to PSD2 and using 3D Secure, this can be used to reference a previous transaction for the customer. This will ensure the card will be charged successfully at renewal. | -| `Reference` | `string` | Optional | The reference value (provided by your app) for the subscription istelf. | +| `Reference` | `string` | Optional | The reference value (provided by your app) for the subscription itself. | | `OnHoldAt` | `DateTimeOffset?` | Optional | The timestamp of the most recent on hold action. | -| `PrepaidDunning` | `bool?` | Optional | Boolean representing whether the subscription is prepaid and currently in dunning. Only returned for Relationship Invoicing sites with the feature enabled | -| `Coupons` | [`List`](../../doc/models/subscription-included-coupon.md) | Optional | Additional coupon data. To use this data you also have to include the following param in the request`include[]=coupons`.
Only in Read Subscription Endpoint. | +| `PrepaidDunning` | `bool?` | Optional | Boolean representing whether the subscription is prepaid and currently in dunning. Only returned for Relationship Invoicing sites with the feature enabled. | +| `Coupons` | [`List`](../../doc/models/subscription-included-coupon.md) | Optional | Additional coupon data. To use this data you also have to include the following param in the request: `include[]=coupons`.
Only in Read Subscription Endpoint. | | `DunningCommunicationDelayEnabled` | `bool?` | Optional | Enable Communication Delay feature, making sure no communication (email or SMS) is sent to the Customer between 9PM and 8AM in time zone set by the `dunning_communication_delay_time_zone` attribute. | | `DunningCommunicationDelayTimeZone` | `string` | Optional | Time zone for the Dunning Communication Delay feature. | | `ReceivesInvoiceEmails` | `bool?` | Optional | - | @@ -72,38 +72,42 @@ | `PrepaidConfiguration` | [`PrepaidConfiguration`](../../doc/models/prepaid-configuration.md) | Optional | - | | `SelfServicePageToken` | `string` | Optional | Returned only for list/read Subscription operation when `include[]=self_service_page_token` parameter is provided. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +Subscription subscription = new Subscription { - "credit_card": { - "id": 10088716, - "first_name": "Test", - "last_name": "Subscription", - "masked_card_number": "XXXX-XXXX-XXXX-1", - "card_type": "bogus", - "expiration_month": 1, - "expiration_year": 2022, - "customer_id": 14543792, - "current_vault": "bogus", - "vault_token": "1", - "billing_address": "123 Montana Way", - "billing_city": "Billings", - "billing_state": "MT", - "billing_zip": "59101", - "billing_country": "US", - "customer_vault_token": null, - "billing_address_2": "", - "payment_type": "credit_card", - "site_gateway_setting_id": 1, - "gateway_handle": null - }, - "dunning_communication_delay_time_zone": "\"Eastern Time (US & Canada)\"", - "id": 96, - "state": "soft_failure", - "balance_in_cents": 212, - "total_revenue_in_cents": 136, - "product_price_in_cents": 70 -} + Id = 8, + State = SubscriptionState.Paused, + BalanceInCents = 124L, + TotalRevenueInCents = 48L, + ProductPriceInCents = 238L, + CreditCard = new CreditCardPaymentProfile + { + PaymentType = PaymentType.CreditCard, + Id = 10088716, + FirstName = "Test", + LastName = "Subscription", + MaskedCardNumber = "XXXX-XXXX-XXXX-1", + CardType = CardType.Bogus, + ExpirationMonth = 1, + ExpirationYear = 2022, + CustomerId = 14543792, + CurrentVault = CreditCardVault.Bogus, + VaultToken = "1", + BillingAddress = "123 Montana Way", + BillingCity = "Billings", + BillingState = "MT", + BillingZip = "59101", + BillingCountry = "US", + CustomerVaultToken = "customer_vault_token2", + BillingAddress2 = "", + SiteGatewaySettingId = 1, + GatewayHandle = "gateway_handle8", + }, + DunningCommunicationDelayTimeZone = "\"Eastern Time (US & Canada)\"", +}; ``` diff --git a/doc/models/subscriptions-mrr-error-response-exception.md b/doc/models/subscriptions-mrr-error-response-exception.md index 918e7dad..c2ec2cdc 100644 --- a/doc/models/subscriptions-mrr-error-response-exception.md +++ b/doc/models/subscriptions-mrr-error-response-exception.md @@ -11,15 +11,20 @@ | --- | --- | --- | --- | | `Errors` | [`AttributeError`](../../doc/models/attribute-error.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +try { - "errors": { - "attribute": [ - "supplied value is invalid, expected ISO 8601 format" - ] - } + // make the API call +} +catch (ApiException e) +{ + if (e is SubscriptionsMrrErrorResponseException) + { + // TODO: Handle SubscriptionsMrrErrorResponseException + Console.WriteLine(e.Message); + } } ``` diff --git a/doc/models/tax-configuration-kind.md b/doc/models/tax-configuration-kind.md index 291cea72..18379dd2 100644 --- a/doc/models/tax-configuration-kind.md +++ b/doc/models/tax-configuration-kind.md @@ -14,3 +14,11 @@ | `EnumLinkedAvalara` | | `EnumDigitalRiver` | +## Example + +```csharp +using AdvancedBilling.Standard.Models; + +TaxConfigurationKind taxConfigurationKind = TaxConfigurationKind.Custom; +``` + diff --git a/doc/models/tax-configuration.md b/doc/models/tax-configuration.md index 1378b062..38526d89 100644 --- a/doc/models/tax-configuration.md +++ b/doc/models/tax-configuration.md @@ -13,13 +13,16 @@ | `DestinationAddress` | [`TaxDestinationAddress?`](../../doc/models/tax-destination-address.md) | Optional | - | | `FullyConfigured` | `bool?` | Optional | Returns `true` when Chargify has been properly configured to charge tax using the specified tax system. More details about taxes: https://maxio.zendesk.com/hc/en-us/articles/24287012608909-Taxes-Overview

**Default**: `false` | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +TaxConfiguration taxConfiguration = new TaxConfiguration { - "kind": "custom", - "fully_configured": false, - "destination_address": "shipping_only" -} + Kind = TaxConfigurationKind.Custom, + DestinationAddress = TaxDestinationAddress.ShippingOnly, + FullyConfigured = false, +}; ``` diff --git a/doc/models/tax-destination-address.md b/doc/models/tax-destination-address.md index 891b350f..4fb91d58 100644 --- a/doc/models/tax-destination-address.md +++ b/doc/models/tax-destination-address.md @@ -14,3 +14,11 @@ | `ShippingOnly` | | `BillingOnly` | +## Example + +```csharp +using AdvancedBilling.Standard.Models; + +TaxDestinationAddress taxDestinationAddress = TaxDestinationAddress.ShippingOnly; +``` + diff --git a/doc/models/tokenized-payment-profile.md b/doc/models/tokenized-payment-profile.md index b5a0a79f..bde0df1c 100644 --- a/doc/models/tokenized-payment-profile.md +++ b/doc/models/tokenized-payment-profile.md @@ -14,14 +14,17 @@ | `GatewayHandle` | `string` | Optional | - | | `CustomerVaultToken` | `string` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +TokenizedPaymentProfile tokenizedPaymentProfile = new TokenizedPaymentProfile { - "id": 72, - "vault_token": "vault_token2", - "gateway_handle": "gateway_handle8", - "customer_vault_token": "customer_vault_token8" -} + Id = 116, + VaultToken = "vault_token0", + GatewayHandle = "gateway_handle0", + CustomerVaultToken = "customer_vault_token6", +}; ``` diff --git a/doc/models/too-many-management-link-requests-error-exception.md b/doc/models/too-many-management-link-requests-error-exception.md index 19637b2a..a53e1df7 100644 --- a/doc/models/too-many-management-link-requests-error-exception.md +++ b/doc/models/too-many-management-link-requests-error-exception.md @@ -11,14 +11,20 @@ | --- | --- | --- | --- | | `Errors` | [`TooManyManagementLinkRequests`](../../doc/models/too-many-management-link-requests.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +try { - "errors": { - "error": "error4", - "new_link_available_at": "2016-03-13T12:52:32.123Z" - } + // make the API call +} +catch (ApiException e) +{ + if (e is TooManyManagementLinkRequestsErrorException) + { + // TODO: Handle TooManyManagementLinkRequestsErrorException + Console.WriteLine(e.Message); + } } ``` diff --git a/doc/models/too-many-management-link-requests.md b/doc/models/too-many-management-link-requests.md index 1dbac2a1..dbcb513e 100644 --- a/doc/models/too-many-management-link-requests.md +++ b/doc/models/too-many-management-link-requests.md @@ -12,12 +12,18 @@ | `Error` | `string` | Required | - | | `NewLinkAvailableAt` | `DateTimeOffset` | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Globalization; + +TooManyManagementLinkRequests tooManyManagementLinkRequests = new TooManyManagementLinkRequests { - "error": "error2", - "new_link_available_at": "2016-03-13T12:52:32.123Z" -} + Error = "error8", + NewLinkAvailableAt = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), +}; ``` diff --git a/doc/models/trial-type.md b/doc/models/trial-type.md index 4807ad00..2020fa55 100644 --- a/doc/models/trial-type.md +++ b/doc/models/trial-type.md @@ -1,7 +1,7 @@ # Trial Type -Indicates how a trial is handled when the trail period ends and there is no credit card on file. For `no_obligation`, the subscription transitions to a Trial Ended state. Maxio will not send any emails or statements. For `payment_expected`, the subscription transitions to a Past Due state. Maxio will send normal dunning emails and statements according to your other settings. +Indicates how a trial is handled when the trial period ends and there is no credit card on file. For `no_obligation`, the subscription transitions to a Trial Ended state. Maxio will not send any emails or statements. For `payment_expected`, the subscription transitions to a Past Due state. Maxio will send normal dunning emails and statements according to your other settings. ## Enumeration @@ -14,3 +14,11 @@ Indicates how a trial is handled when the trail period ends and there is no cred | `NoObligation` | | `PaymentExpected` | +## Example + +```csharp +using AdvancedBilling.Standard.Models; + +TrialType trialType = TrialType.NoObligation; +``` + diff --git a/doc/models/update-allocation-expiration-date.md b/doc/models/update-allocation-expiration-date.md index 169bbfe7..087f20d1 100644 --- a/doc/models/update-allocation-expiration-date.md +++ b/doc/models/update-allocation-expiration-date.md @@ -11,13 +11,20 @@ | --- | --- | --- | --- | | `Allocation` | [`AllocationExpirationDate`](../../doc/models/allocation-expiration-date.md) | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Globalization; + +UpdateAllocationExpirationDate updateAllocationExpirationDate = new UpdateAllocationExpirationDate { - "allocation": { - "expires_at": "2016-03-13T12:52:32.123Z" - } -} + Allocation = new AllocationExpirationDate + { + ExpiresAt = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + }, +}; ``` diff --git a/doc/models/update-component-price-point-request.md b/doc/models/update-component-price-point-request.md index 48251d21..86626347 100644 --- a/doc/models/update-component-price-point-request.md +++ b/doc/models/update-component-price-point-request.md @@ -11,17 +11,21 @@ | --- | --- | --- | --- | | `PricePoint` | [`UpdateComponentPricePoint`](../../doc/models/update-component-price-point.md) | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +UpdateComponentPricePointRequest updateComponentPricePointRequest = new UpdateComponentPricePointRequest { - "price_point": { - "name": "name0", - "handle": "handle6", - "pricing_scheme": "per_unit", - "use_site_exchange_rate": false, - "tax_included": false - } -} + PricePoint = new UpdateComponentPricePoint + { + Name = "name0", + Handle = "handle6", + PricingScheme = PricingScheme.PerUnit, + UseSiteExchangeRate = false, + TaxIncluded = false, + }, +}; ``` diff --git a/doc/models/update-component-price-point.md b/doc/models/update-component-price-point.md index 5f4133fa..ac824ce0 100644 --- a/doc/models/update-component-price-point.md +++ b/doc/models/update-component-price-point.md @@ -14,19 +14,22 @@ | `PricingScheme` | [`PricingScheme?`](../../doc/models/pricing-scheme.md) | Optional | The identifier for the pricing scheme. See [Product Components](https://help.chargify.com/products/product-components.html) for an overview of pricing schemes. | | `UseSiteExchangeRate` | `bool?` | Optional | Whether to use the site level exchange rate or define your own prices for each currency if you have multiple currencies defined on the site. | | `TaxIncluded` | `bool?` | Optional | Whether or not the price point includes tax | -| `Interval` | `int?` | Optional | The numerical interval. i.e. an interval of ‘30’ coupled with an interval_unit of day would mean this component price point would renew every 30 days. This property is only available for sites with Multifrequency enabled. | +| `Interval` | `int?` | Optional | The numerical interval. e.g., an interval of ‘30’ coupled with an interval_unit of day would mean this component price point would renew every 30 days. This property is only available for sites with Multifrequency enabled. | | `IntervalUnit` | [`IntervalUnit?`](../../doc/models/interval-unit.md) | Optional | A string representing the interval unit for this component price point, either month or day. This property is only available for sites with Multifrequency enabled. | | `Prices` | [`List`](../../doc/models/update-price.md) | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +UpdateComponentPricePoint updateComponentPricePoint = new UpdateComponentPricePoint { - "name": "name2", - "handle": "handle8", - "pricing_scheme": "per_unit", - "use_site_exchange_rate": false, - "tax_included": false -} + Name = "name4", + Handle = "handle0", + PricingScheme = PricingScheme.Stairstep, + UseSiteExchangeRate = false, + TaxIncluded = false, +}; ``` diff --git a/doc/models/update-component-request.md b/doc/models/update-component-request.md index e223ac6f..3d075367 100644 --- a/doc/models/update-component-request.md +++ b/doc/models/update-component-request.md @@ -11,18 +11,22 @@ | --- | --- | --- | --- | | `Component` | [`UpdateComponent`](../../doc/models/update-component.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +UpdateComponentRequest updateComponentRequest = new UpdateComponentRequest { - "component": { - "item_category": "Business Software", - "handle": "handle4", - "name": "name8", - "description": "description2", - "accounting_code": "accounting_code4", - "taxable": false - } -} + Component = new UpdateComponent + { + Handle = "handle4", + Name = "name8", + Description = "description2", + AccountingCode = "accounting_code4", + Taxable = false, + ItemCategory = ItemCategory.EnumBusinessSoftware, + }, +}; ``` diff --git a/doc/models/update-component.md b/doc/models/update-component.md index b97fed21..a7fcecb7 100644 --- a/doc/models/update-component.md +++ b/doc/models/update-component.md @@ -10,7 +10,7 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | | `Handle` | `string` | Optional | - | -| `Name` | `string` | Optional | The name of the Component, suitable for display on statements. i.e. Text Messages. | +| `Name` | `string` | Optional | The name of the Component, suitable for display on statements. e.g., Text Messages. | | `Description` | `string` | Optional | The description of the component. | | `AccountingCode` | `string` | Optional | - | | `Taxable` | `bool?` | Optional | Boolean flag describing whether a component is taxable or not. | @@ -18,17 +18,21 @@ | `ItemCategory` | [`ItemCategory?`](../../doc/models/item-category.md) | Optional | One of the following: Business Software, Consumer Software, Digital Services, Physical Goods, Other | | `DisplayOnHostedPage` | `bool?` | Optional | - | | `UpgradeCharge` | [`CreditType?`](../../doc/models/credit-type.md) | Optional | The type of credit to be created when upgrading/downgrading. Defaults to the component and then site setting if one is not provided. | +| `UnspscCode` | `string` | Optional | (Optional) Custom UNSPSC commodity code for Level 3/CEDP payment data. When set, this value is sent as the commodity code on invoice line items for this component instead of the default derived from item_category. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +UpdateComponent updateComponent = new UpdateComponent { - "item_category": "Business Software", - "handle": "handle6", - "name": "name0", - "description": "description0", - "accounting_code": "accounting_code6", - "taxable": false -} + Handle = "handle4", + Name = "name8", + Description = "description8", + AccountingCode = "accounting_code4", + Taxable = false, + ItemCategory = ItemCategory.EnumBusinessSoftware, +}; ``` diff --git a/doc/models/update-coupon-currency.md b/doc/models/update-coupon-currency.md index 80894edc..c4492412 100644 --- a/doc/models/update-coupon-currency.md +++ b/doc/models/update-coupon-currency.md @@ -12,12 +12,15 @@ | `Currency` | `string` | Required | ISO code for the site defined currency. | | `Price` | `int` | Required | Price for the given currency. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +UpdateCouponCurrency updateCouponCurrency = new UpdateCouponCurrency { - "currency": "currency4", - "price": 146 -} + Currency = "currency4", + Price = 100, +}; ``` diff --git a/doc/models/update-currency-price.md b/doc/models/update-currency-price.md index ea07f0bc..ddd53e9b 100644 --- a/doc/models/update-currency-price.md +++ b/doc/models/update-currency-price.md @@ -12,12 +12,15 @@ | `Id` | `int` | Required | ID of the currency price record being updated | | `Price` | `double` | Required | New price for the given currency | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +UpdateCurrencyPrice updateCurrencyPrice = new UpdateCurrencyPrice { - "id": 146, - "price": 71.86 -} + Id = 104, + Price = 163.6, +}; ``` diff --git a/doc/models/update-currency-prices-request.md b/doc/models/update-currency-prices-request.md index b3eff8f3..8a8529c7 100644 --- a/doc/models/update-currency-prices-request.md +++ b/doc/models/update-currency-prices-request.md @@ -11,16 +11,22 @@ | --- | --- | --- | --- | | `CurrencyPrices` | [`List`](../../doc/models/update-currency-price.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Collections.Generic; + +UpdateCurrencyPricesRequest updateCurrencyPricesRequest = new UpdateCurrencyPricesRequest { - "currency_prices": [ + CurrencyPrices = new List { - "id": 50, - "price": 233.74 - } - ] -} + new UpdateCurrencyPrice + { + Id = 50, + Price = 233.74, + }, + }, +}; ``` diff --git a/doc/models/update-customer-request.md b/doc/models/update-customer-request.md index 9114221c..a2990d14 100644 --- a/doc/models/update-customer-request.md +++ b/doc/models/update-customer-request.md @@ -11,17 +11,21 @@ | --- | --- | --- | --- | | `Customer` | [`UpdateCustomer`](../../doc/models/update-customer.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +UpdateCustomerRequest updateCustomerRequest = new UpdateCustomerRequest { - "customer": { - "first_name": "first_name0", - "last_name": "last_name8", - "email": "email6", - "cc_emails": "cc_emails0", - "organization": "organization6" - } -} + Customer = new UpdateCustomer + { + FirstName = "first_name0", + LastName = "last_name8", + Email = "email6", + CcEmails = "cc_emails0", + Organization = "organization6", + }, +}; ``` diff --git a/doc/models/update-customer.md b/doc/models/update-customer.md index baac236b..c3f79fcd 100644 --- a/doc/models/update-customer.md +++ b/doc/models/update-customer.md @@ -25,20 +25,25 @@ | `Locale` | `string` | Optional | Set a specific language on a customer record. | | `VatNumber` | `string` | Optional | - | | `TaxExempt` | `bool?` | Optional | - | +| `Surcharging` | `bool?` | Optional | Whether surcharging is enabled for the customer. Only applied on sites where surcharging control is enabled. | | `TaxExemptReason` | `string` | Optional | - | | `ParentId` | `int?` | Optional | - | -| `Verified` | `bool?` | Optional | Is the customer verified to use ACH as a payment method. Available only on Authorize.Net gateway | +| `Verified` | `bool?` | Optional | Is the customer verified to use ACH as a payment method. Available only on the Authorize.Net gateway. | | `SalesforceId` | `string` | Optional | The Salesforce ID of the customer | +| `BrandingThemeId` | `int?` | Optional | The ID of the Branding Theme assigned to this customer as the customer's default Branding Theme. This customer-level Branding Theme is used when a subscription does not have its own subscription-level Branding Theme. Available only when Branding Themes are enabled for the site. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +UpdateCustomer updateCustomer = new UpdateCustomer { - "first_name": "first_name2", - "last_name": "last_name0", - "email": "email4", - "cc_emails": "cc_emails8", - "organization": "organization6" -} + FirstName = "first_name2", + LastName = "last_name0", + Email = "email4", + CcEmails = "cc_emails8", + Organization = "organization6", +}; ``` diff --git a/doc/models/update-invoice-item.md b/doc/models/update-invoice-item.md new file mode 100644 index 00000000..f42ee706 --- /dev/null +++ b/doc/models/update-invoice-item.md @@ -0,0 +1,44 @@ + +# Update Invoice Item + +A line item change for a draft ad hoc invoice. Supports the same attributes as line items on invoice creation, plus `uid` and `_destroy` for updating or removing existing line items. + +## Structure + +`UpdateInvoiceItem` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `Title` | `string` | Optional | - | +| `Quantity` | [`UpdateInvoiceItemQuantity`](../../doc/models/containers/update-invoice-item-quantity.md) | Optional | This is a container for one-of cases. | +| `UnitPrice` | [`UpdateInvoiceItemUnitPrice`](../../doc/models/containers/update-invoice-item-unit-price.md) | Optional | This is a container for one-of cases. | +| `Taxable` | `bool?` | Optional | Set to true to automatically calculate taxes. Site must be configured to use and calculate taxes. If using AvaTax, a tax_code parameter must also be sent. | +| `TaxCode` | `string` | Optional | A string representing the tax code related to the product type. This is especially important when using AvaTax to tax based on locale. This attribute has a max length of 25 characters. | +| `PeriodRangeStart` | `string` | Optional | YYYY-MM-DD | +| `PeriodRangeEnd` | `string` | Optional | YYYY-MM-DD | +| `ProductId` | [`UpdateInvoiceItemProductId`](../../doc/models/containers/update-invoice-item-product-id.md) | Optional | This is a container for one-of cases. | +| `ComponentId` | [`UpdateInvoiceItemComponentId`](../../doc/models/containers/update-invoice-item-component-id.md) | Optional | This is a container for one-of cases. | +| `PricePointId` | [`UpdateInvoiceItemPricePointId`](../../doc/models/containers/update-invoice-item-price-point-id.md) | Optional | This is a container for one-of cases. | +| `ProductPricePointId` | [`UpdateInvoiceItemProductPricePointId`](../../doc/models/containers/update-invoice-item-product-price-point-id.md) | Optional | This is a container for one-of cases. | +| `Description` | `string` | Optional | **Constraints**: *Maximum Length*: `255` | +| `Uid` | `string` | Optional | Unique identifier of an existing line item on the invoice. When provided, the matching line item is updated with the submitted attributes. When omitted, a new line item is added to the invoice. | +| `Destroy` | `bool?` | Optional | Set to `true` together with `uid` to remove the matching line item from the invoice. Line items not referenced in the request remain unchanged. | + +## Example + +```csharp +using AdvancedBilling.Standard.Models; +using AdvancedBilling.Standard.Models.Containers; + +UpdateInvoiceItem updateInvoiceItem = new UpdateInvoiceItem +{ + Title = "title8", + Quantity = UpdateInvoiceItemQuantity.FromPrecision(94.82), + UnitPrice = UpdateInvoiceItemUnitPrice.FromPrecision(78.04), + Taxable = false, + TaxCode = "tax_code0", +}; +``` + diff --git a/doc/models/update-invoice-request.md b/doc/models/update-invoice-request.md new file mode 100644 index 00000000..c1c2e9bd --- /dev/null +++ b/doc/models/update-invoice-request.md @@ -0,0 +1,61 @@ + +# Update Invoice Request + +Request payload for updating a draft ad hoc invoice. + +## Structure + +`UpdateInvoiceRequest` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `Invoice` | [`UpdateInvoice`](../../doc/models/update-invoice.md) | Required | Attributes of a draft ad hoc invoice which can be updated. Only the submitted attributes are changed. | + +## Example + +```csharp +using AdvancedBilling.Standard.Models; +using AdvancedBilling.Standard.Models.Containers; +using System.Collections.Generic; + +UpdateInvoiceRequest updateInvoiceRequest = new UpdateInvoiceRequest +{ + Invoice = new UpdateInvoice + { + LineItems = new List + { + new UpdateInvoiceItem + { + Title = "title4", + Quantity = UpdateInvoiceItemQuantity.FromPrecision(56.68), + UnitPrice = UpdateInvoiceItemUnitPrice.FromPrecision(39.9), + Taxable = false, + TaxCode = "tax_code6", + }, + new UpdateInvoiceItem + { + Title = "title4", + Quantity = UpdateInvoiceItemQuantity.FromPrecision(56.68), + UnitPrice = UpdateInvoiceItemUnitPrice.FromPrecision(39.9), + Taxable = false, + TaxCode = "tax_code6", + }, + new UpdateInvoiceItem + { + Title = "title4", + Quantity = UpdateInvoiceItemQuantity.FromPrecision(56.68), + UnitPrice = UpdateInvoiceItemUnitPrice.FromPrecision(39.9), + Taxable = false, + TaxCode = "tax_code6", + }, + }, + IssueDate = DateTime.Parse("2024-01-01"), + NetTerms = 144, + PaymentInstructions = "payment_instructions6", + Memo = "memo0", + }, +}; +``` + diff --git a/doc/models/update-invoice.md b/doc/models/update-invoice.md new file mode 100644 index 00000000..8746e77a --- /dev/null +++ b/doc/models/update-invoice.md @@ -0,0 +1,50 @@ + +# Update Invoice + +Attributes of a draft ad hoc invoice which can be updated. Only the submitted attributes are changed. + +## Structure + +`UpdateInvoice` + +## Fields + +| Name | Type | Tags | Description | +| --- | --- | --- | --- | +| `LineItems` | [`List`](../../doc/models/update-invoice-item.md) | Optional | Line item changes to apply. Line items without a `uid` are added, line items with a `uid` are updated, and line items with a `uid` and `_destroy` set to `true` are removed. Existing line items not referenced in the array remain unchanged. | +| `IssueDate` | `DateTime?` | Optional | New issue date for the invoice (format YYYY-MM-DD). This date is interpreted and validated in your site's time zone. It must be today or a date in the past — future dates are not accepted. The due date is recalculated from the issue date and net terms. | +| `NetTerms` | `int?` | Optional | Number of days after the issue date on which the invoice is due. The due date is recalculated when net terms or the issue date change. | +| `PaymentInstructions` | `string` | Optional | Custom payment instructions displayed on the invoice. | +| `Memo` | `string` | Optional | A custom memo displayed on the invoice. | +| `SellerAddress` | [`CreateInvoiceAddress`](../../doc/models/create-invoice-address.md) | Optional | Replaces the seller address on the invoice | +| `BillingAddress` | [`CreateInvoiceAddress`](../../doc/models/create-invoice-address.md) | Optional | Replaces the billing address on the invoice | +| `ShippingAddress` | [`CreateInvoiceAddress`](../../doc/models/create-invoice-address.md) | Optional | Replaces the shipping address on the invoice | +| `Coupons` | [`List`](../../doc/models/create-invoice-coupon.md) | Optional | When present, replaces all discounts currently applied to the invoice. Send an empty array to remove all discounts. | + +## Example + +```csharp +using AdvancedBilling.Standard.Models; +using AdvancedBilling.Standard.Models.Containers; +using System.Collections.Generic; + +UpdateInvoice updateInvoice = new UpdateInvoice +{ + LineItems = new List + { + new UpdateInvoiceItem + { + Title = "title4", + Quantity = UpdateInvoiceItemQuantity.FromPrecision(56.68), + UnitPrice = UpdateInvoiceItemUnitPrice.FromPrecision(39.9), + Taxable = false, + TaxCode = "tax_code6", + }, + }, + IssueDate = DateTime.Parse("2024-01-01"), + NetTerms = 46, + PaymentInstructions = "payment_instructions6", + Memo = "memo2", +}; +``` + diff --git a/doc/models/update-metadata-request.md b/doc/models/update-metadata-request.md index 5a92eb68..591c414a 100644 --- a/doc/models/update-metadata-request.md +++ b/doc/models/update-metadata-request.md @@ -11,15 +11,19 @@ | --- | --- | --- | --- | | `Metadata` | [`UpdateMetadata`](../../doc/models/update-metadata.md) | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +UpdateMetadataRequest updateMetadataRequest = new UpdateMetadataRequest { - "metadata": { - "current_name": "current_name0", - "name": "name6", - "value": "value8" - } -} + Metadata = new UpdateMetadata + { + CurrentName = "current_name0", + Name = "name6", + MValue = "value8", + }, +}; ``` diff --git a/doc/models/update-metadata.md b/doc/models/update-metadata.md index 44720a24..5d861242 100644 --- a/doc/models/update-metadata.md +++ b/doc/models/update-metadata.md @@ -13,13 +13,16 @@ | `Name` | `string` | Optional | - | | `MValue` | `string` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +UpdateMetadata updateMetadata = new UpdateMetadata { - "current_name": "current_name4", - "name": "name0", - "value": "value2" -} + CurrentName = "current_name8", + Name = "name4", + MValue = "value6", +}; ``` diff --git a/doc/models/update-metafield.md b/doc/models/update-metafield.md index 8b610b30..232e13ff 100644 --- a/doc/models/update-metafield.md +++ b/doc/models/update-metafield.md @@ -12,26 +12,34 @@ | `CurrentName` | `string` | Optional | - | | `Name` | `string` | Optional | - | | `Scope` | [`MetafieldScope`](../../doc/models/metafield-scope.md) | Optional | Warning: When updating a metafield's scope attribute, all scope attributes must be passed. Partially complete scope attributes will override the existing settings. | -| `InputType` | [`MetafieldInput?`](../../doc/models/metafield-input.md) | Optional | Indicates the type of metafield. A text metafield allows any string value. Dropdown and radio metafields have a set of values that can be selected. Defaults to 'text'. | +| `InputType` | [`MetafieldInput?`](../../doc/models/metafield-input.md) | Optional | Indicates the type of metafield. A text metafield allows any string value. Dropdown and radio metafields have a set of values that can be selected. Defaults to 'text'. | | `Enum` | `List` | Optional | Only applicable when input_type is radio or dropdown. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Collections.Generic; + +UpdateMetafield updateMetafield = new UpdateMetafield { - "current_name": "current_name0", - "name": "name6", - "scope": { - "csv": "0", - "invoices": "0", - "statements": "0", - "portal": "0", - "public_show": "0" - }, - "input_type": "balance_tracker", - "enum": [ - "enum2" - ] -} + CurrentName = "current_name6", + Name = "name2", + Scope = new MetafieldScope + { + Csv = IncludeOption.Exclude, + Invoices = IncludeOption.Exclude, + Statements = IncludeOption.Exclude, + Portal = IncludeOption.Exclude, + PublicShow = IncludeOption.Exclude, + }, + InputType = MetafieldInput.Radio, + MEnum = new List + { + "enum8", + "enum9", + "enum0", + }, +}; ``` diff --git a/doc/models/update-metafields-request.md b/doc/models/update-metafields-request.md index b9ecbc90..d43a8a12 100644 --- a/doc/models/update-metafields-request.md +++ b/doc/models/update-metafields-request.md @@ -11,25 +11,35 @@ | --- | --- | --- | --- | | `Metafields` | [`UpdateMetafieldsRequestMetafields`](../../doc/models/containers/update-metafields-request-metafields.md) | Optional | This is a container for one-of cases. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using AdvancedBilling.Standard.Models.Containers; +using System.Collections.Generic; + +UpdateMetafieldsRequest updateMetafieldsRequest = new UpdateMetafieldsRequest { - "metafields": { - "current_name": "current_name0", - "name": "name6", - "scope": { - "csv": "0", - "invoices": "0", - "statements": "0", - "portal": "0", - "public_show": "0" - }, - "input_type": "balance_tracker", - "enum": [ - "enum2" - ] - } -} + Metafields = UpdateMetafieldsRequestMetafields.FromUpdateMetafield( + new UpdateMetafield + { + CurrentName = "current_name0", + Name = "name6", + Scope = new MetafieldScope + { + Csv = IncludeOption.Exclude, + Invoices = IncludeOption.Exclude, + Statements = IncludeOption.Exclude, + Portal = IncludeOption.Exclude, + PublicShow = IncludeOption.Exclude, + }, + InputType = MetafieldInput.BalanceTracker, + MEnum = new List + { + "enum2", + }, + } + ), +}; ``` diff --git a/doc/models/update-payment-profile-request.md b/doc/models/update-payment-profile-request.md index 4b516c34..8436a557 100644 --- a/doc/models/update-payment-profile-request.md +++ b/doc/models/update-payment-profile-request.md @@ -11,17 +11,21 @@ | --- | --- | --- | --- | | `PaymentProfile` | [`UpdatePaymentProfile`](../../doc/models/update-payment-profile.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +UpdatePaymentProfileRequest updatePaymentProfileRequest = new UpdatePaymentProfileRequest { - "payment_profile": { - "full_number": "5424000000000015", - "first_name": "first_name4", - "last_name": "last_name2", - "card_type": "bogus", - "expiration_month": "expiration_month0" - } -} + PaymentProfile = new UpdatePaymentProfile + { + FirstName = "first_name4", + LastName = "last_name2", + FullNumber = "5424000000000015", + CardType = CardType.Bogus, + ExpirationMonth = "expiration_month0", + }, +}; ``` diff --git a/doc/models/update-payment-profile.md b/doc/models/update-payment-profile.md index a6318e63..6305a28a 100644 --- a/doc/models/update-payment-profile.md +++ b/doc/models/update-payment-profile.md @@ -13,25 +13,28 @@ | `LastName` | `string` | Optional | The last name of the card holder. | | `FullNumber` | `string` | Optional | The full credit card number | | `CardType` | [`CardType?`](../../doc/models/card-type.md) | Optional | The type of card used. | -| `ExpirationMonth` | `string` | Optional | (Optional when performing an Import via vault_token, required otherwise) The 1- or 2-digit credit card expiration month, as an integer or string, i.e. 5 | -| `ExpirationYear` | `string` | Optional | (Optional when performing a Import via vault_token, required otherwise) The 4-digit credit card expiration year, as an integer or string, i.e. 2012 | +| `ExpirationMonth` | `string` | Optional | (Optional when performing an Import via vault_token, required otherwise) The 1- or 2-digit credit card expiration month, as an integer or string, e.g., 5 | +| `ExpirationYear` | `string` | Optional | (Optional when performing an Import via vault_token, required otherwise) The 4-digit credit card expiration year, as an integer or string, e.g., 2012 | | `CurrentVault` | [`AllVaults?`](../../doc/models/all-vaults.md) | Optional | The vault that stores the payment profile with the provided `vault_token`. Use `bogus` for testing. | -| `BillingAddress` | `string` | Optional | The credit card or bank account billing street address (i.e. 123 Main St.). This value is merely passed through to the payment gateway. | -| `BillingCity` | `string` | Optional | The credit card or bank account billing address city (i.e. “Boston”). This value is merely passed through to the payment gateway. | -| `BillingState` | `string` | Optional | The credit card or bank account billing address state (i.e. MA). This value is merely passed through to the payment gateway. This must conform to the [ISO_3166-1](https://en.wikipedia.org/wiki/ISO_3166-1#Current_codes) in order to be valid for tax locale purposes. | -| `BillingZip` | `string` | Optional | The credit card or bank account billing address zip code (i.e. 12345). This value is merely passed through to the payment gateway. | -| `BillingCountry` | `string` | Optional | The credit card or bank account billing address country, required in [ISO_3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format (i.e. “US”). This value is merely passed through to the payment gateway. Some gateways require country codes in a specific format. Check your gateway’s documentation. If creating an ACH subscription, only US is supported at this time. | -| `BillingAddress2` | `string` | Optional | Second line of the customer’s billing address i.e. Apt. 100 | +| `BillingAddress` | `string` | Optional | The credit card or bank account billing street address (e.g., 123 Main St.). This value is merely passed through to the payment gateway. | +| `BillingCity` | `string` | Optional | The credit card or bank account billing address city (e.g., “Boston”). This value is merely passed through to the payment gateway. | +| `BillingState` | `string` | Optional | The credit card or bank account billing address state (e.g., MA). This value is merely passed through to the payment gateway. This must conform to the [ISO_3166-1](https://en.wikipedia.org/wiki/ISO_3166-1#Current_codes) in order to be valid for tax locale purposes. | +| `BillingZip` | `string` | Optional | The credit card or bank account billing address zip code (e.g., 12345). This value is merely passed through to the payment gateway. | +| `BillingCountry` | `string` | Optional | The credit card or bank account billing address country, required in [ISO_3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format (e.g., “US”). This value is merely passed through to the payment gateway. Some gateways require country codes in a specific format. Check your gateway’s documentation. If creating an ACH subscription, only US is supported at this time. | +| `BillingAddress2` | `string` | Optional | Second line of the customer’s billing address, e.g., Apt. 100 | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +UpdatePaymentProfile updatePaymentProfile = new UpdatePaymentProfile { - "full_number": "5424000000000015", - "first_name": "first_name2", - "last_name": "last_name0", - "card_type": "carnet", - "expiration_month": "expiration_month2" -} + FirstName = "first_name6", + LastName = "last_name4", + FullNumber = "5424000000000015", + CardType = CardType.AmericanExpress, + ExpirationMonth = "expiration_month8", +}; ``` diff --git a/doc/models/update-price.md b/doc/models/update-price.md index ec580fba..4c4aba30 100644 --- a/doc/models/update-price.md +++ b/doc/models/update-price.md @@ -15,15 +15,19 @@ | `Destroy` | `bool?` | Optional | - | | `StartingQuantity` | [`UpdatePriceStartingQuantity`](../../doc/models/containers/update-price-starting-quantity.md) | Optional | This is a container for one-of cases. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using AdvancedBilling.Standard.Models.Containers; + +UpdatePrice updatePrice = new UpdatePrice { - "id": 18, - "ending_quantity": 216, - "unit_price": 166.62, - "_destroy": false, - "starting_quantity": 242 -} + Id = 206, + EndingQuantity = UpdatePriceEndingQuantity.FromNumber(28), + UnitPrice = UpdatePriceUnitPrice.FromPrecision(181.3), + Destroy = false, + StartingQuantity = UpdatePriceStartingQuantity.FromNumber(54), +}; ``` diff --git a/doc/models/update-product-price-point-request.md b/doc/models/update-product-price-point-request.md index 4903d397..232b29bd 100644 --- a/doc/models/update-product-price-point-request.md +++ b/doc/models/update-product-price-point-request.md @@ -11,14 +11,18 @@ | --- | --- | --- | --- | | `PricePoint` | [`UpdateProductPricePoint`](../../doc/models/update-product-price-point.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +UpdateProductPricePointRequest updateProductPricePointRequest = new UpdateProductPricePointRequest { - "price_point": { - "handle": "handle6", - "price_in_cents": 196 - } -} + PricePoint = new UpdateProductPricePoint + { + Handle = "handle6", + PriceInCents = 196L, + }, +}; ``` diff --git a/doc/models/update-product-price-point.md b/doc/models/update-product-price-point.md index 753d48dd..3d11c5be 100644 --- a/doc/models/update-product-price-point.md +++ b/doc/models/update-product-price-point.md @@ -12,12 +12,15 @@ | `Handle` | `string` | Optional | - | | `PriceInCents` | `long?` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +UpdateProductPricePoint updateProductPricePoint = new UpdateProductPricePoint { - "handle": "handle6", - "price_in_cents": 220 -} + Handle = "handle2", + PriceInCents = 154L, +}; ``` diff --git a/doc/models/update-reason-code-request.md b/doc/models/update-reason-code-request.md index d26f77b3..9098051c 100644 --- a/doc/models/update-reason-code-request.md +++ b/doc/models/update-reason-code-request.md @@ -11,15 +11,19 @@ | --- | --- | --- | --- | | `ReasonCode` | [`UpdateReasonCode`](../../doc/models/update-reason-code.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +UpdateReasonCodeRequest updateReasonCodeRequest = new UpdateReasonCodeRequest { - "reason_code": { - "code": "code4", - "description": "description6", - "position": 14 - } -} + ReasonCode = new UpdateReasonCode + { + Code = "code4", + Description = "description6", + Position = 14, + }, +}; ``` diff --git a/doc/models/update-reason-code.md b/doc/models/update-reason-code.md index f82894c7..fe5a4c44 100644 --- a/doc/models/update-reason-code.md +++ b/doc/models/update-reason-code.md @@ -13,13 +13,16 @@ | `Description` | `string` | Optional | The friendly summary of what the code signifies | | `Position` | `int?` | Optional | The order that code appears in lists | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +UpdateReasonCode updateReasonCode = new UpdateReasonCode { - "code": "code0", - "description": "description8", - "position": 118 -} + Code = "code4", + Description = "description6", + Position = 4, +}; ``` diff --git a/doc/models/update-segment-request.md b/doc/models/update-segment-request.md index ed3700ba..78ca74a3 100644 --- a/doc/models/update-segment-request.md +++ b/doc/models/update-segment-request.md @@ -11,30 +11,40 @@ | --- | --- | --- | --- | | `Segment` | [`UpdateSegment`](../../doc/models/update-segment.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using AdvancedBilling.Standard.Models.Containers; +using System.Collections.Generic; + +UpdateSegmentRequest updateSegmentRequest = new UpdateSegmentRequest { - "segment": { - "pricing_scheme": "stairstep", - "prices": [ - { - "starting_quantity": 64, - "ending_quantity": 38, - "unit_price": "String3" - }, - { - "starting_quantity": 64, - "ending_quantity": 38, - "unit_price": "String3" - }, - { - "starting_quantity": 64, - "ending_quantity": 38, - "unit_price": "String3" - } - ] - } -} + Segment = new UpdateSegment + { + PricingScheme = PricingScheme.Stairstep, + Prices = new List + { + new CreateOrUpdateSegmentPrice + { + UnitPrice = CreateOrUpdateSegmentPriceUnitPrice.FromString("String3"), + StartingQuantity = 64, + EndingQuantity = 38, + }, + new CreateOrUpdateSegmentPrice + { + UnitPrice = CreateOrUpdateSegmentPriceUnitPrice.FromString("String3"), + StartingQuantity = 64, + EndingQuantity = 38, + }, + new CreateOrUpdateSegmentPrice + { + UnitPrice = CreateOrUpdateSegmentPriceUnitPrice.FromString("String3"), + StartingQuantity = 64, + EndingQuantity = 38, + }, + }, + }, +}; ``` diff --git a/doc/models/update-segment.md b/doc/models/update-segment.md index 8df01ba4..3b648b51 100644 --- a/doc/models/update-segment.md +++ b/doc/models/update-segment.md @@ -12,18 +12,37 @@ | `PricingScheme` | [`PricingScheme`](../../doc/models/pricing-scheme.md) | Required | The identifier for the pricing scheme. See [Product Components](https://help.chargify.com/products/product-components.html) for an overview of pricing schemes. | | `Prices` | [`List`](../../doc/models/create-or-update-segment-price.md) | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using AdvancedBilling.Standard.Models.Containers; +using System.Collections.Generic; + +UpdateSegment updateSegment = new UpdateSegment { - "pricing_scheme": "stairstep", - "prices": [ + PricingScheme = PricingScheme.Stairstep, + Prices = new List { - "starting_quantity": 64, - "ending_quantity": 38, - "unit_price": "String3" - } - ] -} + new CreateOrUpdateSegmentPrice + { + UnitPrice = CreateOrUpdateSegmentPriceUnitPrice.FromString("String3"), + StartingQuantity = 64, + EndingQuantity = 38, + }, + new CreateOrUpdateSegmentPrice + { + UnitPrice = CreateOrUpdateSegmentPriceUnitPrice.FromString("String3"), + StartingQuantity = 64, + EndingQuantity = 38, + }, + new CreateOrUpdateSegmentPrice + { + UnitPrice = CreateOrUpdateSegmentPriceUnitPrice.FromString("String3"), + StartingQuantity = 64, + EndingQuantity = 38, + }, + }, +}; ``` diff --git a/doc/models/update-subscription-component.md b/doc/models/update-subscription-component.md index 33931b22..fef0bd4d 100644 --- a/doc/models/update-subscription-component.md +++ b/doc/models/update-subscription-component.md @@ -12,30 +12,39 @@ | `ComponentId` | `int?` | Optional | - | | `CustomPrice` | [`ComponentCustomPrice`](../../doc/models/component-custom-price.md) | Optional | Create or update custom pricing unique to the subscription. Used in place of `price_point_id`. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using AdvancedBilling.Standard.Models.Containers; +using System.Collections.Generic; + +UpdateSubscriptionComponent updateSubscriptionComponent = new UpdateSubscriptionComponent { - "component_id": 244, - "custom_price": { - "tax_included": false, - "pricing_scheme": "stairstep", - "interval": 66, - "interval_unit": "day", - "list_price_point_id": 174, - "prices": [ - { - "starting_quantity": 242, - "ending_quantity": 40, - "unit_price": 23.26 - }, - { - "starting_quantity": 242, - "ending_quantity": 40, - "unit_price": 23.26 - } - ] - } -} + ComponentId = 118, + CustomPrice = new ComponentCustomPrice + { + Prices = new List + { + new Price + { + StartingQuantity = PriceStartingQuantity.FromNumber(242), + UnitPrice = PriceUnitPrice.FromPrecision(23.26), + EndingQuantity = PriceEndingQuantity.FromNumber(40), + }, + new Price + { + StartingQuantity = PriceStartingQuantity.FromNumber(242), + UnitPrice = PriceUnitPrice.FromPrecision(23.26), + EndingQuantity = PriceEndingQuantity.FromNumber(40), + }, + }, + TaxIncluded = false, + PricingScheme = PricingScheme.Stairstep, + Interval = 66, + IntervalUnit = IntervalUnit.Day, + ListPricePointId = 174, + }, +}; ``` diff --git a/doc/models/update-subscription-group-request.md b/doc/models/update-subscription-group-request.md index 501caa05..42a6d270 100644 --- a/doc/models/update-subscription-group-request.md +++ b/doc/models/update-subscription-group-request.md @@ -11,16 +11,22 @@ | --- | --- | --- | --- | | `SubscriptionGroup` | [`UpdateSubscriptionGroup`](../../doc/models/update-subscription-group.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Collections.Generic; + +UpdateSubscriptionGroupRequest updateSubscriptionGroupRequest = new UpdateSubscriptionGroupRequest { - "subscription_group": { - "member_ids": [ - 164, - 165 - ] - } -} + SubscriptionGroup = new UpdateSubscriptionGroup + { + MemberIds = new List + { + 164, + 165, + }, + }, +}; ``` diff --git a/doc/models/update-subscription-group.md b/doc/models/update-subscription-group.md index ba924710..e6019a8c 100644 --- a/doc/models/update-subscription-group.md +++ b/doc/models/update-subscription-group.md @@ -11,15 +11,20 @@ | --- | --- | --- | --- | | `MemberIds` | `List` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Collections.Generic; + +UpdateSubscriptionGroup updateSubscriptionGroup = new UpdateSubscriptionGroup { - "member_ids": [ - 52, - 53, - 54 - ] -} + MemberIds = new List + { + 248, + 249, + 250, + }, +}; ``` diff --git a/doc/models/update-subscription-note-request.md b/doc/models/update-subscription-note-request.md index d553463b..ef257a9e 100644 --- a/doc/models/update-subscription-note-request.md +++ b/doc/models/update-subscription-note-request.md @@ -13,14 +13,18 @@ Updatable fields for Subscription Note | --- | --- | --- | --- | | `Note` | [`UpdateSubscriptionNote`](../../doc/models/update-subscription-note.md) | Required | Updatable fields for Subscription Note | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +UpdateSubscriptionNoteRequest updateSubscriptionNoteRequest = new UpdateSubscriptionNoteRequest { - "note": { - "body": "body0", - "sticky": false - } -} + Note = new UpdateSubscriptionNote + { + Body = "body0", + Sticky = false, + }, +}; ``` diff --git a/doc/models/update-subscription-note.md b/doc/models/update-subscription-note.md index 212af79b..f067ef6e 100644 --- a/doc/models/update-subscription-note.md +++ b/doc/models/update-subscription-note.md @@ -14,12 +14,15 @@ Updatable fields for Subscription Note | `Body` | `string` | Required | - | | `Sticky` | `bool` | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +UpdateSubscriptionNote updateSubscriptionNote = new UpdateSubscriptionNote { - "body": "body8", - "sticky": false -} + Body = "body2", + Sticky = false, +}; ``` diff --git a/doc/models/update-subscription-request.md b/doc/models/update-subscription-request.md index 5aaf53f7..912116b5 100644 --- a/doc/models/update-subscription-request.md +++ b/doc/models/update-subscription-request.md @@ -11,23 +11,28 @@ | --- | --- | --- | --- | | `Subscription` | [`UpdateSubscription`](../../doc/models/update-subscription.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +UpdateSubscriptionRequest updateSubscriptionRequest = new UpdateSubscriptionRequest { - "subscription": { - "defer_signup": false, - "dunning_communication_delay_time_zone": "\"Eastern Time (US & Canada)\"", - "credit_card_attributes": { - "full_number": "full_number2", - "expiration_month": "expiration_month6", - "expiration_year": "expiration_year2" + Subscription = new UpdateSubscription + { + CreditCardAttributes = new CreditCardAttributes + { + FullNumber = "full_number2", + ExpirationMonth = "expiration_month6", + ExpirationYear = "expiration_year2", + }, + ProductHandle = "product_handle6", + ProductId = 206, + ProductChangeDelayed = false, + NextProductId = "next_product_id6", + DeferSignup = false, + DunningCommunicationDelayTimeZone = "\"Eastern Time (US & Canada)\"", }, - "product_handle": "product_handle6", - "product_id": 206, - "product_change_delayed": false, - "next_product_id": "next_product_id6" - } -} +}; ``` diff --git a/doc/models/update-subscription.md b/doc/models/update-subscription.md index 9c0512a1..c593b796 100644 --- a/doc/models/update-subscription.md +++ b/doc/models/update-subscription.md @@ -10,15 +10,16 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | | `CreditCardAttributes` | [`CreditCardAttributes`](../../doc/models/credit-card-attributes.md) | Optional | - | -| `ProductHandle` | `string` | Optional | Set to the handle of a different product to change the subscription's product | -| `ProductId` | `int?` | Optional | Set to the id of a different product to change the subscription's product | +| `ProductHandle` | `string` | Optional | Set to the handle of a different product to change the subscription's product. | +| `ProductId` | `int?` | Optional | Set to the id of a different product to change the subscription's product. | | `ProductChangeDelayed` | `bool?` | Optional | - | | `NextProductId` | `string` | Optional | Set to an empty string to cancel a delayed product change. | | `NextProductPricePointId` | `string` | Optional | - | | `SnapDay` | [`UpdateSubscriptionSnapDay`](../../doc/models/containers/update-subscription-snap-day.md) | Optional | This is a container for one-of cases. | -| `InitialBillingAt` | `DateTimeOffset?` | Optional | (Optional) Set this attribute to a future date/time to update a subscription in the Awaiting Signup Date state, to Awaiting Signup. In the Awaiting Signup state, a subscription behaves like any other. It can be canceled, allocated to, or have its billing date changed. etc. When the `initial_billing_at` date hits, the subscription will transition to the expected state. If the product has a trial, the subscription will enter a trial, otherwise it will go active. Setup fees will be respected either before or after the trial, as configured on the price point. If the payment is due at the initial_billing_at and it fails the subscription will be immediately canceled. You can omit the initial_billing_at date to activate the subscription immediately. See the [subscription import](https://maxio.zendesk.com/hc/en-us/articles/24251489107213-Advanced-Billing-Subscription-Imports#date-format) documentation for more information about Date/Time formats. | +| `InitialBillingAt` | `DateTimeOffset?` | Optional | (Optional) Set this attribute to a future date/time to update a subscription in the Awaiting Signup Date state, to Awaiting Signup. In the Awaiting Signup state, a subscription behaves like any other. It can be canceled, allocated to, or have its billing date changed, etc. When the `initial_billing_at` date hits, the subscription will transition to the expected state. If the product has a trial, the subscription will enter a trial, otherwise it will go active. Setup fees will be respected either before or after the trial, as configured on the price point. If the payment is due at the initial_billing_at and it fails the subscription will be immediately canceled. You can omit the initial_billing_at date to activate the subscription immediately. See the [subscription import](https://maxio.zendesk.com/hc/en-us/articles/24251489107213-Advanced-Billing-Subscription-Imports#date-format) documentation for more information about Date/Time formats. | | `DeferSignup` | `bool?` | Optional | (Optional) Set this attribute to true to move the subscription from Awaiting Signup, to Awaiting Signup Date. Use this when you want to update a subscription that has an unknown initial billing date. When the first billing date is known, update a subscription to set the `initial_billing_at` date. The subscription moves to the awaiting signup with a scheduled initial billing date. You can omit the initial_billing_at date to activate the subscription immediately. See [Subscription States](https://maxio-chargify.zendesk.com/hc/en-us/articles/5404222005773-Subscription-States) for more information.

**Default**: `false` | | `NextBillingAt` | `DateTimeOffset?` | Optional | - | +| `BrandingThemeId` | `int?` | Optional | The ID of the Branding Theme to assign to this subscription. When set, this subscription-level Branding Theme is used instead of the customer's default Branding Theme for subscription-related documents and communications that use subscription theming. Pass null or an empty value to clear the subscription-level Branding Theme. Available only when Branding Themes are enabled for the site. Not returned in the response. | | `ExpiresAt` | `DateTimeOffset?` | Optional | Timestamp giving the expiration date of this subscription (if any). You may manually change the expiration date at any point during a subscription period. | | `PaymentCollectionMethod` | `string` | Optional | - | | `ReceivesInvoiceEmails` | `bool?` | Optional | - | @@ -32,21 +33,25 @@ | `ProductPricePointId` | `int?` | Optional | Set to change the current product's price point. | | `ProductPricePointHandle` | `string` | Optional | Set to change the current product's price point. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +UpdateSubscription updateSubscription = new UpdateSubscription { - "defer_signup": false, - "dunning_communication_delay_time_zone": "\"Eastern Time (US & Canada)\"", - "credit_card_attributes": { - "full_number": "full_number2", - "expiration_month": "expiration_month6", - "expiration_year": "expiration_year2" - }, - "product_handle": "product_handle2", - "product_id": 114, - "product_change_delayed": false, - "next_product_id": "next_product_id8" -} + CreditCardAttributes = new CreditCardAttributes + { + FullNumber = "full_number2", + ExpirationMonth = "expiration_month6", + ExpirationYear = "expiration_year2", + }, + ProductHandle = "product_handle0", + ProductId = 16, + ProductChangeDelayed = false, + NextProductId = "next_product_id0", + DeferSignup = false, + DunningCommunicationDelayTimeZone = "\"Eastern Time (US & Canada)\"", +}; ``` diff --git a/doc/models/upgrade-charge-credit-type.md b/doc/models/upgrade-charge-credit-type.md index 477e0590..c2750750 100644 --- a/doc/models/upgrade-charge-credit-type.md +++ b/doc/models/upgrade-charge-credit-type.md @@ -21,3 +21,11 @@ The type of credit to be created when upgrading/downgrading. Defaults to the com | `Prorated` | | `None` | +## Example + +```csharp +using AdvancedBilling.Standard.Models; + +UpgradeChargeCreditType upgradeChargeCreditType = UpgradeChargeCreditType.Full; +``` + diff --git a/doc/models/upsert-prepaid-configuration-request.md b/doc/models/upsert-prepaid-configuration-request.md index f8fb9244..7bfef81b 100644 --- a/doc/models/upsert-prepaid-configuration-request.md +++ b/doc/models/upsert-prepaid-configuration-request.md @@ -11,16 +11,20 @@ | --- | --- | --- | --- | | `PrepaidConfiguration` | [`UpsertPrepaidConfiguration`](../../doc/models/upsert-prepaid-configuration.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +UpsertPrepaidConfigurationRequest upsertPrepaidConfigurationRequest = new UpsertPrepaidConfigurationRequest { - "prepaid_configuration": { - "initial_funding_amount_in_cents": 74, - "replenish_to_amount_in_cents": 76, - "auto_replenish": false, - "replenish_threshold_amount_in_cents": 20 - } -} + PrepaidConfiguration = new UpsertPrepaidConfiguration + { + InitialFundingAmountInCents = 74L, + ReplenishToAmountInCents = 76L, + AutoReplenish = false, + ReplenishThresholdAmountInCents = 20L, + }, +}; ``` diff --git a/doc/models/upsert-prepaid-configuration.md b/doc/models/upsert-prepaid-configuration.md index a5523332..8ad8df00 100644 --- a/doc/models/upsert-prepaid-configuration.md +++ b/doc/models/upsert-prepaid-configuration.md @@ -14,14 +14,17 @@ | `AutoReplenish` | `bool?` | Optional | - | | `ReplenishThresholdAmountInCents` | `long?` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +UpsertPrepaidConfiguration upsertPrepaidConfiguration = new UpsertPrepaidConfiguration { - "initial_funding_amount_in_cents": 40, - "replenish_to_amount_in_cents": 42, - "auto_replenish": false, - "replenish_threshold_amount_in_cents": 242 -} + InitialFundingAmountInCents = 244L, + ReplenishToAmountInCents = 246L, + AutoReplenish = false, + ReplenishThresholdAmountInCents = 190L, +}; ``` diff --git a/doc/models/usage-response.md b/doc/models/usage-response.md index 3bc959f6..15878856 100644 --- a/doc/models/usage-response.md +++ b/doc/models/usage-response.md @@ -11,17 +11,25 @@ | --- | --- | --- | --- | | `Usage` | [`Usage`](../../doc/models/usage.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using AdvancedBilling.Standard.Models.Containers; +using System.Globalization; + +UsageResponse usageResponse = new UsageResponse { - "usage": { - "id": 150, - "memo": "memo2", - "created_at": "2016-03-13T12:52:32.123Z", - "price_point_id": 28, - "quantity": 28 - } -} + Usage = new Usage + { + Id = 150L, + Memo = "memo2", + CreatedAt = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + PricePointId = 28, + Quantity = UsageQuantity.FromNumber(28), + }, +}; ``` diff --git a/doc/models/usage.md b/doc/models/usage.md index 090e92dc..e1cb7803 100644 --- a/doc/models/usage.md +++ b/doc/models/usage.md @@ -19,15 +19,22 @@ | `ComponentHandle` | `string` | Optional | - | | `SubscriptionId` | `int?` | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using AdvancedBilling.Standard.Models.Containers; +using System.Globalization; + +Usage usage = new Usage { - "id": 252, - "memo": "memo8", - "created_at": "2016-03-13T12:52:32.123Z", - "price_point_id": 126, - "quantity": 130 -} + Id = 150L, + Memo = "memo2", + CreatedAt = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + PricePointId = 28, + Quantity = UsageQuantity.FromNumber(28), +}; ``` diff --git a/doc/models/void-invoice-event-data.md b/doc/models/void-invoice-event-data.md index 96318031..ba0f349a 100644 --- a/doc/models/void-invoice-event-data.md +++ b/doc/models/void-invoice-event-data.md @@ -18,22 +18,29 @@ Example schema for an `void_invoice` event | `IsAdvanceInvoice` | `bool` | Required | If true, the invoice is an advance invoice. | | `Reason` | `string` | Required | The reason for the void. | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Globalization; + +VoidInvoiceEventData voidInvoiceEventData = new VoidInvoiceEventData { - "credit_note_attributes": { - "uid": "uid2", - "site_id": 72, - "customer_id": 184, - "subscription_id": 0, - "number": "number0" - }, - "memo": "memo6", - "applied_amount": "applied_amount6", - "transaction_time": "2016-03-13T12:52:32.123Z", - "is_advance_invoice": false, - "reason": "reason8" -} + CreditNoteAttributes = new CreditNote + { + Uid = "uid2", + SiteId = 72, + CustomerId = 184, + SubscriptionId = 0, + Number = "number0", + }, + Memo = "memo6", + AppliedAmount = "applied_amount6", + TransactionTime = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + IsAdvanceInvoice = false, + Reason = "reason8", +}; ``` diff --git a/doc/models/void-invoice-event.md b/doc/models/void-invoice-event.md index ce93d9d9..79120c2d 100644 --- a/doc/models/void-invoice-event.md +++ b/doc/models/void-invoice-event.md @@ -15,38 +15,49 @@ | `EventType` | [`InvoiceEventType`](../../doc/models/invoice-event-type.md) | Required | **Default**: `InvoiceEventType.void_invoice` | | `EventData` | [`VoidInvoiceEventData`](../../doc/models/void-invoice-event-data.md) | Required | Example schema for an `void_invoice` event | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Globalization; + +VoidInvoiceEvent voidInvoiceEvent = new VoidInvoiceEvent { - "id": 16, - "timestamp": "2016-03-13T12:52:32.123Z", - "invoice": { - "issue_date": "2024-01-01", - "due_date": "2024-01-01", - "paid_date": "2024-01-01", - "public_url_expires_on": "2024-01-21", - "id": 166, - "uid": "uid6", - "site_id": 92, - "customer_id": 204, - "subscription_id": 20 - }, - "event_type": "void_invoice", - "event_data": { - "credit_note_attributes": { - "uid": "uid2", - "site_id": 72, - "customer_id": 184, - "subscription_id": 0, - "number": "number0" + Id = 236L, + Timestamp = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + Invoice = new Invoice + { + Id = 166L, + Uid = "uid6", + SiteId = 92, + CustomerId = 204, + SubscriptionId = 20, + IssueDate = DateTime.Parse("2024-01-01"), + DueDate = DateTime.Parse("2024-01-01"), + PaidDate = DateTime.Parse("2024-01-01"), + PublicUrlExpiresOn = DateTime.Parse("2024-01-21"), + }, + EventType = InvoiceEventType.VoidInvoice, + EventData = new VoidInvoiceEventData + { + CreditNoteAttributes = new CreditNote + { + Uid = "uid2", + SiteId = 72, + CustomerId = 184, + SubscriptionId = 0, + Number = "number0", + }, + Memo = "memo0", + AppliedAmount = "applied_amount2", + TransactionTime = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + IsAdvanceInvoice = false, + Reason = "reason2", }, - "memo": "memo0", - "applied_amount": "applied_amount2", - "transaction_time": "2016-03-13T12:52:32.123Z", - "is_advance_invoice": false, - "reason": "reason2" - } -} +}; ``` diff --git a/doc/models/void-invoice-request.md b/doc/models/void-invoice-request.md index 03bcae00..d37c0be8 100644 --- a/doc/models/void-invoice-request.md +++ b/doc/models/void-invoice-request.md @@ -11,13 +11,17 @@ | --- | --- | --- | --- | | `Void` | [`VoidInvoice`](../../doc/models/void-invoice.md) | Required | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +VoidInvoiceRequest voidInvoiceRequest = new VoidInvoiceRequest { - "void": { - "reason": "reason6" - } -} + MVoid = new VoidInvoice + { + Reason = "reason6", + }, +}; ``` diff --git a/doc/models/void-invoice.md b/doc/models/void-invoice.md index 6b37f008..7921b30f 100644 --- a/doc/models/void-invoice.md +++ b/doc/models/void-invoice.md @@ -11,11 +11,14 @@ | --- | --- | --- | --- | | `Reason` | `string` | Required | **Constraints**: *Minimum Length*: `1` | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; + +VoidInvoice voidInvoice = new VoidInvoice { - "reason": "reason2" -} + Reason = "reason8", +}; ``` diff --git a/doc/models/void-remainder-event-data.md b/doc/models/void-remainder-event-data.md index 8964c2a8..1d70fb1b 100644 --- a/doc/models/void-remainder-event-data.md +++ b/doc/models/void-remainder-event-data.md @@ -16,20 +16,27 @@ Example schema for an `void_remainder` event | `AppliedAmount` | `string` | Required | The amount of the void. | | `TransactionTime` | `DateTimeOffset` | Required | The time the refund was applied, in ISO 8601 format, i.e. "2019-06-07T17:20:06Z" | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Globalization; + +VoidRemainderEventData voidRemainderEventData = new VoidRemainderEventData { - "credit_note_attributes": { - "uid": "uid2", - "site_id": 72, - "customer_id": 184, - "subscription_id": 0, - "number": "number0" - }, - "memo": "memo6", - "applied_amount": "applied_amount4", - "transaction_time": "2016-03-13T12:52:32.123Z" -} + CreditNoteAttributes = new CreditNote + { + Uid = "uid2", + SiteId = 72, + CustomerId = 184, + SubscriptionId = 0, + Number = "number0", + }, + Memo = "memo6", + AppliedAmount = "applied_amount6", + TransactionTime = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), +}; ``` diff --git a/doc/models/void-remainder-event.md b/doc/models/void-remainder-event.md index 9effe21c..b408595b 100644 --- a/doc/models/void-remainder-event.md +++ b/doc/models/void-remainder-event.md @@ -15,36 +15,47 @@ | `EventType` | [`InvoiceEventType`](../../doc/models/invoice-event-type.md) | Required | **Default**: `InvoiceEventType.void_remainder` | | `EventData` | [`VoidRemainderEventData`](../../doc/models/void-remainder-event-data.md) | Required | Example schema for an `void_remainder` event | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Globalization; + +VoidRemainderEvent voidRemainderEvent = new VoidRemainderEvent { - "id": 128, - "timestamp": "2016-03-13T12:52:32.123Z", - "invoice": { - "issue_date": "2024-01-01", - "due_date": "2024-01-01", - "paid_date": "2024-01-01", - "public_url_expires_on": "2024-01-21", - "id": 166, - "uid": "uid6", - "site_id": 92, - "customer_id": 204, - "subscription_id": 20 - }, - "event_type": "void_remainder", - "event_data": { - "credit_note_attributes": { - "uid": "uid2", - "site_id": 72, - "customer_id": 184, - "subscription_id": 0, - "number": "number0" + Id = 198L, + Timestamp = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + Invoice = new Invoice + { + Id = 166L, + Uid = "uid6", + SiteId = 92, + CustomerId = 204, + SubscriptionId = 20, + IssueDate = DateTime.Parse("2024-01-01"), + DueDate = DateTime.Parse("2024-01-01"), + PaidDate = DateTime.Parse("2024-01-01"), + PublicUrlExpiresOn = DateTime.Parse("2024-01-21"), + }, + EventType = InvoiceEventType.VoidRemainder, + EventData = new VoidRemainderEventData + { + CreditNoteAttributes = new CreditNote + { + Uid = "uid2", + SiteId = 72, + CustomerId = 184, + SubscriptionId = 0, + Number = "number0", + }, + Memo = "memo0", + AppliedAmount = "applied_amount2", + TransactionTime = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), }, - "memo": "memo0", - "applied_amount": "applied_amount2", - "transaction_time": "2016-03-13T12:52:32.123Z" - } -} +}; ``` diff --git a/doc/models/webhook-order.md b/doc/models/webhook-order.md index 18ecc708..b342f8d4 100644 --- a/doc/models/webhook-order.md +++ b/doc/models/webhook-order.md @@ -12,3 +12,11 @@ | `NewestFirst` | | `OldestFirst` | +## Example + +```csharp +using AdvancedBilling.Standard.Models; + +WebhookOrder webhookOrder = WebhookOrder.NewestFirst; +``` + diff --git a/doc/models/webhook-response.md b/doc/models/webhook-response.md index eddd2183..9a5102d0 100644 --- a/doc/models/webhook-response.md +++ b/doc/models/webhook-response.md @@ -11,17 +11,26 @@ | --- | --- | --- | --- | | `Webhook` | [`Webhook`](../../doc/models/webhook.md) | Optional | - | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Globalization; + +WebhookResponse webhookResponse = new WebhookResponse { - "webhook": { - "event": "event2", - "id": 18, - "created_at": "2016-03-13T12:52:32.123Z", - "last_error": "last_error4", - "last_error_at": "2016-03-13T12:52:32.123Z" - } -} + Webhook = new Webhook + { + MEvent = "event2", + Id = 18L, + CreatedAt = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + LastError = "last_error4", + LastErrorAt = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + }, +}; ``` diff --git a/doc/models/webhook-status.md b/doc/models/webhook-status.md index 70a637ba..a4554cac 100644 --- a/doc/models/webhook-status.md +++ b/doc/models/webhook-status.md @@ -14,3 +14,11 @@ | `Pending` | | `Paused` | +## Example + +```csharp +using AdvancedBilling.Standard.Models; + +WebhookStatus webhookStatus = WebhookStatus.Successful; +``` + diff --git a/doc/models/webhook-subscription.md b/doc/models/webhook-subscription.md index 6a308306..5a2d0ee3 100644 --- a/doc/models/webhook-subscription.md +++ b/doc/models/webhook-subscription.md @@ -39,6 +39,7 @@ | `SubscriptionCardUpdate` | | `SubscriptionGroupCardUpdate` | | `SubscriptionProductChange` | +| `SubscriptionProductChangeScheduled` | | `SubscriptionStateChange` | | `TrialEndNotice` | | `UpcomingRenewalNotice` | @@ -48,3 +49,11 @@ | `SubscriptionPrepaymentAccountBalanceChanged` | | `SubscriptionServiceCreditAccountBalanceChanged` | +## Example + +```csharp +using AdvancedBilling.Standard.Models; + +WebhookSubscription webhookSubscription = WebhookSubscription.DirectDebitPaymentPending; +``` + diff --git a/doc/models/webhook.md b/doc/models/webhook.md index a4a75473..fe8569c0 100644 --- a/doc/models/webhook.md +++ b/doc/models/webhook.md @@ -10,27 +10,35 @@ | Name | Type | Tags | Description | | --- | --- | --- | --- | | `Event` | `string` | Optional | A string describing which event type produced the given webhook | -| `Id` | `long?` | Optional | The unique identifier for the webhooks (unique across all of Chargify). This is not changed on a retry/replay of the same webhook, so it may be used to avoid duplicate action for the same event. | +| `Id` | `long?` | Optional | The unique identifier for the webhook (unique across all of Chargify). This is not changed on a retry/replay of the same webhook, so it may be used to avoid duplicate action for the same event. | | `CreatedAt` | `DateTimeOffset?` | Optional | Timestamp indicating when the webhook was created | | `LastError` | `string` | Optional | Text describing the status code and/or error from the last failed attempt to send the Webhook. When a webhook is retried and accepted, this field will be cleared. | | `LastErrorAt` | `DateTimeOffset?` | Optional | Timestamp indicating when the last non-acceptance occurred. If a webhook is later resent and accepted, this field will be cleared. | | `AcceptedAt` | `DateTimeOffset?` | Optional | Timestamp indicating when the webhook was accepted by the merchant endpoint. When a webhook is explicitly replayed by the merchant, this value will be cleared until it is accepted again. | | `LastSentAt` | `DateTimeOffset?` | Optional | Timestamp indicating when the most recent attempt was made to send the webhook | | `LastSentUrl` | `string` | Optional | The url that the endpoint was last sent to. | -| `Successful` | `bool?` | Optional | A boolean flag describing whether the webhook was accepted by the webhook endpoint for the most recent attempt. (Acceptance is defined by receiving a “200 OK” HTTP response within a reasonable timeframe, i.e. 15 seconds) | +| `Successful` | `bool?` | Optional | “A boolean flag describing whether the webhook was accepted by the webhook endpoint for the most recent attempt. (Acceptance is defined by receiving a “200 OK” HTTP response within a reasonable timeframe, e.g., 15 seconds.)” | | `Body` | `string` | Optional | The data sent within the webhook post | | `Signature` | `string` | Optional | The calculated webhook signature | | `SignatureHmacSha256` | `string` | Optional | The calculated HMAC-SHA-256 webhook signature | -## Example (as JSON) +## Example -```json +```csharp +using AdvancedBilling.Standard.Models; +using System.Globalization; + +Webhook webhook = new Webhook { - "event": "event6", - "id": 154, - "created_at": "2016-03-13T12:52:32.123Z", - "last_error": "last_error8", - "last_error_at": "2016-03-13T12:52:32.123Z" -} + MEvent = "event2", + Id = 18L, + CreatedAt = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), + LastError = "last_error4", + LastErrorAt = DateTime.ParseExact("2016-03-13T12:52:32.123Z", "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK", + provider: CultureInfo.InvariantCulture, + DateTimeStyles.RoundtripKind), +}; ```