Skip to content

Commit

Permalink
Merge pull request #831 from recurly/v3-v2021-02-25-8899612454
Browse files Browse the repository at this point in the history
Generated Latest Changes for v2021-02-25 (Auth & Capture)
  • Loading branch information
amandamfielding authored Apr 30, 2024
2 parents cd89ad9 + e8b2f1b commit e8ac2cb
Show file tree
Hide file tree
Showing 10 changed files with 288 additions and 16 deletions.
102 changes: 102 additions & 0 deletions Recurly/Client.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4526,6 +4526,108 @@ public InvoiceCollection CreatePendingPurchase(PurchaseCreate body, RequestOptio



/// <summary>
/// Authorize a purchase <see href="https://developers.recurly.com/api/v2021-02-25#operation/create_authorize_purchase">create_authorize_purchase api documentation</see>
/// </summary>
/// <param name="CreateAuthorizePurchaseParams">Optional Parameters for the request</param>
/// <returns>
/// Returns the authorize invoice
/// </returns>
/// <exception cref="Recurly.Errors.ApiError">Thrown when the request is invalid.</exception>
public InvoiceCollection CreateAuthorizePurchase(PurchaseCreate body, RequestOptions options = null)
{
var urlParams = new Dictionary<string, object> { };
var url = this.InterpolatePath("/purchases/authorize", urlParams);
return MakeRequest<InvoiceCollection>(Method.POST, url, body, null, options);
}



/// <summary>
/// Authorize a purchase <see href="https://developers.recurly.com/api/v2021-02-25#operation/create_authorize_purchase">create_authorize_purchase api documentation</see>
/// </summary>
/// <param name="CreateAuthorizePurchaseParams">Optional Parameters for the request</param>
/// <returns>
/// Returns the authorize invoice
/// </returns>
/// <exception cref="Recurly.Errors.ApiError">Thrown when the request is invalid.</exception>
public Task<InvoiceCollection> CreateAuthorizePurchaseAsync(PurchaseCreate body, CancellationToken cancellationToken = default(CancellationToken), RequestOptions options = null)
{
var urlParams = new Dictionary<string, object> { };
var url = this.InterpolatePath("/purchases/authorize", urlParams);
return MakeRequestAsync<InvoiceCollection>(Method.POST, url, body, null, options, cancellationToken);
}



/// <summary>
/// Capture a purchase <see href="https://developers.recurly.com/api/v2021-02-25#operation/create_capture_purchase">create_capture_purchase api documentation</see>
/// </summary>
/// <param name="CreateCapturePurchaseParams">Optional Parameters for the request</param>
/// <returns>
/// Returns the captured invoice
/// </returns>
/// <exception cref="Recurly.Errors.ApiError">Thrown when the request is invalid.</exception>
public InvoiceCollection CreateCapturePurchase(string transactionId, RequestOptions options = null)
{
var urlParams = new Dictionary<string, object> { { "transaction_id", transactionId } };
var url = this.InterpolatePath("/purchases/{transaction_id}/capture", urlParams);
return MakeRequest<InvoiceCollection>(Method.POST, url, null, null, options);
}



/// <summary>
/// Capture a purchase <see href="https://developers.recurly.com/api/v2021-02-25#operation/create_capture_purchase">create_capture_purchase api documentation</see>
/// </summary>
/// <param name="CreateCapturePurchaseParams">Optional Parameters for the request</param>
/// <returns>
/// Returns the captured invoice
/// </returns>
/// <exception cref="Recurly.Errors.ApiError">Thrown when the request is invalid.</exception>
public Task<InvoiceCollection> CreateCapturePurchaseAsync(string transactionId, CancellationToken cancellationToken = default(CancellationToken), RequestOptions options = null)
{
var urlParams = new Dictionary<string, object> { { "transaction_id", transactionId } };
var url = this.InterpolatePath("/purchases/{transaction_id}/capture", urlParams);
return MakeRequestAsync<InvoiceCollection>(Method.POST, url, null, null, options, cancellationToken);
}



/// <summary>
/// Cancel Purchase <see href="https://developers.recurly.com/api/v2021-02-25#operation/cancelPurchase">cancelPurchase api documentation</see>
/// </summary>
/// <param name="CancelpurchaseParams">Optional Parameters for the request</param>
/// <returns>
/// Returns the cancelled invoice
/// </returns>
/// <exception cref="Recurly.Errors.ApiError">Thrown when the request is invalid.</exception>
public InvoiceCollection Cancelpurchase(string transactionId, RequestOptions options = null)
{
var urlParams = new Dictionary<string, object> { { "transaction_id", transactionId } };
var url = this.InterpolatePath("/purchases/{transaction_id}/cancel/", urlParams);
return MakeRequest<InvoiceCollection>(Method.POST, url, null, null, options);
}



/// <summary>
/// Cancel Purchase <see href="https://developers.recurly.com/api/v2021-02-25#operation/cancelPurchase">cancelPurchase api documentation</see>
/// </summary>
/// <param name="CancelpurchaseParams">Optional Parameters for the request</param>
/// <returns>
/// Returns the cancelled invoice
/// </returns>
/// <exception cref="Recurly.Errors.ApiError">Thrown when the request is invalid.</exception>
public Task<InvoiceCollection> CancelpurchaseAsync(string transactionId, CancellationToken cancellationToken = default(CancellationToken), RequestOptions options = null)
{
var urlParams = new Dictionary<string, object> { { "transaction_id", transactionId } };
var url = this.InterpolatePath("/purchases/{transaction_id}/cancel/", urlParams);
return MakeRequestAsync<InvoiceCollection>(Method.POST, url, null, null, options, cancellationToken);
}



/// <summary>
/// List the dates that have an available export to download. <see href="https://developers.recurly.com/api/v2021-02-25#operation/get_export_dates">get_export_dates api documentation</see>
/// </summary>
Expand Down
60 changes: 60 additions & 0 deletions Recurly/IClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2942,6 +2942,66 @@ public interface IClient
/// <exception cref="Recurly.Errors.ApiError">Thrown when the request is invalid.</exception>
Task<InvoiceCollection> CreatePendingPurchaseAsync(PurchaseCreate body, CancellationToken cancellationToken = default(CancellationToken), RequestOptions options = null);

/// <summary>
/// Authorize a purchase <see href="https://developers.recurly.com/api/v2021-02-25#operation/create_authorize_purchase">create_authorize_purchase api documentation</see>
/// </summary>
/// <param name="body">The body of the request.</param>
/// <returns>
/// Returns the authorize invoice
/// </returns>
/// <exception cref="Recurly.Errors.ApiError">Thrown when the request is invalid.</exception>
InvoiceCollection CreateAuthorizePurchase(PurchaseCreate body, RequestOptions options = null);

/// <summary>
/// Authorize a purchase <see href="https://developers.recurly.com/api/v2021-02-25#operation/create_authorize_purchase">create_authorize_purchase api documentation</see>
/// </summary>
/// <param name="body">The body of the request.</param>
/// <returns>
/// Returns the authorize invoice
/// </returns>
/// <exception cref="Recurly.Errors.ApiError">Thrown when the request is invalid.</exception>
Task<InvoiceCollection> CreateAuthorizePurchaseAsync(PurchaseCreate body, CancellationToken cancellationToken = default(CancellationToken), RequestOptions options = null);

/// <summary>
/// Capture a purchase <see href="https://developers.recurly.com/api/v2021-02-25#operation/create_capture_purchase">create_capture_purchase api documentation</see>
/// </summary>
/// <param name="transactionId">Transaction ID or UUID. For ID no prefix is used e.g. `e28zov4fw0v2`. For UUID use prefix `uuid-`, e.g. `uuid-123457890`.</param>
/// <returns>
/// Returns the captured invoice
/// </returns>
/// <exception cref="Recurly.Errors.ApiError">Thrown when the request is invalid.</exception>
InvoiceCollection CreateCapturePurchase(string transactionId, RequestOptions options = null);

/// <summary>
/// Capture a purchase <see href="https://developers.recurly.com/api/v2021-02-25#operation/create_capture_purchase">create_capture_purchase api documentation</see>
/// </summary>
/// <param name="transactionId">Transaction ID or UUID. For ID no prefix is used e.g. `e28zov4fw0v2`. For UUID use prefix `uuid-`, e.g. `uuid-123457890`.</param>
/// <returns>
/// Returns the captured invoice
/// </returns>
/// <exception cref="Recurly.Errors.ApiError">Thrown when the request is invalid.</exception>
Task<InvoiceCollection> CreateCapturePurchaseAsync(string transactionId, CancellationToken cancellationToken = default(CancellationToken), RequestOptions options = null);

/// <summary>
/// Cancel Purchase <see href="https://developers.recurly.com/api/v2021-02-25#operation/cancelPurchase">cancelPurchase api documentation</see>
/// </summary>
/// <param name="transactionId">Transaction ID or UUID. For ID no prefix is used e.g. `e28zov4fw0v2`. For UUID use prefix `uuid-`, e.g. `uuid-123457890`.</param>
/// <returns>
/// Returns the cancelled invoice
/// </returns>
/// <exception cref="Recurly.Errors.ApiError">Thrown when the request is invalid.</exception>
InvoiceCollection Cancelpurchase(string transactionId, RequestOptions options = null);

/// <summary>
/// Cancel Purchase <see href="https://developers.recurly.com/api/v2021-02-25#operation/cancelPurchase">cancelPurchase api documentation</see>
/// </summary>
/// <param name="transactionId">Transaction ID or UUID. For ID no prefix is used e.g. `e28zov4fw0v2`. For UUID use prefix `uuid-`, e.g. `uuid-123457890`.</param>
/// <returns>
/// Returns the cancelled invoice
/// </returns>
/// <exception cref="Recurly.Errors.ApiError">Thrown when the request is invalid.</exception>
Task<InvoiceCollection> CancelpurchaseAsync(string transactionId, CancellationToken cancellationToken = default(CancellationToken), RequestOptions options = null);

/// <summary>
/// List the dates that have an available export to download. <see href="https://developers.recurly.com/api/v2021-02-25#operation/get_export_dates">get_export_dates api documentation</see>
/// </summary>
Expand Down
2 changes: 0 additions & 2 deletions Recurly/Resources/Invoice.cs
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,6 @@ public class Invoice : Resource
/// Optionally supplied string that may be either `net` or `eom` (end-of-month).
/// When `net`, an invoice becomes past due the specified number of `Net Terms` days from the current date.
/// When `eom` an invoice becomes past due the specified number of `Net Terms` days from the last day of the current month.
///
/// This field is only available when the EOM Net Terms feature is enabled.
/// </value>
[JsonProperty("net_terms_type")]
[JsonConverter(typeof(RecurlyStringEnumConverter))]
Expand Down
2 changes: 0 additions & 2 deletions Recurly/Resources/InvoiceCreate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@ public class InvoiceCreate : Request
/// Optionally supplied string that may be either `net` or `eom` (end-of-month).
/// When `net`, an invoice becomes past due the specified number of `Net Terms` days from the current date.
/// When `eom` an invoice becomes past due the specified number of `Net Terms` days from the last day of the current month.
///
/// This field is only available when the EOM Net Terms feature is enabled.
/// </value>
[JsonProperty("net_terms_type")]
[JsonConverter(typeof(RecurlyStringEnumConverter))]
Expand Down
2 changes: 0 additions & 2 deletions Recurly/Resources/PurchaseCreate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,6 @@ public class PurchaseCreate : Request
/// Optionally supplied string that may be either `net` or `eom` (end-of-month).
/// When `net`, an invoice becomes past due the specified number of `Net Terms` days from the current date.
/// When `eom` an invoice becomes past due the specified number of `Net Terms` days from the last day of the current month.
///
/// This field is only available when the EOM Net Terms feature is enabled.
/// </value>
[JsonProperty("net_terms_type")]
[JsonConverter(typeof(RecurlyStringEnumConverter))]
Expand Down
2 changes: 0 additions & 2 deletions Recurly/Resources/Subscription.cs
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,6 @@ public class Subscription : Resource
/// Optionally supplied string that may be either `net` or `eom` (end-of-month).
/// When `net`, an invoice becomes past due the specified number of `Net Terms` days from the current date.
/// When `eom` an invoice becomes past due the specified number of `Net Terms` days from the last day of the current month.
///
/// This field is only available when the EOM Net Terms feature is enabled.
/// </value>
[JsonProperty("net_terms_type")]
[JsonConverter(typeof(RecurlyStringEnumConverter))]
Expand Down
2 changes: 0 additions & 2 deletions Recurly/Resources/SubscriptionChangeCreate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,6 @@ public class SubscriptionChangeCreate : Request
/// Optionally supplied string that may be either `net` or `eom` (end-of-month).
/// When `net`, an invoice becomes past due the specified number of `Net Terms` days from the current date.
/// When `eom` an invoice becomes past due the specified number of `Net Terms` days from the last day of the current month.
///
/// This field is only available when the EOM Net Terms feature is enabled.
/// </value>
[JsonProperty("net_terms_type")]
[JsonConverter(typeof(RecurlyStringEnumConverter))]
Expand Down
2 changes: 0 additions & 2 deletions Recurly/Resources/SubscriptionCreate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,6 @@ public class SubscriptionCreate : Request
/// Optionally supplied string that may be either `net` or `eom` (end-of-month).
/// When `net`, an invoice becomes past due the specified number of `Net Terms` days from the current date.
/// When `eom` an invoice becomes past due the specified number of `Net Terms` days from the last day of the current month.
///
/// This field is only available when the EOM Net Terms feature is enabled.
/// </value>
[JsonProperty("net_terms_type")]
[JsonConverter(typeof(RecurlyStringEnumConverter))]
Expand Down
2 changes: 0 additions & 2 deletions Recurly/Resources/SubscriptionUpdate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,6 @@ public class SubscriptionUpdate : Request
/// Optionally supplied string that may be either `net` or `eom` (end-of-month).
/// When `net`, an invoice becomes past due the specified number of `Net Terms` days from the current date.
/// When `eom` an invoice becomes past due the specified number of `Net Terms` days from the last day of the current month.
///
/// This field is only available when the EOM Net Terms feature is enabled.
/// </value>
[JsonProperty("net_terms_type")]
[JsonConverter(typeof(RecurlyStringEnumConverter))]
Expand Down
Loading

0 comments on commit e8ac2cb

Please sign in to comment.