Skip to content

Commit

Permalink
Merge pull request #793 from recurly/v3-v2021-02-25-1684878505
Browse files Browse the repository at this point in the history
Generated Latest Changes for v2021-02-25 (External Products & References)
  • Loading branch information
amandamfielding authored May 24, 2023
2 parents fd55c60 + 8c6cf0d commit 48ffceb
Show file tree
Hide file tree
Showing 10 changed files with 835 additions and 0 deletions.
223 changes: 223 additions & 0 deletions Recurly/Client.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2177,6 +2177,40 @@ public Pager<ExternalProduct> ListExternalProducts(ListExternalProductsParams op



/// <summary>
/// Create an external product <see href="https://developers.recurly.com/api/v2021-02-25#operation/create_external_product">create_external_product api documentation</see>
/// </summary>
/// <param name="CreateExternalProductParams">Optional Parameters for the request</param>
/// <returns>
/// Returns the external product
/// </returns>
/// <exception cref="Recurly.Errors.ApiError">Thrown when the request is invalid.</exception>
public ExternalProduct CreateExternalProduct(ExternalProductCreate body, RequestOptions options = null)
{
var urlParams = new Dictionary<string, object> { };
var url = this.InterpolatePath("/external_products", urlParams);
return MakeRequest<ExternalProduct>(Method.POST, url, body, null, options);
}



/// <summary>
/// Create an external product <see href="https://developers.recurly.com/api/v2021-02-25#operation/create_external_product">create_external_product api documentation</see>
/// </summary>
/// <param name="CreateExternalProductParams">Optional Parameters for the request</param>
/// <returns>
/// Returns the external product
/// </returns>
/// <exception cref="Recurly.Errors.ApiError">Thrown when the request is invalid.</exception>
public Task<ExternalProduct> CreateExternalProductAsync(ExternalProductCreate body, CancellationToken cancellationToken = default(CancellationToken), RequestOptions options = null)
{
var urlParams = new Dictionary<string, object> { };
var url = this.InterpolatePath("/external_products", urlParams);
return MakeRequestAsync<ExternalProduct>(Method.POST, url, body, null, options, cancellationToken);
}



/// <summary>
/// Fetch an external product <see href="https://developers.recurly.com/api/v2021-02-25#operation/get_external_product">get_external_product api documentation</see>
/// </summary>
Expand Down Expand Up @@ -2211,6 +2245,195 @@ public ExternalProduct GetExternalProduct(string externalProductId, RequestOptio



/// <summary>
/// Update an external product <see href="https://developers.recurly.com/api/v2021-02-25#operation/update_external_product">update_external_product api documentation</see>
/// </summary>
/// <param name="UpdateExternalProductParams">Optional Parameters for the request</param>
/// <returns>
/// Settings for an external product.
/// </returns>
/// <exception cref="Recurly.Errors.ApiError">Thrown when the request is invalid.</exception>
public ExternalProduct UpdateExternalProduct(string externalProductId, ExternalProductUpdate body, RequestOptions options = null)
{
var urlParams = new Dictionary<string, object> { { "external_product_id", externalProductId } };
var url = this.InterpolatePath("/external_products/{external_product_id}", urlParams);
return MakeRequest<ExternalProduct>(Method.PUT, url, body, null, options);
}



/// <summary>
/// Update an external product <see href="https://developers.recurly.com/api/v2021-02-25#operation/update_external_product">update_external_product api documentation</see>
/// </summary>
/// <param name="UpdateExternalProductParams">Optional Parameters for the request</param>
/// <returns>
/// Settings for an external product.
/// </returns>
/// <exception cref="Recurly.Errors.ApiError">Thrown when the request is invalid.</exception>
public Task<ExternalProduct> UpdateExternalProductAsync(string externalProductId, ExternalProductUpdate body, CancellationToken cancellationToken = default(CancellationToken), RequestOptions options = null)
{
var urlParams = new Dictionary<string, object> { { "external_product_id", externalProductId } };
var url = this.InterpolatePath("/external_products/{external_product_id}", urlParams);
return MakeRequestAsync<ExternalProduct>(Method.PUT, url, body, null, options, cancellationToken);
}



/// <summary>
/// Deactivate an external product <see href="https://developers.recurly.com/api/v2021-02-25#operation/deactivate_external_products">deactivate_external_products api documentation</see>
/// </summary>
/// <param name="DeactivateExternalProductsParams">Optional Parameters for the request</param>
/// <returns>
/// Deactivated external product.
/// </returns>
/// <exception cref="Recurly.Errors.ApiError">Thrown when the request is invalid.</exception>
public ExternalProduct DeactivateExternalProducts(string externalProductId, RequestOptions options = null)
{
var urlParams = new Dictionary<string, object> { { "external_product_id", externalProductId } };
var url = this.InterpolatePath("/external_products/{external_product_id}", urlParams);
return MakeRequest<ExternalProduct>(Method.DELETE, url, null, null, options);
}



/// <summary>
/// Deactivate an external product <see href="https://developers.recurly.com/api/v2021-02-25#operation/deactivate_external_products">deactivate_external_products api documentation</see>
/// </summary>
/// <param name="DeactivateExternalProductsParams">Optional Parameters for the request</param>
/// <returns>
/// Deactivated external product.
/// </returns>
/// <exception cref="Recurly.Errors.ApiError">Thrown when the request is invalid.</exception>
public Task<ExternalProduct> DeactivateExternalProductsAsync(string externalProductId, CancellationToken cancellationToken = default(CancellationToken), RequestOptions options = null)
{
var urlParams = new Dictionary<string, object> { { "external_product_id", externalProductId } };
var url = this.InterpolatePath("/external_products/{external_product_id}", urlParams);
return MakeRequestAsync<ExternalProduct>(Method.DELETE, url, null, null, options, cancellationToken);
}



/// <summary>
/// List the external product references for an external product <see href="https://developers.recurly.com/api/v2021-02-25#operation/list_external_product_external_product_references">list_external_product_external_product_references api documentation</see>
/// </summary>
/// <param name="ListExternalProductExternalProductReferencesParams">Optional Parameters for the request</param>
/// <returns>
/// A list of the the external product references for an external product.
/// </returns>
public Pager<ExternalProductReferenceCollection> ListExternalProductExternalProductReferences(string externalProductId, ListExternalProductExternalProductReferencesParams optionalParams = null, RequestOptions options = null)
{
var urlParams = new Dictionary<string, object> { { "external_product_id", externalProductId } };
var queryParams = (optionalParams ?? new ListExternalProductExternalProductReferencesParams()).ToDictionary();
var url = this.InterpolatePath("/external_products/{external_product_id}/external_product_references", urlParams);
return Pager<ExternalProductReferenceCollection>.Build(url, queryParams, options, this);
}





/// <summary>
/// Create an external product reference on an external product <see href="https://developers.recurly.com/api/v2021-02-25#operation/create_external_product_external_product_reference">create_external_product_external_product_reference api documentation</see>
/// </summary>
/// <param name="CreateExternalProductExternalProductReferenceParams">Optional Parameters for the request</param>
/// <returns>
/// Details for the external product reference.
/// </returns>
/// <exception cref="Recurly.Errors.ApiError">Thrown when the request is invalid.</exception>
public ExternalProductReferenceMini CreateExternalProductExternalProductReference(string externalProductId, ExternalProductReferenceCreate body, RequestOptions options = null)
{
var urlParams = new Dictionary<string, object> { { "external_product_id", externalProductId } };
var url = this.InterpolatePath("/external_products/{external_product_id}/external_product_references", urlParams);
return MakeRequest<ExternalProductReferenceMini>(Method.POST, url, body, null, options);
}



/// <summary>
/// Create an external product reference on an external product <see href="https://developers.recurly.com/api/v2021-02-25#operation/create_external_product_external_product_reference">create_external_product_external_product_reference api documentation</see>
/// </summary>
/// <param name="CreateExternalProductExternalProductReferenceParams">Optional Parameters for the request</param>
/// <returns>
/// Details for the external product reference.
/// </returns>
/// <exception cref="Recurly.Errors.ApiError">Thrown when the request is invalid.</exception>
public Task<ExternalProductReferenceMini> CreateExternalProductExternalProductReferenceAsync(string externalProductId, ExternalProductReferenceCreate body, CancellationToken cancellationToken = default(CancellationToken), RequestOptions options = null)
{
var urlParams = new Dictionary<string, object> { { "external_product_id", externalProductId } };
var url = this.InterpolatePath("/external_products/{external_product_id}/external_product_references", urlParams);
return MakeRequestAsync<ExternalProductReferenceMini>(Method.POST, url, body, null, options, cancellationToken);
}



/// <summary>
/// Fetch an external product reference <see href="https://developers.recurly.com/api/v2021-02-25#operation/get_external_product_external_product_reference">get_external_product_external_product_reference api documentation</see>
/// </summary>
/// <param name="GetExternalProductExternalProductReferenceParams">Optional Parameters for the request</param>
/// <returns>
/// Details for an external product reference.
/// </returns>
/// <exception cref="Recurly.Errors.ApiError">Thrown when the request is invalid.</exception>
public ExternalProductReferenceMini GetExternalProductExternalProductReference(string externalProductId, string externalProductReferenceId, RequestOptions options = null)
{
var urlParams = new Dictionary<string, object> { { "external_product_id", externalProductId }, { "external_product_reference_id", externalProductReferenceId } };
var url = this.InterpolatePath("/external_products/{external_product_id}/external_product_references/{external_product_reference_id}", urlParams);
return MakeRequest<ExternalProductReferenceMini>(Method.GET, url, null, null, options);
}



/// <summary>
/// Fetch an external product reference <see href="https://developers.recurly.com/api/v2021-02-25#operation/get_external_product_external_product_reference">get_external_product_external_product_reference api documentation</see>
/// </summary>
/// <param name="GetExternalProductExternalProductReferenceParams">Optional Parameters for the request</param>
/// <returns>
/// Details for an external product reference.
/// </returns>
/// <exception cref="Recurly.Errors.ApiError">Thrown when the request is invalid.</exception>
public Task<ExternalProductReferenceMini> GetExternalProductExternalProductReferenceAsync(string externalProductId, string externalProductReferenceId, CancellationToken cancellationToken = default(CancellationToken), RequestOptions options = null)
{
var urlParams = new Dictionary<string, object> { { "external_product_id", externalProductId }, { "external_product_reference_id", externalProductReferenceId } };
var url = this.InterpolatePath("/external_products/{external_product_id}/external_product_references/{external_product_reference_id}", urlParams);
return MakeRequestAsync<ExternalProductReferenceMini>(Method.GET, url, null, null, options, cancellationToken);
}



/// <summary>
/// Deactivate an external product reference <see href="https://developers.recurly.com/api/v2021-02-25#operation/deactivate_external_product_external_product_reference">deactivate_external_product_external_product_reference api documentation</see>
/// </summary>
/// <param name="DeactivateExternalProductExternalProductReferenceParams">Optional Parameters for the request</param>
/// <returns>
/// Details for an external product reference.
/// </returns>
/// <exception cref="Recurly.Errors.ApiError">Thrown when the request is invalid.</exception>
public ExternalProductReferenceMini DeactivateExternalProductExternalProductReference(string externalProductId, string externalProductReferenceId, RequestOptions options = null)
{
var urlParams = new Dictionary<string, object> { { "external_product_id", externalProductId }, { "external_product_reference_id", externalProductReferenceId } };
var url = this.InterpolatePath("/external_products/{external_product_id}/external_product_references/{external_product_reference_id}", urlParams);
return MakeRequest<ExternalProductReferenceMini>(Method.DELETE, url, null, null, options);
}



/// <summary>
/// Deactivate an external product reference <see href="https://developers.recurly.com/api/v2021-02-25#operation/deactivate_external_product_external_product_reference">deactivate_external_product_external_product_reference api documentation</see>
/// </summary>
/// <param name="DeactivateExternalProductExternalProductReferenceParams">Optional Parameters for the request</param>
/// <returns>
/// Details for an external product reference.
/// </returns>
/// <exception cref="Recurly.Errors.ApiError">Thrown when the request is invalid.</exception>
public Task<ExternalProductReferenceMini> DeactivateExternalProductExternalProductReferenceAsync(string externalProductId, string externalProductReferenceId, CancellationToken cancellationToken = default(CancellationToken), RequestOptions options = null)
{
var urlParams = new Dictionary<string, object> { { "external_product_id", externalProductId }, { "external_product_reference_id", externalProductReferenceId } };
var url = this.InterpolatePath("/external_products/{external_product_id}/external_product_references/{external_product_reference_id}", urlParams);
return MakeRequestAsync<ExternalProductReferenceMini>(Method.DELETE, url, null, null, options, cancellationToken);
}



/// <summary>
/// List a site's external subscriptions <see href="https://developers.recurly.com/api/v2021-02-25#operation/list_external_subscriptions">list_external_subscriptions api documentation</see>
/// </summary>
Expand Down
12 changes: 12 additions & 0 deletions Recurly/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,18 @@ namespace Recurly
namespace Constants
{

public enum ExternalProductReferenceConnectionType
{
Undefined = 0,

[EnumMember(Value = "apple_app_store")]
AppleAppStore,

[EnumMember(Value = "google_play_store")]
GooglePlayStore,

};

public enum RelatedType
{
Undefined = 0,
Expand Down
Loading

0 comments on commit 48ffceb

Please sign in to comment.