diff --git a/AdvancedBilling.Standard/AdvancedBilling.Standard.csproj b/AdvancedBilling.Standard/AdvancedBilling.Standard.csproj index c223628..e34484b 100644 --- a/AdvancedBilling.Standard/AdvancedBilling.Standard.csproj +++ b/AdvancedBilling.Standard/AdvancedBilling.Standard.csproj @@ -9,13 +9,13 @@ netstandard2.0 Maxio.AdvancedBillingSdk - 7.0.0.0 + 7.0.1.0 MaxioSdk AdvancedBilling.Standard Copyright © 2019 - 7.0.0.0 - 7.0.0.0 + 7.0.1.0 + 7.0.1.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 6fc69e0..4940b59 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:7.0.0 on OS {os-info}"; + private const string userAgent = "AB SDK DotNet:7.0.1 on OS {os-info}"; private readonly HttpCallback httpCallback; private readonly Lazy aPIExports; private readonly Lazy advanceInvoice; diff --git a/AdvancedBilling.Standard/Controllers/ComponentPricePointsController.cs b/AdvancedBilling.Standard/Controllers/ComponentPricePointsController.cs index 29592f1..fab8082 100644 --- a/AdvancedBilling.Standard/Controllers/ComponentPricePointsController.cs +++ b/AdvancedBilling.Standard/Controllers/ComponentPricePointsController.cs @@ -72,7 +72,7 @@ public Models.ComponentResponse PromoteComponentPricePointToDefault( .ExecuteAsync(cancellationToken).ConfigureAwait(false); /// - /// This endpoint can be used to create a new price point for an existing component. + /// Creates a price point for an existing component. /// /// Required parameter: The Advanced Billing id of the component. /// Optional parameter: . @@ -83,7 +83,7 @@ public Models.ComponentPricePointResponse CreateComponentPricePoint( => CoreHelper.RunTask(CreateComponentPricePointAsync(componentId, body)); /// - /// This endpoint can be used to create a new price point for an existing component. + /// Creates a price point for an existing component. /// /// Required parameter: The Advanced Billing id of the component. /// Optional parameter: . diff --git a/AdvancedBilling.Standard/Controllers/ComponentsController.cs b/AdvancedBilling.Standard/Controllers/ComponentsController.cs index ab28799..b27bfe3 100644 --- a/AdvancedBilling.Standard/Controllers/ComponentsController.cs +++ b/AdvancedBilling.Standard/Controllers/ComponentsController.cs @@ -271,8 +271,8 @@ public Models.ComponentResponse FindComponent( .ExecuteAsync(cancellationToken).ConfigureAwait(false); /// - /// This request will return information regarding 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:`. + /// Returns information regarding a component from a specific product family. + /// You can read the component by either the component's id or handle. When using the handle, it must be prefixed with `handle:`. /// /// 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:`. @@ -283,8 +283,8 @@ public Models.ComponentResponse ReadComponent( => CoreHelper.RunTask(ReadComponentAsync(productFamilyId, componentId)); /// - /// This request will return information regarding 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:`. + /// Returns information regarding a component from a specific product family. + /// You can read the component by either the component's id or handle. When using the handle, it must be prefixed with `handle:`. /// /// 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:`. diff --git a/AdvancedBilling.Standard/Controllers/CustomersController.cs b/AdvancedBilling.Standard/Controllers/CustomersController.cs index 6a9537e..64bd725 100644 --- a/AdvancedBilling.Standard/Controllers/CustomersController.cs +++ b/AdvancedBilling.Standard/Controllers/CustomersController.cs @@ -141,7 +141,7 @@ public Models.CustomerResponse CreateCustomer( .ExecuteAsync(cancellationToken).ConfigureAwait(false); /// - /// This method allows to retrieve the Customer properties by Advanced Billing-generated Customer ID. + /// Retrieves the Customer properties by Advanced Billing-generated Customer ID. /// /// Required parameter: The Advanced Billing id of the customer. /// Returns the Models.CustomerResponse response from the API call. @@ -150,7 +150,7 @@ public Models.CustomerResponse ReadCustomer( => CoreHelper.RunTask(ReadCustomerAsync(id)); /// - /// This method allows to retrieve the Customer properties by Advanced Billing-generated Customer ID. + /// Retrieves the Customer properties by Advanced Billing-generated Customer ID. /// /// Required parameter: The Advanced Billing id of the customer. /// cancellationToken. diff --git a/AdvancedBilling.Standard/Controllers/PaymentProfilesController.cs b/AdvancedBilling.Standard/Controllers/PaymentProfilesController.cs index 425f31d..6d082df 100644 --- a/AdvancedBilling.Standard/Controllers/PaymentProfilesController.cs +++ b/AdvancedBilling.Standard/Controllers/PaymentProfilesController.cs @@ -83,8 +83,8 @@ internal PaymentProfilesController(GlobalConfiguration globalConfiguration) : ba /// ## GoCardless. /// For more information on GoCardless, please view the following resources:. /// + [Full documentation on GoCardless](https://maxio.zendesk.com/hc/en-us/articles/24176159136909-GoCardless). - /// + [Using Chargify.js with GoCardless - minimal example](https://developers.chargify.com/docs/developer-docs/ZG9jOjE0NjAzNDIy-examples#minimal-example-with-direct-debit-gocardless-gateway). - /// + [Using Chargify.js with GoCardless - full example](https://developers.chargify.com/docs/developer-docs/ZG9jOjE0NjAzNDIy-examples#full-example-with-direct-debit-gocardless-gateway). + /// + [Using Chargify.js with GoCardless - minimal example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QQZKCER8CFK40MR6XJ). + /// + [Using Chargify.js with GoCardless - full example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QR09JVHWW0MCA7HVJV). /// ### GoCardless with Local Bank Details. /// Following examples create customer, bank account and mandate in GoCardless:. /// ```json. @@ -144,8 +144,8 @@ internal PaymentProfilesController(GlobalConfiguration globalConfiguration) : ba /// ## SEPA Direct Debit. /// For more information on Stripe SEPA Direct Debit, please view the following resources:. /// + [Full documentation on Stripe SEPA Direct Debit](https://maxio.zendesk.com/hc/en-us/articles/24176170430093-Stripe-SEPA-and-BECS-Direct-Debit). - /// + [Using Chargify.js with Stripe Direct Debit - minimal example](https://developers.chargify.com/docs/developer-docs/ZG9jOjE0NjAzNDIy-examples#minimal-example-with-sepa-or-becs-direct-debit-stripe-gateway). - /// + [Using Chargify.js with Stripe Direct Debit - full example](https://developers.chargify.com/docs/developer-docs/ZG9jOjE0NjAzNDIy-examples#full-example-with-sepa-direct-debit-stripe-gateway). + /// + [Using Chargify.js with Stripe Direct Debit - minimal example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QQFKKN8Z7B7DZ9AJS5). + /// + [Using Chargify.js with Stripe Direct Debit - full example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QRECQQ4ECS3ZA55GY7). /// ### Stripe SEPA Direct Debit Payment Profiles. /// The following example creates a customer, bank account and mandate in Stripe:. /// ```json. @@ -299,8 +299,8 @@ public Models.PaymentProfileResponse CreatePaymentProfile( /// ## GoCardless. /// For more information on GoCardless, please view the following resources:. /// + [Full documentation on GoCardless](https://maxio.zendesk.com/hc/en-us/articles/24176159136909-GoCardless). - /// + [Using Chargify.js with GoCardless - minimal example](https://developers.chargify.com/docs/developer-docs/ZG9jOjE0NjAzNDIy-examples#minimal-example-with-direct-debit-gocardless-gateway). - /// + [Using Chargify.js with GoCardless - full example](https://developers.chargify.com/docs/developer-docs/ZG9jOjE0NjAzNDIy-examples#full-example-with-direct-debit-gocardless-gateway). + /// + [Using Chargify.js with GoCardless - minimal example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QQZKCER8CFK40MR6XJ). + /// + [Using Chargify.js with GoCardless - full example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QR09JVHWW0MCA7HVJV). /// ### GoCardless with Local Bank Details. /// Following examples create customer, bank account and mandate in GoCardless:. /// ```json. @@ -360,8 +360,8 @@ public Models.PaymentProfileResponse CreatePaymentProfile( /// ## SEPA Direct Debit. /// For more information on Stripe SEPA Direct Debit, please view the following resources:. /// + [Full documentation on Stripe SEPA Direct Debit](https://maxio.zendesk.com/hc/en-us/articles/24176170430093-Stripe-SEPA-and-BECS-Direct-Debit). - /// + [Using Chargify.js with Stripe Direct Debit - minimal example](https://developers.chargify.com/docs/developer-docs/ZG9jOjE0NjAzNDIy-examples#minimal-example-with-sepa-or-becs-direct-debit-stripe-gateway). - /// + [Using Chargify.js with Stripe Direct Debit - full example](https://developers.chargify.com/docs/developer-docs/ZG9jOjE0NjAzNDIy-examples#full-example-with-sepa-direct-debit-stripe-gateway). + /// + [Using Chargify.js with Stripe Direct Debit - minimal example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QQFKKN8Z7B7DZ9AJS5). + /// + [Using Chargify.js with Stripe Direct Debit - full example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QRECQQ4ECS3ZA55GY7). /// ### Stripe SEPA Direct Debit Payment Profiles. /// The following example creates a customer, bank account and mandate in Stripe:. /// ```json. @@ -887,7 +887,7 @@ public Models.PaymentProfileResponse ChangeSubscriptionGroupDefaultPaymentProfil /// /// 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://developers.chargify.com/docs/developer-docs/ZG9jOjE0NjAzNDI0-overview). + /// 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). /// /// Required parameter: Advanced Billing Token. /// Returns the Models.GetOneTimeTokenRequest response from the API call. @@ -898,7 +898,7 @@ public Models.GetOneTimeTokenRequest ReadOneTimeToken( /// /// 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://developers.chargify.com/docs/developer-docs/ZG9jOjE0NjAzNDI0-overview). + /// 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). /// /// Required parameter: Advanced Billing Token. /// cancellationToken. diff --git a/AdvancedBilling.Standard/Controllers/SubscriptionComponentsController.cs b/AdvancedBilling.Standard/Controllers/SubscriptionComponentsController.cs index d2e979a..8bf1957 100644 --- a/AdvancedBilling.Standard/Controllers/SubscriptionComponentsController.cs +++ b/AdvancedBilling.Standard/Controllers/SubscriptionComponentsController.cs @@ -576,15 +576,15 @@ public async Task DeletePrepaidUsageAllocationAsync( /// Q. Is it possible to record metered usage for more than one component at a time?. /// A. No. Usage should be reported as one API call per component on a single subscription. For example, to record that a subscriber has sent both an SMS Message and an Email, send an API call for each. /// - /// Required parameter: The Chargify id of the subscription. + /// Required parameter: Either the Advanced Billing subscription ID (integer) or the subscription reference (string). Important: In cases where a numeric string value matches both an existing subscription ID and an existing subscription reference, the system will prioritize the subscription ID lookup. For example, if both subscription ID 123 and subscription reference "123" exist, passing "123" will return the subscription with ID 123.. /// Required parameter: Either the Advanced Billing id for the component or the component's handle prefixed by `handle:`. /// Optional parameter: . /// Returns the Models.UsageResponse response from the API call. public Models.UsageResponse CreateUsage( - int subscriptionId, + CreateUsageSubscriptionIdOrReference subscriptionIdOrReference, CreateUsageComponentId componentId, Models.CreateUsageRequest body = null) - => CoreHelper.RunTask(CreateUsageAsync(subscriptionId, componentId, body)); + => CoreHelper.RunTask(CreateUsageAsync(subscriptionIdOrReference, componentId, body)); /// /// ## Documentation. @@ -624,23 +624,23 @@ public Models.UsageResponse CreateUsage( /// Q. Is it possible to record metered usage for more than one component at a time?. /// A. No. Usage should be reported as one API call per component on a single subscription. For example, to record that a subscriber has sent both an SMS Message and an Email, send an API call for each. /// - /// Required parameter: The Chargify id of the subscription. + /// Required parameter: Either the Advanced Billing subscription ID (integer) or the subscription reference (string). Important: In cases where a numeric string value matches both an existing subscription ID and an existing subscription reference, the system will prioritize the subscription ID lookup. For example, if both subscription ID 123 and subscription reference "123" exist, passing "123" will return the subscription with ID 123.. /// Required parameter: Either the Advanced Billing id for the component or the component's handle prefixed by `handle:`. /// Optional parameter: . /// cancellationToken. /// Returns the Models.UsageResponse response from the API call. public async Task CreateUsageAsync( - int subscriptionId, + CreateUsageSubscriptionIdOrReference subscriptionIdOrReference, CreateUsageComponentId componentId, Models.CreateUsageRequest body = null, CancellationToken cancellationToken = default) => await CreateApiCall() .RequestBuilder(_requestBuilder => _requestBuilder - .Setup(HttpMethod.Post, "/subscriptions/{subscription_id}/components/{component_id}/usages.json") + .Setup(HttpMethod.Post, "/subscriptions/{subscription_id_or_reference}/components/{component_id}/usages.json") .WithAuth("BasicAuth") .Parameters(_parameters => _parameters .Body(_bodyParameter => _bodyParameter.Setup(body)) - .Template(_template => _template.Setup("subscription_id", subscriptionId)) + .Template(_template => _template.Setup("subscription_id_or_reference", subscriptionIdOrReference).Required()) .Template(_template => _template.Setup("component_id", componentId).Required()) .Header(_header => _header.Setup("Content-Type", "application/json")))) .ResponseHandler(_responseHandler => _responseHandler @@ -687,10 +687,10 @@ public Models.UsageResponse CreateUsage( CancellationToken cancellationToken = default) => await CreateApiCall>() .RequestBuilder(_requestBuilder => _requestBuilder - .Setup(HttpMethod.Get, "/subscriptions/{subscription_id}/components/{component_id}/usages.json") + .Setup(HttpMethod.Get, "/subscriptions/{subscription_id_or_reference}/components/{component_id}/usages.json") .WithAuth("BasicAuth") .Parameters(_parameters => _parameters - .Template(_template => _template.Setup("subscription_id", input.SubscriptionId)) + .Template(_template => _template.Setup("subscription_id_or_reference", input.SubscriptionIdOrReference).Required()) .Template(_template => _template.Setup("component_id", input.ComponentId).Required()) .Query(_query => _query.Setup("since_id", input.SinceId)) .Query(_query => _query.Setup("max_id", input.MaxId)) diff --git a/AdvancedBilling.Standard/Controllers/SubscriptionsController.cs b/AdvancedBilling.Standard/Controllers/SubscriptionsController.cs index 293b84d..b41fbb3 100644 --- a/AdvancedBilling.Standard/Controllers/SubscriptionsController.cs +++ b/AdvancedBilling.Standard/Controllers/SubscriptionsController.cs @@ -50,9 +50,9 @@ internal SubscriptionsController(GlobalConfiguration globalConfiguration) : base /// Credit card details may be required, depending on the options for the product being subscribed. The product can be specified by `product_id` or by `product_handle` (API Handle). /// If you are creating a subscription with a payment profile, the attribute to send will be `credit_card_attributes` or `bank_account_attributes` for ACH and Direct Debit. That said, when you read the subscription after creation, we return the profile details under `credit_card` or `bank_account`. /// ## Bulk creation of subscriptions. - /// Bulk creation of subscriptions is currently not supported. For scenarios where multiple subscriptions must be added, particularly when assigning to the same subscription group, it is essential to switch to a single-threaded approach. . + /// Bulk creation of subscriptions is currently not supported. For scenarios where multiple subscriptions must be added, particularly when assigning to the same subscription group, it is essential to switch to a single-threaded approach. /// To avoid data conflicts or inaccuracies, incorporate a sleep interval between requests. - /// While this single-threaded approach may impact performance, it ensures data consistency and accuracy in cases where concurrent creation attempts could otherwise lead to issues with subscription alignment and integrity. . + /// While this single-threaded approach may impact performance, it ensures data consistency and accuracy in cases where concurrent creation attempts could otherwise lead to issues with subscription alignment and integrity. /// ## Taxable Subscriptions. /// If your intent is to charge your subscribers tax via [Avalara Taxes](https://maxio.zendesk.com/hc/en-us/articles/24287043035661-Avalara-VAT-Tax) or [Custom Taxes](https://maxio.zendesk.com/hc/en-us/articles/24287044212749-Custom-Taxes), there are a few considerations to be made regarding collecting subscription data. /// For subscribers to be eligible to be taxed, the following information for the `customer` object or `payment_profile` object must by supplied:. @@ -89,7 +89,7 @@ internal SubscriptionsController(GlobalConfiguration globalConfiguration) : base /// Custom prices and price points can exist in harmony on a subscription. /// # Passing Payment Information. /// ## Subscription with Chargify.js token. - /// The `chargify_token` can be obtained using [Chargify.js](https://developers.chargify.com/docs/developer-docs/ZG9jOjE0NjAzNDI0-overview). The token represents payment profile attributes that were provided by the customer in their browser and stored at the payment gateway. + /// The `chargify_token` can be obtained using [Chargify.js](https://docs.maxio.com/hc/en-us/articles/38163190843789-Chargify-js-Overview#chargify-js-overview-0-0). The token represents payment profile attributes that were provided by the customer in their browser and stored at the payment gateway. /// The `payment_type` attribute may either be `credit_card` or `bank_account`, depending on the type of payment method being added. If a bank account is being passed, the payment attributes should be changed to `bank_account_attributes`. /// ```json. /// {. @@ -202,8 +202,8 @@ internal SubscriptionsController(GlobalConfiguration globalConfiguration) : base /// For more information on GoCardless, please view the following two resources:. /// + [Payment Profiles via API for GoCardless](https://developers.chargify.com/docs/api-docs/1f10a4f170405-create-payment-profile#gocardless). /// + [Full documentation on GoCardless](https://maxio.zendesk.com/hc/en-us/articles/24176159136909-GoCardless). - /// + [Using Chargify.js with GoCardless - minimal example](https://developers.chargify.com/docs/developer-docs/ZG9jOjE0NjAzNDIy-examples#minimal-example-with-direct-debit-gocardless-gateway). - /// + [Using Chargify.js with GoCardless - full example](https://developers.chargify.com/docs/developer-docs/ZG9jOjE0NjAzNDIy-examples#full-example-with-direct-debit-gocardless-gateway). + /// + [Using Chargify.js with GoCardless - minimal example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QQZKCER8CFK40MR6XJ). + /// + [Using Chargify.js with GoCardless - full example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QR09JVHWW0MCA7HVJV). /// ```json. /// {. /// "subscription": {. @@ -255,8 +255,8 @@ internal SubscriptionsController(GlobalConfiguration globalConfiguration) : base /// For more information on Stripe Direct Debit, please view the following two resources:. /// + [Payment Profiles via API for Stripe SEPA Direct Debit](https://developers.chargify.com/docs/api-docs/1f10a4f170405-create-payment-profile#sepa-direct-debit). /// + [Full documentation on Stripe Direct Debit](https://maxio.zendesk.com/hc/en-us/articles/24176170430093-Stripe-SEPA-and-BECS-Direct-Debit). - /// + [Using Chargify.js with Stripe SEPA or BECS Direct Debit - minimal example](https://developers.chargify.com/docs/developer-docs/ZG9jOjE0NjAzNDIy-examples#minimal-example-with-sepa-or-becs-direct-debit-stripe-gateway). - /// + [Using Chargify.js with Stripe SEPA Direct Debit - full example](https://developers.chargify.com/docs/developer-docs/ZG9jOjE0NjAzNDIy-examples#full-example-with-sepa-direct-debit-stripe-gateway). + /// + [Using Chargify.js with Stripe SEPA or BECS Direct Debit - minimal example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QQFKKN8Z7B7DZ9AJS5). + /// + [Using Chargify.js with Stripe SEPA Direct Debit - full example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QR09JVHWW0MCA7HVJV). /// ```json. /// {. /// "subscription": {. @@ -278,8 +278,8 @@ internal SubscriptionsController(GlobalConfiguration globalConfiguration) : base /// For more information on Stripe Direct Debit, please view the following two resources:. /// + [Payment Profiles via API for Stripe BECS Direct Debit]($e/Payment%20Profiles/createPaymentProfile). /// + [Full documentation on Stripe Direct Debit](https://maxio.zendesk.com/hc/en-us/articles/24176170430093-Stripe-SEPA-and-BECS-Direct-Debit). - /// + [Using Chargify.js with Stripe SEPA, BECS or BACS Direct Debit - minimal example](page:development-tools/chargify-js/examples#minimal-example-with-sepa-becs-or-bacs-direct-debit-stripe-gateway). - /// + [Using Chargify.js with Stripe BECS Direct Debit - full example](page:development-tools/chargify-js/examples#full-example-with-becs-direct-debit-stripe-gateway). + /// + [Using Chargify.js with Stripe SEPA, BECS or BACS Direct Debit - minimal example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QQFKKN8Z7B7DZ9AJS5). + /// + [Using Chargify.js with Stripe BECS Direct Debit - full example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QRX4B1TYZKZD8ZND6D). /// ```json. /// {. /// "subscription": {. @@ -302,8 +302,8 @@ internal SubscriptionsController(GlobalConfiguration globalConfiguration) : base /// For more information on Stripe Direct Debit, please view the following two resources:. /// + [Payment Profiles via API for Stripe BACS Direct Debit]($e/Payment%20Profiles/createPaymentProfile). /// + [Full documentation on Stripe Direct Debit](https://maxio.zendesk.com/hc/en-us/articles/24176170430093-Stripe-SEPA-and-BECS-Direct-Debit). - /// + [Using Chargify.js with Stripe SEPA, BECS or BACS Direct Debit - minimal example](page:development-tools/chargify-js/examples#minimal-example-with-sepa-becs-or-bacs-direct-debit-stripe-gateway). - /// + [Using Chargify.js with Stripe BACS Direct Debit - full example](page:development-tools/chargify-js/examples#full-example-with-bacs-direct-debit-stripe-gateway). + /// + [Using Chargify.js with Stripe SEPA, BECS or BACS Direct Debit - minimal example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QQFKKN8Z7B7DZ9AJS5). + /// + [Using Chargify.js with Stripe BACS Direct Debit - full example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QR7PA1DJ3XE9MD05FM). /// ```json. /// {. /// "subscription": {. @@ -518,9 +518,9 @@ public Models.SubscriptionResponse CreateSubscription( /// Credit card details may be required, depending on the options for the product being subscribed. The product can be specified by `product_id` or by `product_handle` (API Handle). /// If you are creating a subscription with a payment profile, the attribute to send will be `credit_card_attributes` or `bank_account_attributes` for ACH and Direct Debit. That said, when you read the subscription after creation, we return the profile details under `credit_card` or `bank_account`. /// ## Bulk creation of subscriptions. - /// Bulk creation of subscriptions is currently not supported. For scenarios where multiple subscriptions must be added, particularly when assigning to the same subscription group, it is essential to switch to a single-threaded approach. . + /// Bulk creation of subscriptions is currently not supported. For scenarios where multiple subscriptions must be added, particularly when assigning to the same subscription group, it is essential to switch to a single-threaded approach. /// To avoid data conflicts or inaccuracies, incorporate a sleep interval between requests. - /// While this single-threaded approach may impact performance, it ensures data consistency and accuracy in cases where concurrent creation attempts could otherwise lead to issues with subscription alignment and integrity. . + /// While this single-threaded approach may impact performance, it ensures data consistency and accuracy in cases where concurrent creation attempts could otherwise lead to issues with subscription alignment and integrity. /// ## Taxable Subscriptions. /// If your intent is to charge your subscribers tax via [Avalara Taxes](https://maxio.zendesk.com/hc/en-us/articles/24287043035661-Avalara-VAT-Tax) or [Custom Taxes](https://maxio.zendesk.com/hc/en-us/articles/24287044212749-Custom-Taxes), there are a few considerations to be made regarding collecting subscription data. /// For subscribers to be eligible to be taxed, the following information for the `customer` object or `payment_profile` object must by supplied:. @@ -557,7 +557,7 @@ public Models.SubscriptionResponse CreateSubscription( /// Custom prices and price points can exist in harmony on a subscription. /// # Passing Payment Information. /// ## Subscription with Chargify.js token. - /// The `chargify_token` can be obtained using [Chargify.js](https://developers.chargify.com/docs/developer-docs/ZG9jOjE0NjAzNDI0-overview). The token represents payment profile attributes that were provided by the customer in their browser and stored at the payment gateway. + /// The `chargify_token` can be obtained using [Chargify.js](https://docs.maxio.com/hc/en-us/articles/38163190843789-Chargify-js-Overview#chargify-js-overview-0-0). The token represents payment profile attributes that were provided by the customer in their browser and stored at the payment gateway. /// The `payment_type` attribute may either be `credit_card` or `bank_account`, depending on the type of payment method being added. If a bank account is being passed, the payment attributes should be changed to `bank_account_attributes`. /// ```json. /// {. @@ -670,8 +670,8 @@ public Models.SubscriptionResponse CreateSubscription( /// For more information on GoCardless, please view the following two resources:. /// + [Payment Profiles via API for GoCardless](https://developers.chargify.com/docs/api-docs/1f10a4f170405-create-payment-profile#gocardless). /// + [Full documentation on GoCardless](https://maxio.zendesk.com/hc/en-us/articles/24176159136909-GoCardless). - /// + [Using Chargify.js with GoCardless - minimal example](https://developers.chargify.com/docs/developer-docs/ZG9jOjE0NjAzNDIy-examples#minimal-example-with-direct-debit-gocardless-gateway). - /// + [Using Chargify.js with GoCardless - full example](https://developers.chargify.com/docs/developer-docs/ZG9jOjE0NjAzNDIy-examples#full-example-with-direct-debit-gocardless-gateway). + /// + [Using Chargify.js with GoCardless - minimal example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QQZKCER8CFK40MR6XJ). + /// + [Using Chargify.js with GoCardless - full example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QR09JVHWW0MCA7HVJV). /// ```json. /// {. /// "subscription": {. @@ -723,8 +723,8 @@ public Models.SubscriptionResponse CreateSubscription( /// For more information on Stripe Direct Debit, please view the following two resources:. /// + [Payment Profiles via API for Stripe SEPA Direct Debit](https://developers.chargify.com/docs/api-docs/1f10a4f170405-create-payment-profile#sepa-direct-debit). /// + [Full documentation on Stripe Direct Debit](https://maxio.zendesk.com/hc/en-us/articles/24176170430093-Stripe-SEPA-and-BECS-Direct-Debit). - /// + [Using Chargify.js with Stripe SEPA or BECS Direct Debit - minimal example](https://developers.chargify.com/docs/developer-docs/ZG9jOjE0NjAzNDIy-examples#minimal-example-with-sepa-or-becs-direct-debit-stripe-gateway). - /// + [Using Chargify.js with Stripe SEPA Direct Debit - full example](https://developers.chargify.com/docs/developer-docs/ZG9jOjE0NjAzNDIy-examples#full-example-with-sepa-direct-debit-stripe-gateway). + /// + [Using Chargify.js with Stripe SEPA or BECS Direct Debit - minimal example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QQFKKN8Z7B7DZ9AJS5). + /// + [Using Chargify.js with Stripe SEPA Direct Debit - full example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QR09JVHWW0MCA7HVJV). /// ```json. /// {. /// "subscription": {. @@ -746,8 +746,8 @@ public Models.SubscriptionResponse CreateSubscription( /// For more information on Stripe Direct Debit, please view the following two resources:. /// + [Payment Profiles via API for Stripe BECS Direct Debit]($e/Payment%20Profiles/createPaymentProfile). /// + [Full documentation on Stripe Direct Debit](https://maxio.zendesk.com/hc/en-us/articles/24176170430093-Stripe-SEPA-and-BECS-Direct-Debit). - /// + [Using Chargify.js with Stripe SEPA, BECS or BACS Direct Debit - minimal example](page:development-tools/chargify-js/examples#minimal-example-with-sepa-becs-or-bacs-direct-debit-stripe-gateway). - /// + [Using Chargify.js with Stripe BECS Direct Debit - full example](page:development-tools/chargify-js/examples#full-example-with-becs-direct-debit-stripe-gateway). + /// + [Using Chargify.js with Stripe SEPA, BECS or BACS Direct Debit - minimal example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QQFKKN8Z7B7DZ9AJS5). + /// + [Using Chargify.js with Stripe BECS Direct Debit - full example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QRX4B1TYZKZD8ZND6D). /// ```json. /// {. /// "subscription": {. @@ -770,8 +770,8 @@ public Models.SubscriptionResponse CreateSubscription( /// For more information on Stripe Direct Debit, please view the following two resources:. /// + [Payment Profiles via API for Stripe BACS Direct Debit]($e/Payment%20Profiles/createPaymentProfile). /// + [Full documentation on Stripe Direct Debit](https://maxio.zendesk.com/hc/en-us/articles/24176170430093-Stripe-SEPA-and-BECS-Direct-Debit). - /// + [Using Chargify.js with Stripe SEPA, BECS or BACS Direct Debit - minimal example](page:development-tools/chargify-js/examples#minimal-example-with-sepa-becs-or-bacs-direct-debit-stripe-gateway). - /// + [Using Chargify.js with Stripe BACS Direct Debit - full example](page:development-tools/chargify-js/examples#full-example-with-bacs-direct-debit-stripe-gateway). + /// + [Using Chargify.js with Stripe SEPA, BECS or BACS Direct Debit - minimal example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QQFKKN8Z7B7DZ9AJS5). + /// + [Using Chargify.js with Stripe BACS Direct Debit - full example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QR7PA1DJ3XE9MD05FM). /// ```json. /// {. /// "subscription": {. diff --git a/AdvancedBilling.Standard/Controllers/WebhooksController.cs b/AdvancedBilling.Standard/Controllers/WebhooksController.cs index 916a737..cb83d41 100644 --- a/AdvancedBilling.Standard/Controllers/WebhooksController.cs +++ b/AdvancedBilling.Standard/Controllers/WebhooksController.cs @@ -36,15 +36,7 @@ public class WebhooksController : BaseController internal WebhooksController(GlobalConfiguration globalConfiguration) : base(globalConfiguration) { } /// - /// ## Webhooks Intro. - /// The Webhooks API allows you to view a list of all webhooks and to selectively resend individual or groups of webhooks. Webhooks will be sent on endpoints specified by you. Endpoints can be added via API or Web UI. There is also an option to enable / disable webhooks via API request. - /// We recommend that you review Advanced Billing's webhook documentation located in our help site. The following resources will help guide you on how to use webhooks in Advanced Billing, in addition to these webhook endpoints:. - /// + [Adding/editing new webhooks](https://maxio.zendesk.com/hc/en-us/articles/24286723085197-Webhooks#configure-webhook-url). - /// + [Webhooks introduction and delivery information](https://maxio.zendesk.com/hc/en-us/articles/24266143173901-Webhooks-Overview). - /// + [Main webhook reference](https://maxio.zendesk.com/hc/en-us/articles/24266136649869-Webhooks-Reference). - /// + [Available webhooks and payloads](https://maxio.zendesk.com/hc/en-us/articles/24266136649869-Webhooks-Reference#events). - /// ## List Webhooks for a Site. - /// This method allows you to fetch data about webhooks. You can pass query parameters if you want to filter webhooks. + /// Allows you to view a list of webhooks. You can pass query parameters if you want to filter webhooks. See the [Webhooks](page:introduction/webhooks/webhooks) documentation for more information. /// /// Object containing request parameters. /// Returns the List of Models.WebhookResponse response from the API call. @@ -53,15 +45,7 @@ internal WebhooksController(GlobalConfiguration globalConfiguration) : base(glob => CoreHelper.RunTask(ListWebhooksAsync(input)); /// - /// ## Webhooks Intro. - /// The Webhooks API allows you to view a list of all webhooks and to selectively resend individual or groups of webhooks. Webhooks will be sent on endpoints specified by you. Endpoints can be added via API or Web UI. There is also an option to enable / disable webhooks via API request. - /// We recommend that you review Advanced Billing's webhook documentation located in our help site. The following resources will help guide you on how to use webhooks in Advanced Billing, in addition to these webhook endpoints:. - /// + [Adding/editing new webhooks](https://maxio.zendesk.com/hc/en-us/articles/24286723085197-Webhooks#configure-webhook-url). - /// + [Webhooks introduction and delivery information](https://maxio.zendesk.com/hc/en-us/articles/24266143173901-Webhooks-Overview). - /// + [Main webhook reference](https://maxio.zendesk.com/hc/en-us/articles/24266136649869-Webhooks-Reference). - /// + [Available webhooks and payloads](https://maxio.zendesk.com/hc/en-us/articles/24266136649869-Webhooks-Reference#events). - /// ## List Webhooks for a Site. - /// This method allows you to fetch data about webhooks. You can pass query parameters if you want to filter webhooks. + /// Allows you to view a list of webhooks. You can pass query parameters if you want to filter webhooks. See the [Webhooks](page:introduction/webhooks/webhooks) documentation for more information. /// /// Object containing request parameters. /// cancellationToken. @@ -84,7 +68,7 @@ internal WebhooksController(GlobalConfiguration globalConfiguration) : base(glob .ExecuteAsync(cancellationToken).ConfigureAwait(false); /// - /// This method allows you to enable webhooks via API for your site. + /// Allows you to enable webhooks for your site. /// /// Optional parameter: . /// Returns the Models.EnableWebhooksResponse response from the API call. @@ -93,7 +77,7 @@ public Models.EnableWebhooksResponse EnableWebhooks( => CoreHelper.RunTask(EnableWebhooksAsync(body)); /// - /// This method allows you to enable webhooks via API for your site. + /// Allows you to enable webhooks for your site. /// /// Optional parameter: . /// cancellationToken. @@ -111,8 +95,7 @@ public Models.EnableWebhooksResponse EnableWebhooks( .ExecuteAsync(cancellationToken).ConfigureAwait(false); /// - /// Posting to the replay endpoint does not immediately resend the webhooks. They are added to a queue and will be sent as soon as possible, depending on available system resources. - /// You may submit an array of up to 1000 webhook IDs to replay in the request. + /// Replays webhooks. Posting to this endpoint does not immediately resend the webhooks. They are added to a queue and sent as soon as possible, depending on available system resources. You can submit an array of up to 1000 webhook IDs in the replay request. /// /// Optional parameter: . /// Returns the Models.ReplayWebhooksResponse response from the API call. @@ -121,8 +104,7 @@ public Models.ReplayWebhooksResponse ReplayWebhooks( => CoreHelper.RunTask(ReplayWebhooksAsync(body)); /// - /// Posting to the replay endpoint does not immediately resend the webhooks. They are added to a queue and will be sent as soon as possible, depending on available system resources. - /// You may submit an array of up to 1000 webhook IDs to replay in the request. + /// Replays webhooks. Posting to this endpoint does not immediately resend the webhooks. They are added to a queue and sent as soon as possible, depending on available system resources. You can submit an array of up to 1000 webhook IDs in the replay request. /// /// Optional parameter: . /// cancellationToken. @@ -140,9 +122,8 @@ public Models.ReplayWebhooksResponse ReplayWebhooks( .ExecuteAsync(cancellationToken).ConfigureAwait(false); /// - /// The Chargify API allows you to create an endpoint and assign a list of webhooks subscriptions (events) to it. - /// You can check available events here. - /// [Event keys](https://maxio.zendesk.com/hc/en-us/articles/24266136649869-Webhooks-Reference#events). + /// Creates an endpoint and assigns a list of webhooks subscriptions (events) to it. + /// See the [Webhooks Reference](page:introduction/webhooks/webhooks-reference#events) page for available events. /// /// Optional parameter: . /// Returns the Models.EndpointResponse response from the API call. @@ -151,9 +132,8 @@ public Models.EndpointResponse CreateEndpoint( => CoreHelper.RunTask(CreateEndpointAsync(body)); /// - /// The Chargify API allows you to create an endpoint and assign a list of webhooks subscriptions (events) to it. - /// You can check available events here. - /// [Event keys](https://maxio.zendesk.com/hc/en-us/articles/24266136649869-Webhooks-Reference#events). + /// Creates an endpoint and assigns a list of webhooks subscriptions (events) to it. + /// See the [Webhooks Reference](page:introduction/webhooks/webhooks-reference#events) page for available events. /// /// Optional parameter: . /// cancellationToken. @@ -173,14 +153,14 @@ public Models.EndpointResponse CreateEndpoint( .ExecuteAsync(cancellationToken).ConfigureAwait(false); /// - /// This method returns created endpoints for site. + /// Returns created endpoints for a site. /// /// Returns the List of Models.Endpoint response from the API call. public List ListEndpoints() => CoreHelper.RunTask(ListEndpointsAsync()); /// - /// This method returns created endpoints for site. + /// Returns created endpoints for a site. /// /// cancellationToken. /// Returns the List of Models.Endpoint response from the API call. @@ -192,12 +172,9 @@ public Models.EndpointResponse CreateEndpoint( .ExecuteAsync(cancellationToken).ConfigureAwait(false); /// - /// You can update an Endpoint via the API with a PUT request to the resource endpoint. - /// You can change the `url` of your endpoint which consumes webhooks or list of `webhook_subscriptions`. - /// Check available [Event keys](https://maxio.zendesk.com/hc/en-us/articles/24266136649869-Webhooks-Reference#events). - /// Always send a complete list of events which you want subscribe/watch. - /// Sending an PUT request for existing endpoint with empty list of `webhook_subscriptions` will end with unsubscribe from all events. - /// If you want unsubscribe from specific event, just send a list of `webhook_subscriptions` without the specific event key. + /// Updates an Endpoint. You can change the `url` of your endpoint or the list of `webhook_subscriptions` to which you are subscribed. See the [Webhooks Reference](page:introduction/webhooks/webhooks-reference#events) page for available events. + /// Always send a complete list of events to which you want to subscribe. Sending a PUT request for an existing endpoint with an empty list of `webhook_subscriptions` will unsubscribe all events. + /// If you want unsubscribe from a specific event, send a list of `webhook_subscriptions` without the specific event key. /// /// Required parameter: The Advanced Billing id for the endpoint that should be updated. /// Optional parameter: . @@ -208,12 +185,9 @@ public Models.EndpointResponse UpdateEndpoint( => CoreHelper.RunTask(UpdateEndpointAsync(endpointId, body)); /// - /// You can update an Endpoint via the API with a PUT request to the resource endpoint. - /// You can change the `url` of your endpoint which consumes webhooks or list of `webhook_subscriptions`. - /// Check available [Event keys](https://maxio.zendesk.com/hc/en-us/articles/24266136649869-Webhooks-Reference#events). - /// Always send a complete list of events which you want subscribe/watch. - /// Sending an PUT request for existing endpoint with empty list of `webhook_subscriptions` will end with unsubscribe from all events. - /// If you want unsubscribe from specific event, just send a list of `webhook_subscriptions` without the specific event key. + /// Updates an Endpoint. You can change the `url` of your endpoint or the list of `webhook_subscriptions` to which you are subscribed. See the [Webhooks Reference](page:introduction/webhooks/webhooks-reference#events) page for available events. + /// Always send a complete list of events to which you want to subscribe. Sending a PUT request for an existing endpoint with an empty list of `webhook_subscriptions` will unsubscribe all events. + /// If you want unsubscribe from a specific event, send a list of `webhook_subscriptions` without the specific event key. /// /// Required parameter: The Advanced Billing id for the endpoint that should be updated. /// Optional parameter: . diff --git a/AdvancedBilling.Standard/Models/Containers/CreateUsageSubscriptionIdOrReference.cs b/AdvancedBilling.Standard/Models/Containers/CreateUsageSubscriptionIdOrReference.cs new file mode 100644 index 0000000..3a7a187 --- /dev/null +++ b/AdvancedBilling.Standard/Models/Containers/CreateUsageSubscriptionIdOrReference.cs @@ -0,0 +1,126 @@ +// +// 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 Type[] { + typeof(NumberCase), + typeof(MStringCase) + }, + true + )] + public abstract class CreateUsageSubscriptionIdOrReference + { + /// + /// This is Number case. + /// + /// + /// The CreateUsageSubscriptionIdOrReference instance, wrapping the provided int value. + /// + public static CreateUsageSubscriptionIdOrReference FromNumber(int number) + { + return new NumberCase().Set(number); + } + + /// + /// This is String case. + /// + /// + /// The CreateUsageSubscriptionIdOrReference instance, wrapping the provided string value. + /// + public static CreateUsageSubscriptionIdOrReference 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); + + [JsonConverter(typeof(UnionTypeCaseConverter), JTokenType.Integer)] + private sealed class NumberCase : CreateUsageSubscriptionIdOrReference, ICaseValue + { + public int _value; + + public override T Match(Func number, Func mString) + { + return number(_value); + } + + 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 == null ? other._value == null : _value.Equals(other._value); + } + } + + [JsonConverter(typeof(UnionTypeCaseConverter), JTokenType.String, JTokenType.Null)] + private sealed class MStringCase : CreateUsageSubscriptionIdOrReference, ICaseValue + { + public string _value; + + public override T Match(Func number, Func mString) + { + return mString(_value); + } + + 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/ListUsagesInputSubscriptionIdOrReference.cs b/AdvancedBilling.Standard/Models/Containers/ListUsagesInputSubscriptionIdOrReference.cs new file mode 100644 index 0000000..dcff2b4 --- /dev/null +++ b/AdvancedBilling.Standard/Models/Containers/ListUsagesInputSubscriptionIdOrReference.cs @@ -0,0 +1,126 @@ +// +// 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 Type[] { + typeof(NumberCase), + typeof(MStringCase) + }, + true + )] + public abstract class ListUsagesInputSubscriptionIdOrReference + { + /// + /// This is Number case. + /// + /// + /// The ListUsagesInputSubscriptionIdOrReference instance, wrapping the provided int value. + /// + public static ListUsagesInputSubscriptionIdOrReference FromNumber(int number) + { + return new NumberCase().Set(number); + } + + /// + /// This is String case. + /// + /// + /// The ListUsagesInputSubscriptionIdOrReference instance, wrapping the provided string value. + /// + public static ListUsagesInputSubscriptionIdOrReference 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); + + [JsonConverter(typeof(UnionTypeCaseConverter), JTokenType.Integer)] + private sealed class NumberCase : ListUsagesInputSubscriptionIdOrReference, ICaseValue + { + public int _value; + + public override T Match(Func number, Func mString) + { + return number(_value); + } + + 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 == null ? other._value == null : _value.Equals(other._value); + } + } + + [JsonConverter(typeof(UnionTypeCaseConverter), JTokenType.String, JTokenType.Null)] + private sealed class MStringCase : ListUsagesInputSubscriptionIdOrReference, ICaseValue + { + public string _value; + + public override T Match(Func number, Func mString) + { + return mString(_value); + } + + 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/ListUsagesInput.cs b/AdvancedBilling.Standard/Models/ListUsagesInput.cs index 832ff22..8489012 100644 --- a/AdvancedBilling.Standard/Models/ListUsagesInput.cs +++ b/AdvancedBilling.Standard/Models/ListUsagesInput.cs @@ -34,7 +34,7 @@ public ListUsagesInput() /// /// Initializes a new instance of the class. /// - /// subscription_id. + /// subscription_id_or_reference. /// component_id. /// since_id. /// max_id. @@ -43,7 +43,7 @@ public ListUsagesInput() /// page. /// per_page. public ListUsagesInput( - int subscriptionId, + ListUsagesInputSubscriptionIdOrReference subscriptionIdOrReference, ListUsagesInputComponentId componentId, long? sinceId = null, long? maxId = null, @@ -52,7 +52,7 @@ public ListUsagesInput( int? page = 1, int? perPage = 20) { - this.SubscriptionId = subscriptionId; + this.SubscriptionIdOrReference = subscriptionIdOrReference; this.ComponentId = componentId; this.SinceId = sinceId; this.MaxId = maxId; @@ -63,10 +63,10 @@ public ListUsagesInput( } /// - /// The Chargify id of the subscription + /// Either the Advanced Billing subscription ID (integer) or the subscription reference (string). Important: In cases where a numeric string value matches both an existing subscription ID and an existing subscription reference, the system will prioritize the subscription ID lookup. For example, if both subscription ID 123 and subscription reference "123" exist, passing "123" will return the subscription with ID 123. /// - [JsonProperty("subscription_id")] - public int SubscriptionId { get; set; } + [JsonProperty("subscription_id_or_reference")] + public ListUsagesInputSubscriptionIdOrReference SubscriptionIdOrReference { get; set; } /// /// Either the Advanced Billing id for the component or the component's handle prefixed by `handle:` @@ -129,7 +129,8 @@ public override bool Equals(object obj) if (ReferenceEquals(this, obj)) return true; return obj is ListUsagesInput other && - (this.SubscriptionId.Equals(other.SubscriptionId)) && + (this.SubscriptionIdOrReference == null && other.SubscriptionIdOrReference == null || + this.SubscriptionIdOrReference?.Equals(other.SubscriptionIdOrReference) == true) && (this.ComponentId == null && other.ComponentId == null || this.ComponentId?.Equals(other.ComponentId) == true) && (this.SinceId == null && other.SinceId == null || @@ -153,7 +154,7 @@ public override bool Equals(object obj) /// List of strings. protected new void ToString(List toStringOutput) { - toStringOutput.Add($"SubscriptionId = {this.SubscriptionId}"); + toStringOutput.Add($"SubscriptionIdOrReference = {(this.SubscriptionIdOrReference == null ? "null" : this.SubscriptionIdOrReference.ToString())}"); toStringOutput.Add($"ComponentId = {(this.ComponentId == null ? "null" : this.ComponentId.ToString())}"); toStringOutput.Add($"SinceId = {(this.SinceId == null ? "null" : this.SinceId.ToString())}"); toStringOutput.Add($"MaxId = {(this.MaxId == null ? "null" : this.MaxId.ToString())}"); diff --git a/AdvancedBilling.sln b/AdvancedBilling.sln index f8c0b78..662e28e 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", "{d086dca9-f0fd-48f6-bb16-2e021660c8c6}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AdvancedBilling.Standard", "AdvancedBilling.Standard/AdvancedBilling.Standard.csproj", "{cd90c6fa-6e72-47b3-bb97-69758ee23b9d}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -10,10 +10,10 @@ Global Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {d086dca9-f0fd-48f6-bb16-2e021660c8c6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {d086dca9-f0fd-48f6-bb16-2e021660c8c6}.Debug|Any CPU.Build.0 = Debug|Any CPU - {d086dca9-f0fd-48f6-bb16-2e021660c8c6}.Release|Any CPU.ActiveCfg = Release|Any CPU - {d086dca9-f0fd-48f6-bb16-2e021660c8c6}.Release|Any CPU.Build.0 = Release|Any CPU + {cd90c6fa-6e72-47b3-bb97-69758ee23b9d}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {cd90c6fa-6e72-47b3-bb97-69758ee23b9d}.Debug|Any CPU.Build.0 = Debug|Any CPU + {cd90c6fa-6e72-47b3-bb97-69758ee23b9d}.Release|Any CPU.ActiveCfg = Release|Any CPU + {cd90c6fa-6e72-47b3-bb97-69758ee23b9d}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/README.md b/README.md index 03e64fb..e94b133 100644 --- a/README.md +++ b/README.md @@ -29,15 +29,15 @@ 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 7.0.0 +dotnet add package Maxio.AdvancedBillingSdk --version 7.0.1 ``` You can also view the package at: -https://www.nuget.org/packages/Maxio.AdvancedBillingSdk/7.0.0 +https://www.nuget.org/packages/Maxio.AdvancedBillingSdk/7.0.1 ## Initialize the API Client -**_Note:_** Documentation for the client can be found [here.](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/7.0.0/doc/client.md) +**_Note:_** Documentation for the client can be found [here.](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/7.0.1/doc/client.md) The following parameters are configurable for the API Client: @@ -46,8 +46,8 @@ The following parameters are configurable for the API Client: | Site | `string` | The subdomain for your Advanced Billing site.
*Default*: `"subdomain"` | | Environment | `Environment` | 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/7.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/7.0.0/doc/auth/basic-authentication.md) | The Credentials Setter for Basic Authentication | +| HttpClientConfiguration | [`Action`](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/7.0.1/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/7.0.1/doc/auth/basic-authentication.md) | The Credentials Setter for Basic Authentication | The API client can be initialized as follows: @@ -55,6 +55,8 @@ The API client can be initialized as follows: using AdvancedBilling.Standard; using AdvancedBilling.Standard.Authentication; +namespace ConsoleApp; + AdvancedBillingClient client = new AdvancedBillingClient.Builder() .BasicAuthCredentials( new BasicAuthModel.Builder( @@ -82,63 +84,63 @@ 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/7.0.0/doc/auth/basic-authentication.md) +* [`BasicAuth (Basic Authentication)`](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/7.0.1/doc/auth/basic-authentication.md) ## List of APIs -* [API Exports](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/7.0.0/doc/controllers/api-exports.md) -* [Advance Invoice](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/7.0.0/doc/controllers/advance-invoice.md) -* [Billing Portal](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/7.0.0/doc/controllers/billing-portal.md) -* [Component Price Points](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/7.0.0/doc/controllers/component-price-points.md) -* [Custom Fields](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/7.0.0/doc/controllers/custom-fields.md) -* [Events-Based Billing Segments](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/7.0.0/doc/controllers/events-based-billing-segments.md) -* [Payment Profiles](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/7.0.0/doc/controllers/payment-profiles.md) -* [Product Families](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/7.0.0/doc/controllers/product-families.md) -* [Product Price Points](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/7.0.0/doc/controllers/product-price-points.md) -* [Proforma Invoices](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/7.0.0/doc/controllers/proforma-invoices.md) -* [Reason Codes](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/7.0.0/doc/controllers/reason-codes.md) -* [Referral Codes](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/7.0.0/doc/controllers/referral-codes.md) -* [Sales Commissions](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/7.0.0/doc/controllers/sales-commissions.md) -* [Subscription Components](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/7.0.0/doc/controllers/subscription-components.md) -* [Subscription Groups](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/7.0.0/doc/controllers/subscription-groups.md) -* [Subscription Group Invoice Account](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/7.0.0/doc/controllers/subscription-group-invoice-account.md) -* [Subscription Group Status](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/7.0.0/doc/controllers/subscription-group-status.md) -* [Subscription Invoice Account](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/7.0.0/doc/controllers/subscription-invoice-account.md) -* [Subscription Notes](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/7.0.0/doc/controllers/subscription-notes.md) -* [Subscription Products](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/7.0.0/doc/controllers/subscription-products.md) -* [Subscription Status](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/7.0.0/doc/controllers/subscription-status.md) -* [Coupons](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/7.0.0/doc/controllers/coupons.md) -* [Components](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/7.0.0/doc/controllers/components.md) -* [Customers](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/7.0.0/doc/controllers/customers.md) -* [Events](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/7.0.0/doc/controllers/events.md) -* [Insights](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/7.0.0/doc/controllers/insights.md) -* [Invoices](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/7.0.0/doc/controllers/invoices.md) -* [Offers](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/7.0.0/doc/controllers/offers.md) -* [Products](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/7.0.0/doc/controllers/products.md) -* [Sites](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/7.0.0/doc/controllers/sites.md) -* [Subscriptions](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/7.0.0/doc/controllers/subscriptions.md) -* [Webhooks](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/7.0.0/doc/controllers/webhooks.md) +* [API Exports](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/7.0.1/doc/controllers/api-exports.md) +* [Advance Invoice](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/7.0.1/doc/controllers/advance-invoice.md) +* [Billing Portal](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/7.0.1/doc/controllers/billing-portal.md) +* [Component Price Points](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/7.0.1/doc/controllers/component-price-points.md) +* [Custom Fields](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/7.0.1/doc/controllers/custom-fields.md) +* [Events-Based Billing Segments](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/7.0.1/doc/controllers/events-based-billing-segments.md) +* [Payment Profiles](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/7.0.1/doc/controllers/payment-profiles.md) +* [Product Families](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/7.0.1/doc/controllers/product-families.md) +* [Product Price Points](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/7.0.1/doc/controllers/product-price-points.md) +* [Proforma Invoices](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/7.0.1/doc/controllers/proforma-invoices.md) +* [Reason Codes](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/7.0.1/doc/controllers/reason-codes.md) +* [Referral Codes](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/7.0.1/doc/controllers/referral-codes.md) +* [Sales Commissions](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/7.0.1/doc/controllers/sales-commissions.md) +* [Subscription Components](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/7.0.1/doc/controllers/subscription-components.md) +* [Subscription Groups](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/7.0.1/doc/controllers/subscription-groups.md) +* [Subscription Group Invoice Account](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/7.0.1/doc/controllers/subscription-group-invoice-account.md) +* [Subscription Group Status](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/7.0.1/doc/controllers/subscription-group-status.md) +* [Subscription Invoice Account](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/7.0.1/doc/controllers/subscription-invoice-account.md) +* [Subscription Notes](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/7.0.1/doc/controllers/subscription-notes.md) +* [Subscription Products](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/7.0.1/doc/controllers/subscription-products.md) +* [Subscription Status](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/7.0.1/doc/controllers/subscription-status.md) +* [Coupons](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/7.0.1/doc/controllers/coupons.md) +* [Components](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/7.0.1/doc/controllers/components.md) +* [Customers](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/7.0.1/doc/controllers/customers.md) +* [Events](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/7.0.1/doc/controllers/events.md) +* [Insights](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/7.0.1/doc/controllers/insights.md) +* [Invoices](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/7.0.1/doc/controllers/invoices.md) +* [Offers](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/7.0.1/doc/controllers/offers.md) +* [Products](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/7.0.1/doc/controllers/products.md) +* [Sites](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/7.0.1/doc/controllers/sites.md) +* [Subscriptions](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/7.0.1/doc/controllers/subscriptions.md) +* [Webhooks](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/7.0.1/doc/controllers/webhooks.md) ## SDK Infrastructure ### Configuration -* [HttpClientConfiguration](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/7.0.0/doc/http-client-configuration.md) -* [HttpClientConfigurationBuilder](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/7.0.0/doc/http-client-configuration-builder.md) -* [ProxyConfigurationBuilder](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/7.0.0/doc/proxy-configuration-builder.md) +* [HttpClientConfiguration](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/7.0.1/doc/http-client-configuration.md) +* [HttpClientConfigurationBuilder](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/7.0.1/doc/http-client-configuration-builder.md) +* [ProxyConfigurationBuilder](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/7.0.1/doc/proxy-configuration-builder.md) ### HTTP -* [HttpCallback](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/7.0.0/doc/http-callback.md) -* [HttpContext](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/7.0.0/doc/http-context.md) -* [HttpRequest](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/7.0.0/doc/http-request.md) -* [HttpResponse](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/7.0.0/doc/http-response.md) -* [HttpStringResponse](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/7.0.0/doc/http-string-response.md) +* [HttpCallback](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/7.0.1/doc/http-callback.md) +* [HttpContext](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/7.0.1/doc/http-context.md) +* [HttpRequest](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/7.0.1/doc/http-request.md) +* [HttpResponse](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/7.0.1/doc/http-response.md) +* [HttpStringResponse](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/7.0.1/doc/http-string-response.md) ### Utilities -* [ApiException](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/7.0.0/doc/api-exception.md) -* [ApiHelper](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/7.0.0/doc/api-helper.md) -* [CustomDateTimeConverter](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/7.0.0/doc/custom-date-time-converter.md) -* [UnixDateTimeConverter](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/7.0.0/doc/unix-date-time-converter.md) +* [ApiException](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/7.0.1/doc/api-exception.md) +* [ApiHelper](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/7.0.1/doc/api-helper.md) +* [CustomDateTimeConverter](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/7.0.1/doc/custom-date-time-converter.md) +* [UnixDateTimeConverter](https://www.github.com/maxio-com/ab-dotnet-sdk/tree/7.0.1/doc/unix-date-time-converter.md) diff --git a/doc/auth/basic-authentication.md b/doc/auth/basic-authentication.md index 1c25545..c8d8025 100644 --- a/doc/auth/basic-authentication.md +++ b/doc/auth/basic-authentication.md @@ -26,6 +26,8 @@ You must provide credentials in the client as shown in the following code snippe using AdvancedBilling.Standard; using AdvancedBilling.Standard.Authentication; +namespace ConsoleApp; + AdvancedBillingClient client = new AdvancedBillingClient.Builder() .BasicAuthCredentials( new BasicAuthModel.Builder( diff --git a/doc/client.md b/doc/client.md index 5691bf1..a7d0213 100644 --- a/doc/client.md +++ b/doc/client.md @@ -17,6 +17,8 @@ The API client can be initialized as follows: using AdvancedBilling.Standard; using AdvancedBilling.Standard.Authentication; +namespace ConsoleApp; + AdvancedBillingClient client = new AdvancedBillingClient.Builder() .BasicAuthCredentials( new BasicAuthModel.Builder( diff --git a/doc/controllers/component-price-points.md b/doc/controllers/component-price-points.md index 9c7c0f4..709728c 100644 --- a/doc/controllers/component-price-points.md +++ b/doc/controllers/component-price-points.md @@ -103,7 +103,7 @@ catch (ApiException e) # Create Component Price Point -This endpoint can be used to create a new price point for an existing component. +Creates a price point for an existing component. ```csharp CreateComponentPricePointAsync( @@ -145,7 +145,7 @@ CreateComponentPricePointRequest body = new CreateComponentPricePointRequest { StartingQuantity = PriceStartingQuantity.FromString("101"), UnitPrice = PriceUnitPrice.FromString("4.00"), - EndingQuantity = null, + EndingQuantity = PriceEndingQuantity.FromString("200"), }, }, Handle = "wholesale-handle", diff --git a/doc/controllers/components.md b/doc/controllers/components.md index 6abb006..38139d7 100644 --- a/doc/controllers/components.md +++ b/doc/controllers/components.md @@ -708,9 +708,9 @@ catch (ApiException e) # Read Component -This request will return information regarding a component from a specific product family. +Returns information regarding 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:`. +You can read the component by either the component's id or handle. When using the handle, it must be prefixed with `handle:`. ```csharp ReadComponentAsync( diff --git a/doc/controllers/customers.md b/doc/controllers/customers.md index 801ccca..0c842ac 100644 --- a/doc/controllers/customers.md +++ b/doc/controllers/customers.md @@ -287,7 +287,7 @@ catch (ApiException e) # Read Customer -This method allows to retrieve the Customer properties by Advanced Billing-generated Customer ID. +Retrieves the Customer properties by Advanced Billing-generated Customer ID. ```csharp ReadCustomerAsync( @@ -319,6 +319,43 @@ catch (ApiException e) } ``` +## Example Response *(as JSON)* + +```json +{ + "customer": { + "first_name": "Jane", + "last_name": "Doe", + "email": "jane@example.com", + "cc_emails": "joe@example.com", + "organization": "ABC, Inc.", + "reference": "1234567890", + "id": 88833369, + "created_at": "2025-05-08T11:39:18-04:00", + "updated_at": "2025-05-08T11:39:18-04:00", + "address": "123 Main Street", + "address_2": "Unit 10", + "city": "Anytown", + "state": "MA", + "state_name": "Massachusetts", + "zip": "02120", + "country": "US", + "country_name": "United States", + "phone": "555-555-1212", + "verified": false, + "portal_customer_created_at": null, + "portal_invite_last_sent_at": null, + "portal_invite_last_accepted_at": null, + "tax_exempt": false, + "vat_number": null, + "parent_id": null, + "locale": "es-MX", + "salesforce_id": null, + "default_auto_renewal_profile_id": null + } +} +``` + # Update Customer diff --git a/doc/controllers/payment-profiles.md b/doc/controllers/payment-profiles.md index b9e19b3..9b580b6 100644 --- a/doc/controllers/payment-profiles.md +++ b/doc/controllers/payment-profiles.md @@ -96,9 +96,9 @@ For more information on GoCardless, please view the following resources: + [Full documentation on GoCardless](https://maxio.zendesk.com/hc/en-us/articles/24176159136909-GoCardless) -+ [Using Chargify.js with GoCardless - minimal example](https://developers.chargify.com/docs/developer-docs/ZG9jOjE0NjAzNDIy-examples#minimal-example-with-direct-debit-gocardless-gateway) ++ [Using Chargify.js with GoCardless - minimal example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QQZKCER8CFK40MR6XJ) -+ [Using Chargify.js with GoCardless - full example](https://developers.chargify.com/docs/developer-docs/ZG9jOjE0NjAzNDIy-examples#full-example-with-direct-debit-gocardless-gateway) ++ [Using Chargify.js with GoCardless - full example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QR09JVHWW0MCA7HVJV) ### GoCardless with Local Bank Details @@ -170,9 +170,9 @@ For more information on Stripe SEPA Direct Debit, please view the following reso + [Full documentation on Stripe SEPA Direct Debit](https://maxio.zendesk.com/hc/en-us/articles/24176170430093-Stripe-SEPA-and-BECS-Direct-Debit) -+ [Using Chargify.js with Stripe Direct Debit - minimal example](https://developers.chargify.com/docs/developer-docs/ZG9jOjE0NjAzNDIy-examples#minimal-example-with-sepa-or-becs-direct-debit-stripe-gateway) ++ [Using Chargify.js with Stripe Direct Debit - minimal example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QQFKKN8Z7B7DZ9AJS5) -+ [Using Chargify.js with Stripe Direct Debit - full example](https://developers.chargify.com/docs/developer-docs/ZG9jOjE0NjAzNDIy-examples#full-example-with-sepa-direct-debit-stripe-gateway) ++ [Using Chargify.js with Stripe Direct Debit - full example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QRECQQ4ECS3ZA55GY7) ### Stripe SEPA Direct Debit Payment Profiles @@ -1102,7 +1102,7 @@ One Time Tokens aka Advanced Billing Tokens house the credit card or ACH (Author 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://developers.chargify.com/docs/developer-docs/ZG9jOjE0NjAzNDI0-overview). +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). ```csharp ReadOneTimeTokenAsync( diff --git a/doc/controllers/subscription-components.md b/doc/controllers/subscription-components.md index bf34a16..b6fd4b1 100644 --- a/doc/controllers/subscription-components.md +++ b/doc/controllers/subscription-components.md @@ -1172,7 +1172,7 @@ A. No. Usage should be reported as one API call per component on a single subscr ```csharp CreateUsageAsync( - int subscriptionId, + CreateUsageSubscriptionIdOrReference subscriptionIdOrReference, CreateUsageComponentId componentId, Models.CreateUsageRequest body = null) ``` @@ -1181,7 +1181,7 @@ CreateUsageAsync( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription | +| `subscriptionIdOrReference` | [`CreateUsageSubscriptionIdOrReference`](../../doc/models/containers/create-usage-subscription-id-or-reference.md) | Template, Required | This is a container for one-of cases. | | `componentId` | [`CreateUsageComponentId`](../../doc/models/containers/create-usage-component-id.md) | Template, Required | This is a container for one-of cases. | | `body` | [`CreateUsageRequest`](../../doc/models/create-usage-request.md) | Body, Optional | - | @@ -1192,7 +1192,8 @@ CreateUsageAsync( ## Example Usage ```csharp -int subscriptionId = 222; +CreateUsageSubscriptionIdOrReference subscriptionIdOrReference = CreateUsageSubscriptionIdOrReference.FromNumber(234); + CreateUsageComponentId componentId = CreateUsageComponentId.FromNumber(144); CreateUsageRequest body = new CreateUsageRequest @@ -1208,7 +1209,7 @@ CreateUsageRequest body = new CreateUsageRequest try { UsageResponse result = await subscriptionComponentsController.CreateUsageAsync( - subscriptionId, + subscriptionIdOrReference, componentId, body ); @@ -1271,7 +1272,7 @@ ListUsagesAsync( | Parameter | Type | Tags | Description | | --- | --- | --- | --- | -| `subscriptionId` | `int` | Template, Required | The Chargify id of the subscription | +| `subscriptionIdOrReference` | [`ListUsagesInputSubscriptionIdOrReference`](../../doc/models/containers/list-usages-input-subscription-id-or-reference.md) | Template, Required | This is a container for one-of cases. | | `componentId` | [`ListUsagesInputComponentId`](../../doc/models/containers/list-usages-input-component-id.md) | Template, Required | This is a container for one-of cases. | | `sinceId` | `long?` | Query, Optional | Returns usages with an id greater than or equal to the one specified | | `maxId` | `long?` | Query, Optional | Returns usages with an id less than or equal to the one specified | @@ -1289,7 +1290,7 @@ ListUsagesAsync( ```csharp ListUsagesInput listUsagesInput = new ListUsagesInput { - SubscriptionId = 222, + SubscriptionIdOrReference = ListUsagesInputSubscriptionIdOrReference.FromNumber(234), ComponentId = ListUsagesInputComponentId.FromNumber(144), Page = 2, PerPage = 50, diff --git a/doc/controllers/subscriptions.md b/doc/controllers/subscriptions.md index 49eb4d8..4041232 100644 --- a/doc/controllers/subscriptions.md +++ b/doc/controllers/subscriptions.md @@ -117,7 +117,7 @@ Custom prices and price points can exist in harmony on a subscription. ## Subscription with Chargify.js token -The `chargify_token` can be obtained using [Chargify.js](https://developers.chargify.com/docs/developer-docs/ZG9jOjE0NjAzNDI0-overview). The token represents payment profile attributes that were provided by the customer in their browser and stored at the payment gateway. +The `chargify_token` can be obtained using [Chargify.js](https://docs.maxio.com/hc/en-us/articles/38163190843789-Chargify-js-Overview#chargify-js-overview-0-0). The token represents payment profile attributes that were provided by the customer in their browser and stored at the payment gateway. The `payment_type` attribute may either be `credit_card` or `bank_account`, depending on the type of payment method being added. If a bank account is being passed, the payment attributes should be changed to `bank_account_attributes`. @@ -248,9 +248,9 @@ For more information on GoCardless, please view the following two resources: + [Full documentation on GoCardless](https://maxio.zendesk.com/hc/en-us/articles/24176159136909-GoCardless) -+ [Using Chargify.js with GoCardless - minimal example](https://developers.chargify.com/docs/developer-docs/ZG9jOjE0NjAzNDIy-examples#minimal-example-with-direct-debit-gocardless-gateway) ++ [Using Chargify.js with GoCardless - minimal example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QQZKCER8CFK40MR6XJ) -+ [Using Chargify.js with GoCardless - full example](https://developers.chargify.com/docs/developer-docs/ZG9jOjE0NjAzNDIy-examples#full-example-with-direct-debit-gocardless-gateway) ++ [Using Chargify.js with GoCardless - full example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QR09JVHWW0MCA7HVJV) ```json { @@ -310,9 +310,9 @@ For more information on Stripe Direct Debit, please view the following two resou + [Full documentation on Stripe Direct Debit](https://maxio.zendesk.com/hc/en-us/articles/24176170430093-Stripe-SEPA-and-BECS-Direct-Debit) -+ [Using Chargify.js with Stripe SEPA or BECS Direct Debit - minimal example](https://developers.chargify.com/docs/developer-docs/ZG9jOjE0NjAzNDIy-examples#minimal-example-with-sepa-or-becs-direct-debit-stripe-gateway) ++ [Using Chargify.js with Stripe SEPA or BECS Direct Debit - minimal example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QQFKKN8Z7B7DZ9AJS5) -+ [Using Chargify.js with Stripe SEPA Direct Debit - full example](https://developers.chargify.com/docs/developer-docs/ZG9jOjE0NjAzNDIy-examples#full-example-with-sepa-direct-debit-stripe-gateway) ++ [Using Chargify.js with Stripe SEPA Direct Debit - full example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QR09JVHWW0MCA7HVJV) ```json { @@ -340,9 +340,9 @@ For more information on Stripe Direct Debit, please view the following two resou + [Full documentation on Stripe Direct Debit](https://maxio.zendesk.com/hc/en-us/articles/24176170430093-Stripe-SEPA-and-BECS-Direct-Debit) -+ [Using Chargify.js with Stripe SEPA, BECS or BACS Direct Debit - minimal example](page:development-tools/chargify-js/examples#minimal-example-with-sepa-becs-or-bacs-direct-debit-stripe-gateway) ++ [Using Chargify.js with Stripe SEPA, BECS or BACS Direct Debit - minimal example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QQFKKN8Z7B7DZ9AJS5) -+ [Using Chargify.js with Stripe BECS Direct Debit - full example](page:development-tools/chargify-js/examples#full-example-with-becs-direct-debit-stripe-gateway) ++ [Using Chargify.js with Stripe BECS Direct Debit - full example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QRX4B1TYZKZD8ZND6D) ```json { @@ -371,9 +371,9 @@ For more information on Stripe Direct Debit, please view the following two resou + [Full documentation on Stripe Direct Debit](https://maxio.zendesk.com/hc/en-us/articles/24176170430093-Stripe-SEPA-and-BECS-Direct-Debit) -+ [Using Chargify.js with Stripe SEPA, BECS or BACS Direct Debit - minimal example](page:development-tools/chargify-js/examples#minimal-example-with-sepa-becs-or-bacs-direct-debit-stripe-gateway) ++ [Using Chargify.js with Stripe SEPA, BECS or BACS Direct Debit - minimal example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QQFKKN8Z7B7DZ9AJS5) -+ [Using Chargify.js with Stripe BACS Direct Debit - full example](page:development-tools/chargify-js/examples#full-example-with-bacs-direct-debit-stripe-gateway) ++ [Using Chargify.js with Stripe BACS Direct Debit - full example](https://docs.maxio.com/hc/en-us/articles/38206331271693-Examples#h_01K0PJ15QR7PA1DJ3XE9MD05FM) ```json { diff --git a/doc/controllers/webhooks.md b/doc/controllers/webhooks.md index 2dfdcda..cccc319 100644 --- a/doc/controllers/webhooks.md +++ b/doc/controllers/webhooks.md @@ -20,20 +20,7 @@ WebhooksController webhooksController = client.WebhooksController; # List Webhooks -## Webhooks Intro - -The Webhooks API allows you to view a list of all webhooks and to selectively resend individual or groups of webhooks. Webhooks will be sent on endpoints specified by you. Endpoints can be added via API or Web UI. There is also an option to enable / disable webhooks via API request. - -We recommend that you review Advanced Billing's webhook documentation located in our help site. The following resources will help guide you on how to use webhooks in Advanced Billing, in addition to these webhook endpoints: - -+ [Adding/editing new webhooks](https://maxio.zendesk.com/hc/en-us/articles/24286723085197-Webhooks#configure-webhook-url) -+ [Webhooks introduction and delivery information](https://maxio.zendesk.com/hc/en-us/articles/24266143173901-Webhooks-Overview) -+ [Main webhook reference](https://maxio.zendesk.com/hc/en-us/articles/24266136649869-Webhooks-Reference) -+ [Available webhooks and payloads](https://maxio.zendesk.com/hc/en-us/articles/24266136649869-Webhooks-Reference#events) - -## List Webhooks for a Site - -This method allows you to fetch data about webhooks. You can pass query parameters if you want to filter webhooks. +Allows you to view a list of webhooks. You can pass query parameters if you want to filter webhooks. See the [Webhooks](page:introduction/webhooks/webhooks) documentation for more information. ```csharp ListWebhooksAsync( @@ -118,7 +105,7 @@ catch (ApiException e) # Enable Webhooks -This method allows you to enable webhooks via API for your site +Allows you to enable webhooks for your site ```csharp EnableWebhooksAsync( @@ -165,9 +152,7 @@ catch (ApiException e) # Replay Webhooks -Posting to the replay endpoint does not immediately resend the webhooks. They are added to a queue and will be sent as soon as possible, depending on available system resources. - -You may submit an array of up to 1000 webhook IDs to replay in the request. +Replays webhooks. Posting to this endpoint does not immediately resend the webhooks. They are added to a queue and sent as soon as possible, depending on available system resources. You can submit an array of up to 1000 webhook IDs in the replay request. ```csharp ReplayWebhooksAsync( @@ -218,10 +203,8 @@ catch (ApiException e) # Create Endpoint -The Chargify API allows you to create an endpoint and assign a list of webhooks subscriptions (events) to it. - -You can check available events here. -[Event keys](https://maxio.zendesk.com/hc/en-us/articles/24266136649869-Webhooks-Reference#events) +Creates an endpoint and assigns a list of webhooks subscriptions (events) to it. +See the [Webhooks Reference](page:introduction/webhooks/webhooks-reference#events) page for available events. ```csharp CreateEndpointAsync( @@ -291,7 +274,7 @@ catch (ApiException e) # List Endpoints -This method returns created endpoints for site. +Returns created endpoints for a site. ```csharp ListEndpointsAsync() @@ -346,15 +329,11 @@ catch (ApiException e) # Update Endpoint -You can update an Endpoint via the API with a PUT request to the resource endpoint. - -You can change the `url` of your endpoint which consumes webhooks or list of `webhook_subscriptions`. -Check available [Event keys](https://maxio.zendesk.com/hc/en-us/articles/24266136649869-Webhooks-Reference#events). +Updates an Endpoint. You can change the `url` of your endpoint or the list of `webhook_subscriptions` to which you are subscribed. See the [Webhooks Reference](page:introduction/webhooks/webhooks-reference#events) page for available events. -Always send a complete list of events which you want subscribe/watch. -Sending an PUT request for existing endpoint with empty list of `webhook_subscriptions` will end with unsubscribe from all events. +Always send a complete list of events to which you want to subscribe. Sending a PUT request for an existing endpoint with an empty list of `webhook_subscriptions` will unsubscribe all events. -If you want unsubscribe from specific event, just send a list of `webhook_subscriptions` without the specific event key. +If you want unsubscribe from a specific event, send a list of `webhook_subscriptions` without the specific event key. ```csharp UpdateEndpointAsync( @@ -381,7 +360,7 @@ CreateOrUpdateEndpointRequest body = new CreateOrUpdateEndpointRequest { Endpoint = new CreateOrUpdateEndpoint { - Url = "https://yout.site/webhooks/1/json.", + Url = "https://your.site/webhooks/1/json.", WebhookSubscriptions = new List { WebhookSubscription.PaymentFailure, diff --git a/doc/models/containers/create-usage-subscription-id-or-reference.md b/doc/models/containers/create-usage-subscription-id-or-reference.md new file mode 100644 index 0000000..9e1dcff --- /dev/null +++ b/doc/models/containers/create-usage-subscription-id-or-reference.md @@ -0,0 +1,14 @@ + +# Create Usage Subscription Id or Reference + +## Class Name + +`CreateUsageSubscriptionIdOrReference` + +## Cases + +| Type | Factory Method | +| --- | --- | +| `int` | CreateUsageSubscriptionIdOrReference.FromNumber(int number) | +| `string` | CreateUsageSubscriptionIdOrReference.FromString(string mString) | + diff --git a/doc/models/containers/list-usages-input-subscription-id-or-reference.md b/doc/models/containers/list-usages-input-subscription-id-or-reference.md new file mode 100644 index 0000000..ca67d06 --- /dev/null +++ b/doc/models/containers/list-usages-input-subscription-id-or-reference.md @@ -0,0 +1,14 @@ + +# List Usages Input Subscription Id or Reference + +## Class Name + +`ListUsagesInputSubscriptionIdOrReference` + +## Cases + +| Type | Factory Method | +| --- | --- | +| `int` | ListUsagesInputSubscriptionIdOrReference.FromNumber(int number) | +| `string` | ListUsagesInputSubscriptionIdOrReference.FromString(string mString) | + diff --git a/doc/proxy-configuration-builder.md b/doc/proxy-configuration-builder.md index 62fa720..da9aa73 100644 --- a/doc/proxy-configuration-builder.md +++ b/doc/proxy-configuration-builder.md @@ -21,14 +21,16 @@ To configure the SDK to use a proxy server, initialize the proxy configuration d using AdvancedBilling.Standard; using AdvancedBilling.Standard.Http.Client.Proxy; - var client = new AdvancedBillingClient.Builder() - .HttpClientConfig(config => config - .Proxy(new ProxyConfigurationBuilder("http://localhost") - .Port(8080) - .Tunnel(false) - .Auth("user", "pass") - ) +namespace ConsoleApp; + +var client = new AdvancedBillingClient.Builder() +.HttpClientConfig(config => config + .Proxy(new ProxyConfigurationBuilder("http://localhost") + .Port(8080) + .Tunnel(false) + .Auth("user", "pass") ) - .Build(); +) +.Build(); ```