Skip to content

Commit

Permalink
Merge branch 'main' into publish
Browse files Browse the repository at this point in the history
# Conflicts:
#	AdvancedBilling.Standard/Controllers/APIExportsController.cs
#	AdvancedBilling.Standard/Controllers/BillingPortalController.cs
#	AdvancedBilling.Standard/Controllers/ComponentsController.cs
#	AdvancedBilling.Standard/Controllers/CouponsController.cs
#	AdvancedBilling.Standard/Controllers/CustomFieldsController.cs
#	AdvancedBilling.Standard/Controllers/InvoicesController.cs
#	AdvancedBilling.Standard/Controllers/PaymentProfilesController.cs
#	AdvancedBilling.Standard/Controllers/ProductPricePointsController.cs
#	AdvancedBilling.Standard/Controllers/ProformaInvoicesController.cs
#	AdvancedBilling.Standard/Controllers/SalesCommissionsController.cs
#	AdvancedBilling.Standard/Controllers/SitesController.cs
#	AdvancedBilling.Standard/Controllers/SubscriptionComponentsController.cs
#	AdvancedBilling.Standard/Controllers/SubscriptionsController.cs
#	AdvancedBilling.Standard/Models/BankAccountAttributes.cs
#	AdvancedBilling.Standard/Models/BankAccountPaymentProfile.cs
#	AdvancedBilling.Standard/Models/ComponentCurrencyPrice.cs
#	AdvancedBilling.Standard/Models/CreditCardPaymentProfile.cs
#	AdvancedBilling.Standard/Models/SubscriptionGroupBankAccount.cs
#	AdvancedBilling.Standard/Models/VoidRemainderEventData.cs
#	AdvancedBilling.sln
#	doc/controllers/components.md
#	doc/controllers/coupons.md
#	doc/controllers/custom-fields.md
#	doc/controllers/invoices.md
#	doc/controllers/payment-profiles.md
#	doc/controllers/product-price-points.md
#	doc/controllers/proforma-invoices.md
#	doc/controllers/subscriptions.md
#	doc/models/bank-account-attributes.md
#	doc/models/bank-account-payment-profile.md
#	doc/models/bank-account-response.md
#	doc/models/credit-card-payment-profile.md
#	doc/models/payment-profile-response.md
#	doc/models/subscription-group-bank-account.md
  • Loading branch information
michalpierog committed Jan 29, 2024
2 parents 27da65a + 83a76e1 commit 3fc0dcc
Show file tree
Hide file tree
Showing 37 changed files with 3,864 additions and 3,701 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -293,4 +293,4 @@ public Models.BatchJobResponse ReadSubscriptionsExport(
.ErrorCase("404", CreateErrorCase("Not Found:'{$response.body}'", (_reason, _context) => new ApiException(_reason, _context), true)))
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
}
}
}
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>
/// 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);

/// <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);
Expand Down
Loading

0 comments on commit 3fc0dcc

Please sign in to comment.