Skip to content

Commit

Permalink
Automated commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
maxio-sdk committed Jan 29, 2024
1 parent 5c141b7 commit 27da65a
Show file tree
Hide file tree
Showing 643 changed files with 13,761 additions and 12,545 deletions.
3 changes: 3 additions & 0 deletions AdvancedBilling.Standard/AdvancedBilling.Standard.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,14 @@ Maxio integrates directly into your product, so you can seamlessly manage your p
<PackageProjectUrl>https://www.maxio.com/product/advanced-billing</PackageProjectUrl>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageLicenseFile>LICENSE</PackageLicenseFile>

<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>

<ItemGroup>
<PackageReference Include= "APIMatic.Core" Version= "0.3.*" />
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
<PackageReference Include="JsonSubTypes" Version="2.0.1" />
<None Include="..\README.md" Pack="true" PackagePath="\"/>
<None Include="..\LICENSE" Pack="true" PackagePath="\"/>
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace AdvancedBilling.Standard.Authentication
internal class BasicAuthManager : AuthManager, IBasicAuthCredentials
{
/// <summary>
/// Initializes a new instance of the <see cref="IrisBasicAuthManager"/> class.
/// Initializes a new instance of the <see cref="BasicAuthManager"/> class.
/// </summary>
/// <param name="username"> Username.</param>
/// <param name="password"> Password.</param>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ namespace AdvancedBilling.Standard.Authentication
{
using System;

/// <summary>
/// Authentication configuration interface for BasicAuth.
/// </summary>
public interface IBasicAuthCredentials
{
/// <summary>
Expand Down
166 changes: 89 additions & 77 deletions AdvancedBilling.Standard/Controllers/APIExportsController.cs

Large diffs are not rendered by default.

48 changes: 24 additions & 24 deletions AdvancedBilling.Standard/Controllers/AdvanceInvoiceController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,65 +76,65 @@ public Models.Invoice IssueAdvanceInvoice(
.ExecuteAsync(cancellationToken).ConfigureAwait(false);

/// <summary>
/// Void a subscription's existing advance invoice. Once voided, it can later be regenerated if desired.
/// A `reason` is required in order to void, and the invoice must have an open status. Voiding will cause any prepayments and credits that were applied to the invoice to be returned to the subscription. For a full overview of the impact of voiding, please [see our help docs](reference/Chargify-API.v1.yaml/components/schemas/Invoice).
/// Once an advance invoice has been generated for a subscription's upcoming renewal, it can be viewed through this endpoint. There can only be one advance invoice per subscription per billing cycle.
/// </summary>
/// <param name="subscriptionId">Required parameter: The Chargify id of the subscription.</param>
/// <param name="body">Optional parameter: Example: .</param>
/// <returns>Returns the Models.Invoice response from the API call.</returns>
public Models.Invoice VoidAdvanceInvoice(
int subscriptionId,
Models.VoidInvoiceRequest body = null)
=> CoreHelper.RunTask(VoidAdvanceInvoiceAsync(subscriptionId, body));
public Models.Invoice ReadAdvanceInvoice(
int subscriptionId)
=> CoreHelper.RunTask(ReadAdvanceInvoiceAsync(subscriptionId));

/// <summary>
/// Void a subscription's existing advance invoice. Once voided, it can later be regenerated if desired.
/// A `reason` is required in order to void, and the invoice must have an open status. Voiding will cause any prepayments and credits that were applied to the invoice to be returned to the subscription. For a full overview of the impact of voiding, please [see our help docs](reference/Chargify-API.v1.yaml/components/schemas/Invoice).
/// Once an advance invoice has been generated for a subscription's upcoming renewal, it can be viewed through this endpoint. There can only be one advance invoice per subscription per billing cycle.
/// </summary>
/// <param name="subscriptionId">Required parameter: The Chargify id of the subscription.</param>
/// <param name="body">Optional parameter: Example: .</param>
/// <param name="cancellationToken"> cancellationToken. </param>
/// <returns>Returns the Models.Invoice response from the API call.</returns>
public async Task<Models.Invoice> VoidAdvanceInvoiceAsync(
public async Task<Models.Invoice> ReadAdvanceInvoiceAsync(
int subscriptionId,
Models.VoidInvoiceRequest body = null,
CancellationToken cancellationToken = default)
=> await CreateApiCall<Models.Invoice>()
.RequestBuilder(_requestBuilder => _requestBuilder
.Setup(HttpMethod.Post, "/subscriptions/{subscription_id}/advance_invoice/void.json")
.Setup(HttpMethod.Get, "/subscriptions/{subscription_id}/advance_invoice.json")
.WithAuth("global")
.Parameters(_parameters => _parameters
.Body(_bodyParameter => _bodyParameter.Setup(body))
.Template(_template => _template.Setup("subscription_id", subscriptionId))
.Header(_header => _header.Setup("Content-Type", "application/json"))))
.Template(_template => _template.Setup("subscription_id", subscriptionId))))
.ResponseHandler(_responseHandler => _responseHandler
.ErrorCase("404", CreateErrorCase("Not Found:'{$response.body}'", (_reason, _context) => new ApiException(_reason, _context), true)))
.ExecuteAsync(cancellationToken).ConfigureAwait(false);

/// <summary>
/// Once an advance invoice has been generated for a subscription's upcoming renewal, it can be viewed through this endpoint. There can only be one advance invoice per subscription per billing cycle.
/// Void a subscription's existing advance invoice. Once voided, it can later be regenerated if desired.
/// A `reason` is required in order to void, and the invoice must have an open status. Voiding will cause any prepayments and credits that were applied to the invoice to be returned to the subscription. For a full overview of the impact of voiding, please [see our help docs](reference/Chargify-API.v1.yaml/components/schemas/Invoice).
/// </summary>
/// <param name="subscriptionId">Required parameter: The Chargify id of the subscription.</param>
/// <param name="body">Optional parameter: Example: .</param>
/// <returns>Returns the Models.Invoice response from the API call.</returns>
public Models.Invoice ReadAdvanceInvoice(
int subscriptionId)
=> CoreHelper.RunTask(ReadAdvanceInvoiceAsync(subscriptionId));
public Models.Invoice VoidAdvanceInvoice(
int subscriptionId,
Models.VoidInvoiceRequest body = null)
=> CoreHelper.RunTask(VoidAdvanceInvoiceAsync(subscriptionId, body));

/// <summary>
/// Once an advance invoice has been generated for a subscription's upcoming renewal, it can be viewed through this endpoint. There can only be one advance invoice per subscription per billing cycle.
/// Void a subscription's existing advance invoice. Once voided, it can later be regenerated if desired.
/// A `reason` is required in order to void, and the invoice must have an open status. Voiding will cause any prepayments and credits that were applied to the invoice to be returned to the subscription. For a full overview of the impact of voiding, please [see our help docs](reference/Chargify-API.v1.yaml/components/schemas/Invoice).
/// </summary>
/// <param name="subscriptionId">Required parameter: The Chargify id of the subscription.</param>
/// <param name="body">Optional parameter: Example: .</param>
/// <param name="cancellationToken"> cancellationToken. </param>
/// <returns>Returns the Models.Invoice response from the API call.</returns>
public async Task<Models.Invoice> ReadAdvanceInvoiceAsync(
public async Task<Models.Invoice> VoidAdvanceInvoiceAsync(
int subscriptionId,
Models.VoidInvoiceRequest body = null,
CancellationToken cancellationToken = default)
=> await CreateApiCall<Models.Invoice>()
.RequestBuilder(_requestBuilder => _requestBuilder
.Setup(HttpMethod.Get, "/subscriptions/{subscription_id}/advance_invoice.json")
.Setup(HttpMethod.Post, "/subscriptions/{subscription_id}/advance_invoice/void.json")
.WithAuth("global")
.Parameters(_parameters => _parameters
.Template(_template => _template.Setup("subscription_id", subscriptionId))))
.Body(_bodyParameter => _bodyParameter.Setup(body))
.Template(_template => _template.Setup("subscription_id", subscriptionId))
.Header(_header => _header.Setup("Content-Type", "application/json"))))
.ResponseHandler(_responseHandler => _responseHandler
.ErrorCase("404", CreateErrorCase("Not Found:'{$response.body}'", (_reason, _context) => new ApiException(_reason, _context), true)))
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
Expand Down
68 changes: 36 additions & 32 deletions AdvancedBilling.Standard/Controllers/BillingPortalController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,38 +35,7 @@ public class BillingPortalController : BaseController
internal BillingPortalController(GlobalConfiguration globalConfiguration) : base(globalConfiguration) { }

/// <summary>
/// You can revoke a customer's Billing Portal invitation.
/// If you attempt to revoke an invitation when the Billing Portal is already disabled for a Customer, you will receive a 422 error response.
/// ## Limitations.
/// This endpoint will only return a JSON response.
/// </summary>
/// <param name="customerId">Required parameter: The Chargify id of the customer.</param>
/// <returns>Returns the Models.RevokedInvitation response from the API call.</returns>
public Models.RevokedInvitation RevokeBillingPortalAccess(
int customerId)
=> CoreHelper.RunTask(RevokeBillingPortalAccessAsync(customerId));

/// <summary>
/// You can revoke a customer's Billing Portal invitation.
/// If you attempt to revoke an invitation when the Billing Portal is already disabled for a Customer, you will receive a 422 error response.
/// ## Limitations.
/// This endpoint will only return a JSON response.
/// </summary>
/// <param name="customerId">Required parameter: The Chargify id of the customer.</param>
/// <param name="cancellationToken"> cancellationToken. </param>
/// <returns>Returns the Models.RevokedInvitation response from the API call.</returns>
public async Task<Models.RevokedInvitation> RevokeBillingPortalAccessAsync(
int customerId,
CancellationToken cancellationToken = default)
=> await CreateApiCall<Models.RevokedInvitation>()
.RequestBuilder(_requestBuilder => _requestBuilder
.Setup(HttpMethod.Delete, "/portal/customers/{customer_id}/invitations/revoke.json")
.WithAuth("global")
.Parameters(_parameters => _parameters
.Template(_template => _template.Setup("customer_id", customerId))))
.ExecuteAsync(cancellationToken).ConfigureAwait(false);

/// <summary>
/// <![CDATA[
/// ## Billing Portal Documentation.
/// Full documentation on how the Billing Portal operates within the Chargify UI can be located [here](https://chargify.zendesk.com/hc/en-us/articles/4407648972443).
/// This documentation is focused on how the to configure the Billing Portal Settings, as well as Subscriber Interaction and Merchant Management of the Billing Portal.
Expand All @@ -75,6 +44,7 @@ public Models.RevokedInvitation RevokeBillingPortalAccess(
/// If your customer has been invited to the Billing Portal, then they will receive a link to manage their subscription (the “Management URL”) automatically at the bottom of their statements, invoices, and receipts. **This link changes periodically for security and is only valid for 65 days.**.
/// If you need to provide your customer their Management URL through other means, you can retrieve it via the API. Because the URL is cryptographically signed with a timestamp, it is not possible for merchants to generate the URL without requesting it from Chargify.
/// In order to prevent abuse & overuse, we ask that you request a new URL only when absolutely necessary. Management URLs are good for 65 days, so you should re-use a previously generated one as much as possible. If you use the URL frequently (such as to display on your website), please **do not** make an API request to Chargify every time.
/// ]]>
/// </summary>
/// <param name="customerId">Required parameter: The Chargify id of the customer.</param>
/// <param name="autoInvite">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`..</param>
Expand All @@ -85,6 +55,7 @@ public Models.CustomerResponse EnableBillingPortalForCustomer(
=> CoreHelper.RunTask(EnableBillingPortalForCustomerAsync(customerId, autoInvite));

/// <summary>
/// <![CDATA[
/// ## Billing Portal Documentation.
/// Full documentation on how the Billing Portal operates within the Chargify UI can be located [here](https://chargify.zendesk.com/hc/en-us/articles/4407648972443).
/// This documentation is focused on how the to configure the Billing Portal Settings, as well as Subscriber Interaction and Merchant Management of the Billing Portal.
Expand All @@ -93,6 +64,7 @@ public Models.CustomerResponse EnableBillingPortalForCustomer(
/// If your customer has been invited to the Billing Portal, then they will receive a link to manage their subscription (the “Management URL”) automatically at the bottom of their statements, invoices, and receipts. **This link changes periodically for security and is only valid for 65 days.**.
/// If you need to provide your customer their Management URL through other means, you can retrieve it via the API. Because the URL is cryptographically signed with a timestamp, it is not possible for merchants to generate the URL without requesting it from Chargify.
/// In order to prevent abuse & overuse, we ask that you request a new URL only when absolutely necessary. Management URLs are good for 65 days, so you should re-use a previously generated one as much as possible. If you use the URL frequently (such as to display on your website), please **do not** make an API request to Chargify every time.
/// ]]>
/// </summary>
/// <param name="customerId">Required parameter: The Chargify id of the customer.</param>
/// <param name="autoInvite">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`..</param>
Expand Down Expand Up @@ -194,5 +166,37 @@ public Models.ResentInvitation ResendBillingPortalInvitation(
.ErrorCase("404", CreateErrorCase("Not Found:'{$response.body}'", (_reason, _context) => new ApiException(_reason, _context), true))
.ErrorCase("422", CreateErrorCase("HTTP Response Not OK. Status code: {$statusCode}. Response: '{$response.body}'.", (_reason, _context) => new ErrorListResponseException(_reason, _context), true)))
.ExecuteAsync(cancellationToken).ConfigureAwait(false);

/// <summary>
/// You can revoke a customer's Billing Portal invitation.
/// If you attempt to revoke an invitation when the Billing Portal is already disabled for a Customer, you will receive a 422 error response.
/// ## Limitations.
/// This endpoint will only return a JSON response.
/// </summary>
/// <param name="customerId">Required parameter: The Chargify id of the customer.</param>
/// <returns>Returns the Models.RevokedInvitation response from the API call.</returns>
public Models.RevokedInvitation RevokeBillingPortalAccess(
int customerId)
=> CoreHelper.RunTask(RevokeBillingPortalAccessAsync(customerId));

/// <summary>
/// You can revoke a customer's Billing Portal invitation.
/// If you attempt to revoke an invitation when the Billing Portal is already disabled for a Customer, you will receive a 422 error response.
/// ## Limitations.
/// This endpoint will only return a JSON response.
/// </summary>
/// <param name="customerId">Required parameter: The Chargify id of the customer.</param>
/// <param name="cancellationToken"> cancellationToken. </param>
/// <returns>Returns the Models.RevokedInvitation response from the API call.</returns>
public async Task<Models.RevokedInvitation> RevokeBillingPortalAccessAsync(
int customerId,
CancellationToken cancellationToken = default)
=> await CreateApiCall<Models.RevokedInvitation>()
.RequestBuilder(_requestBuilder => _requestBuilder
.Setup(HttpMethod.Delete, "/portal/customers/{customer_id}/invitations/revoke.json")
.WithAuth("global")
.Parameters(_parameters => _parameters
.Template(_template => _template.Setup("customer_id", customerId))))
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
}
}
Loading

0 comments on commit 27da65a

Please sign in to comment.