Skip to content

Commit

Permalink
Merge pull request #126 from square/release/36.0.0
Browse files Browse the repository at this point in the history
Generated PR for Release: 36.0.0
  • Loading branch information
daphnechiu authored Apr 16, 2024
2 parents 1872d32 + 2a7d250 commit 8e8d93e
Show file tree
Hide file tree
Showing 18 changed files with 30 additions and 725 deletions.
4 changes: 4 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# **ATTENTION**
This repository **cannot** accept Pull Requests. If you wish to proceed with opening this PR, please understand that your code **will not** be pulled into this repository. Consider opening an issue which lays out the problem instead. Thank you very much for your efforts and highlighting issues!

Please direct all technical support questions, feature requests, API-related issues, and general discussions to our Square-supported developer channels. For public support, [join us in our Square Developer Discord server](https://discord.com/invite/squaredev) or [post in our Developer Forums](https://developer.squareup.com/forums). For private support, [contact our Developer Success Engineers](https://squareup.com/help/us/en/contact?panel=BF53A9C8EF68) directly.
20 changes: 10 additions & 10 deletions Square.sln
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,24 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26430.14
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Square", "Square/Square.csproj", "{3e3d86c1-1cc2-431c-bb34-9d1a88554c6e}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Square", "Square/Square.csproj", "{6e3f5606-ac3a-4f31-b282-c963803ed607}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Square.Tests", "Square.Tests/Square.Tests.csproj", "{175ec7f2-668d-432c-934b-583b0830ab20}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Square.Tests", "Square.Tests/Square.Tests.csproj", "{3b6c7029-db3d-4724-a411-e817ac6e70e3}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{3e3d86c1-1cc2-431c-bb34-9d1a88554c6e}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3e3d86c1-1cc2-431c-bb34-9d1a88554c6e}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3e3d86c1-1cc2-431c-bb34-9d1a88554c6e}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3e3d86c1-1cc2-431c-bb34-9d1a88554c6e}.Release|Any CPU.Build.0 = Release|Any CPU
{175ec7f2-668d-432c-934b-583b0830ab20}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{175ec7f2-668d-432c-934b-583b0830ab20}.Debug|Any CPU.Build.0 = Debug|Any CPU
{175ec7f2-668d-432c-934b-583b0830ab20}.Release|Any CPU.ActiveCfg = Release|Any CPU
{175ec7f2-668d-432c-934b-583b0830ab20}.Release|Any CPU.Build.0 = Release|Any CPU
{6e3f5606-ac3a-4f31-b282-c963803ed607}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6e3f5606-ac3a-4f31-b282-c963803ed607}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6e3f5606-ac3a-4f31-b282-c963803ed607}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6e3f5606-ac3a-4f31-b282-c963803ed607}.Release|Any CPU.Build.0 = Release|Any CPU
{3b6c7029-db3d-4724-a411-e817ac6e70e3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3b6c7029-db3d-4724-a411-e817ac6e70e3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3b6c7029-db3d-4724-a411-e817ac6e70e3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3b6c7029-db3d-4724-a411-e817ac6e70e3}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
54 changes: 0 additions & 54 deletions Square/Apis/IOAuthApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,60 +19,6 @@ namespace Square.Apis
/// </summary>
public interface IOAuthApi
{
/// <summary>
/// `RenewToken` is deprecated. For information about refreshing OAuth access tokens, see.
/// [Migrate from Renew to Refresh OAuth Tokens](https://developer.squareup.com/docs/oauth-api/migrate-to-refresh-tokens).
/// Renews an OAuth access token before it expires.
/// OAuth access tokens besides your application's personal access token expire after 30 days.
/// You can also renew expired tokens within 15 days of their expiration.
/// You cannot renew an access token that has been expired for more than 15 days.
/// Instead, the associated user must recomplete the OAuth flow from the beginning.
/// __Important:__ The `Authorization` header for this endpoint must have the.
/// following format:.
/// ```.
/// Authorization: Client APPLICATION_SECRET.
/// ```.
/// Replace `APPLICATION_SECRET` with the application secret on the **Credentials**.
/// page in the [Developer Dashboard](https://developer.squareup.com/apps).
/// </summary>
/// <param name="clientId">Required parameter: Your application ID, which is available on the **OAuth** page in the [Developer Dashboard](https://developer.squareup.com/apps)..</param>
/// <param name="body">Required parameter: An object containing the fields to POST for the request. See the corresponding object definition for field details..</param>
/// <param name="authorization">Required parameter: Client APPLICATION_SECRET.</param>
/// <returns>Returns the Models.RenewTokenResponse response from the API call.</returns>
[Obsolete]
Models.RenewTokenResponse RenewToken(
string clientId,
Models.RenewTokenRequest body,
string authorization);

/// <summary>
/// `RenewToken` is deprecated. For information about refreshing OAuth access tokens, see.
/// [Migrate from Renew to Refresh OAuth Tokens](https://developer.squareup.com/docs/oauth-api/migrate-to-refresh-tokens).
/// Renews an OAuth access token before it expires.
/// OAuth access tokens besides your application's personal access token expire after 30 days.
/// You can also renew expired tokens within 15 days of their expiration.
/// You cannot renew an access token that has been expired for more than 15 days.
/// Instead, the associated user must recomplete the OAuth flow from the beginning.
/// __Important:__ The `Authorization` header for this endpoint must have the.
/// following format:.
/// ```.
/// Authorization: Client APPLICATION_SECRET.
/// ```.
/// Replace `APPLICATION_SECRET` with the application secret on the **Credentials**.
/// page in the [Developer Dashboard](https://developer.squareup.com/apps).
/// </summary>
/// <param name="clientId">Required parameter: Your application ID, which is available on the **OAuth** page in the [Developer Dashboard](https://developer.squareup.com/apps)..</param>
/// <param name="body">Required parameter: An object containing the fields to POST for the request. See the corresponding object definition for field details..</param>
/// <param name="authorization">Required parameter: Client APPLICATION_SECRET.</param>
/// <param name="cancellationToken"> cancellationToken. </param>
/// <returns>Returns the Models.RenewTokenResponse response from the API call.</returns>
[Obsolete]
Task<Models.RenewTokenResponse> RenewTokenAsync(
string clientId,
Models.RenewTokenRequest body,
string authorization,
CancellationToken cancellationToken = default);

/// <summary>
/// Revokes an access token generated with the OAuth flow.
/// If an account has more than one OAuth access token for your application, this.
Expand Down
66 changes: 0 additions & 66 deletions Square/Apis/OAuthApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,72 +29,6 @@ internal class OAuthApi : BaseApi, IOAuthApi
/// </summary>
internal OAuthApi(GlobalConfiguration globalConfiguration) : base(globalConfiguration) { }

/// <summary>
/// `RenewToken` is deprecated. For information about refreshing OAuth access tokens, see.
/// [Migrate from Renew to Refresh OAuth Tokens](https://developer.squareup.com/docs/oauth-api/migrate-to-refresh-tokens).
/// Renews an OAuth access token before it expires.
/// OAuth access tokens besides your application's personal access token expire after 30 days.
/// You can also renew expired tokens within 15 days of their expiration.
/// You cannot renew an access token that has been expired for more than 15 days.
/// Instead, the associated user must recomplete the OAuth flow from the beginning.
/// __Important:__ The `Authorization` header for this endpoint must have the.
/// following format:.
/// ```.
/// Authorization: Client APPLICATION_SECRET.
/// ```.
/// Replace `APPLICATION_SECRET` with the application secret on the **Credentials**.
/// page in the [Developer Dashboard](https://developer.squareup.com/apps).
/// </summary>
/// <param name="clientId">Required parameter: Your application ID, which is available on the **OAuth** page in the [Developer Dashboard](https://developer.squareup.com/apps)..</param>
/// <param name="body">Required parameter: An object containing the fields to POST for the request. See the corresponding object definition for field details..</param>
/// <param name="authorization">Required parameter: Client APPLICATION_SECRET.</param>
/// <returns>Returns the Models.RenewTokenResponse response from the API call.</returns>
[Obsolete]
public Models.RenewTokenResponse RenewToken(
string clientId,
Models.RenewTokenRequest body,
string authorization)
=> CoreHelper.RunTask(RenewTokenAsync(clientId, body, authorization));

/// <summary>
/// `RenewToken` is deprecated. For information about refreshing OAuth access tokens, see.
/// [Migrate from Renew to Refresh OAuth Tokens](https://developer.squareup.com/docs/oauth-api/migrate-to-refresh-tokens).
/// Renews an OAuth access token before it expires.
/// OAuth access tokens besides your application's personal access token expire after 30 days.
/// You can also renew expired tokens within 15 days of their expiration.
/// You cannot renew an access token that has been expired for more than 15 days.
/// Instead, the associated user must recomplete the OAuth flow from the beginning.
/// __Important:__ The `Authorization` header for this endpoint must have the.
/// following format:.
/// ```.
/// Authorization: Client APPLICATION_SECRET.
/// ```.
/// Replace `APPLICATION_SECRET` with the application secret on the **Credentials**.
/// page in the [Developer Dashboard](https://developer.squareup.com/apps).
/// </summary>
/// <param name="clientId">Required parameter: Your application ID, which is available on the **OAuth** page in the [Developer Dashboard](https://developer.squareup.com/apps)..</param>
/// <param name="body">Required parameter: An object containing the fields to POST for the request. See the corresponding object definition for field details..</param>
/// <param name="authorization">Required parameter: Client APPLICATION_SECRET.</param>
/// <param name="cancellationToken"> cancellationToken. </param>
/// <returns>Returns the Models.RenewTokenResponse response from the API call.</returns>
[Obsolete]
public async Task<Models.RenewTokenResponse> RenewTokenAsync(
string clientId,
Models.RenewTokenRequest body,
string authorization,
CancellationToken cancellationToken = default)
=> await CreateApiCall<Models.RenewTokenResponse>()
.RequestBuilder(_requestBuilder => _requestBuilder
.Setup(HttpMethod.Post, "/oauth2/clients/{client_id}/access-token/renew")
.Parameters(_parameters => _parameters
.Body(_bodyParameter => _bodyParameter.Setup(body))
.Template(_template => _template.Setup("client_id", clientId))
.Header(_header => _header.Setup("Content-Type", "application/json"))
.Header(_header => _header.Setup("Authorization", authorization))))
.ResponseHandler(_responseHandler => _responseHandler
.ContextAdder((_result, _context) => _result.ContextSetter(_context)))
.ExecuteAsync(cancellationToken).ConfigureAwait(false);

/// <summary>
/// Revokes an access token generated with the OAuth flow.
/// If an account has more than one OAuth access token for your application, this.
Expand Down
2 changes: 1 addition & 1 deletion Square/Models/CatalogCustomAttributeDefinition.cs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ internal CatalogCustomAttributeDefinition(Dictionary<string, bool> shouldSeriali

/// <summary>
/// The set of `CatalogObject` types that this custom atttribute may be applied to.
/// Currently, only `ITEM`, `ITEM_VARIATION`, and `MODIFIER` are allowed. At least one type must be included.
/// Currently, only `ITEM`, `ITEM_VARIATION`, `MODIFIER`, `MODIFIER_LIST`, and `CATEGORY` are allowed. At least one type must be included.
/// See [CatalogObjectType](#type-catalogobjecttype) for possible values
/// </summary>
[JsonProperty("allowed_object_types")]
Expand Down
4 changes: 2 additions & 2 deletions Square/Models/Order.cs
Original file line number Diff line number Diff line change
Expand Up @@ -381,13 +381,13 @@ internal Order(Dictionary<string, bool> shouldSerialize,
public IDictionary<string, string> Metadata { get; }

/// <summary>
/// The timestamp for when the order was created, in RFC 3339 format (for example, "2016-09-04T23:59:33.123Z").
/// The timestamp for when the order was created, at server side, in RFC 3339 format (for example, "2016-09-04T23:59:33.123Z").
/// </summary>
[JsonProperty("created_at", NullValueHandling = NullValueHandling.Ignore)]
public string CreatedAt { get; }

/// <summary>
/// The timestamp for when the order was last updated, in RFC 3339 format (for example, "2016-09-04T23:59:33.123Z").
/// The timestamp for when the order was last updated, at server side, in RFC 3339 format (for example, "2016-09-04T23:59:33.123Z").
/// </summary>
[JsonProperty("updated_at", NullValueHandling = NullValueHandling.Ignore)]
public string UpdatedAt { get; }
Expand Down
1 change: 0 additions & 1 deletion Square/Models/OrderLineItemTax.cs
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,6 @@ internal OrderLineItemTax(Dictionary<string, bool> shouldSerialize,
/// The percentage of the tax, as a string representation of a decimal
/// number. For example, a value of `"7.25"` corresponds to a percentage of
/// 7.25%.
/// Either `percentage` or `amount_money` should be set, but not both.
/// </summary>
[JsonProperty("percentage")]
public string Percentage { get; }
Expand Down
160 changes: 0 additions & 160 deletions Square/Models/RenewTokenRequest.cs

This file was deleted.

Loading

0 comments on commit 8e8d93e

Please sign in to comment.