Skip to content

Commit

Permalink
Automated commit message (#11)
Browse files Browse the repository at this point in the history
Co-authored-by: PayPalServerSDKs <[email protected]>
  • Loading branch information
DPoplin and PayPalServerSDKs authored Oct 22, 2024
1 parent 8d8dd68 commit 2ff74be
Show file tree
Hide file tree
Showing 397 changed files with 6,704 additions and 6,704 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using PaypalServerSDK.Standard.Controllers;
using PaypalServerSDK.Standard.Http.Response;using PaypalServerSDK.Standard.Models;
using PaypalServerSDK.Standard.Utilities;
using PaypalServerSDK.Standard.Exceptions;
using PaypalServerSdk.Standard.Controllers;
using PaypalServerSdk.Standard.Http.Response;using PaypalServerSdk.Standard.Models;
using PaypalServerSdk.Standard.Utilities;
using PaypalServerSdk.Standard.Exceptions;
using APIMatic.Core.Authentication;
using APIMatic.Core.Request;
using APIMatic.Core;

namespace PaypalServerSDK.Standard.Authentication
namespace PaypalServerSdk.Standard.Authentication
{
/// <summary>
/// ClientCredentialsAuthManager Class.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using System.Threading.Tasks;
using System.Collections.Generic;

namespace PaypalServerSDK.Standard.Authentication
namespace PaypalServerSdk.Standard.Authentication
{
public interface IClientCredentialsAuth
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
// Copyright (c) APIMatic. All rights reserved.
// </copyright>
using System;
using PaypalServerSDK.Standard.Models;
using PaypalServerSdk.Standard.Models;

namespace PaypalServerSDK.Standard.Authentication
namespace PaypalServerSdk.Standard.Authentication
{
internal static class OAuthTokenExtensions
{
Expand Down
12 changes: 6 additions & 6 deletions PaypalServerSdk.Standard/Controllers/BaseController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
using APIMatic.Core;
using APIMatic.Core.Http.Configuration;
using APIMatic.Core.Response;
using PaypalServerSDK.Standard.Exceptions;
using PaypalServerSDK.Standard.Http.Client;
using PaypalServerSDK.Standard.Http.Request;
using PaypalServerSDK.Standard.Http.Response;
using PaypalServerSDK.Standard.Utilities;
using PaypalServerSdk.Standard.Exceptions;
using PaypalServerSdk.Standard.Http.Client;
using PaypalServerSdk.Standard.Http.Request;
using PaypalServerSdk.Standard.Http.Response;
using PaypalServerSdk.Standard.Utilities;
using System;

namespace PaypalServerSDK.Standard.Controllers
namespace PaypalServerSdk.Standard.Controllers
{
/// <summary>
/// The base class for all controller classes.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
using APIMatic.Core.Utilities;
using APIMatic.Core.Utilities.Date.Xml;
using Newtonsoft.Json.Converters;
using PaypalServerSDK.Standard;
using PaypalServerSDK.Standard.Exceptions;
using PaypalServerSDK.Standard.Http.Client;
using PaypalServerSDK.Standard.Http.Response;
using PaypalServerSDK.Standard.Utilities;
using PaypalServerSdk.Standard;
using PaypalServerSdk.Standard.Exceptions;
using PaypalServerSdk.Standard.Http.Client;
using PaypalServerSdk.Standard.Http.Response;
using PaypalServerSdk.Standard.Utilities;
using System.Net.Http;

namespace PaypalServerSDK.Standard.Controllers
namespace PaypalServerSdk.Standard.Controllers
{
/// <summary>
/// OAuthAuthorizationController.
Expand Down
208 changes: 104 additions & 104 deletions PaypalServerSdk.Standard/Controllers/OrdersController.cs

Large diffs are not rendered by default.

186 changes: 93 additions & 93 deletions PaypalServerSdk.Standard/Controllers/PaymentsController.cs

Large diffs are not rendered by default.

136 changes: 68 additions & 68 deletions PaypalServerSdk.Standard/Controllers/VaultController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
using APIMatic.Core.Utilities;
using APIMatic.Core.Utilities.Date.Xml;
using Newtonsoft.Json.Converters;
using PaypalServerSDK.Standard;
using PaypalServerSDK.Standard.Exceptions;
using PaypalServerSDK.Standard.Http.Client;
using PaypalServerSDK.Standard.Http.Response;
using PaypalServerSDK.Standard.Utilities;
using PaypalServerSdk.Standard;
using PaypalServerSdk.Standard.Exceptions;
using PaypalServerSdk.Standard.Http.Client;
using PaypalServerSdk.Standard.Http.Response;
using PaypalServerSdk.Standard.Utilities;
using System.Net.Http;

namespace PaypalServerSDK.Standard.Controllers
namespace PaypalServerSdk.Standard.Controllers
{
/// <summary>
/// VaultController.
Expand All @@ -34,37 +34,6 @@ public class VaultController : BaseController
/// </summary>
internal VaultController(GlobalConfiguration globalConfiguration) : base(globalConfiguration) { }

/// <summary>
/// Returns a readable representation of temporarily vaulted payment source associated with the setup token id.
/// </summary>
/// <param name="id">Required parameter: ID of the setup token..</param>
/// <returns>Returns the ApiResponse of Models.SetupTokenResponse response from the API call.</returns>
public ApiResponse<Models.SetupTokenResponse> SetupTokensGet(
string id)
=> CoreHelper.RunTask(SetupTokensGetAsync(id));

/// <summary>
/// Returns a readable representation of temporarily vaulted payment source associated with the setup token id.
/// </summary>
/// <param name="id">Required parameter: ID of the setup token..</param>
/// <param name="cancellationToken"> cancellationToken. </param>
/// <returns>Returns the ApiResponse of Models.SetupTokenResponse response from the API call.</returns>
public async Task<ApiResponse<Models.SetupTokenResponse>> SetupTokensGetAsync(
string id,
CancellationToken cancellationToken = default)
=> await CreateApiCall<Models.SetupTokenResponse>()
.RequestBuilder(_requestBuilder => _requestBuilder
.Setup(HttpMethod.Get, "/v3/vault/setup-tokens/{id}")
.WithAuth("Oauth2")
.Parameters(_parameters => _parameters
.Template(_template => _template.Setup("id", id))))
.ResponseHandler(_responseHandler => _responseHandler
.ErrorCase("403", CreateErrorCase("Authorization failed due to insufficient permissions.", (_reason, _context) => new ErrorException(_reason, _context)))
.ErrorCase("404", CreateErrorCase("The specified resource does not exist.", (_reason, _context) => new ErrorException(_reason, _context)))
.ErrorCase("422", CreateErrorCase("The requested action could not be performed, semantically incorrect, or failed business validation.", (_reason, _context) => new ErrorException(_reason, _context)))
.ErrorCase("500", CreateErrorCase("An internal server error has occurred.", (_reason, _context) => new ErrorException(_reason, _context))))
.ExecuteAsync(cancellationToken).ConfigureAwait(false);

/// <summary>
/// Returns all payment tokens for a customer.
/// </summary>
Expand Down Expand Up @@ -129,35 +98,6 @@ internal VaultController(GlobalConfiguration globalConfiguration) : base(globalC
.ErrorCase("500", CreateErrorCase("An internal server error has occurred.", (_reason, _context) => new ErrorException(_reason, _context))))
.ExecuteAsync(cancellationToken).ConfigureAwait(false);

/// <summary>
/// Delete the payment token associated with the payment token id.
/// </summary>
/// <param name="id">Required parameter: ID of the payment token..</param>
public void PaymentTokensDelete(
string id)
=> CoreHelper.RunVoidTask(PaymentTokensDeleteAsync(id));

/// <summary>
/// Delete the payment token associated with the payment token id.
/// </summary>
/// <param name="id">Required parameter: ID of the payment token..</param>
/// <param name="cancellationToken"> cancellationToken. </param>
/// <returns>Returns the void response from the API call.</returns>
public async Task PaymentTokensDeleteAsync(
string id,
CancellationToken cancellationToken = default)
=> await CreateApiCall<VoidType>()
.RequestBuilder(_requestBuilder => _requestBuilder
.Setup(HttpMethod.Delete, "/v3/vault/payment-tokens/{id}")
.WithAuth("Oauth2")
.Parameters(_parameters => _parameters
.Template(_template => _template.Setup("id", id))))
.ResponseHandler(_responseHandler => _responseHandler
.ErrorCase("400", CreateErrorCase("Request is not well-formed, syntactically incorrect, or violates schema.", (_reason, _context) => new ErrorException(_reason, _context)))
.ErrorCase("403", CreateErrorCase("Authorization failed due to insufficient permissions.", (_reason, _context) => new ErrorException(_reason, _context)))
.ErrorCase("500", CreateErrorCase("An internal server error has occurred.", (_reason, _context) => new ErrorException(_reason, _context))))
.ExecuteAsync(cancellationToken).ConfigureAwait(false);

/// <summary>
/// Creates a Payment Token from the given payment source and adds it to the Vault of the associated customer.
/// </summary>
Expand All @@ -182,7 +122,7 @@ public async Task PaymentTokensDeleteAsync(
.WithAuth("Oauth2")
.Parameters(_parameters => _parameters
.Body(_bodyParameter => _bodyParameter.Setup(input.Body))
.Header(_header => _header.Setup("PayPal-Request-Id", input.PayPalRequestId))
.Header(_header => _header.Setup("PayPal-Request-Id", input.PaypalRequestId))
.Header(_header => _header.Setup("Content-Type", "application/json"))))
.ResponseHandler(_responseHandler => _responseHandler
.ErrorCase("400", CreateErrorCase("Request is not well-formed, syntactically incorrect, or violates schema.", (_reason, _context) => new ErrorException(_reason, _context)))
Expand Down Expand Up @@ -216,13 +156,73 @@ public async Task PaymentTokensDeleteAsync(
.WithAuth("Oauth2")
.Parameters(_parameters => _parameters
.Body(_bodyParameter => _bodyParameter.Setup(input.Body))
.Header(_header => _header.Setup("PayPal-Request-Id", input.PayPalRequestId))
.Header(_header => _header.Setup("PayPal-Request-Id", input.PaypalRequestId))
.Header(_header => _header.Setup("Content-Type", "application/json"))))
.ResponseHandler(_responseHandler => _responseHandler
.ErrorCase("400", CreateErrorCase("Request is not well-formed, syntactically incorrect, or violates schema.", (_reason, _context) => new ErrorException(_reason, _context)))
.ErrorCase("403", CreateErrorCase("Authorization failed due to insufficient permissions.", (_reason, _context) => new ErrorException(_reason, _context)))
.ErrorCase("422", CreateErrorCase("The requested action could not be performed, semantically incorrect, or failed business validation.", (_reason, _context) => new ErrorException(_reason, _context)))
.ErrorCase("500", CreateErrorCase("An internal server error has occurred.", (_reason, _context) => new ErrorException(_reason, _context))))
.ExecuteAsync(cancellationToken).ConfigureAwait(false);

/// <summary>
/// Delete the payment token associated with the payment token id.
/// </summary>
/// <param name="id">Required parameter: ID of the payment token..</param>
public void PaymentTokensDelete(
string id)
=> CoreHelper.RunVoidTask(PaymentTokensDeleteAsync(id));

/// <summary>
/// Delete the payment token associated with the payment token id.
/// </summary>
/// <param name="id">Required parameter: ID of the payment token..</param>
/// <param name="cancellationToken"> cancellationToken. </param>
/// <returns>Returns the void response from the API call.</returns>
public async Task PaymentTokensDeleteAsync(
string id,
CancellationToken cancellationToken = default)
=> await CreateApiCall<VoidType>()
.RequestBuilder(_requestBuilder => _requestBuilder
.Setup(HttpMethod.Delete, "/v3/vault/payment-tokens/{id}")
.WithAuth("Oauth2")
.Parameters(_parameters => _parameters
.Template(_template => _template.Setup("id", id))))
.ResponseHandler(_responseHandler => _responseHandler
.ErrorCase("400", CreateErrorCase("Request is not well-formed, syntactically incorrect, or violates schema.", (_reason, _context) => new ErrorException(_reason, _context)))
.ErrorCase("403", CreateErrorCase("Authorization failed due to insufficient permissions.", (_reason, _context) => new ErrorException(_reason, _context)))
.ErrorCase("500", CreateErrorCase("An internal server error has occurred.", (_reason, _context) => new ErrorException(_reason, _context))))
.ExecuteAsync(cancellationToken).ConfigureAwait(false);

/// <summary>
/// Returns a readable representation of temporarily vaulted payment source associated with the setup token id.
/// </summary>
/// <param name="id">Required parameter: ID of the setup token..</param>
/// <returns>Returns the ApiResponse of Models.SetupTokenResponse response from the API call.</returns>
public ApiResponse<Models.SetupTokenResponse> SetupTokensGet(
string id)
=> CoreHelper.RunTask(SetupTokensGetAsync(id));

/// <summary>
/// Returns a readable representation of temporarily vaulted payment source associated with the setup token id.
/// </summary>
/// <param name="id">Required parameter: ID of the setup token..</param>
/// <param name="cancellationToken"> cancellationToken. </param>
/// <returns>Returns the ApiResponse of Models.SetupTokenResponse response from the API call.</returns>
public async Task<ApiResponse<Models.SetupTokenResponse>> SetupTokensGetAsync(
string id,
CancellationToken cancellationToken = default)
=> await CreateApiCall<Models.SetupTokenResponse>()
.RequestBuilder(_requestBuilder => _requestBuilder
.Setup(HttpMethod.Get, "/v3/vault/setup-tokens/{id}")
.WithAuth("Oauth2")
.Parameters(_parameters => _parameters
.Template(_template => _template.Setup("id", id))))
.ResponseHandler(_responseHandler => _responseHandler
.ErrorCase("403", CreateErrorCase("Authorization failed due to insufficient permissions.", (_reason, _context) => new ErrorException(_reason, _context)))
.ErrorCase("404", CreateErrorCase("The specified resource does not exist.", (_reason, _context) => new ErrorException(_reason, _context)))
.ErrorCase("422", CreateErrorCase("The requested action could not be performed, semantically incorrect, or failed business validation.", (_reason, _context) => new ErrorException(_reason, _context)))
.ErrorCase("500", CreateErrorCase("An internal server error has occurred.", (_reason, _context) => new ErrorException(_reason, _context))))
.ExecuteAsync(cancellationToken).ConfigureAwait(false);
}
}
2 changes: 1 addition & 1 deletion PaypalServerSdk.Standard/Environment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;

namespace PaypalServerSDK.Standard
namespace PaypalServerSdk.Standard
{
/// <summary>
/// Available environments.
Expand Down
8 changes: 4 additions & 4 deletions PaypalServerSdk.Standard/Exceptions/ApiException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
// Copyright (c) APIMatic. All rights reserved.
// </copyright>
using APIMatic.Core.Types.Sdk;
using PaypalServerSDK.Standard.Http.Client;
using PaypalServerSDK.Standard.Http.Request;
using PaypalServerSDK.Standard.Http.Response;
using PaypalServerSdk.Standard.Http.Client;
using PaypalServerSdk.Standard.Http.Request;
using PaypalServerSdk.Standard.Http.Response;

namespace PaypalServerSDK.Standard.Exceptions
namespace PaypalServerSdk.Standard.Exceptions
{
/// <summary>
/// This is the base class for all exceptions that represent an error response
Expand Down
10 changes: 5 additions & 5 deletions PaypalServerSdk.Standard/Exceptions/ErrorException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
using APIMatic.Core.Utilities.Converters;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using PaypalServerSDK.Standard;
using PaypalServerSDK.Standard.Http.Client;
using PaypalServerSDK.Standard.Models;
using PaypalServerSDK.Standard.Utilities;
using PaypalServerSdk.Standard;
using PaypalServerSdk.Standard.Http.Client;
using PaypalServerSdk.Standard.Models;
using PaypalServerSdk.Standard.Utilities;

namespace PaypalServerSDK.Standard.Exceptions
namespace PaypalServerSdk.Standard.Exceptions
{
/// <summary>
/// ErrorException.
Expand Down
10 changes: 5 additions & 5 deletions PaypalServerSdk.Standard/Exceptions/OAuthProviderException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
using APIMatic.Core.Utilities.Converters;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using PaypalServerSDK.Standard;
using PaypalServerSDK.Standard.Http.Client;
using PaypalServerSDK.Standard.Models;
using PaypalServerSDK.Standard.Utilities;
using PaypalServerSdk.Standard;
using PaypalServerSdk.Standard.Http.Client;
using PaypalServerSdk.Standard.Models;
using PaypalServerSdk.Standard.Utilities;

namespace PaypalServerSDK.Standard.Exceptions
namespace PaypalServerSdk.Standard.Exceptions
{
/// <summary>
/// OAuthProviderException.
Expand Down
2 changes: 1 addition & 1 deletion PaypalServerSdk.Standard/Http/Client/FileStreamInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using System;
using System.IO;

namespace PaypalServerSDK.Standard.Http.Client
namespace PaypalServerSdk.Standard.Http.Client
{
/// <summary>
/// An DTO class to capture information for file uploads.
Expand Down
8 changes: 4 additions & 4 deletions PaypalServerSdk.Standard/Http/Client/HttpCallback.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
// <copyright file="HttpCallback.cs" company="APIMatic">
// Copyright (c) APIMatic. All rights reserved.
// </copyright>
using PaypalServerSDK.Standard.Http.Request;
using PaypalServerSDK.Standard.Http.Response;
using PaypalServerSDK.Standard.Utilities;
using PaypalServerSdk.Standard.Http.Request;
using PaypalServerSdk.Standard.Http.Response;
using PaypalServerSdk.Standard.Utilities;
using APIMatic.Core.Types;
using APIMatic.Core.Types.Sdk;

namespace PaypalServerSDK.Standard.Http.Client
namespace PaypalServerSdk.Standard.Http.Client
{
/// <summary>
/// To use for the capturing of the outgoing HTTP request and incoming Http response.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
using System.Net.Http;
using APIMatic.Core.Http.Configuration;

namespace PaypalServerSDK.Standard.Http.Client
namespace PaypalServerSdk.Standard.Http.Client
{
/// <summary>
/// HttpClientConfiguration represents the current state of the Http Client.
Expand Down
6 changes: 3 additions & 3 deletions PaypalServerSdk.Standard/Http/Client/HttpContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
// Copyright (c) APIMatic. All rights reserved.
// </copyright>
using APIMatic.Core.Types.Sdk;
using PaypalServerSDK.Standard.Http.Request;
using PaypalServerSDK.Standard.Http.Response;
using PaypalServerSdk.Standard.Http.Request;
using PaypalServerSdk.Standard.Http.Response;

namespace PaypalServerSDK.Standard.Http.Client
namespace PaypalServerSdk.Standard.Http.Client
{
/// <summary>
/// Represents the contextual information of HTTP request and response.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using System.Net.Http;
using APIMatic.Core.Http.Configuration;

namespace PaypalServerSDK.Standard.Http.Client
namespace PaypalServerSdk.Standard.Http.Client
{
/// <summary>
/// Represents the current state of the Http Client.
Expand Down
2 changes: 1 addition & 1 deletion PaypalServerSdk.Standard/Http/Request/HttpRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using System.Collections.Generic;
using APIMatic.Core.Types.Sdk;

namespace PaypalServerSDK.Standard.Http.Request
namespace PaypalServerSdk.Standard.Http.Request
{
/// <summary>
/// HttpRequest stores necessary information about the http request.
Expand Down
Loading

0 comments on commit 2ff74be

Please sign in to comment.