Skip to content

Commit

Permalink
Merge pull request #842 from recurly/v3-v2021-02-25-9766218312
Browse files Browse the repository at this point in the history
Generated Latest Changes for v2021-02-25 (Taxable Address Control, RevRec)
  • Loading branch information
amandamfielding authored Jul 3, 2024
2 parents 687265a + de14b9a commit 554465f
Show file tree
Hide file tree
Showing 26 changed files with 1,833 additions and 31 deletions.
185 changes: 179 additions & 6 deletions Recurly/Client.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1766,7 +1766,7 @@ public Pager<CustomFieldDefinition> ListCustomFieldDefinitions(ListCustomFieldDe
/// </summary>
/// <param name="GetCustomFieldDefinitionParams">Optional Parameters for the request</param>
/// <returns>
/// An custom field definition.
/// A custom field definition.
/// </returns>
/// <exception cref="Recurly.Errors.ApiError">Thrown when the request is invalid.</exception>
public CustomFieldDefinition GetCustomFieldDefinition(string customFieldDefinitionId, RequestOptions options = null)
Expand All @@ -1783,7 +1783,7 @@ public CustomFieldDefinition GetCustomFieldDefinition(string customFieldDefiniti
/// </summary>
/// <param name="GetCustomFieldDefinitionParams">Optional Parameters for the request</param>
/// <returns>
/// An custom field definition.
/// A custom field definition.
/// </returns>
/// <exception cref="Recurly.Errors.ApiError">Thrown when the request is invalid.</exception>
public Task<CustomFieldDefinition> GetCustomFieldDefinitionAsync(string customFieldDefinitionId, CancellationToken cancellationToken = default(CancellationToken), RequestOptions options = null)
Expand All @@ -1795,6 +1795,179 @@ public CustomFieldDefinition GetCustomFieldDefinition(string customFieldDefiniti



/// <summary>
/// Create a new general ledger account <see href="https://developers.recurly.com/api/v2021-02-25#operation/create_general_ledger_account">create_general_ledger_account api documentation</see>
/// </summary>
/// <param name="CreateGeneralLedgerAccountParams">Optional Parameters for the request</param>
/// <returns>
/// A new general ledger account.
/// </returns>
/// <exception cref="Recurly.Errors.ApiError">Thrown when the request is invalid.</exception>
public GeneralLedgerAccount CreateGeneralLedgerAccount(GeneralLedgerAccountCreate body, RequestOptions options = null)
{
var urlParams = new Dictionary<string, object> { };
var url = this.InterpolatePath("/general_ledger_accounts", urlParams);
return MakeRequest<GeneralLedgerAccount>(Method.POST, url, body, null, options);
}



/// <summary>
/// Create a new general ledger account <see href="https://developers.recurly.com/api/v2021-02-25#operation/create_general_ledger_account">create_general_ledger_account api documentation</see>
/// </summary>
/// <param name="CreateGeneralLedgerAccountParams">Optional Parameters for the request</param>
/// <returns>
/// A new general ledger account.
/// </returns>
/// <exception cref="Recurly.Errors.ApiError">Thrown when the request is invalid.</exception>
public Task<GeneralLedgerAccount> CreateGeneralLedgerAccountAsync(GeneralLedgerAccountCreate body, CancellationToken cancellationToken = default(CancellationToken), RequestOptions options = null)
{
var urlParams = new Dictionary<string, object> { };
var url = this.InterpolatePath("/general_ledger_accounts", urlParams);
return MakeRequestAsync<GeneralLedgerAccount>(Method.POST, url, body, null, options, cancellationToken);
}



/// <summary>
/// List a site's general ledger accounts <see href="https://developers.recurly.com/api/v2021-02-25#operation/list_general_ledger_accounts">list_general_ledger_accounts api documentation</see>
/// </summary>
/// <param name="ListGeneralLedgerAccountsParams">Optional Parameters for the request</param>
/// <returns>
/// A list of the site's general ledger accounts.
/// </returns>
public Pager<GeneralLedgerAccount> ListGeneralLedgerAccounts(ListGeneralLedgerAccountsParams optionalParams = null, RequestOptions options = null)
{
var urlParams = new Dictionary<string, object> { };
var queryParams = (optionalParams ?? new ListGeneralLedgerAccountsParams()).ToDictionary();
var url = this.InterpolatePath("/general_ledger_accounts", urlParams);
return Pager<GeneralLedgerAccount>.Build(url, queryParams, options, this);
}





/// <summary>
/// Fetch a general ledger account <see href="https://developers.recurly.com/api/v2021-02-25#operation/get_general_ledger_account">get_general_ledger_account api documentation</see>
/// </summary>
/// <param name="GetGeneralLedgerAccountParams">Optional Parameters for the request</param>
/// <returns>
/// A general ledger account.
/// </returns>
/// <exception cref="Recurly.Errors.ApiError">Thrown when the request is invalid.</exception>
public GeneralLedgerAccount GetGeneralLedgerAccount(string generalLedgerAccountId, RequestOptions options = null)
{
var urlParams = new Dictionary<string, object> { { "general_ledger_account_id", generalLedgerAccountId } };
var url = this.InterpolatePath("/general_ledger_accounts/{general_ledger_account_id}", urlParams);
return MakeRequest<GeneralLedgerAccount>(Method.GET, url, null, null, options);
}



/// <summary>
/// Fetch a general ledger account <see href="https://developers.recurly.com/api/v2021-02-25#operation/get_general_ledger_account">get_general_ledger_account api documentation</see>
/// </summary>
/// <param name="GetGeneralLedgerAccountParams">Optional Parameters for the request</param>
/// <returns>
/// A general ledger account.
/// </returns>
/// <exception cref="Recurly.Errors.ApiError">Thrown when the request is invalid.</exception>
public Task<GeneralLedgerAccount> GetGeneralLedgerAccountAsync(string generalLedgerAccountId, CancellationToken cancellationToken = default(CancellationToken), RequestOptions options = null)
{
var urlParams = new Dictionary<string, object> { { "general_ledger_account_id", generalLedgerAccountId } };
var url = this.InterpolatePath("/general_ledger_accounts/{general_ledger_account_id}", urlParams);
return MakeRequestAsync<GeneralLedgerAccount>(Method.GET, url, null, null, options, cancellationToken);
}



/// <summary>
/// Update a general ledger account <see href="https://developers.recurly.com/api/v2021-02-25#operation/update_general_ledger_account">update_general_ledger_account api documentation</see>
/// </summary>
/// <param name="UpdateGeneralLedgerAccountParams">Optional Parameters for the request</param>
/// <returns>
/// The updated general ledger account.
/// </returns>
/// <exception cref="Recurly.Errors.ApiError">Thrown when the request is invalid.</exception>
public GeneralLedgerAccount UpdateGeneralLedgerAccount(string generalLedgerAccountId, GeneralLedgerAccountUpdate body, RequestOptions options = null)
{
var urlParams = new Dictionary<string, object> { { "general_ledger_account_id", generalLedgerAccountId } };
var url = this.InterpolatePath("/general_ledger_accounts/{general_ledger_account_id}", urlParams);
return MakeRequest<GeneralLedgerAccount>(Method.PUT, url, body, null, options);
}



/// <summary>
/// Update a general ledger account <see href="https://developers.recurly.com/api/v2021-02-25#operation/update_general_ledger_account">update_general_ledger_account api documentation</see>
/// </summary>
/// <param name="UpdateGeneralLedgerAccountParams">Optional Parameters for the request</param>
/// <returns>
/// The updated general ledger account.
/// </returns>
/// <exception cref="Recurly.Errors.ApiError">Thrown when the request is invalid.</exception>
public Task<GeneralLedgerAccount> UpdateGeneralLedgerAccountAsync(string generalLedgerAccountId, GeneralLedgerAccountUpdate body, CancellationToken cancellationToken = default(CancellationToken), RequestOptions options = null)
{
var urlParams = new Dictionary<string, object> { { "general_ledger_account_id", generalLedgerAccountId } };
var url = this.InterpolatePath("/general_ledger_accounts/{general_ledger_account_id}", urlParams);
return MakeRequestAsync<GeneralLedgerAccount>(Method.PUT, url, body, null, options, cancellationToken);
}



/// <summary>
/// Get a single Performance Obligation. <see href="https://developers.recurly.com/api/v2021-02-25#operation/get_performance_obligation">get_performance_obligation api documentation</see>
/// </summary>
/// <param name="GetPerformanceObligationParams">Optional Parameters for the request</param>
/// <returns>
/// A single Performance Obligation.
/// </returns>
/// <exception cref="Recurly.Errors.ApiError">Thrown when the request is invalid.</exception>
public PerformanceObligation GetPerformanceObligation(string performanceObligationId, RequestOptions options = null)
{
var urlParams = new Dictionary<string, object> { { "performance_obligation_id", performanceObligationId } };
var url = this.InterpolatePath("/performance_obligations/{performance_obligation_id}", urlParams);
return MakeRequest<PerformanceObligation>(Method.GET, url, null, null, options);
}



/// <summary>
/// Get a single Performance Obligation. <see href="https://developers.recurly.com/api/v2021-02-25#operation/get_performance_obligation">get_performance_obligation api documentation</see>
/// </summary>
/// <param name="GetPerformanceObligationParams">Optional Parameters for the request</param>
/// <returns>
/// A single Performance Obligation.
/// </returns>
/// <exception cref="Recurly.Errors.ApiError">Thrown when the request is invalid.</exception>
public Task<PerformanceObligation> GetPerformanceObligationAsync(string performanceObligationId, CancellationToken cancellationToken = default(CancellationToken), RequestOptions options = null)
{
var urlParams = new Dictionary<string, object> { { "performance_obligation_id", performanceObligationId } };
var url = this.InterpolatePath("/performance_obligations/{performance_obligation_id}", urlParams);
return MakeRequestAsync<PerformanceObligation>(Method.GET, url, null, null, options, cancellationToken);
}



/// <summary>
/// Get a site's Performance Obligations <see href="https://developers.recurly.com/api/v2021-02-25#operation/get_performance_obligations">get_performance_obligations api documentation</see>
/// </summary>
/// <param name="GetPerformanceObligationsParams">Optional Parameters for the request</param>
/// <returns>
/// A list of Performance Obligations.
/// </returns>
public Pager<PerformanceObligation> GetPerformanceObligations(RequestOptions options = null)
{
var urlParams = new Dictionary<string, object> { };
var url = this.InterpolatePath("/performance_obligations", urlParams);
return Pager<PerformanceObligation>.Build(url, null, options, this);
}





/// <summary>
/// List an invoice template's associated accounts <see href="https://developers.recurly.com/api/v2021-02-25#operation/list_invoice_template_accounts">list_invoice_template_accounts api documentation</see>
/// </summary>
Expand Down Expand Up @@ -4909,11 +5082,11 @@ public Pager<ExternalPaymentPhase> ListExternalSubscriptionExternalPaymentPhases


/// <summary>
/// Fetch an external payment_phase <see href="https://developers.recurly.com/api/v2021-02-25#operation/get_external_subscription_external_payment_phase">get_external_subscription_external_payment_phase api documentation</see>
/// Fetch an external payment phase <see href="https://developers.recurly.com/api/v2021-02-25#operation/get_external_subscription_external_payment_phase">get_external_subscription_external_payment_phase api documentation</see>
/// </summary>
/// <param name="GetExternalSubscriptionExternalPaymentPhaseParams">Optional Parameters for the request</param>
/// <returns>
/// Details for an external payment_phase.
/// Details for an external payment phase.
/// </returns>
/// <exception cref="Recurly.Errors.ApiError">Thrown when the request is invalid.</exception>
public ExternalPaymentPhase GetExternalSubscriptionExternalPaymentPhase(string externalSubscriptionId, string externalPaymentPhaseId, RequestOptions options = null)
Expand All @@ -4926,11 +5099,11 @@ public ExternalPaymentPhase GetExternalSubscriptionExternalPaymentPhase(string e


/// <summary>
/// Fetch an external payment_phase <see href="https://developers.recurly.com/api/v2021-02-25#operation/get_external_subscription_external_payment_phase">get_external_subscription_external_payment_phase api documentation</see>
/// Fetch an external payment phase <see href="https://developers.recurly.com/api/v2021-02-25#operation/get_external_subscription_external_payment_phase">get_external_subscription_external_payment_phase api documentation</see>
/// </summary>
/// <param name="GetExternalSubscriptionExternalPaymentPhaseParams">Optional Parameters for the request</param>
/// <returns>
/// Details for an external payment_phase.
/// Details for an external payment phase.
/// </returns>
/// <exception cref="Recurly.Errors.ApiError">Thrown when the request is invalid.</exception>
public Task<ExternalPaymentPhase> GetExternalSubscriptionExternalPaymentPhaseAsync(string externalSubscriptionId, string externalPaymentPhaseId, CancellationToken cancellationToken = default(CancellationToken), RequestOptions options = null)
Expand Down
36 changes: 36 additions & 0 deletions Recurly/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2363,5 +2363,41 @@ public enum ExternalInvoiceState

};

public enum GeneralLedgerAccountType
{
Undefined = 0,

[EnumMember(Value = "liability")]
Liability,

[EnumMember(Value = "revenue")]
Revenue,

};

public enum OriginTaxAddressSource
{
Undefined = 0,

[EnumMember(Value = "origin")]
Origin,

[EnumMember(Value = "destination")]
Destination,

};

public enum DestinationTaxAddressSource
{
Undefined = 0,

[EnumMember(Value = "destination")]
Destination,

[EnumMember(Value = "origin")]
Origin,

};

}
}
Loading

0 comments on commit 554465f

Please sign in to comment.